Repository navigation
Conversation
…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>
|
Merging to
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 |
E2E Evals: ✅ PASS (flaky: 1 case(s) passed on their one rerun)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 Derived dependents (scripts/pr-dependencies.ts):
Rule and judge shards
Fail-closed reconciliationSliced 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)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 Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
|
Frozen in wave |
* 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>
|
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). |
What changed
PR 2: the paid report prices a label-named
claude -precord and an aborted Agent SDK session; PTY stays unknown until PR 3 (stacked on this one).Before/after as text
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 newstreamed_cost_usd, a record's newcost_case_idand the headlinecost $X. Verdicts, failure classes, rerun eligibility and the trialmodel(the pass-rate series key) still come from the records named by case id;test/paid-report-cost.test.tspins the failed record, class and model with and withoutcost_case_id(script ran). Every touched harness file is recorded non-behavioral at HARNESS_VERSION 6.Approvals
Source: gstack-approvals record for garrytan/gsta150-cost-attribution (display only; not an approval citation).
Summary
test/helpers/e2e-helpers.ts,test/helpers/session-runner.ts,test/helpers/eval-store.ts):recordE2Ewritescost_case_idfromrunSkillTest's registeredtestNamewhen 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_idwould make it a named record and change which record sets the failure class.lib/pricing.ts,test/helpers/agent-sdk-runner.ts,test/helpers/session-ledger.ts): an Agent SDK session without a result event logsstreamed_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.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).trialCostKnownrule. 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'scost_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.tscost 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_idand priced $0.10; auq-format-gate's aborted SDK session loggedstreamed_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.09claude -ptranscript 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 printcost $Xwith 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_usdfrom unbilled sessions,cost_case_idbinding 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 oldertrialCostKnownrule, and the docs say so.docs/TESTING_INTERNALS.mdcaseCostandcost_case_id; session-ledger section addsstreamed_cost_usdpricing rules and the Codex cost fieldsdocs/troubleshooting.mdcost unknownentry lists what still causes it after this PRdocs/evals/census-red.mdNot covered:
scripts/test-pr-profile.tsandscripts/test-health-report.tsstill label unknown cost "(PTY)" in runtime output.