Skip to content

v1.91.25.0 feat(cso): private two-architecture release scoring + self-checking runtime release gates - #3036

Merged
garrytan merged 7 commits into
mainfrom
cso-evaluator-support
Oct 5, 2026
Merged

garrytan merged 7 commits into
mainfrom
cso-evaluator-support

Conversation

@garrytan

@garrytan garrytan commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

These are the gstack-side changes the approved private CSO runtime evaluator needs before it can qualify the Node, Bun, Python and Rails runtimes. They implement gaps G1–G6 and G9–G11 from the evaluator plan. A user's audit behaves the same as before until a qualified runtime catalog merges.

G12 (opaque producer inputs). The producer input is {schemaVersion: 2, cellRef, skill, source, execution} and the receipt binds cellRef + inputHash with no cell field. collectProducerReceipts rebuilds the trusted cell from the matrix, so a cell agent can no longer learn its case or variant from its own bundle. requalificationTriggers() also now resolves paths correctly from any working directory.

Scoring a private release run (G1)

  • defineEvalCorpus(manifest, sourceFiles) injects a private corpus that uses the public layout. Every source hash is checked, unsafe paths are rejected, and the public corpus version can't be reused. Materialize, matrix, collect, score and baseline all accept it, and the CLI takes --corpus-manifest.
  • Per-platform cells. Cells carry an optional linux/amd64/linux/arm64 platform. Each platform needs exactly one producer installation and one provider identity, with shared catalogs and provider policy, and the producer refuses a cell whose platform doesn't match its host.
  • New profiles. release runs v3 with one repetition. baseline produces v2 comprehensive cells for createEvalBaseline, which binds a complete adjudicated run by hash; score --baseline uses it, and without a pinned baseline the regression gate reports unmeasured.
  • The full profile is unchanged. Its matrix hash, a0f20a12…, is the same on main and on this branch.

Evaluation-only helper builds (G2)

  • cso-runtime-promotion.ts evaluation-candidate turns staged records into a cso-eval-<runId>-<sha12> catalog whose runtimes are evaluation_candidate.
  • bun run build:cso -- --evaluation-candidate <catalog> --output <dir> builds the five-artifact unit outside the checkout, plus a .gstack-cso-evaluation marker. The helper reports evaluationOnly: true.
  • Normal builds, setup, setup-summary preloading and promotion all refuse evaluation catalogs.

Runtime release workflows (G3–G6, G10, G11)

  • G3: the ingress checks the staging run itself. It resolves that run from each verified provenance; every image must name the same run, and the run must match the certificate's run URI. It then requires a successful workflow_dispatch run on main at sourceCommit, with ten qualify-native <runtimeId> jobs that all succeeded.
  • G4: native gate booleans come from test results. scripts/cso-native-evidence.ts derives them from Bun's JUnit executed-and-passed counts. Skipped Docker tests now report as skipped instead of passing. The pending list is requiredChecks(stack) minus the native keys, which fixes the PostgreSQL rows.
  • G5: promotion PRs get their required checks. Both promote jobs (runtime and scanner) dispatch free-tests.yml on the new branch, because pushes made with GITHUB_TOKEN don't trigger it.
  • G6: the dots in the image regexes are escaped.
  • G10: optional opaque evaluationRef. An unprotected dispatch-summary job shows the approver the claimed images before approval. Tests prove the reference never reaches statements, evidence or the catalog.
  • G11: requalification triggers. The staging run records the helper ABI, isolation policy hash, image-preparation digest and build-inputs revision. Promotion writes them to the catalog, and test/cso-requalification.test.ts fails when the committed catalog no longer matches the code. selectRuntime refuses runtimes qualified under a different isolation policy.

Multi-payload security proofs (G9)

  • VerificationRequest.security accepts one assertion, or 1–8 assertions with distinct names, judged in a single before/after pair.
  • A single assertion hashes exactly as before. Images staged before this change fail closed as inconclusive when given an array.

Validation

  • The full free suite (bun run test:ubicloud) passes: 17/17 shards.
  • bun run typecheck is clean, typecheck:test adds no new diagnostics, format:cso:check passes, and actionlint passes on the whole repo.
  • Focused suites (CSO, module-size ratchet, spawnsync tripwire, workflow pins and concurrency, free-tests wiring, gate secret scan): 724 pass, 22 skip, 0 fail.
  • Not exercised: Docker-backed native evidence against real staged images, and live GitHub behavior of the new ingress and promote steps. The first protected-main staging run and the first evaluator dispatch will exercise both.

