Repository navigation
fix(scenarios): scorer and card defects from the 18.6.0 gallery refresh (dataset coverage, over-gating, delete floor, card wording) - #36617
Conversation
…sh (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmPTDM2MxHR8cvoMVUX
…y delete floor; card wording Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmPTDM2MxHR8cvoMVUX
…enario-scorer-gallery-refresh
📓 Docs Drift CheckThis PR changes 1 package(s): 18 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 13 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
|
repo:objectstack#2 · os-steve · session_01ADHkmPTDM2MxHR8cvoMVUX 席位核对ACCEPT — PR #36617 @
|
|
repo:objectstack#2 · os-steve · session_01ADHkmPTDM2MxHR8cvoMVUX Landing — PR #36617 @
State: undraft + auto-merge through the queue; |
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/mainat the merge base of this branch.scenario-run-grade.ts: on awithheldtruth, 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 aquery_datasetanswer 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).gradeAgentActionsaddsaction:OBJECT.NAME->not-confirm-gatedfor every card action markedconfirm: false: it fails when the build setsai.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.gradePersonaGrantsreads a granteddeleteagainst the platform's owner-only delete floor (deleteFloorReading), from the platform code:member_default'sowner_only_deletes(created_by == current_user.id,plugin-security/src/platform-ownership-policies.ts) is lifted only bySharingService.checkDeleteansweringallow(plugin-sharing/src/sharing-service.ts): ownership, Modify All or a write depth oforg, and only where the object's org-wide default is not public and it has anowner_id(checkDeleteabstains 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 ownrowOwner, moved tosrc/row-owner.tsso the scorer reads the same answer without importing the runner (re-exported fromrunner/prompts.ts, runner surface unchanged). A row only an authored delete/all row policy, acontrolled_by_parentmaster's gate, or a declared route action (via, or the confirm-gated action for a waiting write) could admit is not measured. leave_balanceshr_officerwithallowDeleteand no Modify All now failspersona-grant:hr_officer:leave_request:delete, naming LR-0100 and LR-0003.log_ticketsick_by_medical_noteoverpay_invoiceHOOK_ABORTED; the seed is unchanged.refusalMeetsnow lets a declaredVALIDATION_FAILEDbe met byHOOK_ABORTEDat a 4xx status. Reason: the card measures that the app's own rule refuses an overpayment, andHOOK_ABORTEDis 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 storedamount_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.automation.record-triggered-flowAlso:
packages/qa/scenarios/README.mdanddocs/qa/scenarios/README.mddescribe the three new readings; one@objectstack/scenariospatch changeset (the card JSONs ship in the package library).Tests
All on head
a2c2e31cdb, package@objectstack/scenarios, afterpnpm --filter '@objectstack/scenarios^...' buildand 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).test/score/scenario-run-grade.test.ts(new describe), item 2 as anACTION_DEGRADATIONSrow intest/score/scenario-tags.test.ts, item 3 in a new describe there (leave_balances card, seven cases), item 6 intest/runner/mid-tier-run-readings.test.tsbeside the ruling-A cases.confirm: falseaction: 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 gainsset_task_status->not-confirm-gated(scenario-tags.test.ts).test/export/fixture.ts,test/runner/orchestrate.test.ts) and the crm completed build (scenario-cards.test.ts) give the sdrwriteScope: 'org'on contact, which lifts the floor for its deletes of admin-owned contacts without unmaskingemailthe way Modify All would; the completed-build case gains a degrade that drops it. The project card'staskis acontrolled_by_parentdetail, sopersona-grant:contractor:task:deletereads not measured on a granting set in threescenario-tags.test.tscases, and the waiting-confirmation case's figures move accordingly. No case was deleted.mid-tier-run-readings.test.tsneeded 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)
scenario-run-grade.test.tsTests 2 failed / 86 passed (the two ⛔ cases).scenario-tags.test.tsTests 1 failed / 109 passed (set_task_status->not-confirm-gated fails on its own defect).scenario-tags.test.ts+scenario-cards.test.tsTests 9 failed / 122 passed.HOOK_ABORTEDtaken out ofrefusalMeets:mid-tier-run-readings.test.tsTests 1 failed / 61 passed.Acceptance notes
owner_only_writes) is not modelled bypersona-grant:*:update; the card scoped item 3 to delete. An update floor reading would followcheckEdit(an edit share and a queue also lift it, apublic_read_writedefault opens it). Noted, not filed: no run has shown it.deletethe card refusesPERMISSION_DENIEDis still judged by the set alone; no open card declares one, so the floor is not read on that leg.controlled_by_parentdetail's delete is not measured rather than modelled through its master's update gate; on the control cards that istaskandinvoice_line.docs/qa/scenarios/README.mdthe persona's role must imply its grants (hr_officer is "organization-wide ... who deletes withdrawn leave requests").docs/qa/scenarios/builds/travel_expense.provenance.jsonrecords 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):
packages/qa/scenarios/src/score/scenario-tags.tsdeleteFloorReading: the floor model, the one reading of platform code in this PR.packages/qa/scenarios/src/score/scenario-run-grade.tsdeclinesWithheld/datasetCoverage: what counts as binding to the asker.packages/qa/scenarios/src/score/scenario-operation-grade.tsrefusalMeets: theHOOK_ABORTEDwidening.Two-minute check:
pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/score/scenario-tags.test.tsshows 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)".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.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).repoproject, Build Core, the type-check lanes) is CI's.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmPTDM2MxHR8cvoMVUX