Skip to content

refactor(console): remove the unused runtime-version constants, derive the pin instead - #198

Merged
amaudruz merged 1 commit into
mainfrom
docs/agent-runtime-pin-drift
Aug 11, 2026
Merged

refactor(console): remove the unused runtime-version constants, derive the pin instead#198
amaudruz merged 1 commit into
mainfrom
docs/agent-runtime-pin-drift

Conversation

@amaudruz

@amaudruz amaudruz commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

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 (and SWITCH_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.json files and judges them against packages/switch-agent-runtime/package.json:

  1. both connectors pin the same package and version;
  2. that package is the one this repo publishes;
  3. the version does not run ahead of 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:

Mutation Result
Bump the Codex pin alone ✅ fails
Point both pins at @sandbox-quantum ✅ fails
Pin 0.9.9 against a 0.2.0 package ✅ fails
Restored ✅ 10 passed

🤖 Generated with Claude Code

@amaudruz amaudruz changed the title docs(console): correct what the agent-runtime version pins actually are refactor(console): remove the unused runtime-version constants, derive the pin instead Aug 11, 2026
@amaudruz
amaudruz force-pushed the docs/agent-runtime-pin-drift branch 2 times, most recently from 3d77f9a to 2c5cc0c Compare August 11, 2026 09:34
…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
amaudruz force-pushed the docs/agent-runtime-pin-drift branch from 2c5cc0c to 8f73bf0 Compare August 11, 2026 09:37
@amaudruz
amaudruz merged commit 62e9ed4 into main Aug 11, 2026
9 checks passed
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>
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.

1 participant