Open in Capy

Two paid-gate flakes fixed at the root

This PR touches setup, so it runs the whole paid gate, and two unrelated cases went red. Each was measured on its own, then fixed:

  • review/SKILL.md workflow judge. The ~64k-token review bundle let the judge's thinking and its answer exhaust the shared 8,192-token cap (Judge response truncated). This one registration now uses ship's 64k streaming output cap, with effort and thresholds unchanged. Measured at default effort: 9/10 before the fix (one low sample) and 10/10 after, so 19/20 overall, with no truncation.
  • qa-only-no-fix. The checker counted the agent's guarded "$B" closetab cleanup after its last probe as a probe that needed a checkpoint. A guarded run now counts as cleanup only when it is exactly a tab close with the supplied browse binary, after the last probe. Replaying the captured CI transcript reproduces the old failure and passes with the fix. Five new free scenarios cover it, including negative controls.

@trunk-io

trunk-io Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan added a commit that referenced this pull request Oct 5, 2026
BenjaminDSmithy added a commit to BenjaminDSmithy/gstack that referenced this pull request Oct 5, 2026
Upstream main moved to f97aefe (v1.91.22.0). Only the release files
conflicted: VERSION, package.json, the agents digest and CHANGELOG.md.

Resolved by taking main's side of each and re-versioning this PR from
1.91.21.0 to 1.91.25.0: bin/gstack-next-version against garrytan/gstack
main reported 1.91.23.0 claimed by garrytan#3036 and 1.91.24.0 by garrytan#3031.
bin/gstack-version-bump wrote VERSION, package.json (1.91.25) and the
digest; the PR's CHANGELOG entry sits above main's 1.91.22.0 entry,
renamed to 1.91.25.0, with nothing of main's entries changed.

Checked on the merged tree: the gate reports 158 checked, exit 0; the
agents-digest, ship-version-sync, version-source, skill-validation,
context-budget, catalog-budget and team-mode tests pass, 415 pass,
0 fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rs independent of cwd

Producer inputs are {schemaVersion: 2, cellRef, skill, source, execution} and
receipts bind cellRef + inputHash; collection rebuilds the cell from the
matrix, so a cell VM never learns its case or variant. requalificationTriggers
resolves Bun's cwd-relative metafile inputs against the repository root.
# Conflicts:
#	CHANGELOG.md
#	VERSION
#	agents-digest/gstack-AGENTS.md
#	package.json
#	test/cso-docker-integration.test.ts
@github-actions github-actions Bot changed the title v1.91.23.0 feat(cso): private two-architecture release scoring + self-checking runtime release gates v1.91.25.0 feat(cso): private two-architecture release scoring + self-checking runtime release gates Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

E2E Evals: ✅ PASS

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

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

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

Derived dependents (scripts/pr-dependencies.ts):

  • scripts/build-cso.sh: 18 case(s), 0 judge(s)
  • scripts/cso-eval-producer.ts: 18 case(s), 0 judge(s)
  • scripts/cso-runtime-promotion.ts: 18 case(s), 0 judge(s)
