You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 26ea065
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(scenarios)!: delete the deprecated agent-confirmation grading names (#38580)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Jianguo** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbF9EubkqZphbS58MUkyEr3k)_Fixes#36057
Clause-②: no (narrowing) — removes published exports of
@objectstack/scenarios
Metadata-protocol: none
Skills-docs: none — no text under skills/, .claude/skills/, docs/qa/ or
content/ names a deleted scorer export (git grep: 0 hits)
## 维护者速读
- 用户能看到什么变化:用户无感;评测包里早已关掉的「代理自己确认就算通过」那套旧评分名字被删掉,评分结果一条不变。
- 为什么做:这是上一次恢复严格评分时留下的收尾,当时只标了弃用,约好在下一个大版本里删除,现在大版本窗口正开着。
- 出错会怎样:只有直接引用这些旧名字写程序的人会在编译时看到报错,改法已写进更新说明;可以直接撤回这次合并。
- 要你做什么:无。
## What changes
The scorer's temporary relaxed grade for `pending_confirmation` (off
since the strict-grading revert, every name `@deprecated`) is deleted,
with every name that existed only for it:
- `score/scenario-operation-grade.ts` (`./score`, `./score/full`):
`AGENT_CONFIRMATION_MEETS_PENDING`, `confirmedByAgent`,
`AgentConfirmedObservation`, `OperationObservation.agentConfirmed`,
`GradeOperationOptions.agentConfirmation`,
`GradeOperationOptions.acceptAgentConfirmation`,
`AgentConfirmationRule`, and the module-internal
`agentConfirmationChecks` and `confirmedRowsCheck`.
`OperationGrade.confirmation` keeps only its `askedFirst` arm.
`gradeConfirmedWrite` and `declaredWriteCheck` take an inline `Pick` of
the card operation (`kind`, `object`, `target`, `values`) where they
read `AgentConfirmationRule['write']`: the same type, no new export.
- `score/index.ts`: `gradeCardOperation` no longer builds the
`agentConfirmation` input.
- `runner/observe.ts`: `agentConfirmedOf` (internal) and
`ObserveInput.actionGates`.
- `runner/orchestrate.ts` (`./runner`): `actionGatesOf` and its call
site.
- `runner/scorecard.ts` (`./runner`):
`ConfirmationTally.confirmedByAgent` and the `confirmed by the agent`
count; the scorecard now reads `irreversible operations: N asked first`.
- `README.md` (ships in the package): the paragraph that named the
deprecated opt-in now states the strict grade only.
- `.changeset/36057-scenarios-delete-agent-confirmation-names.md`:
BREAKING, `patch`, with the FROM-TO map for every removed name and its
ADR-0087 disposition.
Kept unchanged, per the card: `askNamesTarget`, `AskNaming`,
`askedFirst`, `OperationGrade.confirmation` (its `askedFirst` arm).
Grading itself does not move: the runner and `gradeCardOperation` never
opted in, so every run grades exactly as before.
## Tests
- `test/score/scenario-operation-grade.test.ts`: the opted-in describe
block and the "temporary rule's own rows check" case are deleted (they
exercised the switch turned on). A strict block replaces them: the
gallery runs' write through the confirm-gated action fails
`answer:pending_confirmation` and `no-write`; a pending action with
nothing written passes as `asked first`; an overstep keeps its own
outcome. `gradeConfirmedWrite`'s cases are unchanged, typed off
`Parameters<typeof gradeConfirmedWrite>[0]`.
- `test/runner/mid-tier-run-readings.test.ts` (R4): the opted-in
readings, the `actionGatesOf` fixtures and the retired-relaxation
scorecard case are deleted; every strict reading of the recorded
`remove_line` / `remove_ben` turns and the three gallery-run shapes
stays, and the scorecard pin now also asserts the text holds no
`confirmed by the agent`.
- `test/runner/orchestrate.test.ts`, `test/runner/units.test.ts`: tally
and scorecard pins drop the `confirmedByAgent: 0` member and the `· 0
confirmed by the agent` text; one `agentConfirmed` read is dropped.
## Acceptance notes
- ADR-0087 disposition: `not-required (no-migration-prescription)`. The
truer category, `runtime-export-retired`, cannot be proven for this
package: its subpath keys (`./score`, `./runner`) do not map to
`src/<p>.ts`, and the gate refuses such a key by name (its SP battery
uses `@objectstack/scenarios` `./score` as the unmappable fixture),
while the root entry exports none of these names.
`check-adr-0087-registration` accepts the marker beside the FROM-TO
lines.
- Shipped as `patch` with a BREAKING banner: `Metadata-protocol: none`
takes `patch` (AGENTS.md Post-Task Checklist step 3), and the package is
in its `19.0.0-next.2` prerelease window.
- `README.md` was added to the claim's file surface on this thread's ask
(it ships in `files[]`); `.changeset/pre/*.md`, which still names the
deprecated names as history, is untouched.
- No other workspace package, `ui/` file or skill imports a deleted name
(`git grep` over the whole tree, outside `packages/qa/scenarios`,
CHANGELOGs and `.changeset/pre/`: 0 hits).
## Verification
All local readings at head `e832c853` (base `d08d2ae9`; `origin/main`
has moved 6 commits since, none under `packages/qa/scenarios`).
<details><summary>Package tests and type-check</summary>
- Closure built first under the verify lock: `pnpm --filter
'@objectstack/scenarios^...' build`, VERDICT command-exit 0.
- `pnpm --filter @objectstack/scenarios typecheck` (`tsc --noEmit`, 47
test files in the program by `--listFiles`) and `build`: VERDICT
command-exit 0.
- `packages/qa/scenarios`: `vitest run --maxWorkers=2`: Test Files 45
passed (45), Tests 1406 passed (1406).
- `eslint --no-inline-config` on the nine touched TypeScript files: exit
0.
- `node scripts/check-platform-checklist.mjs --changed-from origin/main`
(removed exports): exit 0, no anchored file in the change set.
</details>
<details><summary>Dogfood battery (the narrowing arm)</summary>
- Head `e832c853`. Closure `turbo run build
--filter='@objectstack/dogfood^...'`: 79 of 79 tasks, VERDICT
command-exit 0.
- `pnpm --filter @objectstack/dogfood test` under the verify lock:
VERDICT command-exit 0. Test Files 495 passed, 3 skipped (498); Tests
4183 passed, 68 skipped (4251); 0 failures.
</details>
<details><summary>Derived gate families (dispatch-gates --commands,
67)</summary>
- 67 of 67 exit 0, `pnpm check:dual-build-cjs-loads` included (126
require entry points across 74 packages load).
- `dispatch-gates --ran`: 67 derived, 67 run, 0 NOT MEASURED, 0 unrun.
- `check-adr-0087-registration --base origin/main`: 1 declared-breaking
changeset, `not-required (no-migration-prescription)`, accepted.
</details>
**Read first:**
`packages/qa/scenarios/src/score/scenario-operation-grade.ts`, the
`gradeOperation` `pending_confirmation` branch (the risk hunk: it must
still grade `answer:pending_confirmation` + `no-write` and return
`confirmation: askedFirst` only on a pass); then
`src/runner/scorecard.ts` `confirmationTally` / `cardScorecard`.
**Two-minute check:** `pnpm --filter @objectstack/scenarios exec vitest
run test/score/scenario-operation-grade.test.ts` shows every case
passing, with no `confirmed-by-agent:*` check left in the file.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jSEWVZMA3EooZti247)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
refactor(scenarios)!: delete the deprecated agent-confirmation grading names; a `pending_confirmation` operation is graded strictly, with no opt-in
6
+
7
+
Clause-②: no (narrowing) — removes published exports of @objectstack/scenarios
8
+
Metadata-protocol: none
9
+
10
+
<!-- adr-0087: not-required (no-migration-prescription) No packages/spec schema key, accepted value or metadata type is added, removed or renamed, no card field changes, and nothing stored is rewritten: the removed names are TypeScript exports and members of the scorer (`./score`, `./score/full`) and the runner (`./runner`) of a devx instrument with no metadata surface. The affected party is a TypeScript caller, and its compiler names each removed import or option at its own site; `objectstack migrate meta`, `spec-changes.json` and the upgrade guide have nothing to rewrite. -->
11
+
12
+
**BREAKING** for a TypeScript caller of `@objectstack/scenarios/score`, `@objectstack/scenarios/score/full` or `@objectstack/scenarios/runner` that still read the retired relaxed grade, shipped as `patch`: the change is not to the metadata protocol (`Metadata-protocol: none`). Grading does not change: the relaxed grade was already off by default, so every `pending_confirmation` operation the runner grades, and every `gradeCardOperation` call, grades exactly as before (the agent asks first and writes nothing; the person's confirmation turn grades the write after it).
13
+
14
+
The scorer carried a temporary rule that also met a `pending_confirmation` operation when the agent applied it itself through a confirm-gated business action, on an ask naming the target. Real human confirmation is on the platform, so the rule was switched off and its names deprecated; this release deletes them, and with them the only way a direct `gradeOperation` call could opt back in.
15
+
16
+
- FROM `AGENT_CONFIRMATION_MEETS_PENDING` TO nothing: the switch is gone and grading is strict. Delete the read.
17
+
- FROM `GradeOperationOptions.acceptAgentConfirmation` and `GradeOperationOptions.agentConfirmation` TO nothing: `gradeOperation(declared, observation, { probed, asOf })` takes neither. Drop both options; a grade that passed them now grades strictly, as the runner always did.
18
+
- FROM `confirmedByAgent` TO `askedFirst`: `OperationGrade.confirmation` is `'asked first'` on a passing `pending_confirmation` grade, and absent otherwise. Compare against `askedFirst` only.
19
+
- FROM `AgentConfirmedObservation` and `OperationObservation.agentConfirmed` TO nothing: `observeOperation` no longer reads the agent's applied write for the rule. Stop setting or reading the field.
20
+
- FROM `AgentConfirmationRule` TO `Parameters<typeof gradeConfirmedWrite>[0]` for its `write` member (the operation's `kind`, `object`, `target` and `values`, which `gradeConfirmedWrite` takes as before) and `AskNaming` from `askNamesTarget(card, operationId)` for its `ask` member, both unchanged.
21
+
- FROM `actionGatesOf` (`./runner`) and `ObserveInput.actionGates` TO nothing: the runner no longer reads the build's confirmation gate per action for the grade. Drop the call and the field.
22
+
- FROM `ConfirmationTally.confirmedByAgent` TO nothing: the tally is `{ askedFirst }`, and the scorecard reads `irreversible operations: N asked first` with no `· M confirmed by the agent` count.
23
+
24
+
Unchanged: `askNamesTarget`, `AskNaming`, `askedFirst`, `OperationGrade.confirmation`, `gradeConfirmedWrite` and its checks.
@@ -965,7 +958,7 @@ export function renderScorecard(sc: CardScorecard): string {
965
958
`ask cost: ${askCostText(sc.askSpend)}`,
966
959
`ask time: ${askTimeText(sc.askSpend)}`,
967
960
'',
968
-
...(sc.confirmation ? [`irreversible operations: ${confirmationText(sc.confirmation)}${sc.confirmation.confirmedByAgent>0 ? ' (confirmed by the agent: met only under the retired relaxed grade, off by default)' : ''}`,''] : []),
...(sc.confirmedWrite ? [`irreversible operations, the write after the person confirmed: ${cell(sc.confirmedWrite)} (graded apart from the ask, and in the operations score)`,''] : []),
0 commit comments