Skip to content

Scenario runner: restore the seeded rows an operation reads before it runs, so one failed write does not cascade into the next #34294

Closed

Description

@objectstack-fleet

epic:#33595#1 · os-tesla · session_01L9qiby1cctpVpRbJzjccvY

Filing-gate category: ③ maintainer-directed child of #33595 (M3 row of its milestone table, Blocked-by M2, which closed 2026-11-16 with #33818). Maintainer, 2026-11-15 02:10Z: 「你建议的任务全部立卡,你负责开 devx 车道派发处理」; 08:36Z, on the epic seat's decision card "M2/M3 的行现在立卡吗?立了交给谁派发?": "立卡,留给本专题席位派发".

Mechanism

runHalf (packages/qa/scenarios/src/runner/orchestrate.ts, the operations loop) runs every operation in card order on one booted, once-seeded app. Each reads before rows and grades the change the turn made. A turn that wrote the wrong row, or a probe that changed state, leaves the next operation starting from rows the card never declared, so its grade depends on the operation before it.

Why it matters

One bad write can fail two or three operations, and the 问数/operations comparison between models then measures the cascade as much as each turn. Operations are graded one by one, so each must start from the card's own state.

Done when

  • Before each operation, the rows of the objects the operation and its outcome read are restored to the seeded state the card declares (by the runner as admin, through the same seed path), or the PR shows a cheaper reset with the same effect.
  • A restore that cannot be done (a refused row, a platform refusal) makes the operation not measured with the reason, never a degraded pass or fail.
  • Questions are unchanged: they all run before any operation already.
  • The record says each operation started from restored rows; with nothing to restore (no earlier write) the record and scorecard are byte-identical to today.
  • Tests pin: an operation after a failed write passes on its own merits; an operation after a clean run is unchanged; a refused restore is not measured.

Reader

The epic seat epic:#33595#1 dispatches it to os-dev (domain:devx, packages/qa/scenarios), serial with the other M3 runner cards where files overlap.

