Skip to content

fix(rpc): bump practice writer protocol to runtime-rpc v2 (#328 P2) - #350

Merged
Ancienttwo merged 1 commit into
mainfrom
codex/runtime-rpc-v2
Oct 14, 2026
Merged

Ancienttwo merged 1 commit into
mainfrom
codex/runtime-rpc-v2

Conversation

@Ancienttwo

Copy link
Copy Markdown
Owner

After #348 replaced the runtime RPC checkpoint method with practiceCheckpoint, both peers still advertised archcontext.runtime-rpc/v1. A new client could therefore treat an old daemon as compatible and miss the upgrade diagnosis. This independent follow-up closes the post-#348 RPC P2; refs #328.

The active protocol is now archcontext.runtime-rpc/v2, aligned across the current product manifest, schema, valid fixture, and fast hook. Header and body mismatches return HTTP 426 with the existing exact error string, expected/received versions, and archctx daemon upgrade. The hook keeps its existing fail-open contract and reports the version mismatch in its message. Connection format version: 1 and package/product release versions remain unchanged.

Regression coverage:

  • v1 → v2 header and header-less body rejection, and v2 → frozen-v1 peer rejection with the CLI reporting rpc-version-mismatch and received=v1.
  • Discovery leaves connection/lock bytes unchanged. A live frozen-v1 transport peer is replaced by PID/SIGTERM through the real CLI upgrade flow, producing a healthy v2 connection without a legacy RPC shutdown call.
  • Rejected prepare and practiceCheckpoint calls leave the real practice baseline, every SQLite table, database/WAL bytes, and session rows unchanged; openSession and baseline/session writes remain at zero.
  • Normal v2 health and explicit practice writer calls succeed; legacy RPC checkpoint remains rejected without dispatch.

Validation: focused pre-change tests fail on the v1 constant/400 response; final related suites pass with 515 pass, 1 existing platform-conditional skip, 0 fail across 12 files. bun run typecheck, node scripts/package-boundary-audit.mjs, git diff --check, and node scripts/packaged-cli-smoke.mjs pass. File-backed plan received Claude read-only approval before implementation.

Scope: RPC P2 only; no U4/#349 main.ts or scanner changes, D5–D7, release, aliases, historical evidence, or prior PR/comment rewrites. Keep Draft; no merge/deploy.

@Ancienttwo
Ancienttwo marked this pull request as ready for review October 14, 2026 10:03
@Ancienttwo
Ancienttwo merged commit 0ec2986 into main Oct 14, 2026
12 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T10:07:43.215848Z 401d2b3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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