Skip to content

fix: the paid report prices label-named records, aborted SDK sessions and model-free cases - #3590

Closed
garrytan wants to merge 8 commits into
mainfrom
garrytan/gsta150-cost-attribution
Closed

garrytan wants to merge 8 commits into
mainfrom
garrytan/gsta150-cost-attribution

Conversation

@garrytan

@garrytan garrytan commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3590,
  "head": "ceba1f4cc61d00041caced390725afc8dda756c4",
  "version": "1.91.304.0",
  "base": "main",
  "session_kind": "unattended",
  "thread": "GSTA-150",
  "queue_mode": "stamp-at-merge",
  "pregate": "requires-remote cleared @39f9660b2c39 (1 checks, current for ceba1f4cc61d)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/40822249429",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/40822252167",
    "pregate.json/remote_gate: remote-gate tree=39f9660b2c39 tests=11988"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  }
}

What changed

PR 2: the paid report prices a label-named claude -p record and an aborted Agent SDK session; PTY stays unknown until PR 3

PR 2: the paid report prices a label-named claude -p record and an aborted Agent SDK session; PTY stays unknown until PR 3 (stacked on this one).

Before/after as text
-$ paid report trial cost, focused run 2026-10-29 (main)
-context-save-writes-file         ?  UNKNOWN  (claude -p, label-named record in a 4-case shard)
 plan-mode-no-op                  ?  UNKNOWN  (PTY, 6 sessions)
-auq-format-gate                  ?  UNKNOWN  (Agent SDK, aborted after the question)
-headline: cost $0.00 known + 3 of 3 trial(s) cost unknown
+$ paid report trial cost, focused run 2026-10-29 (PR 2)
+context-save-writes-file     $0.10  known    (claude -p, label-named record in a 4-case shard)
+auq-format-gate              $0.22  known    (Agent SDK, aborted after the question)
+headline: cost $0.32 known + 1 of 3 trial(s) cost unknown

Why

Garry asked for a cost and latency pass on paid evals (GSTA-150). The train gate's report said "cost unknown" for 32 of 139 trials on every gate since Oct 26, so its total understated each gate by about $7.50. This PR fixes three of the four causes: label-named records in multi-case shards (22 trials), the aborted Agent SDK session in auq-format-gate, and the model-free timeline-event-flow. PTY sessions follow in the stacked PR.

Blast radius

Only cost fields change: a trial's cost_usd/cost_known, the session ledger's new streamed_cost_usd, a record's new cost_case_id and the headline cost $X. Verdicts, failure classes, rerun eligibility and the trial model (the pass-rate series key) still come from the records named by case id; test/paid-report-cost.test.ts pins the failed record, class and model with and without cost_case_id (script ran). Every touched harness file is recorded non-behavioral at HARNESS_VERSION 6.

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-10-29 Approve the plan "Paid evals: cut duplicate screen spend and price every gate case (GSTA-150)" (autoplan run GSTA-150-20261029033743, 4 decisions) “Garry: Do it” (Garry, relayed by agent:gstack-minder, relayed by agent:gstack-minder) approved the reviewed plan (sha256 b65a8610ce75), every recommendation taken none
2026-10-29 Approve the plan "Paid evals: cut duplicate screen spend and price every gate case (GSTA-150)" (autoplan run GSTA-150-20261029033743, 3 decisions) “Garry: Do it” (Garry, relayed by agent:gstack-minder, relayed by agent:gstack-minder) approved the reviewed plan (sha256 b65a8610ce75), every recommendation taken none

Source: gstack-approvals record for garrytan/gsta150-cost-attribution (display only; not an approval citation).

Summary

  • Label-named records (test/helpers/e2e-helpers.ts, test/helpers/session-runner.ts, test/helpers/eval-store.ts): recordE2E writes cost_case_id from runSkillTest's registered testName when the record's name is a display label. The report binds that record's cost only. Deviation from the plan's "write case_id": case_id would make it a named record and change which record sets the failure class.
  • Streamed usage (lib/pricing.ts, test/helpers/agent-sdk-runner.ts, test/helpers/session-ledger.ts): an Agent SDK session without a result event logs streamed_cost_usd, priced once per message id at its largest output, subagent turns included, 5-minute cache writes at 1.25x and 1-hour at 2x; an unpriced model stays unknown.
  • caseCost (scripts/lib/paid-report.ts): records plus streamed session cost; unknown when any record or session is; MODEL_FREE_CASES (timeline-event-flow) is a known $0 with neither. The headline adds streamed cost once (billed session cost is already in the collector totals).
  • Scope note: isolated trial shards (behavior and judge panels) keep the older trialCostKnown rule. Every cause in the audit is a rule case, so this does not leave any of the 32 unknown; the docs say so.

