Skip to content

Clear the build LabVIEW's compiled object cache at the start of every CI job - #35

Merged
JanGoebel merged 2 commits into
mainfrom
ci-close-build-labview
Oct 18, 2026
Merged

JanGoebel merged 2 commits into
mainfrom
ci-close-build-labview

Conversation

@JanGoebel

@JanGoebel JanGoebel commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

After #32, four of the five pull requests built their package. #29's build failed in under five minutes with a different error:

The following source VIs or Libraries are missing.
Tool Annotations.ctl
Tool Hint.ctl
The following source VIs or Libraries are the callers of missing files
Get Tool.vi

#29 does not contain those two controls, and nothing in its tree refers to them. The job before it on the runner built #34, whose branch has them, from the same workspace path.

Get Tool.vi is byte-identical on both branches. The repository's VIs are saved source-only, so their compiled code lives in LabVIEW's compiled object cache (Documents\LabVIEW Data\VIObjCache\20.0.0r0), keyed by file path. Get Tool.vi's cache entry was compiled against #34's Tool Data.ctl, which uses Tool Annotations.ctl. Checkout did not touch the unchanged file, so that entry stayed valid for the next job.

My first commit here only closed a still-running LabVIEW. That cannot be the fix: the runner already terminates LabVIEW and VIPM at the end of every job (see "Terminate orphan process" in any job log).

