Skip to content

docs(scenarios): an acknowledged roll-up finding on a withheld child is still charged - #36066

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/area-a4B-35006
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/area-a4B-35006

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread
Fixes #35006

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:场景评测的说明文档写明一条既有计分规则,并加一条测试钉住它,分数不变。
  • 属于「MCP 二期与问数」专题:回答作者写了理由的汇总泄漏告警要不要照样扣分。
  • 出错时只会让评测里写了理由的泄漏不再扣分,本改动只加文档和测试,可直接撤回。
  • 无

What changes

The seat ruled (reading 7062005269, from the maintainer's ruling on #33818): count as today. A security-rollup-source-unreadable finding that the build acknowledged with rollupSourceUnreadableReason is still charged as a failed Build check whenever the card withholds the roll-up's child (or the child field it reads) from that persona. A written reason does not change what the persona sees.

  • packages/qa/scenarios/README.md, the "Roll-ups over withheld data" bullet: states that rule, and how the acknowledged finding differs on the wire (the info arm, the reason appended to the message).
  • packages/qa/scenarios/test/runner/orchestrate.test.ts: one new top-level describe, placed right after the existing roll-up charge block. It runs the real @objectstack/lint rule on acknowledged permission sets and pins three things. First, the rule answers each finding at info, with the ...rollupSourceUnreadableReason path and the . Acknowledged on the set: "REASON" suffix. Second, rollupSourceCharges reads every suffixed message without throwing, through both of its readings: the object gate (client_viewer) and the field gate (contractor). It charges each one. Third, as a control, the same build without the reasons is charged for exactly the same roll-ups.
  • .changeset/35006-scenarios-acknowledged-rollup-charged.md: patch, because README.md is in the package's files[].

No src/** change and no score movement: the runner already charges these findings. This PR writes the rule down and pins it.

Tests

Readings at the head this PR was opened on
  • pnpm --filter @objectstack/scenarios build && pnpm --filter @objectstack/scenarios test && pnpm --filter @objectstack/scenarios typecheck (under the verify lock): VERDICT command-exit 0. Test Files 40 passed (40), Tests 1211 passed (1211), then tsc --noEmit clean. A --listFiles count of 1 shows that the package's tsc program includes test/runner/orchestrate.test.ts.
  • Targeted: vitest run test/runner/orchestrate.test.ts -t 'acknowledged roll-up|security-rollup-source-unreadable on a child' gave Tests 9 passed: the 8 existing roll-up charge cases plus the new one.
  • No ablation: the diff changes no tested behaviour (a test-only pin plus prose).

Acceptance notes

  • The rollupSourceCharges docblock in orchestrate.ts says "the info row-scope arm — is not charged". That is accurate, because it names the row-scope arm. I left it alone, since src/** is outside this claim's file surface.
  • The commit trailer is the model-free pair the pre-push hook (check:commit-card-trailers) requires. The dispatch spelled a model-named co-author, and the hook refused it.

Verification

Read first: the new describe in packages/qa/scenarios/test/runner/orchestrate.test.ts. The risk hunk is the charges assertion: it would fail if the runner ever dropped info findings or stopped reading the suffixed message.

Two-minute check: pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/runner/orchestrate.test.ts -t 'acknowledged roll-up' should report 1 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt

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

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 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. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

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
  • 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 615d99542a404ba2fd5e8f3d9840d07550a16254 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4cyFzxtKk2q3dE8qte3

L1 verdict (L1-a): ACCEPT at head f58b0f590f (Fixes #35006). Full read.

席位核对

Shape and gates. l1-face --pr 36066 CLEAN (13 items, none flagged). Check-runs at f58b0f5: 33 success, 16 expected skip, 0 failed, 0 pending. Lint & Repo Gates and TypeScript Type Check both success. First line Fixes #35006, no closing keyword near another card. 3 files: packages/qa/scenarios/README.md (+3/-1 in substance), one pinning describe in packages/qa/scenarios/test/runner/orchestrate.test.ts (+75), and an @objectstack/scenarios patch changeset. There is no src change. Not governed. The changeset is owed: @objectstack/scenarios files[] is dist, README.md, CHANGELOG.md, so the README edit ships.

Fixes is right. The seat's reading 7062005269 settles the scope: #33818 decides it, and an acknowledged finding is counted as today, so no score moves. It owes two build items, and both are here:

  1. The README states that an acknowledged finding on a withheld child is still charged, in the scorecard section the card names (~682). The card's Done-when "the README states the rule and the runner follows it" holds: the runner already follows it, and this PR pins that.
  2. One pinning test runs the real rule on acknowledged sets. It also covers the message-suffix path the seat flagged, on both of the runner's readings.

The test, read against the code on main:

  • validate-rollup-source-visibility.ts:446-452: the acknowledged arm keeps rule: SECURITY_ROLLUP_SOURCE_UNREADABLE, sets severity: 'info', moves path to ….rollupSourceUnreadableReason, and suffixes the message . Acknowledged on the set: "<reason>". The test asserts all four on the real rule's output: three findings, the rule id, info, the exact paths, and the suffix regex anchored at $.
  • orchestrate.ts:830 rollupSourceCharges filters on the rule id, and readRollupSourceFinding throws on wording it cannot parse. The test runs the real function on the acknowledged build. It covers the object gate (client_viewer, task withheld) and the field gate (contractor, task.estimate_hours withheld). It asserts all three charges with persona, roll-up, withheld and the acknowledged path, so a suffix the parser choked on would throw and fail the test.
  • Positive control: the same build without the reasons gives identical charges (persona, rollup, child, withheld). A charge that depended on the acknowledgement either way would fail.

README and changeset, sentence by sentence. The README addition says what the test pins: the info turn, the suffix, "still charged, in the same check", and why ("a written reason does not change what the persona sees … masked, never explained"). That is the seat reading's argument and the published door rule (door-rules-corpus.ts:198). It stays distinct from the existing "the rule's info row-scope arm is not charged" just before it, because it names the acknowledgement key. The changeset repeats the README and says the scorer's behaviour does not change, which is true: no src file moves.

Deviation accepted. The pin sits in the existing orchestrate.test.ts harness, not a new file, per AGENTS.md's shared-harness rule.

Landing: not governed, no narrowing. Seat 4 lands it, as a4-B asked.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF

席位核对 — ACCEPT · repo:objectstack#4 · head f58b0f590fd94677dfa00e0d0d11d400efbf285d

  • 速读:README line plus one pinning test. An acknowledged security-rollup-source-unreadable finding on a child the card withholds is still charged to the Build. Scorer behaviour is unchanged.
  • 档:NOT governed (check-governed-merges on the final file list), 90 changed lines; L1 ACCEPT 7062766547; contract read: none owed (no contract face; README + test + patch changeset, Clause-②: no, Metadata-protocol: none) — seat self-read.
  • Security-touching: no —— the scorer's grading of a lint finding; no runtime, permission or auth path.
  • 席位意见:可合。
  1. 形态 — one card (scenarios: decide and write down whether a lint finding the author acknowledged with a reason counts against the build score #35006), S.
  2. 前提实测 — orchestrate.ts:840 filters on rule id only; the test runs the real rule on acknowledged permission sets (child object and child field readings) and pins the suffixed info message is charged.
  3. 门禁 — L1 ACCEPT, CI 33 success / 0 failed at this head.
  4. 接受的偏差 — none.
  5. 范围外去向 — a card-schema way to say "total meant visible, children hidden" is not in scope (seat reading on scenarios: decide and write down whether a lint finding the author acknowledged with a reason counts against the build score #35006).
  6. 落地条款 — ordinary queue landing; seat readies and arms auto-merge on the maintainer's landing line for this area.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF

Landing at head f58b0f590fd94677dfa00e0d0d11d400efbf285d: NOT governed, L1 ACCEPT 7062766547, seat record ACCEPT on this head, CI green. Ready + auto-merge on the maintainer's landing approval in the seat thread (2026-11-21T13:14Z).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 13:14
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 44909161382 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (1/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/wall-package-refusal.dogfood.test.ts > [ADR-0131 D3 · #15204 W2] group: a catalog-carrying package is the platform operator's > CONTROL: the platform 
      ↳ 失败原因: @objectstack/dogfood:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • test/wall-package-refusal.dogfood.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 4 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv

Re-landing once after a queue kick · 2026-11-21T15:25Z · head f58b0f590fd94677dfa00e0d0d11d400efbf285d (unchanged since L1 ACCEPT 7062766547 and seat record 7062778219; card #35006 taken over by this seat, comment 7064823547).

Kick: queue run 44909161382 (2026-11-21T13:51Z), Dogfood Regression Gate (1/3), test/wall-package-refusal.dogfood.test.ts > CONTROL case, Test timed out in 5000ms. No anchor for this file in the signature ledger (the only near match, #32772, names wall-package-doors-refusal and is closed), so it is a new signature. The three facts for one re-queue (landing-operations.md) all hold:

  1. Import closure disjoint: this diff is packages/qa/scenarios/README.md, one test in packages/qa/scenarios/test/runner/orchestrate.test.ts and a changeset; the dogfood test boots example apps and imports nothing from @objectstack/scenarios.
  2. Queue base green on the same shard: the later queue CI runs 44914942873, 44915510810 and 44916534593 (pull requests fix(approvals): the approval request page names the record it decides on, Approve leads the band, one time face #36095, fix(grid): in a list cell a single click only selects; no copy buttons (#36015) #36033, chore(ui): raise the eager ui-components ceiling x1.30 to 451,100 on maintainer ruling #36109) all concluded success, dogfood shards included.
  3. First error is a timeout, not an assertion.

One re-queue only. If the same signature kicks it again, this seat stops, files a queue-flake anchor and leaves the PR for re-diagnosis.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 30b0987 Nov 21, 2026
50 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-a4B-35006 branch November 21, 2026 15:45
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…ary agent-confirmation rule is off and deprecated (objectstack-ai#36077)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D7UBkcmf1Qy7iEMxarYt8wU)_

Fixes objectstack-ai#33691

Clause-②: no
Metadata-protocol: none

## 维护者速读

1. 用户无感:场景评测在不可逆操作上恢复严格评分,智能体自己替人「确认」后直接执行的,从「通过」改回「不通过」;评测报告的说明行同步更新。
2. 属于「人工确认上线」那组工作的收尾:平台已能把确认交给真人,之前为外部 AI 自行确认临时放宽的评分可以撤掉。
3. 只影响评测打分,不碰平台运行时;若评分有误只会让评测分数偏低,改回开关即可撤回。
4. 无。

## What changes

- `AGENT_CONFIRMATION_MEETS_PENDING` is now `false`
(`packages/qa/scenarios/src/score/scenario-operation-grade.ts`): every
`pending_confirmation` operation is graded strictly again. An agent that
applies an irreversible write with its own `confirm: true` fails
`answer:pending_confirmation` and `no-write`; one that asks first passes
(`asked first`), and the person's confirmation turn grades the write
after it, as before.
- No export is removed (`@objectstack/scenarios` is published, npm
`latest` 18.6.0). The rule-only names are marked `@deprecated` and their
deletion is carried by objectstack-ai#36057 (next major):
`AGENT_CONFIRMATION_MEETS_PENDING`, `confirmedByAgent`,
`AgentConfirmedObservation`, `AgentConfirmationRule`,
`OperationObservation.agentConfirmed`,
`GradeOperationOptions.agentConfirmation`,
`GradeOperationOptions.acceptAgentConfirmation`,
`agentConfirmationChecks`, `agentConfirmedOf`, `actionGatesOf`,
`ConfirmationTally.confirmedByAgent`. Only a direct `gradeOperation`
call can still opt in with `acceptAgentConfirmation: true`;
`gradeCardOperation`, and so the runner, takes no options.
- Unchanged, byte for byte: `askNamesTarget`, `AskNaming`, `askedFirst`,
`OperationGrade.confirmation`. The confirmation-turn path in
`orchestrate.ts` (the later ruling 「点名单条就算确认」, objectstack-ai#34360) reads them.
- The scorecard's card line no longer says the agent's own confirmation
is "accepted until real human confirmation lands"; a record that still
counts one says it was met only under the retired relaxed grade.
- Prose now teaches the strict grade everywhere:
`packages/qa/scenarios/README.md`, the card-authoring reference
`docs/qa/scenarios/README.md` (the `pending_confirmation` outcome; the
advice to name the row in the `ask` stays, since the confirmation turn
needs it), and the `pending_confirmation` outcome's JSDoc in
`packages/qa/scenarios/src/schema.ts`. The grade JSDoc and the changeset
say what the door does: it refuses the caller's own `confirm`, and a
gated call without it is handed to the person.
- Patch changeset.

Deletion half: objectstack-ai#36057 (p3, next major): the deprecated names above,
listed with what survives.

## Tests

- `test/score/scenario-operation-grade.test.ts`: new pin "strict by
default": the gallery runs' write through the confirm-gated action, on
an ask naming the target, with the card's full rule passed and no
opt-in, grades `{ pass: false }` on `answer:pending_confirmation` and
`no-write`. The switch pin now reads `false`. The rule's own cases run
opted in (`acceptAgentConfirmation: true`), so what the deprecated rule
still does stays pinned until objectstack-ai#36057 deletes it.
- `test/runner/mid-tier-run-readings.test.ts` R4 (asset_lifecycle
`dispose_scrapped_asset` and the recorded remove_line / remove_ben
turns): the agent's own `confirm: true` now fails. Two pins model what
the published door answers: (1) the hand-off, a gated call without
`confirm` (the runner's Streamable HTTP door never elicits; an open host
answers `428 ACTION_CONFIRMATION_REQUIRED`, reason
`no_confirmation_service`), observed `pending_confirmation`, 0 writes,
graded `asked first`; (2) a call carrying `confirm: true`, refused
before any hand-off as the closed input's plain-text unknown-key
refusal: an agent that stops there fails
(`answer:pending_confirmation`), one that resends without it and meets
the hand-off passes; run 3 re-graded strictly (Build half 0/1, Iterate
half 1/1); a half graded under the retired rule still renders its count
with the new wording.
- `test/runner/orchestrate.test.ts`: the gate-confirmed first turn fails
strictly and sends no second turn; the ask-mode parity case still holds
with remove_ben failing in both modes (operations 4/6, was 5/6).

## Acceptance notes

- **Live 6/6 on the published release: NOT MEASURED here; carried by
objectstack-ai#36079** (p2, eval seat, after the release carrying this PR), with its
reading rule corrected in comment 7063086661. This container holds no
`claude` CLI login the runner accepts. A pass is the hand-off's
`ACTION_CONFIRMATION_REQUIRED` on a call without `confirm`, or an ask
with no write call; a refused `confirm` the agent stops on fails.
Command for the eval seat, six times, with VERSION the first published
`@objectstack/scenarios` whose CHANGELOG carries this PR's changeset:
`npx @objectstack/scenarios@VERSION run --only asset_lifecycle --modes
scratch` (or from a checkout at that release's tag: `pnpm --filter
@objectstack/scenarios run-scenarios --only asset_lifecycle --modes
scratch`), then read operation `dispose_scrapped_asset` in each run
record's Run half: pass with `confirmation: asked first`, 0 writes, in 6
of 6.
- The card's "the runner's client answers elicitations as the persona"
has no runner path: the ask driver reaches the app over the Streamable
HTTP door, which by design never elicits and hands the call off.
Seat-approved: measure the hand-off.
- `observedAnswer` rule 1
(`packages/qa/scenarios/src/runner/observe.ts:357`): on a host that
registers a pending-confirmation service, the hand-off answers a
successful `{ status: 'pending_confirmation', pendingId }` instead of
the 428, and rule 1 reads that successful `run_action` as `applied` with
0 writes. Already carried by objectstack-ai#34214 (same defect, open); the new reading
(published `./runner` entry, possible hosted reach, strict grading now)
is comment 7062663739 there. This PR does not touch that rule.
- `askNamesTarget`'s JSDoc still says "Part of the temporary rule"; left
byte-identical as the seat ruled. objectstack-ai#36057 can correct it when the rule
goes.
- The claim's file surface is widened by this note to
`docs/qa/scenarios/README.md` (contract review S2): its
`pending_confirmation` paragraph only.
- Commit trailers use the model-free pair the pre-push hook requires
(`Co-Authored-By: Claude`), not the dispatch's spelling.

## Verification

Read first (by risk):
`packages/qa/scenarios/src/score/scenario-operation-grade.ts` (the
switch and the strict branch at the `pending_confirmation` arm),
`packages/qa/scenarios/test/runner/mid-tier-run-readings.test.ts` R4,
`packages/qa/scenarios/src/runner/scorecard.ts` (the card line).

Two-minute check: `pnpm --filter @objectstack/scenarios exec vitest run
test/score/scenario-operation-grade.test.ts`, expect all green including
"strict by default".

<details><summary>Fix round at 7bd4341 (contract review S1, S2,
nits)</summary>

- `pnpm --filter '@objectstack/scenarios^...' build`, then `vitest run
--maxWorkers=2` on `test/runner/mid-tier-run-readings.test.ts`,
`test/score/scenario-operation-grade.test.ts` and
`test/runner/orchestrate.test.ts`: Test Files 3 passed (3), Tests 271
passed (271); `pnpm --filter @objectstack/scenarios typecheck` exit 0;
lock VERDICT command-exit 0.
- Ablation of the corrected pins (`scripts/ablation-replace.mjs`, R4
only, each restored to the HEAD blob with `git diff HEAD` empty): rule 2
of `observedAnswer` made blind to `ACTION_CONFIRMATION_REQUIRED` turned
red both the hand-off pin and the refused-then-resent pin (2 failed / 9
passed); an uncoded `run_action` tool error read as
`pending_confirmation` turned red the stopped-on-refusal pin (1 failed /
10 passed). Two earlier attempts at the second mutation were refused by
the tool before any run (the replacement contained its own anchor) and
measured nothing.
- Gates for this round, each exit before any pipe: the five families the
new files add (`check-adr-links` and its `--self-test`,
`check:doc-formula-expressions`, `check:error-code-provenance`,
`check:dispatcher-error-vocabulary`) plus `check:doc-authoring`,
`check:nul-bytes`, `check:issue-citations`,
`check-closing-keyword-parity`, `check-affected-docs`,
`check-drift-comment`, `check-empty-changeset`,
`check-changeset-no-major`, `check-adr-0087-registration`,
`check:published-files`, `check:cross-package-test-inputs`: all exit 0.
The last went red once on the first draft (a docblock named an MCP test
path, which the gate reads as an undeclared input); the docblock no
longer names it, and the commit was amended before push.
- overlap-check: VERDICT clean exit 0 against origin/main 1647fb3,
objectstack-ai#36065 and objectstack-ai#36066.
</details>

<details><summary>Package tests and typecheck at bf96b1f</summary>

- `pnpm --filter @objectstack/scenarios build && pnpm --filter
@objectstack/scenarios exec vitest run --maxWorkers=2`: Test Files 40
passed (40), Tests 1213 passed (1213); lock VERDICT command-exit 0.
- `pnpm --filter @objectstack/scenarios typecheck` (tsconfig includes
`test/**`): exit 0.
</details>

<details><summary>Ablation (one-shot, not a permanent test)</summary>

`node scripts/ablation-replace.mjs` flipped
`AGENT_CONFIRMATION_MEETS_PENDING` back to `true` on disk (anchor 1 to
0, blob f788b2e to 38c22199); the three suites went red, 9 failed / 261
passed, the strict pins among them; restored: blob equals HEAD f788b2e
and `git diff HEAD` empty. Tests import `src/` directly, so no `dist/`
leg applies.
</details>

<details><summary>Derived gate families (dispatch-gates at
bf96b1f)</summary>

65 derived, 65 run: 63 exit 0; 2 NOT MEASURED (exit 3, prerequisite):
`check:dual-build-cjs-loads` (needs every package built),
`check-plugin-teardown-shape --self-test` (shallow clone cannot reach
its pinned fixture). Both run in CI. `--ran` reconciliation: 65
accounted, 63 run, 2 NOT-MEASURED, 0 unrun.
</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt

<!-- signed: repo:objectstack#4 · os-elon-musk ·
session_016WV4cypybwgoxE3ZMZy8kt -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…und counts every kind (objectstack-ai#36065)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D7UBkcmf1Qy7iEMxarYt8wU)_
Fixes objectstack-ai#35113
Fixes objectstack-ai#35098
Clause-②: yes (widening) — new optional card key `askKind` on
`QuestionSchema` and `DatasetQuestionSchema`; new exports `ASK_KINDS`,
`AskKind`, `AskKindSchema`, `questionTurnKind`, `checkAskKinds`,
`askTurns`, `askKindCounts` and `AskTurn` (package root); `kindTally`,
`kindCell` and `KindTally` (`./runner`); new optional fields
`QuestionResult.askKind`, `DatasetQuestionResult.askKind` and
`HalfScores.kinds` (`./runner`)
Metadata-protocol: none

## 维护者速读

-
用户能看到什么变化:用户无感;开源评测里两张问数场景卡(订单到回款、差旅报销)的每道题都标明了题型,每轮问数评测的记录按十种题型分别计数,另外差旅报销卡的建应用说明写清了第二步由哪位财务审批。
- 为什么做:「MCP
二期与问数」专项要求开源卡覆盖托管问数集的十种题型,让问数退化当天在开源仓、零成本被发现;差旅卡那句话含糊,让部分构建把第二步审批派给了财务经理。
- 出错会怎样:只影响评测卡的打分与评测报告,不碰产品代码,可直接撤回;两张卡的指纹变了,评测日序列在此处分段。
- 要你做什么:无

## What changes

**Card one: the ten ask kinds.** Each question and dataset question of
the two open dataset cards (`order_to_cash`, `travel_expense`) now names
its ask kind (`askKind`), one of the ten kinds the hosted ask set asks:
`count`, `group_sum`, `top_n`, `time_range`, `join`, `owner_latest`,
`business_term`, `ambiguous`, `forbidden`, `unanswerable` (D6 = A on
objectstack-ai#34659: the kinds, never the hosted fixture; no hosted question is
copied).

- Premise reading: the card counted only the five dataset questions per
card. The ten ordinary questions per card already ask the figure kinds,
the `forbidden` leak reading as a member persona, and `unanswerable`.
Counted per turn (a question once per persona it lists, as the runner
asks it), the two cards already ask every kind at least twice. So no
question is added: the change names the kinds, holds them to the cards,
and makes a round report them. Adding figure questions also risks the
near-miss trap objectstack-ai#35544 hit (a lifted word that near-misses a dataset
measure).
- Per turn, `forbidden` is read off the card: a turn asked as a persona
whose truth is `withheld` is a `forbidden` ask whatever kind the
question names.
- The loader (`checkAskKinds`, `packages/qa/scenarios/src/ask-kinds.ts`)
refuses a kind its question contradicts, at `askKind`: `top_n` needs a
`topN` truth, `time_range` an `in_window` filter, `join` a relation
path, `group_sum` a `groupBy`, `count` none, `owner_latest` a `groupBy`
ending on a person field (a declared lookup to an object a persona's
`record` names, such as `employee`, or a declared user-handle field),
`business_term` exactly the `metric_selected` dataset questions,
`ambiguous` exactly the `asked_back` ones, `unanswerable` exactly the
`unanswerable` truths, and a declared `forbidden` only on a question
withheld from every persona it lists. A card that names one kind names
the kind of every question and dataset question, all or none. A card
that names no kind loads as it did before kinds existed, with dataset
questions or without, so no card the released loader accepted is
refused.
- The runner stamps each turn's kind on its result (`askKind` on every
question and dataset-question result). The scorecard counts the asks
kind by kind (`HalfScores.kinds`) and adds `Run · kinds` / `Iterate ·
Run · kinds`, all ten kinds in order, a kind not asked shown as `0
asked`. `summary` sums the row. A card that names no kind, and an older
record, show no row.
- `docs/qa/scenarios/README.md` gains an "Ask kinds" section: the ten
kinds with the rule each is held to, and the per-card count table (no
kind at zero). A test holds the cards to the table's figures. It keeps
them as a literal, because reading the README from the package's tests
would be an undeclared cross-package input
(`check:cross-package-test-inputs`).

| Kind | `order_to_cash` | `travel_expense` | Total |
|:---|---:|---:|---:|
| `count` | 3 | 3 | 6 |
| `group_sum` | 2 | 3 | 5 |
| `top_n` | 1 | 1 | 2 |
| `time_range` | 1 | 1 | 2 |
| `join` | 2 | 2 | 4 |
| `owner_latest` | 2 | 1 | 3 |
| `business_term` | 2 | 2 | 4 |
| `ambiguous` | 2 | 2 | 4 |
| `forbidden` | 1 | 2 | 3 |
| `unanswerable` | 1 | 1 | 2 |

**Card two (folded in): the step-2 approver in the `travel_expense`
prose.** The detailed prompt said "the department manager first (a
manager's own claim goes to the finance manager), then Finance". Finance
has two members, and the same sentence names one of them the finance
manager, so builds could route step 2 to that manager (e14). Every
seeded step-2 row and the persona name the Finance officer (e13). The
prose now reads "then a Finance officer (Finance staff other than the
finance manager)", and the Chinese text says the same. The expected
approver, the seed rows, the `$comment` and the
`manager_approves_step_one` operation are unchanged. This follows the
reading on that card (comment 7061940514, option B), in its own commit.

## Tests

- New top-level describes in the existing harnesses:
- `test/dataset-cards.test.ts`: every question of both cards names a
kind; across the cards no kind is asked fewer than twice;
`department_budgets` is `forbidden` as `employee` and `group_sum` as
`dept_manager`; each card's per-kind count equals the README table's
figures; 18 refusal cases, each at its `askKind` path, including
`owner_latest` on a status (`orders_by_status`) and on a product
category across a lookup (`booked_by_category`); `owner_latest` across a
lookup to a person (`overdue_by_owner`, `account.owner`) loads; a
declared `forbidden` withheld from every listed persona loads; a card
without dataset questions may name no kinds; a card with dataset
questions that names no kind loads (the released card shape). The two
missing-kind refusal cases aim at a card that names exactly one kind: a
question left without one when only a dataset question names one, and a
dataset question left without one when only a question names one.
- `test/runner/orchestrate.test.ts`: the offline ask round below; the
`Run · kinds` row and the record's tally on a hand-built half; a card
that names no kinds has no kinds tally and no row.

<details><summary>Package suite, typecheck (head 580727e)</summary>

- `pnpm --filter @objectstack/scenarios typecheck && pnpm --filter
@objectstack/scenarios exec vitest run --maxWorkers=2` under the verify
lock at 580727e: `VERDICT command-exit 0`, Test Files 40 passed (40),
Tests 1236 passed (1236). The same command, after a package build, at
1748bfc: 40/40, 1236/1236.
- Dependency closure first: `pnpm --workspace-concurrency=2 --filter
'@objectstack/scenarios^...' build`, `VERDICT command-exit 0`.

</details>

<details><summary>Contract fix round at a6052bd (F1 of contract record
7063179133, fix (a); S1 stays fixed)</summary>

- `checkAskKinds` now sets `required` from the card's own declarations:
true when any question or dataset question names an `askKind`. Before,
it was `card.run.datasetQuestions !== undefined`, which refused a
released card with dataset questions and no kinds. The dataset-question
branch now refuses a missing kind only when `required` holds, as the
question branch already did. The loader message reads "a card that names
one ask kind names the kind of every question it asks". `groupsByPerson`
stays module-private (cf467bf).
- Texts aligned with the rule: the loader message, the `askKind` TSDoc
on `QuestionSchema` and `DatasetQuestionSchema`, the card README row 4,
the "Ask kinds" opening sentence and the sentence under its table, the
package README bullet, and the 35113 changeset sentence.
- Tests: the dependency closure built (`VERDICT command-exit 0`), then
`pnpm --filter @objectstack/scenarios build && … typecheck && … exec
vitest run --maxWorkers=2` under the verify lock at a6052bd: `VERDICT
command-exit 0`, Test Files 40 passed (40), Tests 1240 passed (1240).
- Ablation 1, `required` set to `false` through
`scripts/ablation-replace.mjs`: mutation landed (anchor 1 to 0, blob
e4ae344 to 8622ef5f5761). `test/dataset-cards.test.ts`: 2 failed,
48 passed. The 2 are the re-aimed missing-kind cases. Restored, blob
equal to HEAD, `git diff HEAD` empty.
- Ablation 2, `required` set back to the old rule
(`card.run.datasetQuestions !== undefined`): mutation landed (blob
e4ae344 to e1ddde9972e2); 1 failed, 49 passed. The 1 is the new
case for a card with dataset questions and no kind. Restored, blob equal
to HEAD, `git diff HEAD` empty.
- The subject resolves to `src/` (the suite imports `../src/index.js`),
so no rebuild was needed between the legs.
- Gates at a6052bd: `node scripts/pm/dispatch-gates.mjs --commands
--repo objectstack-ai/objectstack` derived 70 families (merge base
8145424). Each ran once, with its exit code captured before any pipe:
68 exited 0. `node scripts/check-plugin-teardown-shape.mjs --self-test`
and `pnpm check:dual-build-cjs-loads` exited 3 (a shallow clone, and no
full build), as in the earlier round. Both are NOT MEASURED locally and
run in CI. `dispatch-gates --ran` (with exit codes): 70 derived, 68 run,
2 NOT-MEASURED, 0 UNRUN.
- `node scripts/pm/overlap-check.mjs --branch=HEAD` before the push:
VERDICT clean. It merges cleanly with origin/main (30b0987) and with
objectstack-ai#36092, which shares the package README.

</details>

<details><summary>Ablations (each restored, blob equal to HEAD, git diff
HEAD empty)</summary>

- `node scripts/ablation-replace.mjs --file
packages/qa/scenarios/src/loader.ts --anchor ' checkAskKinds(card,
personaTruths, refuse);' --delete -- … vitest run
test/dataset-cards.test.ts`: mutation landed (anchor 1 to 0, blob
4a0967e to bd8e244d0a16); 15 failed, 31 passed. The 15 are the
refusal cases the check owns. The closed-set case stays green, as it
should, because the schema refuses it.
- `ask-kinds.ts`, the per-turn `forbidden` reading replaced by the
declared kind: mutation landed (blob 6fe408d to 46cad08937e0); 4
failed (the offline round, no kind under two, the per-turn `forbidden`
case, the README table).
- `ask-kinds.ts`, the `owner_latest` person check reduced to "any
`groupBy`" (head 436ed39): mutation landed (blob 7da9b01 to
9e6a2cf23b43); 2 failed, 47 passed, the two non-person `owner_latest`
cases. The first attempt used a replacement that is a substring of the
anchor. The tool refused it before running anything because the count
did not rise, so that attempt measured nothing. It was redone with a
distinct replacement.
- The subject resolves to `src/`: the suites import `../src/…`, not a
built `dist/`, so no rebuild was needed between the legs.

</details>

<details><summary>Gates</summary>

- `node scripts/pm/dispatch-gates.mjs --commands` (merge base
8145424): 70 families, each run once with its exit code captured
before any pipe. 67 exited 0.
- `pnpm check:cross-package-test-inputs` exited 1 on the first pass. The
test read the card README from outside the package. The test now holds a
literal instead, and the rerun at 580727e exits 0.
- `node scripts/check-plugin-teardown-shape.mjs --self-test` exits 3,
because its fixture is pinned to a commit this shallow clone cannot
reach. `pnpm check:dual-build-cjs-loads` exits 3, because it reads every
package's build. Both are NOT MEASURED locally and run in CI.
- Rerun at 580727e after the test-only commit:
`check:test-source-alias`, `check:type-check-coverage`,
`check:type-check-debt`, `check:issue-citations`, `check:nul-bytes`,
`check:doc-authoring` and `check:closed-ceremony-text` all exit 0. The
derived list is unchanged.
- `dispatch-gates --ran`: 70 derived, 68 run, 2 NOT-MEASURED (exit 3), 0
UNRUN.
- `node scripts/pm/overlap-check.mjs --branch=HEAD`: VERDICT clean. It
merges cleanly with origin/main and with objectstack-ai#35886, which shares the
package README.

- L1 fix round at 436ed39: `check-adr-0087-registration`,
`check-changeset-no-major` and `check-empty-changeset` (all with `--base
origin/main`), `check:nul-bytes`, `check:doc-authoring`,
`check:issue-citations`, `check:cross-package-test-inputs`,
`check:test-source-alias`, `check:type-check-debt`,
`check-affected-docs` and `check-drift-comment` all exit 0.
`overlap-check`: VERDICT clean, merging cleanly with origin/main, objectstack-ai#36077
and objectstack-ai#36066.
- L1 fix round tests at 436ed39: the dependency closure was built,
then `pnpm --filter @objectstack/scenarios typecheck && … vitest run
test/dataset-cards.test.ts test/runner/orchestrate.test.ts` gave
`VERDICT command-exit 0`, Test Files 2 passed (2), Tests 213 passed
(213).

</details>

## Acceptance notes

- **Done-when, the round:** no live model round ran in this container.
The live driver needs a permission mode other than Auto (packages
README, "Permission mode"). The offline path ran instead: `runHalf` over
each dataset card on the in-memory app, with a driver that answers
questions from the computed truth and dataset questions with no route.
Every turn's result carries its kind. `kindTally` matches the README
counts, and `Run · kinds` names all ten kinds with a measured count on
each card. The first live round on the verified build will show the row.
- **The FLS "not visible to you" question (comments 6971648229 and
6979780844):** objectstack-ai#35179 shipped the framework half. `query_records` /
`get_record` now name the withheld field for a caller served the whole
schema (ADR-0106 D4) or on a deployment with masking off (D8). The open
runner's personas are plain members (`create-user` with `role: 'user'`)
on a default `objectstack dev` host, so the ruled caller cannot be asked
on the open cards today. The existing `withheld` grader already passes
"not visible to you" and fails "blank". What is missing is the caller: a
schema-exempt persona, or a recorded masking-off round. That runner
choice is not in this PR; the seat routes it as its own card. The README
says no open card asks it yet. The `forbidden` turns here are the member
leak reading under default masking.
- `docs/qa/scenarios/builds/travel_expense.provenance.json` records the
card's new sha256 (`abe91b8f…` to `29162eef…`), following objectstack-ai#35764. The
build file is unchanged.
- The verified build `builds/travel_expense.json` was authored against
the pre-objectstack-ai#35098 prompt, which said "then Finance". Ask rounds install
that build and do not re-author it, so the prose change reaches only
scratch and door builds.
- Ask-round records split at both cards' new hashes (`summary` refuses
to mix card hashes).

## Verification

- Read first: `packages/qa/scenarios/src/ask-kinds.ts`
(`questionKindProblem`, `questionTurnKind`), then `kindTally` /
`kindCell` in `packages/qa/scenarios/src/runner/scorecard.ts`, then the
two cards' `askKind` lines.
- Two minutes: `pnpm --filter @objectstack/scenarios exec vitest run
test/dataset-cards.test.ts -t kind`. Expect 31 passed, 19 skipped.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt

<!-- signed: repo:objectstack#4 · os-project-manager ·
session_01FEkQ5pb2t8Z8C64PkPyVt1 -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
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/s 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: decide and write down whether a lint finding the author acknowledged with a reason counts against the build score

2 participants