Repository navigation
base red: toolpack MCP launchers take their secret store from main, so toolpack_mcp passes on macOS - #28898
Conversation
…ain passes (toolpack_mcp red on macOS)
enabling_a_pack_adds_its_skills_and_servers_and_disabling_removes_them has
been red on every macOS run since 2026-10-24: the test wrote the Acme token
to a FileStore and ran the optchat-chief binary, whose `pack mcp` took the
store from toolpacks::store(), the login keychain on macOS
("secret:acme: this Chief has no Acme token"; tests/toolpack_mcp.rs:219).
serve_mcp and mcp_headers now take the store (StoreOf) and serve_mcp its
input and output as parameters; main, the composition root, passes the
Chief home's toolpacks::store and the process's stdin and stdout, so the
binary behaves as before. The test calls serve_mcp in-process with the
FileStore it wrote. No settable or static hook.
Red before: fleet optchat-chief runs at feat 038bf00 (step
32985ab9d258616a8e4bcaaf, aws-m4pro-4) and at 3c94857 (step
52751e3eef0eaaade0c87d33).
|
Base-red check at feat 038bf00, the optchat-chief mode, 5 runs: All 5 runs fail the same 3 tests, each on its own assertion, with 1 failed test in each failed binary. No other test fails. Clippy and fmt pass in every run.
|
|
Review (claude-opus independent reviewer): SHIP at 5ce1432 Correctness:
Non-blocking follow-ups:
Not run by this reviewer: no build or test (read only). |
…t passes its store to serve_mcp 0434546 added OPTCHAT_CHIEF_TEST_FILE_SECRETS so the spawned launcher read the file store on macOS. After the merge of feat, the test calls serve_mcp in-process with its own FileStore, so nothing sets the variable. The seam was the only env-read path to a file store in toolpacks::store.
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
|
Review (claude-refresh-review): SHIP at 299cd21 Compile: fleet job Checks read (
What I read: Findings
Before ready-to-land (description, not code): the PR body is stale after the merges. Feat already fixed this red with the seam (6b047a9, 0434546, which landed today through the safe-push train with no PR number), and this PR now deletes that seam and replaces feat's version of the test. Please add a take-back line, for example |
|
macOS run at head 299cd21 (agent a2912dc77d91aa151): fleet step
Classification: base finding, not this PR. That test fails on every macOS base since 2026-10-29 (5 of 5 runs on 4 hosts, CSSMERR_TP_CERT_EXPIRED: the Xcode clang test fixture has an expired leaf). Open fixes: #29072 and #29362. This PR does not change that test or the code it checks (its diff is only |
Summary
Base red on macOS:
enabling_a_pack_adds_its_skills_and_servers_and_disabling_removes_them(Native/OptChat/optchat-chief/tests/toolpack_mcp.rs:219) fails on every macOS optchat-chief run since 2026-10-24 withsecret:acme: this Chief has no Acme token. Linux CI passes it.Cause: the test writes the token to a
FileStoreand then runs theoptchat-chief pack mcpbinary. The binary gets its store fromtoolpacks::store(), which on macOS is the login keychain (b4db5e6), so the binary never sees the token that the test wrote.Fix: the store is passed at construction, with no settable or static hook.
serve_mcpandmcp_headerstake the store as a parameter (StoreOf), andserve_mcpalso takes its input and output.mainis the composition root. It passestoolpacks::storeof the Chief home and the process's stdin and stdout, so the binary works as before.serve_mcpin-process with theFileStorethat it wrote. It still checks the same things: the secret reaches the server,tools/listis filtered, and a call to a tool that is not allowed is refused.Takes back 0434546: feat fixed the same macOS red on 2026-10-31 with a debug-build env seam (
OPTCHAT_CHIEF_TEST_FILE_SECRETSintoolpacks::store, test side 6b047a9). After the merge of feat, this PR keeps its own fix (the test passes itsFileStoretoserve_mcp), so nothing sets the variable. e854cfd deletes the seam, so no build reads a pack secret from a file because of an environment variable.Testing
Focused command (fleet, macOS):
toolpack_mcp.rs:2195 of 5 (steps32985ab9,3cfdf956,367d52bc,aa89890f,7d878a1don aws-m4pro-3, -4, -6 and -8), and so does 3c94857 (step52751e3eef0eaaade0c87d33).101a2610ff026c4b726fd613(aws-m4pro-3):enabling_a_pack_adds_its_skills_and_servers_and_disabling_removes_them ... ok; clippy and fmt pass. The step stays red only on the two base reds outside this PR,eval_upsell.rs:37(base red: eval_upsell expects the Plus plan that d3340c16ef9 added to the paid-plans skill #28888) andacpmux_peer_moved.rs:187(expired certificate on every host, in followups).Observed / Not run
Refresh (merge of feat 19807ed, head 299cd21): fleet compile e477880e8bcb8a6d13b83850 passed (CmuxNext, app, cmux-tui). The Linux PR check
Native/OptChat/optchat-chiefpassed clippy andcargo testat this head (toolpack_mcp2 of 2). macOS at this head: fleet stepc7ffd26ee150722f5b3191f9(aws-m4pro-7) passedenabling_a_pack_adds_its_skills_and_servers_and_disabling_removes_them, clippy and fmt; the step is red only on the base redacpmux_peer_moved.rs:187(expired clang fixture certificate; fixes #29072, #29362).Observed:
prepush-gate.pyfound no new violations. The pinned rustfmt formatted the three files.Not run: no live check of a stdio MCP pack in a running Chief.
Changelog
none