Rule and judge shards
Shard Automated result Manual/unscored Executed Reused Status Cost
e2e-learnings/skill-e2e-learnings 1/1 0 1 0 ✅ $0.38
e2e-session-intelligence/skill-e2e-session-intelligence 4/4 0 4 0 ✅ $0.87
e2e/skill-e2e-investigate-owned-completion 1/1 0 1 0 ✅ $0.2
e2e-review-army/skill-e2e-review-army--review-army-delivery-audit 1/1 0 1 0 ✅ $0.35
e2e/skill-e2e-coverage-audit 2/2 0 2 0 ✅ $0.77
e2e/skill-e2e-investigate-owned-termination 2/2 0 2 0 ✅ $0.5
e2e-deploy/skill-e2e-deploy--canary-workflow 1/1 0 1 0 ✅ $0.32
e2e-qa-callers/skill-e2e-qa-callers--review-exploratory-small-cli 1/1 0 1 0 ✅ $1.62
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-marker 1/1 0 1 0 ✅ $0.53
e2e-qa-functional-fix/skill-e2e-qa-functional-fix 2/2 0 2 0 ✅ $2.54
e2e-deploy/skill-e2e-deploy--land-and-deploy-review-gate 1/1 0 1 0 ✅ $1
e2e-skillify/skill-e2e-skillify 3/3 0 3 0 ✅ $2.43
e2e-cso/skill-e2e-cso 1/1 0 1 0 ✅ $2.21
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-current 1/1 0 1 0 ✅ $3.88
e2e/skill-e2e-shared-libs--shared-libs-review-lifecycle 1/1 0 1 0 ✅ $2.56
e2e-review-army/skill-e2e-review-army--review-army-migration-safety 1/1 0 1 0 ✅ $1.19
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-timeout-unsettled 1/1 0 1 0 ✅ $0.52
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-after 1/1 0 1 0 ✅ $1.14
e2e/skill-e2e-test-value 3/3 0 3 0 ✅ $2.35
e2e-review-army/skill-e2e-review-army--review-army-quality-score 1/1 0 1 0 ✅ $0.37
e2e/skill-e2e-shared-libs--shared-libs-review-revalidation 1/1 0 1 0 ✅ $4.34
e2e-browse/skill-e2e-bws 6/6 0 6 0 ✅ $0.85
e2e-qa-workflow/skill-e2e-qa-workflow--qa-bootstrap 1/1 0 1 0 ✅ $0.33
e2e-safety-codex-consult/skill-e2e-safety-codex-consult 1/1 0 1 0 ✅ $0.78
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-late-input 1/1 0 1 0 ✅ $1.92
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-plan-checks 1/1 0 1 0 ✅ $1.8
e2e-plan-tune/skill-e2e-plan-tune 1/1 0 1 0 ✅ $0.44
e2e-qa-functional/skill-e2e-qa-functional 2/2 0 2 0 ✅ $2.29
llm-judge/skill-llm-eval 24/24 0 24 0 ✅ $1.44
e2e-deploy/skill-e2e-deploy--benchmark-workflow 1/1 0 1 0 ✅ $0.63
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-late-result 1/1 0 1 0 ✅ $0.95
e2e-qa-workflow/skill-e2e-qa-workflow--qa-only-no-fix 1/1 0 1 0 ✅ $1.82
e2e/skill-e2e-shared-libs-paths--shared-libs-review-prior-coverage 1/1 0 1 0 ✅ $2.37
e2e/skill-e2e-shared-libs-paths--shared-libs-review-path-eligibility 1/1 0 1 0 ✅ $3.68
e2e-review-attribution/skill-e2e-review-attribution 3/3 0 3 0 ✅ $0.89
e2e/skill-e2e-plan--plan-review-report 1/1 0 1 0 ✅ $1.21
e2e-triage/skill-e2e-triage 1/1 0 1 0 ✅ $0.4
e2e/skill-e2e-ship-hook-consent 2/2 0 2 0 ✅ $0.58
e2e-hermetic/skill-e2e-hermetic-canary 2/2 0 2 0 ✅ $0.02
e2e-deploy/skill-e2e-deploy--land-and-deploy-first-run 1/1 0 1 0 ✅ $0.92
e2e/skill-e2e-ship-hook-refresh 1/1 0 1 0 ✅ $0.29
e2e-review/skill-e2e-review 2/2 0 2 0 ✅ $1.01
e2e/skill-e2e-ship-skip 1/1 0 1 0 ✅ $0.59
e2e-docsync-spawned/skill-e2e-docsync-spawned 1/1 0 1 0 ✅ $1.17
e2e/skill-e2e-shared-libs-paths--shared-libs-review-index-flags 1/1 0 1 0 ✅ $2.5
e2e-deploy/skill-e2e-deploy--land-and-deploy-workflow 1/1 0 1 0 ✅ $1.6
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-recovery 1/1 0 1 0 ✅ $0.9
e2e-review-army/skill-e2e-review-army--review-army-perf-n-plus-one 1/1 0 1 0 ✅ $0.99
e2e/skill-e2e-shared-libs--shared-libs-unsupported-git 1/1 0 1 0 ✅ $0.59
e2e-qa-workflow/skill-e2e-qa-workflow--qa-quick 1/1 0 1 0 ✅ $1.69
e2e-third-party-actions/skill-e2e-third-party-actions 5/5 0 5 0 ✅ $1.18
e2e-design/skill-e2e-design--design-review-detector-shim-dom 1/1 0 1 0 ✅ $0.63
e2e-safety-pair-agent/skill-e2e-safety-pair-agent 1/1 0 1 0 ✅ $0.32
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-unavailable 1/1 0 1 0 ✅ $1.69
e2e-design/skill-e2e-design--design-review-detector-shim 1/1 0 1 0 ✅ $0.37
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-small-cli 1/1 0 1 0 ✅ $1.68
e2e-deploy/skill-e2e-deploy--setup-deploy-workflow 1/1 0 1 0 ✅ $0.42
e2e-review-army/skill-e2e-review-army--review-army-json-findings 1/1 0 1 0 ✅ $0.22
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-store 1/1 0 1 0 ✅ $3.35
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-completion 1/1 0 1 0 ✅ $3.27
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-before 1/1 0 1 0 ✅ $1.16
e2e/skill-e2e-workflow 4/4 0 4 0 ✅ $2.9
e2e/skill-e2e-shared-libs--shared-libs-read-only 1/1 0 1 0 ✅ $0.76
e2e-design/skill-e2e-design--plan-design-review-no-ui-scope 1/1 0 1 0 ✅ $0.52
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-failure 1/1 0 1 0 ✅ $2.31
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-asset 1/1 0 1 0 ✅ $1.11
e2e-safety-ship-evidence/skill-e2e-safety-ship-evidence 1/1 0 1 0 ✅ $0.49
e2e-retro/skill-e2e-retro 1/1 0 1 0 ✅ $1.08
e2e-design/skill-e2e-design--design-review-plugin-handoff 1/1 0 1 0 ✅ $0.47
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-launch-failure 1/1 0 1 0 ✅ $0.47
Fail-closed reconciliation
           125s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-recovery
  slice 11  passed            283s  test/skill-e2e-plan-mode-no-op.test.ts
  slice 11  passed            170s  test/skill-e2e-deploy.test.ts#land-and-deploy-workflow
  slice 11  passed            172s  test/skill-e2e-shared-libs-paths.test.ts#shared-libs-review-index-flags
  slice 12  passed            158s  test/skill-e2e-shared-libs-paths.test.ts#shared-libs-review-prior-coverage
  slice 12  passed            123s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-late-result
  slice 12  passed            162s  test/skill-e2e-shared-libs-paths.test.ts#shared-libs-review-path-eligibility
  slice 12  passed            221s  test/skill-e2e-qa-workflow.test.ts#qa-only-no-fix
  slice 13  passed            139s  test/skill-e2e-plan-devex-finding-floor.test.ts
  slice 13  passed            160s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-stale-before
  slice 13  passed            137s  test/skill-e2e-shared-libs.test.ts#shared-libs-read-only
  slice 13  passed            304s  test/skill-e2e-workflow.test.ts
  slice 13  passed             37s  test/skill-e2e-design.test.ts#plan-design-review-no-ui-scope
  slice 14  passed            255s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-failure
  slice 14  passed            109s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-missing-asset
  slice 14  passed            161s  test/skill-e2e-retro.test.ts
  slice 14  passed             57s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-launch-failure
  slice 14  passed             70s  test/skill-e2e-design.test.ts#design-review-plugin-handoff
  slice 14  passed             68s  test/skill-e2e-safety-ship-evidence.test.ts
  slice 15  passed            113s  test/skill-e2e-docsync-spawned.test.ts
  slice 15  passed            125s  test/skill-e2e-review.test.ts
  slice 15  passed            109s  test/skill-e2e-deploy.test.ts#land-and-deploy-first-run
  slice 15  passed             94s  test/skill-e2e-ship-skip.test.ts
  slice 15  passed             93s  test/skill-e2e-review-attribution.test.ts
  slice 15  passed            238s  test/skill-e2e-plan.test.ts#plan-review-report
  slice 15  passed             37s  test/skill-e2e-ship-hook-refresh.test.ts
  slice 15  passed             57s  test/skill-e2e-ship-hook-consent.test.ts
  slice 15  passed             67s  test/skill-e2e-triage.test.ts
  slice 15  passed              5s  test/skill-e2e-hermetic-canary.test.ts
  slice 16  passed             55s  test/skill-e2e-ask-user-question-format-compliance.test.ts
  slice 16  passed             64s  test/skill-e2e-session-intelligence.test.ts
  slice 16  passed             46s  test/skill-e2e-coverage-audit.test.ts
  slice 16  passed             42s  test/skill-e2e-deploy.test.ts#canary-workflow
  slice 16  passed             39s  test/skill-e2e-review-army.test.ts#review-army-delivery-audit
  slice 16  passed             46s  test/skill-e2e-investigate-owned-termination.test.ts
  slice 16  passed             29s  test/skill-e2e-investigate-owned-completion.test.ts
  slice 16  passed             29s  test/skill-e2e-diagram.test.ts
  slice 16  passed             35s  test/skill-e2e-learnings.test.ts