Changes

  • tools/ci/Resolve-CiEnvironment.ps1, with -Fix -CleanStart (every job's first step):

    • closes the LabVIEW chosen for the tests and the build if it is still running
    • deletes that LabVIEW version's compiled object cache folder (VIObjCache\20.0.0r0 for LabVIEW 2020)
    • notes both in the job summary
    • LabVIEW rebuilds the cache from this checkout's files

    The check after the package install does not pass -CleanStart, so it keeps the LabVIEW the install just started.

Why this pull request's own checks fail

Pull request runs take tools/ci from main, not from the pull request, so a pull request cannot change how its own checks run. This pull request's test-build therefore runs the old scripts and fails with the same error as #29. That failure says nothing about the change.

The change takes effect on main for every run, reruns included.

Verified

  • The script parses.
  • The cache path it deletes matches the real folder on the development machine (C:\Users\PVE\Documents\LabVIEW Data\VIObjCache\20.0.0r0).
  • Without -Fix the new code does not run; the read-only run gives an unchanged result.

Not verified

  • On the runner, which is the only place this can be tested.

Cost

Each job compiles the VIs once more, because the cache starts empty. That adds some time to the review and build jobs.

Maintainer steps

  1. Merge.
  2. Rerun only the failed test-build job of Show every case frame of changed VIs in the detailed diff report #29. That is the test.
  3. Rerun this pull request's test-build too if you want it green; it will then use the merged scripts.

🤖 Generated with Claude Code

#29's package build failed with "The following source VIs or Libraries
are missing: Tool Annotations.ctl, Tool Hint.ctl", files #29 does not
have. The job before it built #34, whose branch has them, in the same
workspace path, and LabVIEW 2020 was still running with that job's
MCP Server.lvlib in memory. The clean start only ended LabVIEW when a
leftover VIPM Desktop was found.

With -Fix -CleanStart (the first step of every job) the resolver now
also closes the LabVIEW chosen for the tests and the build if it is
running, and says so in the job summary. LabVIEW CLI and VIPM start it
again with this checkout's files. The check after the package install
does not pass -CleanStart and keeps what the install started.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Tests

✅ All 50 tests passed.

Per-test results
Test VI Result Checks
Test 1: Initialize Test Initialize.vi ✅ pass Assert True: pass
Test 2: Initialized Test Initialized.vi ✅ pass Assert True: pass
Test 3: tools/list Test tools list.vi ✅ pass Assert True: pass
Test 4: prompts/list test prompts list.vi ✅ pass Assert True: pass
Test 5: resources/list test resources list.vi ✅ pass Assert True: pass
Test 6: tools call test tools call.vi ✅ pass Assert True: pass
Test 7: empty JSON object is an invalid request test empty msg.vi ✅ pass Assert True: pass
Test 8: call broken tool test broken tool.vi ✅ pass Assert True: pass
Test 6: tools call test tools call array.vi ✅ pass Assert True: pass
Test 9: GET is rejected with 405 test http get rejected.vi ✅ pass GET -> 405 with Allow: POST and error -32600: pass
Test 10: Origin validation test http origin.vi ✅ pass Origin http://evil.example -> 403 with error -32600: pass
Origin http://localhost:6274 -> 200 with result: pass
Test 11: MCP-Protocol-Version validation test http protocol version.vi ✅ pass MCP-Protocol-Version 1999-01-01 -> 400 with error -32600: pass
MCP-Protocol-Version 2025-06-18 -> 200 with result: pass
Test 12: notification answered with 202 test notification accepted.vi ✅ pass notifications/initialized -> 202 with empty body: pass
Test 13: request with id answered with 200 test request status.vi ✅ pass tools/list with id 1 -> 200 with result and id 1: pass
Test 14: unknown method test unknown method.vi ✅ pass does/not/exist with id 5 -> 200 with error -32601 and id 5: pass
Test 15: unknown notification test unknown notification.vi ✅ pass notifications/cancelled -> 202 with empty body: pass
Test 16: ping test ping.vi ✅ pass ping with id 3 -> 200 with result {} and id 3: pass
Test 17: string request id test string id.vi ✅ pass tools/list with id "abc-1" -> 200 with result and id "abc-1": pass
Test 18: unknown prompt test unknown prompt.vi ✅ pass prompts/get no-such-prompt with id 7 -> JSON-RPC error -32602 with id 7, no status/source: pass
Test 19: unknown resource test unknown resource.vi ✅ pass resources/read of an unknown uri with id 8 -> JSON-RPC error -32002 with id 8, no status/source: pass
Test 20: resources/read returns UTF-8 text unchanged test resource text utf8.vi ✅ pass text of labview://fixture_utf8 decodes to the bytes of fixture_utf8.txt: pass
Test 21: resources/read returns a binary file as Base64 test resource blob.vi ✅ pass blob of labview://fixture_binary is the Base64 of the bytes of fixture_binary.png: pass
Test 22: unknown tool test unknown tool.vi ✅ pass tools/call no_such_tool -> error -32602 with message Unknown tool: no_such_tool and id 22: pass
Test 23: tools/call with arguments that are not an object test tool call without arguments.vi ✅ pass tools/call fake_tool_add with arguments 5 -> error -32602 with message Invalid arguments... and id 23: pass
Test 24: broken tool is a tool execution error test broken tool message.vi ✅ pass tools/call fake_tool_broken_vi -> result with isError true and a text that says not executable: pass
Test 25: prompts/get without arguments test prompt without arguments.vi ✅ pass prompts/get fake_prompt_concatanate_strings without arguments -> result with messages: pass
Test 26: request without method test request without method.vi ✅ pass a message with id 26 and no method -> error -32600 with id 26: pass
Test 27: malformed JSON test malformed json.vi ✅ pass truncated JSON -> error -32700 with id null: pass
Test 28: array inputs say what their items are test tools list array items.vi ✅ pass fake_tool_arrays: pass
Test 29: protocol version negotiation test protocol version negotiation.vi ✅ pass initialize asking for 2024-11-05 -> protocolVersion 2024-11-05: pass
initialize asking for 1999-01-01 -> protocolVersion 2025-06-18: pass
Test 30: resources/templates/list test resource templates list.vi ✅ pass resources/templates/list -> result with resourceTemplates []: pass
Test 31: tools/call without arguments test tool call default arguments.vi ✅ pass tools/call fake_tool_add without arguments -> result with the sum 0, no error, id 31: pass
Test 32: a tool that returns an error sets isError test tool error result.vi ✅ pass fake_tool_return_error with status true -> result with isError true, code and source still in the content: pass
fake_tool_return_error with status false -> result without isError: pass
Test 33: internal errors show no LabVIEW internals test internal error message.vi ✅ pass prompts/get fake_prompt_broken_vi -> error -32603 with a message without call chain, markup, tags or path: pass
Test 34: prompts/list says which arguments are required test prompts list required.vi ✅ pass fake_prompt_required_argument: pass
Test 35: prompts/get checks required arguments test prompt required argument.vi ✅ pass prompts/get fake_prompt_required_argument without topic -> error -32602 that names topic, id 36: pass
prompts/get fake_prompt_required_argument with topic -> result whose text contains both argument values: pass
Test 36: JSON-RPC batch test batch.vi ✅ pass batch of ping (id 38), a notification and tools/list (id b) -> 200 with an array of two answers in that order: pass
batch of two notifications -> 202 with empty body: pass
empty batch -> error -32600 with id null: pass
Test 37: a JSON value that is not an object test non object message.vi ✅ pass body 5 -> error -32600 with id null: pass
body "text" -> error -32600 with id null: pass
body null -> error -32600 with id null: pass
Test 38: tools/call checks required arguments test tool required arguments.vi ✅ pass tools/call fake_tool_required_input without arguments -> error -32602 Missing required argument(s): b, a (the order of inputSchema.required), no result, id 40: pass
tools/call fake_tool_required_input with arguments {} -> error -32602 naming b and a, no result, id 41: pass
tools/call fake_tool_required_input with only a -> error -32602 naming only b, no result, id 42: pass
tools/call fake_tool_required_input with a 2 and b 3 -> result 6, no error, id 43: pass
Test 39: initialize with an unknown protocol version test protocol version fallback.vi ✅ pass initialize asking for 1999-01-01 -> protocolVersion is the first entry of Supported Protocol Versions.vi: pass
Test 40: initialize reports the LabVIEW version test labview version.vi ✅ pass initialize -> serverInfo.additionalDetails.labviewVersion equals the Version Number of this LabVIEW: pass
Test 41: tools/list shows the MCP names of special labels test tools list mcp names.vi ✅ pass tools/list fake_tool_special_labels -> Length (mm) and Factor #1 & 50% are listed as length__mm_ and factor__1___50_ in properties and in required, id 44: pass
tools/list fake_tool_special_labels -> every name in properties and required matches ^[a-zA-Z0-9_-]{1,64}$: pass
Test 42: tools/call reaches special labels by their MCP names test tools call mcp names.vi ✅ pass tools/call fake_tool_special_labels with length__mm_ 2.5 and factor__1___50_ 4 -> result {"result__mm_":10}, no error, id 45: pass
Test 43: Add Tool refuses inputs whose MCP names clash test add tool name clash.vi ✅ pass Add Tool fake tool name clash.vi with the inputs a b and a_b -> error 5010 naming both controls and the MCP name a_b: pass
tools/list after the refused Add Tool -> fake_tool_name_clash is not listed, id 46: pass
Test 44: Add Prompt refuses arguments whose MCP names clash test add prompt name clash.vi ✅ pass Add Prompt fake prompt name clash.vi with the arguments a b and a_b -> error 5010 naming both controls and the MCP name a_b: pass
prompts/list after the refused Add Prompt -> fake_prompt_name_clash is not listed, id 47: pass
Test 45: 3D arrays and arrays of paths, enums and clusters say what their items are test tools list array shapes.vi ✅ pass fake_tool_array_shapes: pass
fake_tool_array_shapes: pass
fake_tool_array_shapes: pass
fake_tool_array_shapes: pass
Test 46: timestamps, clusters and types without a JSON type are described in tools/list test tools list schema details.vi ✅ pass fake_tool_array_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_array_shapes: pass
Test 47: tools/call converts timestamps, clusters, enums and 2D and 3D arrays test tools call schema shapes.vi ✅ pass fake_tool_array_shapes with a 3D array [[[1,2],[3,4]],[[5,6],[7,8]]] -> no isError, the tool gets all 8 elements: pass
fake_tool_schema_shapes with timestamp 2026-10-17T12:34:56Z -> no isError, time out 2026-10-17T12:34:56.000Z: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
Test 48: every array schema in tools/list says what its items are test tools list every array has items.vi ✅ pass tools/list of the test server: pass
Test 49: tools/list gives element descriptions, integer ranges, data entry limits, units and defaults test tools list descriptions defaults ranges.vi ✅ pass fake_tool_schema_shapes: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass

Protocol tests

✅ Test-McpServer.ps1 passed against the test server.

Protocol tester output (0 failed required checks)
Testing MCP server at http://127.0.0.1:36987/mcp/server

[PASS] (required) Lifecycle - initialize answers 200 with a JSON result
[PASS] (required) Lifecycle - initialize answer is JSON-RPC 2.0 with the request id
[PASS] (required) Lifecycle - initialize result has protocolVersion, capabilities and serverInfo.name
[PASS] (required) Lifecycle - Content-Type of the answer is application/json
[PASS] (advisory) Lifecycle - a client asking for 2024-11-05 gets that version back
[PASS] (required) Lifecycle - notifications/initialized is accepted with 202 and no body
[PASS] (required) Transport - GET answers 405 or opens an event stream
[PASS] (advisory) Transport - 405 answer names the allowed method in an Allow header
[PASS] (required) Transport - a request from a foreign Origin is rejected (403)
[PASS] (required) Transport - a request from a localhost Origin is accepted
[PASS] (required) Transport - an unsupported MCP-Protocol-Version header is rejected (400)
[PASS] (required) Transport - the negotiated MCP-Protocol-Version header is accepted
[PASS] (required) JSON-RPC - ping is answered with an empty result
[PASS] (required) JSON-RPC - an unknown method gets error -32601 with the request id
[PASS] (required) JSON-RPC - an unknown notification is not answered
[PASS] (required) JSON-RPC - a string request id is returned unchanged
[PASS] (required) JSON-RPC - malformed JSON gets error -32700
[PASS] (advisory) JSON-RPC - a request without a method gets error -32600
[PASS] (required) Tools - tools/list returns a tools array
[PASS] (required) Tools - every tool has a name and an inputSchema of type object (1 tools)
[PASS] (advisory) Tools - array parameters say what their items are
[PASS] (required) Tools - calling an unknown tool is answered with an error
[PASS] (required) Prompts - prompts/list returns a prompts array
[PASS] (required) Prompts - every prompt has a name (1 prompts)
[PASS] (required) Prompts - getting an unknown prompt is answered with an error
[PASS] (required) Resources - resources/list returns a resources array
[PASS] (required) Resources - every resource has a uri and a name (2 resources)
[PASS] (required) Resources - reading an unknown resource is answered with an error
[PASS] (advisory) Resources - resources/templates/list returns a resourceTemplates array

Required: 24 of 24 passed. Advisory: 0 failed.

VI diff report

No VI, VIM or CTL files changed in this pull request.

Report for commit 2dc3cfc. The installable test package is under Artifacts of this run once the build job has finished.

Closing LabVIEW alone does not explain or fix #29's failure: the runner
already terminates LabVIEW and VIPM at the end of every job. The error
names Get Tool.vi as the caller of the missing Tool Annotations.ctl and
Tool Hint.ctl, and Get Tool.vi is identical on #29 and #34. The
repository's VIs are saved source-only, so their compiled code lives in
LabVIEW's compiled object cache, keyed by file path; Get Tool.vi's entry
was compiled against #34's Tool Data.ctl and stayed valid because the
checkout did not change the file.

With -Fix -CleanStart the resolver now also deletes the cache folder of
the test/build LabVIEW's version (Documents\LabVIEW Data\VIObjCache\
20.0.0r0 for LabVIEW 2020), after closing that LabVIEW, and notes it in
the job summary. LabVIEW rebuilds it from this checkout's files, at the
cost of compiling the VIs once per job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JanGoebel JanGoebel changed the title Close the build LabVIEW at the start of every CI job Clear the build LabVIEW's compiled object cache at the start of every CI job Oct 18, 2026
@JanGoebel

Copy link
Copy Markdown
Owner Author

Update (2dc3cfc): the first commit's diagnosis was wrong. The runner already ends LabVIEW after every job. The cause is LabVIEW's compiled object cache, which keeps Get Tool.vi compiled against #34's typedefs. The clean start now also deletes that cache. This pull request's own checks keep failing until it is merged, because pull request runs use main's tools/ci.

@JanGoebel
JanGoebel merged commit 9cd24d3 into main Oct 18, 2026
1 of 2 checks passed
@JanGoebel

Copy link
Copy Markdown
Owner Author

Verified on the runner after merging: #29's fresh run (39174605466) passed review and test-build. Both jobs' summaries show "Deleted the compiled object cache …\VIObjCache\20.0.0r0", and the package built in about 25 minutes.

JanGoebel pushed a commit that referenced this pull request Oct 18, 2026
PR #30 was merged into main; this brings main's CI and diff-report
changes (#29, #35) into the branch. The toolkit and test files that both
branches touched are PR #30's final versions on main, which this branch
already builds on, so the branch's versions are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants