refactor(console): remove the unused runtime-version constants, derive the pin instead - #198
Merged
Merged
Conversation
amaudruz
force-pushed
the
docs/agent-runtime-pin-drift
branch
2 times, most recently
from
August 11, 2026 09:34
3d77f9a to
2c5cc0c
Compare
…ests `SWITCH_AGENT_RUNTIME_VERSION` and `SWITCH_AGENT_RUNTIME_PACKAGE` had no consumer outside the test that asserted against them. Nothing in the app spawns the runtime — each connector plugin registers it from its own bundled `.mcp.json` — so the constants were a third copy of a version whose only job was to be compared with the two real ones, and a third thing to bump on every release. The tests that tied the connector pins to `package.json` go with them. The two numbers are free to diverge: a pin names a version that is published, `package.json` names the one being prepared, and how far apart they sit is a release decision rather than an invariant. Asserting a fixed relationship made a deliberate gap read as a defect. Three claims in the versioned-artifacts table went with the constants, having drifted from the code and compounded into a launch path that does not exist: the Codex plugin ships a bundled `.mcp.json` as well as the skill, both connectors pin the version rather than only Claude's, and the constant was not something the Codex profile used. Keeping the pins coherent is a review concern now, and the table says so rather than pointing at a test. The publish workflow's closing message named the constant as one of three pins; there are two. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
amaudruz
force-pushed
the
docs/agent-runtime-pin-drift
branch
from
August 11, 2026 09:37
2c5cc0c to
8f73bf0
Compare
amaudruz
added a commit
that referenced
this pull request
Aug 12, 2026
- Linux arm64 desktop artifacts, built + published alongside x64 (#202) - Windows x64 releases, built + published unsigned (CHOO-1468, #204) - Codex session runtime version derives from the artifact registry; drop the SWITCH_AGENT_RUNTIME_VERSION constant + parity test (#198) Version mirrored in artifacts.yaml; derived modules regenerated; artifacts-check passes. No contract revisions changed. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while working on CHOO-2021. Not part of that ticket's scope — opened separately at Louis's request.
Two commits: the docs correction, then the removal it made obvious.
The finding
SWITCH_AGENT_RUNTIME_VERSION(andSWITCH_AGENT_RUNTIME_PACKAGE) had no consumer anywhere outside the test that asserted against them. Nothing in the app spawns the runtime — each connector plugin registers it from its own bundled.mcp.json. So the constants were a third copy of a version whose only purpose was to be compared against the two real ones, plus a third thing to remember to bump on every release.They were also actively misleading. Described as pins, they read as something sessions launch from — so a stale value looked like a live outage rather than a red test. That is exactly how they were misread during CHOO-2021, which is what prompted this.
The change
The test now reads the pin out of both
.mcp.jsonfiles and judges them againstpackages/switch-agent-runtime/package.json:package.json(behind is a staged release; ahead is broken).Assertion 2 is new. It is the one that would have caught a scope change landing on the package but not on the configs that fetch it — precisely the failure CHOO-2021 could have shipped.
Net: one less release step, one less thing that can go stale, and a strictly stronger check.
Also fixed
console/AGENTS.md(three claims that had drifted — see the first commit) and the publish workflow's closing message, which told you to bump "three pins."Verification
Typecheck, lint, format clean. Full suite green: 2401 desktop tests plus core/plugins/shared/runtime.
The new assertions were mutation-tested rather than assumed — each invariant was deliberately broken and confirmed to fail, then restored:
@sandbox-quantum0.9.9against a0.2.0package🤖 Generated with Claude Code