fix: three defects the v0.31.0 release audit found in v0.30.0's own delta (#1372) - #1377
Merged
Conversation
…elta (#1372) Gate 3 round one, dispatch token gate3-r1-4f2a9c7e1b83, over v0.30.0..HEAD: 4 findings, none in a blocking row, DISPOSITION: stop-tag. Three were defects introduced by that same delta; the fourth is the missing control for one of them. 1. statusline._trap_count vs trap_curate.OWNED_README. #1348 excluded the scaffolded README from one counter and not the other, and _trap_count's own docstring asserts the parity that was now false. Reproduced: 16 against 17 on this repository. A maintainer saw `trap 1` on a fully drained trap.d/, with no fragment left to delete that would clear it, while doctor's own trap-queue check said `none waiting` in the same run. statusline.py is vendored standalone and cannot import trap_curate, so the literal is duplicated knowingly -- and the two counters are now compared directly by a test rather than by a docstring claiming they match. 2. OSS_WORKSPACE_MCP_LIST_OUTPUT was read with no sentinel. A forged or inherited variable answered `connected` on a machine with no claude binary. #1344 had hardened the sibling relay against exactly this, in those words, one check over -- and this relay shipped in the same delta with none of the three guards its two siblings carry. Adds OSS_WORKSPACE_MCP_LIST_CHECKED=1 on both sides, matching #629 and #810. 3. The census counted a plugin-declared consumer the harness does not have live. #1361's declared-but-not-live arm registers oss-channel BECAUSE that consumer is dead; the census then counted both, answered collision, and disarmed the channel flag -- #1361's own zero-consumer state, one layer inside the fix for it, plus a stale registration colliding on every launch after. _drop_dead_plugin_consumers drops only a transport positively read as failed: could-not-ask, not-listed and connected all keep the server counted, because an unread answer is not evidence a consumer is dead and dropping one on that basis would hide a real collision. 4. The declared-but-not-live shell arm had no test at all -- two hits in the tree, both in bin/oss-workspace, none under tests/. Adds a coupling check over the emitter's line order and the reader's sed offsets, stated as a coupling check rather than an execution of the launcher. #1361's own relay fixture asserted the value alone was enough, which is the hole finding 2 names; updated rather than weakened. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GAMumWmudgzrPR4HmeeG7w
…ect (#1372) ruff's F401 was right about the letter and wrong about the intent: `import doctor` binds no name this file uses, so it reads as dead -- and removing it raises `ImportError ... most likely due to a circular import`, because doctor.py imports names back out of the two modules under test. Silenced with the reason stated, rather than by reflex or by deleting a load-bearing line to make a linter quiet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GAMumWmudgzrPR4HmeeG7w
fdaviddpt
added a commit
that referenced
this pull request
Sep 9, 2026
Gates, in the order they ran: 1. Default branch green at leg level for f07bf24 -- and NOT from the push run alone. This repository reduces its push/pull_request matrix and reserves all twelve OS x Python legs for workflow_dispatch with full_matrix: true (#1246), so gate 1 dispatched that wider run: 34380226158, 14 legs, conclusion=success. `changelog` is pull_request-only and produced no run on this commit -- it gated every PR in the delta before each merged, so it is unrepeated at the tag rather than unchecked. 2. Nothing in flight: `gh-prs` returned no open pull requests. 3. Security audit, two formal rounds, the hard cap. Round one (gate3-r1-4f2a9c7e1b83) found 4 findings, none blocking, DISPOSITION stop-tag -- all four defects that had shipped in this same delta, three of them past a per-PR review and a green CI run, two of them compositions of two commits each that neither commit's own diff contains. Fixed as #1377, filed as #1376. Round two (gate3-r2-9d13ba60c4f7) re-derived at 492cb1c and found 6, none blocking; DISPOSITION carry-forward-and-proceed, filed as #1378. The sixth arrived `unranked` and was ranked here, by hand, as fails-to-preserve -- a decision on record rather than a column read. 4. Version sites swept unfiltered for the new number: plugin.json, README.md, skills/manager/SKILL.md, CHANGELOG.md all at 0.31.0, none left at 0.30.0. Version 0.31.0 read from release_version.py, not chosen: minor, feature class, 13 fragments (2 added, 11 fixed), baseline 0.30.0 from tag. Delta taken two ways that agree: 13 commits by git rev-list, 11 merged pull requests by the forge, and the two-commit gap is direct pushes carrying no trailing (#N), named by the op rather than inferred. CLAUDE.md's marker re-derived inside this commit, citing cohort-27 at 12 -- already frozen at v0.30.0's tag, per #1122's rule that this release's own cohort does not exist yet at this point. cohort_citation_order.py --at <now> returned ok. One trap.d fragment records a test defect the release found rather than the audit: tests/test_cohort_citation_order_1220.py's real-file check is green on every CI leg because .max/ is gitignored, so its subject is absent there, and red on any maintainer machine because its `at` is a wall-clock constant. Not adjusted to make this commit pass -- the gate the release actually specifies answered ok, and tuning a test the release commit needs green is the shape this repository refuses. Authority: release.authority is `loop`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GAMumWmudgzrPR4HmeeG7w
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.
Closes #1376.
Gate 3 round one for v0.31.0 -- range
v0.30.0..HEAD, dispatch tokengate3-r1-4f2a9c7e1b83, 4 findings, none in a blocking row,DISPOSITION: stop-tag. Three of the four are defects that shipped in that same delta; the fourth is the missing control for one of them. The release is blocked on this landing.Two of the three are compositions of two commits each, and neither commit's own diff contains the defect. A per-PR review cannot see either; only an audit over the whole delta can. That is the argument for gate 3 existing, restated by it catching three things in one pass.
1. Two trap counters disagree by one, permanently
#1348 excluded
trap.d/README.mdfromtrap_curate.waiting().statusline._trap_countwas not touched, and its docstring asserts the parity that became false. Reproduced on this repository: 16 against 17.The harm is not the number. A fully drained
trap.d/-- the healthy end state -- renderstrap 1forever, with no fragment left to delete that would clear it, whiledoctor.py's own trap-queue check saysnone waitingin the same run.statusline.pyis vendored standalone into managed repos and cannot importtrap_curate, so the literal is duplicated knowingly and the docstring now says so. What changed is that the two counters are compared by a test rather than by a docstring claiming they match.2. A new relay read with no sentinel
OSS_WORKSPACE_MCP_LIST_OUTPUTwas read on its own, so a stale, inherited or forged variable reported the consumer live on a machine with noclaudebinary. #1344 hardened the sibling relay against exactly this in the same delta and said why; this one shipped with none of the three guards its two siblings carry. AddsOSS_WORKSPACE_MCP_LIST_CHECKED=1on both sides, matching #629 and #810, and unsets it beforeexecalongside them.3. The repair reproduced the bug it repairs
bin/oss-workspace'sdeclared-but-not-livearm registersoss-channelbecause the plugin-declared consumer is dead. The census then counted both -- its plugin half reads.mcp.jsondeclarations with no liveness check anywhere in it -- answeredcollision, and setchannel_ready=0. The session opens with no channel flag: #1361's own zero-consumer state, one layer inside the fix for it, plus anoss-channelregistration colliding on every launch afterwards._drop_dead_plugin_consumersdrops only a transport positively read asfailed.could-not-ask,not-listedandconnectedall keep the server counted, because an unread answer is not evidence a consumer is dead, and dropping one on that basis would hide a real collision -- the opposite failure, and the worse of the two, since this census is what stops two servers racing one socket.Its default
arm_target_livenessis imported inside the function, not at module scope, becausedoctor_check_mcp_channel_connectionimports names back out of this module.4. The new shell arm had no control
grep -rn "declared-but-not-live" .returned two hits, both inbin/oss-workspace, none undertests/. Adds a coupling check over the emitter's line order and the reader'ssedoffsets -- stated as a coupling check, not an execution of the launcher, which it cannot be and does not claim to be -- plus a positive control that the arm actually blanks the target it just found dead.Red, then green
Each fix's test written first. 4 failed / 1 passed before, then 7 passed; 140 passed across every guard these four files touch (
test_workspace_channel_census_810,test_plugin_channel_consumer_census_1241,test_workspace_plugin_channel_arm_1307,test_workspace_channel_arm_1343,test_doctor_channel_connection_1361,test_statusline_479,test_trap_curate_905,test_trap_curate_owned_readme_1348).#1361's own relay fixture asserted the value alone was enough -- which is precisely the hole finding 2 names. Updated to carry the sentinel rather than weakening the new guard to keep an old fixture green.
Not fixed here
The ranking table has no row for finding 3's shape: two individually-correct decisions composing to a disabled feature. The auditor ranked it
unrankedand reasoned through why none ofmisreports,misdirectsorfails-to-preservefits. That is a gap in the table, and it stays open on #1376.🤖 Generated with Claude Code
https://claude.ai/code/session_01GAMumWmudgzrPR4HmeeG7w
[AI-generated]