Skip to content

v1.91.123.0 fix(cso): comprehensive verify can patch read-only snapshots and accepts runtime-plan's profile - #3240

Merged
capy-ai[bot] merged 4 commits into
mainfrom
cso-verify-repair-path
Oct 17, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
cso-verify-repair-path

Conversation

@garrytan

Copy link
Copy Markdown
Owner

In the first full paid /cso runtime qualification (evaluator run 38995081113, gstack e23f7b8), repairs never ran. Across 42 comprehensive cells the agent recorded 148 repair reviews, but no report has a verification-attempt event, and heldOutRepairEachStack scored 0/24 on every runtime row. Two stacked helper bugs caused it.

Read-only snapshot files. preparePatchedSource (lib/cso/verification.ts) copies the snapshot, including its 0444 file modes, and then writes the patched file in place. For a non-root producer, which is how the evaluator and real users run, that write fails with EACCES. The CLI's catch-all then reports it as the generic "unexpected or unsafe input" error. The helper now makes an existing file owner-writable for the write and restores the original mode afterwards.

Runtime profile alias. runtime-plan returned the stack alias (node), and the skill tells the agent to copy that value into the verification request. Repair-bundle validation, however, requires the qualified runtime ID (node-24.4.0-amd64), so verify would still have failed once the first bug was fixed. Now runtime-plan returns the full ID whenever the runtime catalog resolves one. verify rejects any other profile with an INVALID_ARGUMENT that names the expected ID, and it does so before an attempt is counted.

Tests.

  • test/cso-contracts.test.ts: a new non-root regression test patches a 0444 snapshot file and checks that the mode is kept. It fails with EACCES without the fix.
  • test/cso-node-lifecycle-integration.test.ts: now asserts that runtime-plan returns cli.runtime.id, and builds the verification request from the plan's profile instead of hard-coding the runtime ID. That hard-coded ID is why the integration test never caught the alias bug.

End-to-end check. The fix was also verified on a real qualification cell, running as cso-producer with a unit built under the CI-pinned Bun 1.4.2. The finding ended at repair=runtime_tested and reproduction=reproduced.

Checks: bun run typecheck, and bun test test/cso-contracts.test.ts test/cso-cli.test.ts (81 pass). The Docker lifecycle suite needs a qualified node image and runs in the native validation lane.

Unstamped; the version slot will come from GStack Minder.

Open in Capy

@trunk-io

trunk-io Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Evals: ✅ PASS

[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 0/0 · behavior 0/0 · judge 0/0 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 0m00s · cost $0.00

0 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $0 rule/judge cost | reconcile exit: 0

Profile: pr / mode pr; selected behaviors: 0, judges: 0. Deferred to scheduled/release coverage: 3 behaviors and 0 changed prompt files. Deferred checks did not run and receive no PR-pass credit.

Rule and judge shards
Shard Automated result Manual/unscored Executed Reused Status Cost
Fail-closed reconciliation
[test:paid] report: 1/1 slices, 0 planned shards, tier=gate, attempt 1
[test:paid] coverage: profile=pr mode=pr; selected E2E=0, judges=0
[test:paid] deferred: 3 broad behaviors, 0 changed prompts without quick live coverage; these are not PR passes
[test:paid] collector final outcomes: 0 executed, 0 reused; 0 passed, 0 failed, 0 manual accepted (unscored; no score-cache credit) (0 attempt records from 0 collectors; every record counts)
[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 0/0 · behavior 0/0 · judge 0/0 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 0m00s · cost $0.00
[test:paid] report: every planned shard accounted and passed

Sliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry.

@capy-ai capy-ai Bot changed the title fix(cso): comprehensive verify can patch read-only snapshots and accepts runtime-plan's profile v1.91.123.0 fix(cso): comprehensive verify can patch read-only snapshots and accepts runtime-plan's profile Oct 17, 2026
@capy-ai
capy-ai Bot merged commit 56f25ef into main Oct 17, 2026
69 of 70 checks passed
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