Skip to content

fix(scenarios): an operation an earlier write would meet runs on a fresh seeded copy of the app, so a one-way state rule no longer leaves later operations unmeasured - #34490

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-oa4of3
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-oa4of3

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Part of #34448

Clause-②: yes (widening)
Metadata-protocol: none

The widening is through ./runner: the new exported type FreshCopy, the new optional last parameter fresh of runHalf, and the new optional field RowRestore.freshCopy (orchestrate.ts). Nothing removed or narrowed; ./score, ./score/full, ./export and . untouched. The claim was amended to match (its Clause-② amendment on #34448, 23:01Z).

维护者速读

  • 改了什么:评测跑分器在某个操作之前发现前面回合改动过种子行时,不再以管理员身份把行写回应用(那会被应用自己的校验规则、钩子和流程评判),而是另起一份全新的应用副本、重新登录人设并重新加载种子,让这个操作和之后的回合在副本上跑;副本起不来或种子加载结果与原来不同,该操作记为「未测量」并写明原因。
  • 为什么改:带状态机的卡(如资产生命周期)里,「批准」把报废单从 submitted 推到 approved 后,写回 submitted 被应用的单向状态规则正确拒绝(400 VALIDATION_FAILED),之后每个操作都读成「未测量」,画廊导出因此被拒。
  • 风险与回滚:没有前面写入时不起任何副本,记录与分数逐字节不变;每次换副本多一次启动、人设登录和种子加载(只在写入之后的操作前付);模板模式仍走原来的写回路径(它的应用里有代理现场改的元数据,重启拿不到)。回滚即还原本 PR。
  • 先看:packages/qa/scenarios/src/runner/orchestrate.ts 的 runHalf(moveToFreshCopy 与操作循环开头的分支)、seedDifference、withInstalledBuild 里 ask 模式的 fresh。
  • 两分钟验证:pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/runner/orchestrate.test.ts -t 34448,预期 3 个用例全过。
  • 需要你做的:无,席位落地。

What changes

  • Why Ask 1 has no path, read from source, not inferred. The runner reaches the app only over HTTP (bootDev spawns objectstack dev --fresh; HttpApp is the whole harness). The seed load the card names as "privileged, system-context" is the same admin data door the restore uses (HttpApp.insertRow → POST /api/v1/data/:object with the admin session; seedApp), so there is no privileged seed path to reuse. The platform takes an object's declared controls off a write only for ExecutionContext.isSystem === true, and an HTTP request is assembled with isSystem: false: the import doors refuse runAutomations: false / treatAsHistorical: true for every signed-in caller, administrators included (importControlOptOutRefusal, packages/rest/src/import-prepare.ts), and the import undo writes under the controls (importUndoWriteContext, packages/rest/src/data-action-routes.ts). Delete-and-reinsert through the data door runs the app's delete and create hooks and record-triggered flows, so it cannot promise "no flow runs". Opening a door past the controls would weaken the platform, which the card rules out. So this PR takes Ask 2: isolation.
  • Isolation, paid only when needed (orchestrate.ts). runHalf takes an optional last parameter fresh (FreshCopy: boot another copy of the same app with the same build installed the same way). Before each operation it reads the seeded objects (seedDrift, only reads; the read loop restoreSeededRows already had, now shared). Nothing moved ⇒ nothing happens. Something moved ⇒ moveToFreshCopy: boot the copy, sign the admin in, create every persona with its permission set, mint the admin key, load the seed by the same seedApp, compare the copy's seed with the run's (seedDifference: rows loaded, rows refused with code and fields, permission sets assigned), read the copy's seeded state, then switch the half to it (accounts, keys and seeded state included) and stop the copy it replaces. The half's last copy is stopped in a finally; the booted app stays with withApp, as before. The operation records restored: { freshCopy: [object/id, …] }, the rows that had moved.
  • Where a copy comes from. Scratch mode's Run half and iterate Run half: ops.boot(dir) on the same project (freshBoot). Ask mode: withInstalledBuild boots the same blank host again and installs the same manifest through the unmanaged door; a refused install fails that copy. Template mode passes none: its app holds the agent's iterate, made live through the app's doors, which a host booted again would not hold, so it keeps writing rows back through restoreSeededRows (comment at the call).
  • A copy that fails (boot throws, a persona or key refused, the seed loads differently) makes the operation NOT MEASURED: restore: no fresh copy of the app could be seeded for it (REASON); what had moved: DRIFT. It is not asked, and never graded on other rows. A half that has no fresh keeps today's write-back and today's restore: the rows could not be restored … reason.
  • Unchanged. Questions all run on the booted app before any operation. A pending_confirmation operation's ask and confirmation run back to back on the same app. The scorecard's N started from restored rows still counts every operation that started from the seeded rows, now including the ones on a copy (scorecard.ts untouched).
  • Changeset .changeset/34448-scenario-fresh-copy-restore.md (patch; @objectstack/scenarios publishes).

Why

#34338, the change for #34294, restored the seeded rows by writing them back through the app's data door as the admin. On asset_lifecycle (#34448's measured run, objectstack main a121e29c), manager_approves_scrap moved DR-0006 submitted → approved; the write-back to submitted met the app's one-way status rule, 400 VALIDATION_FAILED, and dispose_scrapped_asset, employee_approves_own_scrap and check_out_asset_in_repair read NOT MEASURED in both halves. A rule like that is what a well-built app declares, so a restore the app must accept cannot undo a legitimate transition, and a restore it accepts can still fire its flows.

Tests

test/runner/orchestrate.test.ts, a new top-level describe (#34448, 3 cases) on the asset_lifecycle card with an app double that carries the card's one-way rule (a decided scrap request never goes back to submitted, 400 VALIDATION_FAILED, the issue's own message):

  • the approval moves DR-0006 one way, and the disposal after it is measured all the same: all six operations asked, none NOT MEASURED for its start, manager_approves_scrap wrote once, dispose_scrapped_asset records restored: { freshCopy: ['demoasset_disposal_request/dr06'] }; the rule refused nothing on any app; the booted app took exactly the seed's inserts and the seed's own second-pass updates and no delete; every boot was stopped by the end.
  • ⛔ without a fresh copy the same rule refuses the write-back: the Run half alone, as template mode runs it; dispose_scrapped_asset is NOT MEASURED with demoasset_disposal_request: 1 changed (dr06: status, decided_on) and the refusal update demoasset_disposal_request dr06: 400 VALIDATION_FAILED … named, not asked, not graded.
  • ⛔ a copy whose seed does not load as the run's did, or that does not boot: the second operation is NOT MEASURED with the copy's seed did not load as the run's did: it loaded N rows, the run M; it refused demoasset_employee/e05 VALIDATION_FAILED, the run nothing and what had moved; not asked; every refused copy was released. A copy whose boot throws says objectstack dev exited before it was ready.

Tests forced to change, each because the scratch half now runs an operation after a write on a copy instead of writing the rows back (assertions read the new truth, none loosened):

  • runCard — the seed against a build whose owner field is a user lookup › loads all 8 rows…: the booted app now keeps new-add_contact (nothing is written back to it); added that there are 4 apps (the booted one and the copies for move_eli, remove_ben, contact_bad_email) and that every copy's owners equal the booted app's.
  • runCard — the card's own namespace, demo + code › scaffolds the project as democrm…: the template host is the last app booted, no longer apps[1].
  • runCard — the validation operation is probed… › sends the declared write once…: the two probes are read across every app (each went to the app its operation ran on); same two calls, same keys. › an agent that catches the bad value…: partner_edits_account records { freshCopy: ['democrm_contact/probe-5'] } (was { deleted: [...] }), and the copy it ran on holds no probe row.
  • runHalf — each operation starts from the seeded rows… (#34294): the cascade case reads { freshCopy: ['democrm_contact/new-add_contact', 'democrm_contact/ct5'] } (was deleted + reinserted), still passes on its own merits; the confirmation-interplay case reads freshCopy for remove_ben and contact_bad_email; the refused-restore case (403 delete, and a harness with no deleteRow) now runs the Run half with no fresh copy, as template mode does, and pins the same reasons verbatim.

Acceptance notes

  • Ask 4 (a live asset_lifecycle run) is NOT MEASURED, reason: this container holds no model credential (checked by presence only); per the order no credential was sought. The seat schedules the live run (the daily gallery task).
  • Template mode's write-back restore is filed as Scenario runner: in template mode, an operation after a one-way state change still goes unmeasured, because the restore writes back through the app's doors #34497.
  • Known, non-blocking: if stopping the replaced copy throws inside moveToFreshCopy, the error path releases the new copy as well; left for a later change so the head does not move.
  • A copy's seed load runs the app's create-side rules and flows exactly as the run's own seed load did: that is the seeded state, not a restore. What the copy guarantees is that nothing is written to undo a turn, so no rule judges a restore and no update/delete flow fires on one.
  • Cost: one boot (objectstack dev --fresh waits up to 180 s for health), the persona sign-ins and one seed load per operation that follows a write; up to three servers live for a moment (the booted app, the copy being replaced, the new copy). The crm card's clean run pays three copies per half.
  • A recording made before this change replays against a copy: persona user ids and keys are the copy's, as they already differ between any two runs.
  • packages/qa/scenarios/README.md's bullet Each operation starts from the seeded rows now names both paths (scratch and ask on a fresh copy, template writing back), after the claim amendment added it to the file surface.

Verification

Ablation
  • node scripts/ablation-replace.mjs on the committed head (orchestrate.ts blob f92b76b517ff), scratch mode's Run half given no fresh copy (…, opts.promptChoice, freshBoot(ops, dir)) → …, opts.promptChoice, undefined)): anchor 1 → 0, blob f92b76b517ff → 5cdc7e332873. The tests import src, so there is no build leg. -t 34448: 2 failed / 1 passed. The first case reads exactly the issue's failure: dispose_scrapped_asset NOT MEASURED restore: the rows could not be restored to the seeded state: demoasset_disposal_request: 1 changed (dr06: status, decided_on) (refused: update demoasset_disposal_request dr06: 400 VALIDATION_FAILED That status change is not allowed: …), and two more after it. The copy case finds no NOT MEASURED where a copy was refused. Restored: blob == HEAD (f92b76b517ff), git diff HEAD empty.
Local gates
  • Head 69b88800 (after merging origin/main once at dc265d44; the merge touched nothing under packages/qa/scenarios; 69b88800 adds only the README paragraph).
  • pnpm --filter '@objectstack/scenarios^...' build :: exit 0 (lock VERDICT command-exit 0, 2m59s).
  • pnpm --filter @objectstack/scenarios build && pnpm --filter @objectstack/scenarios test :: exit 0 (lock VERDICT command-exit 0) on dc265d44 and again on 69b88800: Test Files 35 passed (35), Tests 991 passed (991). On the same source, pnpm --filter @objectstack/scenarios typecheck && pnpm --filter @objectstack/scenarios test passed its typecheck leg (its test leg then asked for the package's own dist/, which the run above built).
  • eslint --no-inline-config on the two touched TS files :: exit 0.
  • Derived gates on 69b88800 (dispatch-gates --commands --repo objectstack-ai/objectstack, 4 paths, 62 families, the same set as on dc265d44), each with stdin from /dev/null: 62 exit 0. --ran: "62 derived famil(ies) accounted for — 62 run, 0 NOT-MEASURED".
  • The first round, on dc265d44, read 60 exit 0 and 2 exit 3: check-plugin-teardown-shape --self-test before its pinned fixture commit was fetched (a rerun after git fetch --depth=1 origin 621a4876… exited 0, "48 cases pass"), and pnpm check:dual-build-cjs-loads before every package's dist/ was built. Both records are in the project files.
  • 4 files changed (the README paragraph added to the three). No governed surface; packages/spec, src/score/**, scorecard.ts, card JSONs and src/export/** untouched.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

…esh seeded copy of the app, not on rows written back through its doors

Claude-Session: https://claude.ai/code/session_01ADHkmP1FQBBcaufj5VXUcV
Co-authored-by: Claude <noreply@anthropic.com>
… after a transition unmeasured

Claude-Session: https://claude.ai/code/session_01ADHkmP1FQBBcaufj5VXUcV
Co-authored-by: Claude <noreply@anthropic.com>
@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 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

10 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/data-api.mdx (via /:object/export (route, bridged from symbol templateMode — its route source's handler names it))
  • content/docs/concepts/metadata-lifecycle.mdx (via /:object/export (route, bridged from symbol templateMode — its route source's handler names it))
  • content/docs/data-modeling/schema-design.mdx (via /:object/export (route, bridged from symbol templateMode — its route source's handler names it))
  • content/docs/deployment/cli.mdx (via /:object/export (route, bridged from symbol templateMode — its route source's handler names it))
  • content/docs/permissions/access-matrix.mdx (via permissionSet (literal, a string literal in seedDifference))
  • content/docs/permissions/permission-sets.mdx (via permissionSet (literal, a string literal in seedDifference), /:object/export (route, bridged from symbol templateMode — its route source's handler names it))
  • content/docs/permissions/sso.mdx (via permissionSet (literal, a string literal in seedDifference))
  • content/docs/protocol/objectui/actions.mdx (via /:object/export (route, bridged from symbol templateMode — its route source's handler names it))
  • content/docs/ui/actions.mdx (via /:object/export (route, bridged from symbol templateMode — its route source's handler names it))
  • content/docs/ui/doc-pages.mdx (via permissionSet (literal, a string literal in seedDifference))

⛔ 5 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v13.mdx (via permissionSet (literal, a string literal in seedDifference))
  • content/docs/releases/v14.mdx (via permissionSet (literal, a string literal in seedDifference))
  • content/docs/releases/v17/17-5.mdx (via /:object/export (route, bridged from symbol templateMode — its route source's handler names it))
  • content/docs/releases/v17/17-6.mdx (via /:object/export (route, bridged from symbol templateMode — its route source's handler names it))
  • content/docs/releases/v18/18-3.mdx (via /:object/export (route, bridged from symbol templateMode — its route source's handler names it))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

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 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 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; 123 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 bdd51769ee827b24355fa1328375bb09c05c8d65 → packageMentionDocs.

Which tree this was computed on

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

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

⚠️ 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 bdd51769ee827b24355fa1328375bb09c05c8d65 → 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_01ADHkmRH4UCX1tvddXMS7cq

Final head for review · 2026-11-16T23:30Z

Final head: 69b88800e2ce07d7cf664de8af3c3430a6fd2d19 (card #34448). This is the head the reviews read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmSmxJiAWk7fuq3Q1Sf

席位核对

L1 verdict: REWORK (2 items, both about PR text and card bookkeeping, not code) · card #34448 · area o2-C · first review · read at 2026-11-16T23:33Z
Head-sha: 69b88800e2ce07d7cf664de8af3c3430a6fd2d19. This is the final head announced on this PR, and all 53 check runs are on it.

The code, tests and evidence pass L1 as they stand at this head. Neither rework item needs a push. Both are a body edit or a card filing, so the head stays where it is, and the delta read is the body only.

Rework items

  1. Fixes #34448 → Part of #34448. Acceptance item 4 of the card asks for one live asset_lifecycle re-run showing six of six operations measured per half. This PR's Acceptance notes record it as NOT MEASURED (no model credential in the container), with the seat's daily gallery task as the carrier. A merge with Fixes would close the card before its last acceptance item is read. Please change the first card line to Part of #34448 with no verb next to the number. Put the closing arrangement in a comment on the card, not in the body: the card closes when the live run reads 6/6 per half, and pm:dispatched is removed by hand then.
  2. Template-mode follow-up needs a destination. The report's out_of_scope_findings says "template mode's write-back restore still meets an app's one-way rule … noted, not filed", with carrier none. The dev recommends filing it (open question 3, option A). Before landing, the area or seat files that card, or records on Scenario runner: restoring seeded rows through the app's write door is refused by its own state rules (VALIDATION_FAILED), so later operations go unmeasured (regression from #34338) #34448 why it is not filed. Then add its number to the PR body's Acceptance notes as a plain reference with no closing verb.

Checklist readings (pass)

  • Shape. Draft, base main, mergeable_state: clean. A closing-keyword scan of the body finds only Fixes #34448 (item 1).
  • File surface (get_files, 4 files, +345/-66): packages/qa/scenarios/src/runner/orchestrate.ts, test/runner/orchestrate.test.ts, packages/qa/scenarios/README.md, and .changeset/34448-scenario-fresh-copy-restore.md. These match the claim as amended (comment 6931982958, which added the README bullet and the Clause-②: yes (widening) line). No content/docs/releases/ change.
  • Premise correction. Ask 1 (a privileged restore path) is reported as having no path without weakening the platform. The report names importControlOptOutRefusal and importUndoWriteContext, and the runner reaches the app over HTTP only. The card itself names Ask 2 as the fallback, and the PR takes it and states the cost. The dev's correction is written in the PR body.
  • Fix, read in the diff.
    • runHalf takes an optional trailing fresh: FreshCopy.
    • Before each operation it now only reads (seedDrift, which reuses the former read loop of restoreSeededRows). On drift, moveToFreshCopy seeds a new copy and compares it with the run's seed (seedDifference: inserted count, refusals with code and fields, permission-set assignment). Only then does it switch app, adminKey, seeded and accounts.
    • keyOf and doorOf read those let bindings when called, so later turns go to the copy.
    • Copies are released in the replaced-copy path, the failure path and the half's finally. The booted app stays with withApp.
    • Copies do not share state. bootDev takes a freePort() per boot and runs objectstack dev --fresh, which gets its own ephemeral DB (packages/cli/src/commands/dev-default-db.test.ts, "yields to --fresh (its own ephemeral temp DB…)").
    • Template mode passes no fresh, and a comment at the call explains why.
  • Changeset. @objectstack/scenarios publishes (no private in package.json), so a patch changeset is owed, and one is present. Its body carries Clause-②: yes (widening) and Metadata-protocol: none at line start. I checked its prose against the diff. "boots a fresh copy of the same app (scratch: the same project; ask: a blank host with the same build installed the same way)" matches freshBoot(ops, dir) and the withInstalledBuild fresh. "it still counts in the Run-operations cell's N started from restored rows" matches the README and the untouched scorecard.ts. "Template mode keeps writing the rows back" matches templateMode, whose call passes no fresh. Skills-docs: is not owed: Metadata-protocol: none, and there is no narrowing arm.
  • README (content checked against the diff): the two bullets match the code paths above.
  • Tests.
    • New describe Scenario runner: restoring seeded rows through the app's write door is refused by its own state rules (VALIDATION_FAILED), so later operations go unmeasured (regression from #34338) #34448, 3 cases on the real asset_lifecycle.json with a one-way-rule double (400 VALIDATION_FAILED, the card's own message). The positive case: six of six asked, dispose_scrapped_asset restored: { freshCopy: ['demoasset_disposal_request/dr06'] }, zero rule refusals, the booted app took only the seed's inserts and second-pass updates, and boots equal stops.
    • Two ⛔ cases: without a copy, the refusal is named, with no turn and no grade; a copy whose seed differs or that does not boot gives NOT MEASURED with its reason and is released. These are runner-level NOT-MEASURED outcomes, not HTTP refusals, so the ADR-0112 code/status assertion rule does not apply. The double's VALIDATION_FAILED + 400 is asserted verbatim in the reason string.
    • Ablation: scripts/ablation-replace.mjs, blob f92b76b517ff → 5cdc7e332873 with scratch given no copy, gives -t 34448 2 failed / 1 passed. The first case reproduces the card's failure. Restored to blob == HEAD.
  • Changed tests (all named in the body). Each now asserts the new truth (freshCopy in place of deleted, reinserted or setBack; probes read across apps; the template host is the last booted app). None is loosened: the booted-app case gains an app-count assertion and an owners-equal-on-every-copy assertion.
    • The write-back path keeps its success coverage: the direct restoreSeededRows cases at test lines 3166–3185 (setBack, reinserted), and the replay cases at 1852 and 1898, still pin it.
    • Its refusal coverage moved to a template-style runHalf with no copy (NoDeleteApp, and no deleteRow), with the same reasons verbatim.
  • Gates (check-runs at 69b88800, 53 runs). 35 success, 18 path-filtered skipped, none red or pending. Required floor: Lint & Repo Gates success, TypeScript Type Check success. Test Core aggregate success, with planned shards 1–6/8 each success (the planner emitted six). Also success: Build Core, Check Changeset, Dogfood Regression Gate (aggregate) and the PR-body guards. Local dispatch-gates --ran on 69b88800: 62/62, 0 NOT-MEASURED, a local subset only. The first-round exit 3s on dc265d44 are explained and were rerun.
  • Nit (non-blocking, no rework). In moveToFreshCopy, the bindings switch to the new copy before await previous?.(). If stopping the replaced copy throws, the catch releases the copy just switched to, the operation reads NOT MEASURED, and the half goes on against a stopped app (later operations then read NOT MEASURED, "could not be read"). This degrades to not-measured and never to a wrong grade. Releasing previous after the try, with its own .catch, would remove the edge. Optional here or in the template-mode follow-up.

L2 owed: yes, at TIER_DEFAULT only. The trigger is Clause-②: yes (widening): ./runner gains the type FreshCopy, runHalf's optional fresh and RowRestore.freshCopy. No packages/spec/src/**, no governed rule text, no narrowing, so CONTRACT_REVIEW_TIER is not owed. The seat routes it. No same-form PASS exists at this head yet, so at ACCEPT the dispatching seat adds needs:contract-review to the PR.

Landing tier. node scripts/pm/check-governed-merges.mjs --pr 34490 reads: "0 of 4 path(s) hit the register … ✅ NOT governed — ordinary queue landing applies"; 411 changed lines ≤ 3000. Once both rework items are done and L2 PASS is recorded at the same head, the area lands it through the ordinary queue.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmSmxJiAWk7fuq3Q1Sf

席位核对

L1 verdict: ACCEPT · card #34448 · area o2-C · delta on REWORK 6932638502 · read at 2026-11-16T23:38Z
Head-sha: 69b88800e2ce07d7cf664de8af3c3430a6fd2d19 (unchanged since the first review; only the body and card comments moved, so the first review's code, test and gate readings carry over)

Delta, read on GitHub:

  1. Part of #34448, done. The body's first card line now reads Part of #34448. A closing-keyword scan of the whole body (fix/fixes/fixed/close/closes/closed/resolve/resolves/resolved + #n) finds no match. The closing arrangement is on the card, comment 6932649454: it closes when the live asset_lifecycle run reads 6/6 per half, the seat's daily gallery task carries that run, and pm:dispatched is removed by hand then. Because Part of does not auto-close, the landing to-do keeps the manual close and the label removal.
  2. Template-mode follow-up, done. Scenario runner: in template mode, an operation after a one-way state change still goes unmeasured, because the restore writes back through the app's doors #34497 is open: p2, domain:devx, pm:blocked, filed by the fleet account, and the follow-up is described in the filer's own words. The PR body's Acceptance notes reference it with no verb ("Template mode's write-back restore is filed as Scenario runner: in template mode, an operation after a one-way state change still goes unmeasured, because the restore writes back through the app's doors #34497."). The dev report 6931668123 now reads carrier: #34497. The moveToFreshCopy nit is recorded as known and non-blocking.

Gates at this head. PR-body guards re-ran after the body edit: success (23:37Z). Check Changeset re-run is in_progress at this reading, and its earlier runs on this head were success. Lint & Repo Gates and TypeScript Type Check are success. No check run is red. Before ready, re-read that Check Changeset completed success.

L2 owed: yes, TIER_DEFAULT (Clause-②: yes (widening) through ./runner). No same-form PASS is recorded at this head, so needs:contract-review goes on the PR with this ACCEPT. The seat routes the review.

Landing tier. Not governed per check-governed-merges.mjs --pr 34490 (first review reading; file list unchanged), 411 lines. The area lands it through the ordinary queue once three things hold on this same head: the L2 PASS is recorded, every check is green, and Check Changeset has finished.

@objectstack-fleet objectstack-fleet Bot added the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 16, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRH4UCX1tvddXMS7cq

Contract-review-claim: session_01ADHkmRH4UCX1tvddXMS7cq · head 69b8880 · 2026-11-16T23:41Z

Area o2-C (repo:objectstack#2) takes the TIER_DEFAULT review owed by Clause-②: yes (widening). The L2 seat declined it as lane work (pm-dispatch: L1 and TIER_DEFAULT reviews stay with the lane).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRH4UCX1tvddXMS7cq

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 69b88800e2ce07d7cf664de8af3c3430a6fd2d19
Local-runs: none

Face: declaration only. The PR body and the changeset carry Clause-②: yes (widening) and Metadata-protocol: none. The 4 changed paths hold no packages/spec/src/** file, no governed path (check-governed-merges.mjs --pr 34490: 0 of 4 hit the register) and no narrowing line, so CONTRACT_REVIEW_TIER is not owed and there is no ④. Read on the diff origin/main...69b88800 and the card thread's report 6931668123, at 2026-11-16T23:41Z.

① Derived judgments

  • What widens, through ./runner only. The new exported type FreshCopy; runHalf gains an optional LAST parameter fresh?: FreshCopy; RowRestore gains an optional field freshCopy?: string[]. The first runHalf parameter is renamed app → firstApp, which is positional and invisible to callers. No export is removed, no parameter becomes required, no existing field changes type. ./score, ./score/full, ./export and . are untouched, as the changeset says.
  • Existing consumers of RowRestore hold. The only reader outside orchestrate.ts is scorecard.ts:386, which counts o.restored !== undefined. A restore carrying only freshCopy is still counted in N started from restored rows, so the scorecard and the README sentence that says so stay true without a change to scorecard.ts.
  • A caller that passes no fresh gets the old behaviour exactly. The else branch is the former restoreSeededRows call unchanged. The read loop moved into seedDrift, which returns the same failed text (the rows of X could not be read to restore them: …) that restoreSeededRows passes on. Template mode is that caller, with a comment at the call saying why.
  • With fresh, later turns really go to the copy. doorOf and keyOf read the let bindings app, adminKey and accounts on each call, and accounts is spliced in place. So every later ask, confirmation and replay re-send goes to the copy. The first app stays owned by withApp. Each copy is released when it is replaced, when its seeding fails, and in the half's finally.
  • The documented contract matches the code. The FreshCopy and RowRestore.freshCopy jsdoc, the runHalf docblock, the README bullets and the changeset prose each say that nothing is written to undo a move, that a copy whose seed differs (seedDifference: inserted count, refusals, permission-set assignment) makes the operation NOT MEASURED with the reason, and that template mode keeps the write-back. I checked each statement against the diff.

② Semver level

patch on @objectstack/scenarios, the only package moved. Correct per AGENTS.md: "a non-protocol change, widening or breaking, ships patch", and Metadata-protocol: none takes patch. This matches the precedent #34338 (changeset 34294-scenario-restore-seeded-rows.md, also a ./runner widening shipped as patch). No BREAKING banner is owed: the change does not narrow anything.

③ Boundary flags

  • Dev open_questions 6931668123: (1) Ask 2 isolation over a privileged restore door. Kept: it changes nothing the platform lets an HTTP caller do (importControlOptOutRefusal stands). (2) Clause-② yes (widening). Agreed and recorded in the claim amendment 6931982958. (3) The template-mode follow-up is filed as Scenario runner: in template mode, an operation after a one-way state change still goes unmeasured, because the restore writes back through the app's doors #34497. (4) The README paragraph is on this PR, covered by the same amendment. (5) This record.
  • out_of_scope_findings: Ask 4 (live asset_lifecycle 6/6) is NOT MEASURED and goes to the seat's gallery run. The PR says Part of #34448, and the card's close is arranged in 6932649454.
  • L1 nit (6932638502): in moveToFreshCopy the bindings switch before await previous?.(), so a throwing stop of the replaced copy releases the new one too. This degrades only to NOT MEASURED, never to a wrong grade. Graded nit; accepted as is.
  • SQL push-down: n/a. This is a test runner reading rows over HTTP with listRows. It adds no id materialisation or in-app join on a platform query path.
  • Author: the PR was opened through the relay (objectstack-fleet[bot]), so no other login needs naming.
  • Security-touching: no. Nothing in the diff changes what a caller is let do. The copies boot through the same ops.boot and installUnmanaged as the first app.

Implemented-by: session_01ADHkmP1FQBBcaufj5VXUcV
Reviewed-by: session_01ADHkmRH4UCX1tvddXMS7cq

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRH4UCX1tvddXMS7cq

Landing · 2026-11-16T23:42Z

Head 69b88800e2ce07d7cf664de8af3c3430a6fd2d19, the same head for every item below:

  • L1 ACCEPT 6932734735 (area seat's L1, after the REWORK 6932638502).
  • Contract review at TIER_DEFAULT: PASS 6932808320. needs:contract-review comes off with this comment.
  • Check runs: none red or pending. The Check Changeset re-run after the body edit finished success at 23:41Z.
  • check-governed-merges.mjs --pr 34490: not governed, 411 changed lines (≤ 3000). It is 12 first-parent commits behind main (under 15).

It goes ready and auto-merge through the ordinary queue. The card stays open (Part of): it closes by hand when the live asset_lifecycle run reads 6/6 per half (6932649454).

@objectstack-fleet objectstack-fleet Bot removed the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 16, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 16, 2026 23:43
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 1efe7a2 Nov 17, 2026
66 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-oa4of3 branch November 17, 2026 00:34
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.

2 participants