Skip to content

fix(scenarios): travel_expense build provenance names the current card; run --template warns on a stale cardSha256 - #37339

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36491-travel-provenance-card-sha
Nov 25, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36491-travel-provenance-card-sha

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #36491
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:只影响内部场景评测工具,差旅报销的已验证构建记录改成指向现在这张卡,评测跑在不匹配的记录上时会先提示一句。
  • 属于场景卡评测的固定样本维护,替每日问数评测解决"记录指向旧卡"的问题。
  • 出错时只是多一行或少一行提示,评测照常打分;改动可直接撤回。
  • 无

What changes

  • docs/qa/scenarios/builds/travel_expense.provenance.json: cardSha256 29162eef… -> 212abedb6b59a5ac0c6921c25bdcc4dc057cbc25e866a9cd2ed962920368a00d, the sha256 of the raw bytes of docs/qa/scenarios/travel_expense.json on dbc1765a24. That is the hash the loader computes (loader.ts fileSha256, createHash('sha256').update(bytes)) and every run record stamps (CardStamp); there is no canonical form. The issue body names a8a67be3…; the card moved again since (feat(scenarios): a card names the agent action an operation goes through (via) #36503 to 68eb89a9…, fix(scenarios): scorer and card defects from the 18.6.0 gallery refresh (dataset coverage, over-gating, delete floor, card wording) #36617 to 212abedb…).
  • packages/qa/scenarios/src/runner/cli.ts: templateProvenanceWarning(path, card) reads F.provenance.json beside the --template F file; when it names the same card with another cardSha256 (or none, or is not JSON), run prints a warning: template provenance: line before the card runs. It never refuses; a missing provenance or one for another card says nothing. It lives in the CLI entry, not the ./runner export, so the published import surface is unchanged.
  • packages/qa/scenarios/README.md: one sentence under "Template and ask modes".
  • Changeset: @objectstack/scenarios patch.

Acceptance notes

Verification

First read (by risk):

  1. packages/qa/scenarios/src/runner/cli.ts, templateProvenanceWarning: when it stays silent and when it warns.
  2. docs/qa/scenarios/builds/travel_expense.provenance.json: the one-line hash change.

Two-minute check: sha256sum docs/qa/scenarios/travel_expense.json prints 212abedb6b59a5ac…, the same value the provenance now holds.

Tests and gates (head 0d4f42e)
  • os-verify-lock.sh -c "pnpm --filter @objectstack/scenarios build && … typecheck && … test" on af13a9a6a5 (the test/src tree of the final head): VERDICT command-exit 0; Test Files 43 passed (43), Tests 1342 passed (1342).
  • Ablation (committed first, restored with git checkout HEAD --, git diff HEAD empty, blob hash matched): scripts/ablation-replace.mjs replaced if (provenance.cardSha256 === card.sha256) return undefined; with return undefined; (anchor 1 -> 0). test/runner/template-provenance.test.ts then went 2 failed / 4 passed, the two warning cases red.
  • node scripts/pm/dispatch-gates.mjs --commands on af13a9a6a5: 65 commands, all run; --ran reconciliation: 65 derived, 65 run, 0 UNRUN. Non-zero: check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (needs a whole-workspace build, so NOT MEASURED locally; CI runs it). check:dts-closure exit 1 in the batch because plugin-audit dist was half-built in this shared tree; after pnpm --filter @objectstack/plugin-audit build it exits 0. On 0d4f42ec49 (changeset declaration lines only) the changeset family ran again: check-changeset-no-major, check-empty-changeset, check-adr-0087-registration, check:changeset-gate-self-tests and check:nul-bytes all exit 0.
  • scripts/pm/overlap-check.mjs: VERDICT clean exit 0. feat(spec)!: PROTOCOL_VERSION 18 → 19, and every current-protocol handshake reads '^19' #37314's file list does not intersect this diff.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr

…un --template warns on a stale one

The verified build's provenance named card sha256 29162eef..., the card
before #36320 and #36617; the card file on main hashes to 212abedb...
(sha256 of the file's bytes, as the loader stamps it). Since the build
was authored only the card's prompt and run sections changed; expect and
iterate did not, so the build file and its verified scores stand.

run --template F now prints a warning when F.provenance.json names the
same card with another cardSha256, and a test pins each committed
provenance to its card and build file.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr
…the fixtures

The committed-fixture pin read docs/qa/scenarios/builds/, a radius the
package does not declare; it is dropped from this change. The warning's
own cases stay, plus one that reads the provenance from disk.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ⚠️ 1 changed file(s) yielded no anchor (packages/qa/scenarios/README.md), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/qa/scenarios/README.md) — pages documenting those are invisible to this run
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json c2f8bff93f6484c43b7667955a0a3541c1454440 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from cebd4eb2e8dbbe2de8d032dcd5466857ab39c5a0 — the merge of head 0d4f42ec4956fc1ad9e92b29b6979e7051e8d753 into base c2f8bff93f6484c43b7667955a0a3541c1454440, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin cebd4eb2e8dbbe2de8d032dcd5466857ab39c5a0 && git checkout cebd4eb2e8dbbe2de8d032dcd5466857ab39c5a0
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c2f8bff93f6484c43b7667955a0a3541c1454440 0d4f42ec4956fc1ad9e92b29b6979e7051e8d753 && git checkout -B drift-repro c2f8bff93f6484c43b7667955a0a3541c1454440 && git merge --no-ff 0d4f42ec4956fc1ad9e92b29b6979e7051e8d753

node scripts/docs-audit/affected-docs.mjs --json c2f8bff93f6484c43b7667955a0a3541c1454440

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr

席位核对 — ACCEPT · L1 · head 0d4f42ec4956fc1ad9e92b29b6979e7051e8d753 · 2026-11-25T19:11Z

Zone a4-A, card #36491. Read from the PR's diff and check-runs, not from the dev report.

  1. Shape. 5 files, +116 / −5: builds/travel_expense.provenance.json (cardSha256 29162eef… → 212abedb…, the raw-byte sha256 of travel_expense.json on main, the same hash loadedCardStamp stamps), src/runner/cli.ts (templateProvenanceWarning: run --template F prints a warning: template provenance: line when F.provenance.json names the same card with another cardSha256, none, or is not JSON; never refuses; the card stamp moved above runCard unchanged), the 6-case pin, one README sentence, a @objectstack/scenarios patch changeset (Clause-②: no, Metadata-protocol: none).
  2. Against the card. The stale hash is refreshed and the optional guard is in; builds/ holds one provenance, so no other was stale.
  3. Gates. Every check-run on this head completed success or an expected skip; none failed.
  4. Dev open questions. (1) cardSha256 names the card the fixture is current against (A, current practice); the one-line definition belongs to docs/qa/scenarios/README.md, outside this claim's file surface, so it is dropped here, not owed. (2) No card for a CI pin of provenance against its card (seat: a new gate defaults to no).
  5. Landing. Not governed (check-governed-merges), 121 changed lines ⇒ the zone lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr

Landing · head 0d4f42ec4956fc1ad9e92b29b6979e7051e8d753 · 2026-11-25T19:13Z

Probe Reading
check-governed-merges --pr 37339 NOT governed
landing-k --pr 37339 OK (K = 0)

State: L1 ACCEPT on this head (7171970057); every check-run green or expected skip. Ready and auto-merge in this stroke. On MERGED, #36491 closes by Fixes.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 25, 2026 19:13
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit a182fbe Nov 25, 2026
52 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36491-travel-provenance-card-sha branch November 25, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scenarios fixture: builds/travel_expense.provenance.json cardSha256 is stale after #36320 (card a8a67be3…, provenance 29162eef…)

2 participants