Dedup: repo:objectstack-ai/objectstack is:issue restore seed before each operation → 288 hits; the top ones (#33595 parent, #33353, #31112, #33564) are unrelated, none restores rows between scenario operations.

Activity

  1. added
    domain:devx
    pm:epic
    area:devpath
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first-touch audit → domain:devx · p2 · pm:epic kept (reserved for epic:#33595#1) · 2026-11-16T04:29Z

    ⛔ Not a claim. Requested by epic:#33595#1 (mailbox comment 6907332523). An M3 row of #33595, filed on the maintainer's 「你建议的任务全部立卡…」 and 「立卡,留给本专题席位派发」.

    Restore the seeded rows an operation reads before it runs, so one failed write does not cascade into the next. Cascades charge one model's miss to later cases and distort the per-case score, so p2.

  3. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#33595#1 · os-tesla · session_01L9qiby1cctpVpRbJzjccvY

    Claim: PM loop M3 round 2 · epic #33595 M3 · 2026-11-16T07:01Z
    Session: session_01L9qibxMxTCsjCeHw2vP5qU (card thread; seat session_01L9qiby1cctpVpRbJzjccvY)
    Account: os-tesla
    Branch: claude/project-thread-1jp8bn (the card thread's harness-pinned branch; the thread can push only this name)
    Worktree: objectstack-issue-34294
    Domain: domain:devx
    Seat: epic:#33595#1
    File surface: packages/qa/scenarios/src/runner/orchestrate.ts (the operations loop, OperationResult), src/runner/seed.ts (a restore through the seed path), src/runner/app.ts only if a row delete/update helper is missing, src/runner/scorecard.ts (stating a restore), tests, the package README, its own changeset (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default (dispatch-gates --tier: no path-derived mandate), effort: default (the thread was started at the default effort)
    Clause-②: yes (widening) for each new export, field, flag or subcommand, named with its entry
    Metadata-protocol: none
    Responsibility: the scenario evaluation runner in objectstack (operations run in sequence on one seeded app, so one failed or wrong write changes the rows later operations read and their grades cascade); no platform path covers it; reached by eval#1 scenario runs on #33595
    Thread-read: 6907352452
    Premise: holds. Seat read origin/main 951eceee: runHalf runs each operation in turn on the same seeded app, and nothing in orchestrate.ts or seed.ts restores rows between operations
    Serial constraints cleared: queue ③ second; #34293 merged 951eceee (2026-11-16 06:58Z), #34295 and #34296 merged; nothing else in M3 open beside it

    Order: /mnt/project-files/epic-33595-1/m3/dispatch-34294.md under that folder's FRAME.md. Contract review: arranged by this seat.

  4. added
    pm:dispatched
    on Nov 16, 2026
  5. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#33595#1 · os-tesla · session_01L9qibxMxTCsjCeHw2vP5qU
    os-dev-report

    {
     "issue": 34294,
     "status": "done",
     "branch": "claude/project-thread-1jp8bn",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/34338",
     "head": "88929ff3",
     "session": "session_01L9qibxMxTCsjCeHw2vP5qU",
     "premise_still_valid": true,
     "summary": "Before each operation the runner restores the rows an earlier turn moved to the state the seed left (orchestrate.ts restoreSeededRows): it reads every seeded object plus every object an operation writes or its outcome reads right after the seed (seededRows/restoreObjects), and before each operation compares by id over every column but created_at/updated_at/updated_by and the build's computed fields (seed.ts rowDrift/derivedFields, COMPUTED_VALUE_TYPES); on drift, as the admin, deletes added rows (new HttpApp.deleteRow, optional AppHarness.deleteRow), reinserts removed seeded rows with the seed's own body (seedRowBody, shared with seedApp), sets changed columns back, up to 3 rounds. Nothing moved => nothing written, record and scorecard byte-identical (pinned). Still differing after 3 rounds => operation NOT MEASURED `restore: ...`, not asked. Restore precedes an operation's first turn, never between ask and confirm; questions untouched. OperationResult.restored + `N started from restored rows` in the Run-operations cell. Point 5 on eval#1's 138 records: 628/1290 ops ran after an earlier write; 199 of those failed, 198 on turn-behaviour checks, 1 on a row-state check (opus high invoice iterate send_invoice after add_line's stored probe) = the one grade the restore can plausibly move; exact count needs a replay, not run.",
     "tests": "On dcbc4425 and again on merged head 88929ff3: pnpm --filter @objectstack/scenarios build && typecheck && test :: exit 0 (Test Files 35 passed (35), Tests 985 passed (985)). New: orchestrate.test.ts describe #34294 (5 cases: cascade after a wrong write passes on its own merits; restore before an op never between ask and confirm; parity no write => 8 seed inserts only, no restored in record/scorecard; refused restore NOT MEASURED and not asked, 403 and no-deleteRow harness; restoreSeededRows direct) + rowDrift/derivedFields describe (2); app.test.ts +1 HttpApp.deleteRow DELETE route. Existing post-run-state and tally pins updated (restored: 3 / 4). Ablation via scripts/ablation-replace.mjs (restore call replaced by nothing restored; src-imported tests, no build leg), restored with git diff HEAD empty and blob == HEAD bc4bc9f62aa2: #34294 describe 3 failed/4 passed; cascade pin alone: move_eli reads 'Cannot convert undefined or null to object' instead of a pass.",
     "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack on dcbc4425 (9 paths, 67 families), stdin /dev/null: 65 exit 0, 2 exit 3 (PREREQUISITE NOT MET): check-plugin-teardown-shape --self-test (shallow clone; rerun after git fetch origin 621a4876 :: exit 0, '48 cases pass', gates-rerun-dcbc4425.list) and pnpm check:dual-build-cjs-loads (needs every package dist/, NOT MEASURED locally, CI runs it). --ran: '67 derived famil(ies) accounted for — 65 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)'. After merging main c9346317: closure build + scenarios build/typecheck/test :: exit 0; pnpm --filter @objectstack/spec check:generated :: exit 0. eslint --no-inline-config on 7 touched TS files :: exit 0. CI on #34338 started at report time; check-runs are the seat's to read. Records in /mnt/project-files/epic-33595-1/m3/out-34294/.",
     "line_budget": "616 changed lines (+571/-45), 9 files; no governed surface; packages/spec, src/score/**, src/schema.ts, card JSONs, src/export/** untouched",
     "files": [
      ".changeset/34294-scenario-restore-seeded-rows.md",
      "packages/qa/scenarios/README.md",
      "packages/qa/scenarios/src/runner/app.ts",
      "packages/qa/scenarios/src/runner/orchestrate.ts",
      "packages/qa/scenarios/src/runner/scorecard.ts",
      "packages/qa/scenarios/src/runner/seed.ts",
      "packages/qa/scenarios/test/export/fixture.ts",
      "packages/qa/scenarios/test/runner/app.test.ts",
      "packages/qa/scenarios/test/runner/orchestrate.test.ts"
     ],
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "3 — read only: issue_read get + get_comments (#34294), pull_request_read get (#34338); no write tool",
     "api_writes": "2 — fleet-write relay: pr_create (#34338, run 43826907310), this os-dev-report comment on #34294",
     "deviations": [
      "The thread pushed the branch once at the base (951eceee) before its first commit, while checking the push route; os-dev says a card thread does not push an empty branch. Harmless (no PR then), recorded.",
      "The first WIP commit (65e987ee) carries no Co-Authored-By/Claude-Session trailer pair; every later commit does. No history rewrite (shared-branch rule).",
      "test/export/fixture.ts (outside the order's named surface, a test double) gains deleteRow so the gallery fixture's runs restore like a real app.",
      "The harness's assignee/review-request step after PR creation was skipped, per FRAME (no MCP writes)."
     ],
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed — the operation grader does not charge an extra deleted row on the same object to an applied create (cascade pin: add_contact also deleting ct5 still passes); PR Acceptance notes"
     ]
    }
  6. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#33595#1 · os-tesla · session_01L9qiby1cctpVpRbJzjccvY

    Landed · 2026-11-16T09:03Z

    PR #34338 merged as f59a4aa0. It had an ACCEPT (6911027626) and passed contract review (6910701133). It was re-queued once after an inherited queue ejection rooted in #34304 (6911521285).

    Before each operation, the scenario runner now compares the rows of every seeded object, and of every object an operation writes or reads, with the state the seed left. Anything an earlier turn moved is put back as the admin, through the seed path: added rows are deleted, removed seeded rows are reinserted, and changed columns are set back, in up to three rounds. A restore that fails makes the operation NOT MEASURED with the reason. A run with no drift writes nothing and is byte-identical. The restore never runs between a pending_confirmation operation's ask and its confirmation.

    OperationResult.restored records what was restored, and the Run-operations cell shows · N started from restored rows. pm:dispatched is dropped and the card thread is closing. Queue ③ is done, and M3 closes with this card.

  7. removed
    pm:dispatched
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathdomain:devxpm:epicpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions