Skip to content

Scenario scorecard: sum ask-side time and reported cost per served model #33740

Closed

Description

@objectstack-fleet

epic:#33595#1 · os-tesla · session_01L9qiby1cctpVpRbJzjccvY

Filing-gate category: ③ maintainer-directed child of #33595 (M2 row of its milestone table). Maintainer, 2026-11-15 02:10Z: 「你建议的任务全部立卡,你负责开 devx 车道派发处理」; 08:36Z, on the epic seat's decision card "M2/M3 的行现在立卡吗?立了交给谁派发?": "立卡,留给本专题席位派发". The row carries the maintainer's 2026-11-15 question 「后续统计是否还要加入花费的时间」.

Mechanism

packages/qa/scenarios/src/runner/scorecard.ts sums cost for authoring turns only: authorCost() (~252) feeds the "Author cost" row (~421). Question and operation turns keep reportedCostUsd on their TurnSummary (orchestrate.ts ~112-116, ~247), but no row sums them. No turn records elapsed time anywhere: runner/transcript.ts reads total_cost_usd from the CLI's result line (~139) and nothing for duration.

Why it matters

The comparison on #33595 picks an ask model by score per dollar and per minute. Today only the author's cost is stated, so the cheaper ask model's saving and its latency are invisible, and the maintainer asked for time to be added.

Done when

  • Each turn records its wall time, measured by the runner around the driver call, and its reported duration when the CLI states one.
  • The scorecard adds an "Ask cost" row and an "Ask time" row per mode and per card, grouped by served model, following authorCost's rule: stated only when every counted turn reported a cost, never reading a missing cost as zero. Time is always measured. The author half gets a time row too.
  • The run record carries the per-turn numbers. Tests pin the sums and the not-reported case.

Reader

The epic seat epic:#33595#1 dispatches it to os-dev (domain:devx, packages/qa/scenarios), serial with the other M2 runner cards where files overlap.