Test Coverage

test/paid-report-cost.test.ts (new): pricing arithmetic and cache-write fallback, streamed dedupe, caseCost, recordE2E's cost_case_id, a two-case shard whose label-named records bind by cost without changing the failed record, class or model. test/paid-report-census.test.ts: a record-less trial's streamed cost reaches the trial and the verdict once; a billed Codex session is never added twice.
Coverage audit: 64% value-weighted at pass 1; the recordE2E gap is since closed. Untested: the SDK runner's ledger write itself (exercised live below).
Tests ran: remote free gate (Ubicloud) 11988 tests, 0 failed on tree 39f9660b2c39. macOS named regressions and Windows free shard clear from this PR's CI.

Pre-Landing Review

Pass 1 (specialists, red team, adversarial, outside voice openai/gpt-6.1-sol): 6 findings. Fixed: headline dropped streamed cost (outside voice, blocking: $0.65 known reported as $0.00), cost-only record set the trial model (would restart pass-rate series), Codex billed cost counted twice in the headline, cache writes without a 5m key priced $0, recordE2E test gap. Noted: trial-shard panels keep trialCostKnown (scope note above). Pass 2 fix-check: no findings.
REVIEW_LOOP: passes=2 converged.
Gate edits: none to thresholds, trials, samples, judges, kinds or quarantine; scripts/lib/paid-report.ts cost path only, recorded non-behavioral.

Eval Results

Focused paid run 2026-10-29 (pre-approved, under $10), Claude Code 2.1.312, claude-opus-5-5: context-save-writes-file wrote a record with cost_case_id and priced $0.10; auq-format-gate's aborted SDK session logged streamed_cost_usd $0.22; all 3 cases passed. Total spend $2.45 across PR 2 and PR 3 (includes the PTY case and a $0.09 claude -p transcript check).

Plan Completion

PR 2 items 1-4 DONE (item 1 CHANGED: cost_case_id, above). Validation: focused paid run DONE; the first train gate after PRs 2 and 3 land should print cost $X with 0 unknown rule trials.

Documentation

PR 2 (cost attribution): updated. The docs now describe how the paid report prices a trial (records plus streamed_cost_usd from unbilled sessions, cost_case_id binding cost only, model-free cases at a known $0, the headline counting streamed cost once) and what still leaves a trial cost-unknown. Panel trials from isolated trial shards keep the older trialCostKnown rule, and the docs say so.

File Change
docs/TESTING_INTERNALS.md Cost paragraph rewritten around caseCost and cost_case_id; session-ledger section adds streamed_cost_usd pricing rules and the Codex cost fields
docs/troubleshooting.md cost unknown entry lists what still causes it after this PR
docs/evals/census-red.md Incomplete-data table row aligned

Not covered: scripts/test-pr-profile.ts and scripts/test-health-report.ts still label unknown cost "(PTY)" in runtime output.

garrytan and others added 8 commits October 29, 2026 04:27
…me, price aborted SDK sessions from streamed usage, model-free cases cost $0

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… cost_known

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… case

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ut a 5m key

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Oct 29, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

Copy link
Copy Markdown
Contributor

E2E Evals: ✅ PASS (flaky: 1 case(s) passed on their one rerun)

[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 112/112 · behavior 1/1 · judge 24/24 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 6m09s · cost $33.96 known + 10 of 139 trial(s) cost unknown
  FLAKY 1 (failed once, passed on its one rule-16 rerun) · 1 rerun execution(s), cost $0.06

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

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

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

  • scripts/harness-version.json: 255 case(s), 24 judge(s)
Rule and judge shards
Shard Automated result Manual/unscored Executed Reused Status Cost
llm-judge/skill-llm-eval 23/24 0 24 0 ❌ $1.44
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-current 1/1 0 1 0 ✅ $0.84
e2e/skill-e2e-coverage-audit 2/2 0 2 0 ✅ $0.23
e2e-deploy/skill-e2e-deploy--setup-deploy-workflow 1/1 0 1 0 ✅ $0.13
e2e-qa-functional-fix/skill-e2e-qa-functional-fix 2/2 0 2 0 ✅ $0.99
e2e/skill-e2e-plan--plan-review-report 1/1 0 1 0 ✅ $1.29
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-unavailable 1/1 0 1 0 ✅ $0.87
e2e-retro/skill-e2e-retro 1/1 0 1 0 ✅ $0.33
e2e/skill-e2e-shared-libs-paths--shared-libs-review-prior-coverage 1/1 0 1 0 ✅ $1
e2e-qa-workflow/skill-e2e-qa-workflow--qa-quick 1/1 0 1 0 ✅ $0.46
e2e-review-attribution/skill-e2e-review-attribution 3/3 0 3 0 ✅ $0.28
e2e/skill-e2e-ship-skip 1/1 0 1 0 ✅ $0.26
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-before 1/1 0 1 0 ✅ $0.42
e2e/skill-e2e-shared-libs--shared-libs-review-lifecycle 1/1 0 1 0 ✅ $0.89
e2e-review-army/skill-e2e-review-army--review-army-migration-safety 1/1 0 1 0 ✅ $0.29
e2e-deploy/skill-e2e-deploy--land-and-deploy-first-run 1/1 0 1 0 ✅ $0.38
e2e/skill-e2e-shared-libs--shared-libs-read-only 1/1 0 1 0 ✅ $0.25
e2e-deploy/skill-e2e-deploy--land-and-deploy-review-gate 1/1 0 1 0 ✅ $0.26
e2e-docsync-spawned/skill-e2e-docsync-spawned 1/1 0 1 0 ✅ $0.35
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-after 1/1 0 1 0 ✅ $0.36
e2e-safety-codex-consult/skill-e2e-safety-codex-consult 1/1 0 1 0 ✅ $0.27
e2e-deploy/skill-e2e-deploy--land-and-deploy-workflow 1/1 0 1 0 ✅ $0.6
e2e/skill-e2e-workflow 4/4 0 4 0 ✅ $0.86
e2e-review-army/skill-e2e-review-army--review-army-perf-n-plus-one 1/1 0 1 0 ✅ $0.23
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-late-result 1/1 0 1 0 ✅ $0.33
e2e/skill-e2e-shared-libs-paths--shared-libs-review-index-flags 1/1 0 1 0 ✅ $1.02
e2e-deploy/skill-e2e-deploy--benchmark-workflow 1/1 0 1 0 ✅ $0.25
e2e/skill-e2e-investigate-owned-completion 1/1 0 1 0 ✅ $0.07
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-small-cli 1/1 0 1 0 ✅ $0.95
e2e-review-army/skill-e2e-review-army--review-army-json-findings 1/1 0 1 0 ✅ $0.07
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-store 1/1 0 1 0 ✅ $1
e2e-triage/skill-e2e-triage 1/1 0 1 0 ✅ $0.1
e2e-review-army/skill-e2e-review-army--review-army-delivery-audit 1/1 0 1 0 ✅ $0.14
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-timeout-unsettled 1/1 0 1 0 ✅ $0.18
e2e-design/skill-e2e-design--design-review-detector-shim 1/1 0 1 0 ✅ $0.12
e2e-session-intelligence/skill-e2e-session-intelligence 4/4 0 4 0 ✅ $0.31
e2e-safety-pair-agent/skill-e2e-safety-pair-agent 1/1 0 1 0 ✅ $0.1
e2e-plan-tune/skill-e2e-plan-tune 1/1 0 1 0 ✅ $0.12
e2e-qa-workflow/skill-e2e-qa-workflow--qa-bootstrap 1/1 0 1 0 ✅ $0.08
e2e-deploy/skill-e2e-deploy--canary-workflow 1/1 0 1 0 ✅ $0.11
e2e/skill-e2e-investigate-owned-termination 2/2 0 2 0 ✅ $0.18
e2e/skill-e2e-ship-hook-refresh 1/1 0 1 0 ✅ $0.1
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-launch-failure 1/1 0 1 0 ✅ $0.16
e2e-design/skill-e2e-design--plan-design-review-no-ui-scope 1/1 0 1 0 ✅ $0.1
e2e-third-party-actions/skill-e2e-third-party-actions 5/5 0 5 0 ✅ $0.43
e2e/skill-e2e-ship-hook-consent 2/2 0 2 0 ✅ $0.25
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-recovery 1/1 0 1 0 ✅ $0.39
e2e/skill-e2e-shared-libs--shared-libs-review-revalidation 1/1 0 1 0 ✅ $1.9
e2e-review/skill-e2e-review 2/2 0 2 0 ✅ $0.32
e2e-cso/skill-e2e-cso 1/1 0 1 0 ✅ $0.43
e2e-qa-functional/skill-e2e-qa-functional 2/2 0 2 0 ✅ $0.73
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-late-input 1/1 0 1 0 ✅ $1.07
e2e-learnings/skill-e2e-learnings 1/1 0 1 0 ✅ $0.07
e2e-failure-routing/skill-e2e-failure-routing 4/4 0 4 0 ✅ $0.46
e2e-qa-workflow/skill-e2e-qa-workflow--qa-only-no-fix 1/1 0 1 0 ✅ $0.5
e2e-qa-callers/skill-e2e-qa-callers--review-exploratory-small-cli 1/1 0 1 0 ✅ $0.75
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-plan-checks 1/1 0 1 0 ✅ $0.97
e2e/skill-e2e-test-value 3/3 0 3 0 ✅ $0.67
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-failure 1/1 0 1 0 ✅ $0.65
e2e-skillify/skill-e2e-skillify 3/3 0 3 0 ✅ $0.84
e2e/skill-e2e-shared-libs-paths--shared-libs-review-path-eligibility 1/1 0 1 0 ✅ $1.46
e2e-hermetic/skill-e2e-hermetic-canary 2/2 0 2 0 ✅ $0.03
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-completion 1/1 0 1 0 ✅ $0.9
e2e-design/skill-e2e-design--design-review-plugin-handoff 1/1 0 1 0 ✅ $0.13
e2e-review-army/skill-e2e-review-army--review-army-quality-score 1/1 0 1 0 ✅ $0.1
e2e-design/skill-e2e-design--design-review-detector-shim-dom 1/1 0 1 0 ✅ $0.21
e2e-safety-ship-evidence/skill-e2e-safety-ship-evidence 1/1 0 1 0 ✅ $0.11
e2e-browse/skill-e2e-bws 6/6 0 6 0 ✅ $0.29
e2e/skill-e2e-shared-libs--shared-libs-unsupported-git 1/1 0 1 0 ✅ $0.18
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-asset 1/1 0 1 0 ✅ $0.25
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-marker 1/1 0 1 0 ✅ $0.17
Fail-closed reconciliation
ompliance.test.ts
  slice 16  passed             23s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-launch-failure
  slice 16  passed             32s  test/skill-e2e-session-intelligence.test.ts
  slice 16  passed             35s  test/skill-e2e-ship-hook-consent.test.ts
  slice 16  passed             27s  test/skill-e2e-investigate-owned-termination.test.ts
  slice 16  passed             21s  test/skill-e2e-design.test.ts#design-review-detector-shim
  slice 16  passed             18s  test/skill-e2e-deploy.test.ts#canary-workflow
  slice 16  passed             30s  test/skill-e2e-ship-hook-refresh.test.ts
  slice 16  passed             18s  test/skill-e2e-design.test.ts#plan-design-review-no-ui-scope
  slice 16  passed             27s  test/skill-e2e-review-army.test.ts#review-army-delivery-audit
  slice 16  passed             27s  test/skill-e2e-safety-pair-agent.test.ts
  slice 16  passed             21s  test/skill-e2e-qa-workflow.test.ts#qa-bootstrap
  slice 17  passed             10s  test/skill-e2e-learnings.test.ts
  slice 17  passed             13s  test/skill-e2e-diagram.test.ts
[test:paid] collector final outcomes: 125 executed, 0 reused; 124 passed, 1 failed, 0 manual accepted (unscored; no score-cache credit) (125 attempt records from 71 collectors; every record counts)
[test:paid] deselected testcases, zero credit (316):
[test:paid]    302  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 112/112 · behavior 1/1 · judge 24/24 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 6m09s · cost $33.96 known + 10 of 139 trial(s) cost unknown
  FLAKY 1 (failed once, passed on its one rule-16 rerun) · 1 rerun execution(s), cost $0.06
[test:paid] flaky (rule 16: failed once, passed on its one rerun; green with this annotation):
  ⚑ plan-eng-review/SKILL.md sections  judge  FLAKY: failed in attempt 1 (paid-slice-5-a1), passed on its one rerun in attempt 1 rerun (slice 1 attempt 1); rerun cost $0.06; first failure: assertion: expect(received).toBeGreaterThanOrEqual(expected)
[test:paid] exercised-path map (shadow, non-blocking): 9 MAP_GAP line(s) over 106 executed case(s) with recorded commands
  MAP_GAP document-release bin/gstack-banned-terms: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP plan-review-report bin/gstack-plan-reality: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP plan-review-report browse/dist/browse: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP ship-exploratory-late-input bin/gstack-review-plan: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP ship-exploratory-plan-checks bin/gstack-review-plan: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP ship-exploratory-small-cli bin/gstack-review-plan: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP ship-exploratory-unavailable bin/gstack-review-plan: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP test-audit-report-only design/dist/design: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP timeline-event-flow bin/gstack-skill-end: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
[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.

Flaky: failed once, passed on its one rerun (rule 16)

⚑ plan-eng-review/SKILL.md sections  judge  FLAKY: failed in attempt 1 (paid-slice-5-a1), passed on its one rerun in attempt 1 rerun (slice 1 attempt 1); rerun cost $0.06; first failure: assertion: expect(received).toBeGreaterThanOrEqual(expected)

Each failed and passed on its rerun in run 40823481891 at the attempts named above. Logged for the daily flaky-fix pass in this run's flake-records-a1 artifact (docs/TESTING_INTERNALS.md#flaky-reruns).

Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit c469fb3692912dee7d8709726ed31c07790acc63.

@capy-ai

capy-ai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Frozen in wave docs-21563262ae01 (branch wave/docs-21563262ae01) at ceba1f4. Push nothing here: a moved head drops this PR from the wave. Fixes go on the wave branch through its integrator.

capy-ai Bot added a commit that referenced this pull request Nov 2, 2026
* Attribute every paid trial's cost: bind label-named records by testName, price aborted SDK sessions from streamed usage, model-free cases cost $0

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: case cost adds streamed sessions to record sums and keeps record cost_known

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: the paid report headline counts ledger-only session cost once

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: a cost-only record never sets the trial model

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test: recordE2E writes cost_case_id only for a registered label-named case

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: CHANGELOG for paid-report cost attribution (Unreleased)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: the headline adds only streamed session cost; cache writes without a 5m key

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: how the paid report prices a trial and what stays cost-unknown

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* Price PTY sessions from their transcripts: pin a session id, sum the session's and its subagents' usage into the ledger's streamed_cost_usd

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: transcript pricing never throws from a PTY ledger writer

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* chore: pin transcript-cost.ts as non-behavioral at HARNESS_VERSION 6

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: recognise --session-id= and --resume= forms

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: CHANGELOG for PTY transcript pricing (Unreleased)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: PTY sessions priced from their transcripts

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: price PTY transcripts without adding a launch argument; native AUQ capture opts out

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: harness notes and CHANGELOG match the transcript claim

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(flaky): gstack-flaky run reruns a failed JUnit test once and ledgers the flake (GSTA-158)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(flaky): stream output, keep unreported runner failures red, fail-closed duplicates and nonzero reruns

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: pre-landing review fixes

gstack-flaky never greens an incomplete run: a targeted rerun needs the
runner's summary proving the first run complete, otherwise (and always for
generic runners) the rerun repeats the whole command. A rerun clears a test
only when it exits 0 and the test passes once on its first attempt. Killed
runners exit 3 (FLAKY_COMMAND_KILLED) and signals are forwarded. The first
report is restored at --junit with reruns kept beside it; ids are redacted at
every output; the ledger gets its own GSTACK_FLAKE_LEDGER_JUNIT; fixtures are
registered in FREE_FIXTURES.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: latch cancellation and check whole-command rerun reports

A cancel forwarded to a runner that traps the signal now counts as killed for
every later attempt, so a cancelled job is never rerun or greened. A
whole-command rerun clears nothing when its report has a failed test, misses a
first-run test, or its runner counted failures outside the report.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: whole-command rerun when coverage or runner-flaky tests can fail the run

A coverage threshold or a fail-on-flaky policy fails a run for a reason a
narrowed rerun cannot reproduce, so either forces a whole-command rerun.
--junit refuses an existing file that is not a JUnit report instead of
deleting it.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(flaky): rerun the whole command by default; targeted rerun is opt-in

A rerun counts only on the runner's own full green verdict: exit 0, no failed
or missing test, nothing counted outside the report. That covers every way a
run can fail, which a narrowed rerun cannot (a coverage threshold with an lcov
reporter, a fail-on-flaky policy, a test never reached). --rerun-scope test
reruns the failed test alone, with its preconditions documented and the
complete-run checks kept as a safety net. An unreadable existing --junit file
is a usage error, not a crash.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: gstack-flaky CHANGELOG entry and standalone-binaries row (GSTA-158)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(flaky): quarantine registry for repeat flakes (GSTA-158 P2)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(flaky): bound renewal dates; match non-ASCII paths in check --base

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(flaky): reword the FLAKY_QUARANTINE_BASE hint so the egress scanner does not read it as a network op

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(agent-sdk): every SDK caller passes the claude_code preset or names why not

The SDK's default system prompt is a bare stub that drops the line telling the
model to run /skill through the Skill tool. runAgentSdkTest now refuses a
missing, empty or bare-string prompt; non-preset callers name a reason; a free
tripwire scans test/ and scripts/ for the same mistake.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test: record the SDK prompt guard as a non-behavioral harness change and baseline its tripwire

harness-version: runAgentSdkTest validates systemPrompt before starting; every
live caller already passed the claude_code preset, so no verdict can change.
test-of-test ratchet: the tripwire's subject is the eval harness by design.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: name the preset literal callers pass and the unnamed-prompt refusal

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(eval-plan): frontier models under test (R54)

Haiku and Sonnet are not models under test. dry-run refuses a plan whose every
arm is Haiku or Sonnet unless --tier-question names what it asks about that
tier, warns on a mix, and re-costs the plan on Opus 5.5 and GPT-6.1 Sol.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(eval-plan): trim R54 skill prose and raise the eval-plan context ceiling

The R54 paragraph and CHECK: frontier bullet were cut to the minimum; the
exemptions and verdict rule stay in docs/TESTING_INTERNALS.md. The remaining
growth is the feature, so only the eval-plan eager ceiling moves (4887 -> 5458,
the capture helper's value); other skills' ceilings are left as they were.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(eval-plan): pilot start keeps the R54 refusal; --tier-question rejects a flag

Review pass 1 (full depth) found the frontier refusal could be skipped by
starting a pilot on Haiku or Sonnet arms behind a dry run made on other arms,
or behind a dry-run.json written before the check existed. startPilot now
refuses a pilot whose every arm is Haiku or Sonnet unless its dry run recorded
a tier question. dry-run --tier-question no longer takes the next flag as its
answer. The testing doc now says the frontier re-cost is printed for
comparison with the brief cap, not enforced.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs(support-tiers): Windows CI in the present tense now that windows-smoke is required (#3806)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* chore: empty commit for a clean check set at the same tree (cancelled orphan free-suite check at 97487df)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs(skills): /eval-plan entry names the R54 frontier check

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai

capy-ai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Landed in wave #3847 as v1.93.10.0 (daf6613), merged from this PR's pin ceba1f4. Integrator changes touching this PR's files: c1c8161 (merge of #3591, resolved by hand: scripts/harness-version.json), ba30ee0 (merge of #3819, resolved by hand: scripts/harness-version.json, test/helpers/agent-sdk-runner.ts).

@capy-ai capy-ai Bot closed this Nov 2, 2026
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