[test:paid] collector final outcomes: 121 executed, 0 reused; 121 passed, 0 failed, 0 manual accepted (unscored; no score-cache credit) (121 attempt records from 70 collectors; every record counts)
[test:paid] deselected testcases, zero credit (307):
[test:paid]    293  sibling case of a case shard (its own shard runs it)
[test:paid]      8  periodic-tier case (this lane runs gate)
[test:paid]      6  Bun hook placeholder of a skipped describe block (not a test)
[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 106/106 · behavior 0/0 · judge 24/24 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 8m25s · cost $89.12
[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.

…up is not a probe

review/SKILL.md workflow: the ~64k-token bundle let default-effort thinking
spend all 8192 output tokens without an answer in CI. Medium effort with a
64k streaming cap kept 24/24 measured samples under 5k tokens and 63 s with
the same gating scores (as ship already does).

qa-only-no-fix: the fixture prompt routes browser cleanup through the deadline
guard, but the checkpoint detector treated every guarded run as a probe that
needs a checkpoint. A child that only closes the tab with the supplied browse
binary, after the last probe, is cleanup; anything else stays a probe. The
captured CI transcript (run 37252022510) now passes and new scenarios pin
the negative controls.
…utput cap

Truncation was the defect: thinking and the answer share max_tokens, and the
~64k-token review bundle once spent all 8192. The registration keeps default
effort and response format and gets ship's 64k streaming cap; the guard test
pins exactly that.
@garrytan
garrytan merged commit 857466f into main Oct 5, 2026
82 checks passed
BenjaminDSmithy added a commit to BenjaminDSmithy/gstack that referenced this pull request Oct 5, 2026
Upstream main moved to 857466f, which released 1.91.25.0 itself, the
version this PR carried; CHANGELOG.md conflicted.

Resolved by taking main's side of the release files and re-versioning
this PR to 1.91.27.0: bin/gstack-next-version against garrytan/gstack
main reported 1.91.26.0 claimed by garrytan#3033. bin/gstack-version-bump
rewrote VERSION, package.json (1.91.27) and the digest; the PR's
CHANGELOG entry, renamed to 1.91.27.0, sits above main's 1.91.25.0
entry, with nothing of main's entries changed.

Checked on the merged tree: the gate reports 158 checked, exit 0; the
agents-digest, ship-version-sync, version-source, skill-validation,
context-budget, catalog-budget and team-mode tests pass, 415 pass,
0 fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
levi85 pushed a commit to levi85/gstack that referenced this pull request Oct 14, 2026
…-checking runtime release gates (garrytan#3036)

* v1.91.23.0 feat(cso): private two-architecture release scoring and self-checking runtime release gates

* Keep the Linux-only native-evidence and requalification tests out of the Windows lane

* Skip the two Linux-release-only checks on Windows in-file instead of growing the shard list

* fix(cso): opaque producer inputs and receipts; requalification triggers independent of cwd

Producer inputs are {schemaVersion: 2, cellRef, skill, source, execution} and
receipts bind cellRef + inputHash; collection rebuilds the cell from the
matrix, so a cell VM never learns its case or variant. requalificationTriggers
resolves Bun's cwd-relative metafile inputs against the repository root.

* test(evals): bound the review judge's thinking; guarded browser cleanup is not a probe

review/SKILL.md workflow: the ~64k-token bundle let default-effort thinking
spend all 8192 output tokens without an answer in CI. Medium effort with a
64k streaming cap kept 24/24 measured samples under 5k tokens and 63 s with
the same gating scores (as ship already does).

qa-only-no-fix: the fixture prompt routes browser cleanup through the deadline
guard, but the checkpoint detector treated every guarded run as a probe that
needs a checkpoint. A child that only closes the tab with the supplied browse
binary, after the last probe, is cleanup; anything else stays a probe. The
captured CI transcript (run 37252022510) now passes and new scenarios pin
the negative controls.

* test(evals): keep the review judge at default effort; only lift its output cap

Truncation was the defect: thinking and the answer share max_tokens, and the
~64k-token review bundle once spent all 8192. The registration keeps default
effort and response format and gets ship's 64k streaming cap; the guard test
pins exactly that.
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