Dedup: repo:objectstack-ai/objectstack is:issue scorecard cost per served model → 1 hit (#33595 itself).

Activity

  1. added
    domain:devx
    pm:epic
    area:devpath
    on Nov 15, 2026
  2. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: grade → p2 · 2026-11-15T08:51Z

    ⛔ Not a claim; the pm:epic reservation for epic #33595's seat is unchanged.

    Filed without a grade. This is scenario runner/grader tooling under epic #33595 (eval scoring v2), so tooling p2 (#32997). The epic seat may re-grade inside its epic.

  3. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#33595#1 · os-tesla · session_01L9qiby1cctpVpRbJzjccvY

    Claim: PM loop M2 round 3 · epic #33595 M2 · 2026-11-15T12:03Z
    Session: session_01L9qibxnX5BL9CTRGBRRYAd (card thread; seat session_01L9qiby1cctpVpRbJzjccvY)
    Account: os-tesla
    Branch: claude/project-thread-dg3roj (the card thread's harness-pinned branch; the thread can push only this name)
    Worktree: objectstack-issue-33740
    Domain: domain:devx
    Seat: epic:#33595#1
    File surface: packages/qa/scenarios/src/runner/scorecard.ts (rows), src/runner/orchestrate.ts (TurnSummary / record fields if needed), src/runner/transcript.ts (reported duration from the result line), tests, the runner README, its own changeset (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default (dispatch-gates --tier: no path-derived mandate), effort: xhigh (epic child)
    Clause-②: yes (widening) for each new exported field or type, named with its entry
    Metadata-protocol: none
    Responsibility: the scenario evaluation runner's scorecard in objectstack (ask-side cost and time are not summed); no platform path covers it; reached by eval#1's scenario runs and the model comparison on #33595
    Thread-read: 6891940593
    Premise: partly holds. Seat read origin/main 6ff93dcd: authorCost still covers authoring turns only, but TurnSummary.elapsedMs already exists for a CLI turn, so the thread measures what is recorded before building, per the order
    Serial constraints cleared: queue ①, after #33739 (PR #33767 merged f8f35db8, 11:50Z); #33741 opens after this merges

    Order: /mnt/project-files/epic-33595-1/r2026-11-15-m2/dispatch-33740.md under that folder's FRAME.md. Contract review: arranged by this seat.

  4. added
    pm:dispatched
    on Nov 15, 2026
  5. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#33595#1 · os-tesla · session_01L9qibxnX5BL9CTRGBRRYAd
    os-dev-report

    {
     "issue": 33740,
     "status": "done",
     "branch": "claude/project-thread-dg3roj",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/33872",
     "head": "78734648",
     "session": "session_01L9qibxnX5BL9CTRGBRRYAd",
     "premise_still_valid": true,
     "summary": "The card's premise holds in part. The scorecard summed cost for the authoring turns only, and no row summed the ask side's cost or anyone's time. But every turn already recorded its time: claude, codex and external: run through runTurnProcess, which stamps meta.process.elapsedMs, copied to TurnSummary.elapsedMs, and recorded: replays it. So this builds on that clock and adds none. The scorecard (scorecard.ts) adds Author time, Ask cost and Ask time rows per mode and author time / ask cost / ask time lines per card. The ask figures cover every question and operation turn of the Run half and the iterate, grouped by served model (TurnSummary.model, else MODEL_NOT_REPORTED). Cost follows authorCost (turnCost is its body): stated only when every turn of that model reported a cost. Time is stated only when every counted turn was timed; otherwise the cell reads 'N of M ask turns not timed', never zero and never a smaller sum. A scorecard stored before these fields reads 'not recorded'. Each turn now also records the claude result line's duration_ms / duration_api_ms (meta.reportedDurationMs / reportedApiDurationMs -> TurnSummary), beside elapsedMs; the rows do not sum them. Folded in on the seat's word after #33843 merged (2ae64a6a): each Run half's RunHalf.guardrails becomes HalfScores.guardrails (guardrailTally: pass, fail, or not measured with its reason), rendered as 'Run · guardrails' and 'Iterate · Run · guardrails' rows. A half without guardrails shows '—', and there is no row when no half carries one. Re-scoring eval#1's nine 2026-11-15 model records gives ask cost / time per card: haiku $0.16-$0.21 / 7m26s-11m25s, sonnet $2.25-$2.95 / 6m00s-7m01s, opus $5.27-$6.73 / 6m13s-7m16s.",
     "tests": "On 78734648, after merging main be8db5bf and rebuilding the package and its closure: pnpm --filter @objectstack/scenarios typecheck :: exit 0; vitest run --maxWorkers=2 :: exit 0 (Test Files 34/34, Tests 865/865); eslint --no-inline-config on the 5 touched TS files :: exit 0. New tests: orchestrate.test.ts +4 (ask-side describe: all timed and costed; partly untimed and uncosted; no model, cost or process plus an older scorecard reading 'not recorded'; a mixed model label and '—') and +1 (guardrail rows: fail, pass, not measured with its reason, none, no row); units.test.ts +1 (duration_ms / duration_api_ms parsed; none when absent). Ablations via ablation-replace.mjs; each restore left blob == HEAD and git diff HEAD empty: turnTime reading an untimed turn as zero -> 2 failed / 2 passed; the duration_ms read deleted -> 1 failed; the summarize reportedDurationMs copy deleted -> 1 failed / 3 passed; guardrailTally always 'pass' -> 1 failed / 5 passed; guardrailTally's notMeasured branch made unreachable -> 1 failed / 5 passed.",
     "gates": "dispatch-gates --commands on 78734648 (7 paths, 62 families, the same list as on 38a88c33): 62 exit 0; --ran: '62 derived famil(ies) accounted for — 62 run, 0 NOT-MEASURED' (record out-33740/gates-ran-78734648.list, reconcile ran-reconcile-78734648.log). On the first head 38a88c33: 60 run, 2 NOT-MEASURED. check:dual-build-cjs-loads exited 3 before the closure was built. check-plugin-teardown-shape --self-test exited 3 because its pinned fixture commit was missing from the shallow clone; it exited 0 (48 cases) after that commit was fetched (teardown-selftest-rerun.log). CI on 78734648: every required check is success (Test Core, TypeScript Type Check, Lint & Repo Gates, Build Core, Check Changeset, PR-body guards, Check PR Size, Governed Surface Queue Guard, Test UI, Live E2E UI, Dogfood Regression Gate); the UI build/lint and dogfood shards were skipped. PR mergeable_state is clean.",
     "line_budget": "483 changed lines (+463/-20), 7 files, under 3000; no governed surface",
     "files_changed": [
      ".changeset/33740-scorecard-ask-time-cost.md",
      "packages/qa/scenarios/README.md",
      "packages/qa/scenarios/src/runner/orchestrate.ts",
      "packages/qa/scenarios/src/runner/scorecard.ts",
      "packages/qa/scenarios/src/runner/transcript.ts",
      "packages/qa/scenarios/test/runner/orchestrate.test.ts",
      "packages/qa/scenarios/test/runner/units.test.ts"
     ],
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "9 — reads only: issue_read x4 (#33740 get, comments x2; #33595 get), pull_request_read x5 (#33843 get; #33872 get x2, get_check_runs, get_comments); no write tool",
     "api_writes": "2 — relay pr_create (objectstack#33872, run 43716236494, body read back identical, assignee os-tesla), relay comment on #33740 (this report); plus git push x3 (not REST)",
     "deviations": [
      "PR body r1 predates the guardrail fold-in; the card thread does not PATCH a body, so the revised body for the seat to patch is out-33740/pr-body-r2.md (adds the guardrail exports to Clause-②, a guardrail What-changes bullet, the test, 2 ablations, and Local gates on 78734648). The PR title is also r1; the changeset title adds ', and states each Run half's guardrail'",
      "PR body signature is a plain line under the attribution block, not the frame's HTML signed: trailer (os-dev forbids dev-written HTML comments), as #33763 and #33767",
      "pr_create carried assignees [os-tesla] (the claim's Account, per os-dev); the harness's MCP assignee/reviewer step was skipped",
      "The CLI's duration_ms / duration_api_ms are recorded per turn but not summed: the rows sum the runner's clock only. The two clocks differ by the CLI's start-up (5,824 ms vs 4,366 ms on one measured turn), and two clocks in one row would read as one. Named in Acceptance notes",
      "Author time / Author cost are not split by served model (the author row already names it; the card asks the grouping of the ask rows). Named in Acceptance notes",
      "ExternalTurnSchema (strict) gains no duration field; the runner times the external command itself"
     ],
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: epic seat · noted, not filed. Whether a row should also state duration_api_ms (model time apart from tool time) is left to a later card if wanted",
      "carrier: epic seat · noted, not filed. The docs-drift advisory on #33872 lists content/docs/automation/jobs.mdx via the literal duration_ms; that page's duration_ms is a job-run column (line 511), unrelated to the scenario runner. A false positive, so no docs change"
     ]
    }
  6. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#33595#1 · os-tesla · session_01L9qiby1cctpVpRbJzjccvY

    Landed · 2026-11-15T16:22Z

    PR #33872 merged as 07225ae8 (ACCEPT 6895995251; contract review PASS 6895112166). The scorecard now states what a model's asks cost and how long they took. Per mode it adds Author time, Ask cost and Ask time rows, and per card the matching lines; askSpend groups every question and operation turn of the Run half and the iterate's by served model. Cost and time are summed only when every counted turn recorded them: an untimed or unpriced turn is named ("N of M … not timed" / "not reported (…)"), never folded into a smaller sum or a zero, and an older record reads not recorded. The CLI's own duration_ms / duration_api_ms are recorded beside elapsedMs, not summed with it. The Run · guardrails and Iterate · Run · guardrails rows state RunHalf.guardrails (#33738) as pass, fail or not measured: <reason>, which settles the scorecard line #33738 owed. pm:dispatched dropped; card thread closing. Queue ① moves to #33741.

  7. removed
    pm:dispatched
    on Nov 15, 2026
  8. added 2 commits that reference this issue on Nov 16, 2026
    07225ae
    f81e4b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathdomain:devxpm:epicpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions