Skip to content

fix(scenarios): scorer and card defects from the 18.6.0 gallery refresh (dataset coverage, over-gating, delete floor, card wording) - #36617

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36558-scenario-scorer-gallery-refresh
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36558-scenario-scorer-gallery-refresh

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Part of #36558 (all seven items land here; the card's done-when, a re-run on 18.6.0, is the eval seat's and is the remainder: items 4, 5 and 7 are card wording, which only a fresh build can show working).
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户看到什么变化:用户无感;只有评测席位跑场景卡时,打分器的三处判法和四张卡的提问措辞变了。
  • 为什么做:属于「评测度量:场景卡与评测轮次」专题,修掉画廊刷新里评分器误判和卡片措辞把模型带偏的问题。
  • 出错会怎样:最坏是某次评测把一个回答或构建判得偏严或偏松,只影响评测分数,不碰线上功能,可直接撤回。
  • 要你做什么:无

What changes

One item per row; every conclusion is against origin/main at the merge base of this branch.

Item What changed
1. withheld-field decline scenario-run-grade.ts: on a withheld truth, the asker and field-absence wordings are read with the reply's dataset-coverage sentences left out (datasetCoverage). A sentence is one when it names a dataset or report, by the word or by the name/label of a dataset a query_dataset answer of the turn served, and nothing in it binds to the asker (you, your role, permission, access, visible, hidden, ...). "The Approved Leave dataset can't group by medical note" is no decline; "... can't show medical notes to you: the field is hidden from your role" still is. The #36323 and #36352 readings are unchanged (their pins pass untouched).
2. over-gating gradeAgentActions adds action:OBJECT.NAME->not-confirm-gated for every card action marked confirm: false: it fails when the build sets ai.requiresConfirmation: true (or does not declare the action). The build prompt's action header now says an unmarked action runs with no confirmation gate, so the build is told what it is graded on.
3. delete floor gradePersonaGrants reads a granted delete against the platform's owner-only delete floor (deleteFloorReading), from the platform code: member_default's owner_only_deletes (created_by == current_user.id, plugin-security/src/platform-ownership-policies.ts) is lifted only by SharingService.checkDelete answering allow (plugin-sharing/src/sharing-service.ts): ownership, Modify All or a write depth of org, and only where the object's org-wide default is not public and it has an owner_id (checkDelete abstains otherwise, and an abstain keeps the floor, Modify All included). The runner loads seed rows as the admin, so no persona created one; the row's owner is the runner's own rowOwner, moved to src/row-owner.ts so the scorer reads the same answer without importing the runner (re-exported from runner/prompts.ts, runner surface unchanged). A row only an authored delete/all row policy, a controlled_by_parent master's gate, or a declared route action (via, or the confirm-gated action for a waiting write) could admit is not measured. leave_balances hr_officer with allowDelete and no Modify All now fails persona-grant:hr_officer:leave_request:delete, naming LR-0100 and LR-0003.
4. service_desk log_ticket The action summary now says it assigns the ticket to the signed-in agent who logs it and opens it (status open).
5. leave_balances sick_by_medical_note The ask (en and zh) counts by what the medical note itself says, not by whether a medical certificate is attached.
6. order_to_cash overpay_invoice Accepted HOOK_ABORTED; the seed is unchanged. refusalMeets now lets a declared VALIDATION_FAILED be met by HOOK_ABORTED at a 4xx status. Reason: the card measures that the app's own rule refuses an overpayment, and HOOK_ABORTED is exactly that (the ledger's undeclared hook refusal, answered at the status the hook chose, else 400; a sandbox fault is served 5xx and stays unmet). Ruling A on #31999 item 9 already accepts a hook's declared refusal; an undeclared one is the same app rule without a code. The seed route cannot keep the card measuring what it claims: invoices are seeded with their stored amount_paid / balance, which already count each loaded payment, and the card's questions read those totals; no seed in which a rule comparing a payment with its invoice's balance accepts every loaded payment and refuses the overpayment exists short of seeding invoices without those totals, which changes what the questions measure.
7. automation.record-triggered-flow An explicit flow ask on the two cards; the posture line is kept. requisition_to_receipt: "the requisition becomes ordered, set by a record-triggered flow on the purchase order when its status changes to sent". travel_expense: "a record-triggered flow on the approval step then moves the claim on (once the manager approves, the claim becomes manager-approved and its Finance step opens)". Both cards' "prefer declarative" line now lists record-triggered flows (en and zh). The posture line is right: it is about a value derived from other fields, which a flow leaves empty on every loaded row; both asks are runtime events whose seeded rows already carry their status, so they do not contradict it. asset_lifecycle and service_desk carry the tag and already ask for flows.

Also: packages/qa/scenarios/README.md and docs/qa/scenarios/README.md describe the three new readings; one @objectstack/scenarios patch changeset (the card JSONs ship in the package library).

Tests

All on head a2c2e31cdb, package @objectstack/scenarios, after pnpm --filter '@objectstack/scenarios^...' build and the package's own build, through the shared verify lock.

  • pnpm --filter @objectstack/scenarios typecheck: exit 0.
  • pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2: Test Files 42 passed (42), Tests 1324 passed (1324).
  • New pins: item 1 in test/score/scenario-run-grade.test.ts (new describe), item 2 as an ACTION_DEGRADATIONS row in test/score/scenario-tags.test.ts, item 3 in a new describe there (leave_balances card, seven cases), item 6 in test/runner/mid-tier-run-readings.test.ts beside the ruling-A cases.
  • Forced test changes (an item flipped an existing reading):
    • Item 2 adds one check per confirm: false action: control-card totals 26/37/32 become 28/39/34 (scenario-cards.test.ts), the rich build's action count 5 becomes 6 and the missing-action list gains set_task_status->not-confirm-gated (scenario-tags.test.ts).
    • Item 3: the crm fixture builds (test/export/fixture.ts, test/runner/orchestrate.test.ts) and the crm completed build (scenario-cards.test.ts) give the sdr writeScope: 'org' on contact, which lifts the floor for its deletes of admin-owned contacts without unmasking email the way Modify All would; the completed-build case gains a degrade that drops it. The project card's task is a controlled_by_parent detail, so persona-grant:contractor:task:delete reads not measured on a granting set in three scenario-tags.test.ts cases, and the waiting-confirmation case's figures move accordingly. No case was deleted.
  • The R3 ACTING roster in mid-tier-run-readings.test.ts needed no change: no operation ask was reworded (item 5 rewords a question).
Ablations (one per changed tested behaviour, unit tests import src/, so no dist leg; each mutation through scripts/ablation-replace.mjs, restored to the HEAD blob with an empty git diff HEAD)
  • Item 1, the dataset-coverage filter made a no-op: scenario-run-grade.test.ts Tests 2 failed / 86 passed (the two ⛔ cases).
  • Item 2, the not-gated check made to pass whenever declared: scenario-tags.test.ts Tests 1 failed / 109 passed (set_task_status->not-confirm-gated fails on its own defect).
  • Item 3, the floor reading switched off: scenario-tags.test.ts + scenario-cards.test.ts Tests 9 failed / 122 passed.
  • Item 6, HOOK_ABORTED taken out of refusalMeets: mid-tier-run-readings.test.ts Tests 1 failed / 61 passed.

Acceptance notes

  • The update half of the same floor (owner_only_writes) is not modelled by persona-grant:*:update; the card scoped item 3 to delete. An update floor reading would follow checkEdit (an edit share and a queue also lift it, a public_read_write default opens it). Noted, not filed: no run has shown it.
  • A delete the card refuses PERMISSION_DENIED is still judged by the set alone; no open card declares one, so the floor is not read on that leg.
  • A controlled_by_parent detail's delete is not measured rather than modelled through its master's update gate; on the control cards that is task and invoice_line.
  • The build prompt does not state the delete floor; per docs/qa/scenarios/README.md the persona's role must imply its grants (hr_officer is "organization-wide ... who deletes withdrawn leave requests").
  • docs/qa/scenarios/builds/travel_expense.provenance.json records the card's sha256 at build time; the card text changed, so a re-export reads the provenance as against the earlier card. Nothing pins that hash.

Verification

First read (by risk):

  1. packages/qa/scenarios/src/score/scenario-tags.ts deleteFloorReading: the floor model, the one reading of platform code in this PR.
  2. packages/qa/scenarios/src/score/scenario-run-grade.ts declinesWithheld / datasetCoverage: what counts as binding to the asker.
  3. packages/qa/scenarios/src/score/scenario-operation-grade.ts refusalMeets: the HOOK_ABORTED widening.

Two-minute check: pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/score/scenario-tags.test.ts shows the describe "a delete the set grants, read against the platform's owner-only delete floor" with seven passing cases.

Local gate subset (dispatch-gates --commands derivation at a2c2e31: 70 commands; 69 exit 0, 1 NOT MEASURED)
  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILE: "70 derived famil(ies) accounted for — 69 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)".
  • NOT MEASURED: pnpm check:dual-build-cjs-loads, exit 3, PREREQUISITE NOT MET (it reads every package's dist; only the scenarios closure is built here). Left to CI.
  • Every other derived command exited 0, among them check:nul-bytes, check:cross-package-test-inputs, check:test-source-alias, check:published-files, check:doc-authoring, check:issue-citations, check:type-check-coverage, check:type-check-debt, check:adr-0087-registration, check:changeset-no-major, check:empty-changeset.
  • overlap-check: VERDICT clean exit 0 (origin/main merges cleanly, 0 PR heads share a file).
  • Everything else CI runs (the repo-wide lint, Test Core including the repo project, Build Core, the type-check lanes) is CI's.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmPTDM2MxHR8cvoMVUX

@github-actions github-actions Bot added size/l 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 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/scenarios, touching 22 documentable anchor(s). ⚠️ 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.

18 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json ed0edb1b507bcd06bc0b40c3aea5490d2a026293.

⛔ 13 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

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
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 68 of 251 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 ed0edb1b507bcd06bc0b40c3aea5490d2a026293 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 68566ee7fb5e6d5912be56165c1b6bb841f43f71 — the merge of head a2c2e31cdbedbad066b9bb799f223621ed718b48 into base ed0edb1b507bcd06bc0b40c3aea5490d2a026293, 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 68566ee7fb5e6d5912be56165c1b6bb841f43f71 && git checkout 68566ee7fb5e6d5912be56165c1b6bb841f43f71
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ed0edb1b507bcd06bc0b40c3aea5490d2a026293 a2c2e31cdbedbad066b9bb799f223621ed718b48 && git checkout -B drift-repro ed0edb1b507bcd06bc0b40c3aea5490d2a026293 && git merge --no-ff a2c2e31cdbedbad066b9bb799f223621ed718b48

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

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

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs ed0edb1b507bcd06bc0b40c3aea5490d2a026293 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmPTDM2MxHR8cvoMVUX

席位核对

ACCEPT — PR #36617 @ a2c2e31cdbedbad066b9bb799f223621ed718b48 · card #36558 · L1 by area s2-E · 2026-11-23T04:06Z

  • Shape (l1-face --pr 36617, CLEAN, 13 items): draft, base main, Part of #36558 (all seven items land here; the card's done-when, a re-run on 18.6.0, is the eval seat's remainder, so Part of is right); no other card bound; Clause-②: no · Metadata-protocol: none; @objectstack/scenarios patch changeset; checks at this head 35 success · 16 expected skip · 0 failed · 0 pending; mergeable clean.
  • Diff read, item by item: (1) declinesWithheld drops dataset/report-coverage sentences (DATASET_NOUN, or a name/label a query_dataset call served, lower-cased in datasetCitations) unless the sentence binds to the asker (ASKER_BOUND); WITHHELD_ACT still reads the whole reply. (2) gradeAgentActions adds ->not-confirm-gated for every confirm: false action; the build prompt line now says an unmarked action runs with no gate. (3) deleteFloorReading models owner_only_deletes: lifted by ownership (rowOwner, moved verbatim to src/row-owner.ts and re-exported from prompts.ts), Modify All (holdsSuperuserBypass) or writeScope: 'org', only where the OWD is not public and the object is user-owned; checked against platform-ownership-policies.ts (owdOpenWritesCoversOperation opens update only) and the controlled_by_parent ruling there; row-dependent policies, a master gate or a declared route read not measured. (6) refusalMeets: HOOK_ABORTED at 4xx meets a declared VALIDATION_FAILED only (the isValidationCode(declared) guard precedes it). (4)(5)(7) card wording: service_desk log_ticket summary, leave_balances sick_by_medical_note ask (en + zh), requisition_to_receipt / travel_expense detailed prompts ask for record-triggered flows (en + zh); no operation ask.en changed, so the R3 ACTING roster is untouched.
  • Tests: new pins for items 1, 2, 3 (7 cases) and 6; forced changes named in the report (control totals +2, action count 6, sdr writeScope: org in the crm fixture with a new degrade case, three contractor task deletes now not measured as controlled_by_parent); no case deleted. Four ablations each red (2 / 1 / 9 / 1), restored to HEAD blob. Package suite under the lock: 42 files, 1324 passed.
  • Changeset read sentence by sentence: patch; the five bullets match the diff.
  • Accepted deviations: file surface grew by src/row-owner.ts (a move), scenario-operation-grade.ts (item 6's home), two READMEs and three test files; the first WIP push preceded overlap-check (clean afterwards); single-file runs and ablations ran outside the lock, the full build/typecheck/test inside it; check:dual-build-cjs-loads NOT MEASURED locally (exit 3), green in CI.
  • Out of scope: persona-grant update does not model owner_only_writes; a PERMISSION_DENIED-refused delete is still read off the permission set — recorded in the PR's acceptance notes, no run has shown either. Security: none. No contract face ⇒ no L2 owed.
  • Landing: not governed, 582 changed lines ≤ 3000 ⇒ area s2-E lands it; card Scenario scorer and card defects from the 18.6.0 gallery refresh (2026-11-22) #36558 stays open for the eval seat's 18.6.0 re-run.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmPTDM2MxHR8cvoMVUX

Landing — PR #36617 @ a2c2e31cdbedbad066b9bb799f223621ed718b48 · area s2-E · 2026-11-23T04:07Z

probe reading
check-governed-merges --pr 36617 NOT governed · 582 changed lines ≤ 3000
landing-k --pr 36617 K = 1 < 15 · no new locale pack under a label PR · no shared book moved

State: undraft + auto-merge through the queue; Part of #36558 — on merge the card's remainder (the 18.6.0 re-run) goes to the eval lane.

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/l 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.

2 participants