Skip to content

fix(spec): rewrite a stored bulk-actions list when the object already declares the same selection arm - #39444

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-39395-wip
Dec 4, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-39395-wip

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxRh6Sbfo2Xm49JPx6

Requested by Elon · project thread

Fixes #39395
Fixes #39446

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:从旧版升级的客户,在源码已按新写法改好后,再跑数据库内已保存列表视图的升级时,这些视图会被自动改写,不再卡住、不再要求手工重存。
  • 为什么做:属于协议 19 升级工具链,替所有带工作室保存列表视图、且对象已声明批量操作顺序的老库解决升级卡死。
  • 出错会怎样:只在对象声明的顺序保留了该视图自己的顺序时才改写,其余情况保持原样并给出待办说明,不会覆盖作者的排列;可直接撤回。
  • 要你做什么:无。

What changes

The protocol-19 conversion view-bulk-actions-to-action-selection left every list of an object as stored (with a TODO) whenever the object already declared actionLayout.selection, without comparing it. The source half (os migrate meta --from 18 --write) writes exactly that arm, so after the source edit a Studio-saved row stayed unconverted and os migrate meta --stored --apply exited 1, its TODO prescribing the edit already made.

Now the declared arm is read against the list's order, the way the entry's own multi-list merge reads each list against the merged order. Agreement definition (source: the source half's own output, i.e. the arm this same entry builds in planObject, merged from every list of the object): the declared arm names every action the list names, and its order (pinned, then more) restricted to those names is the list's order. Which names are buttons is the arm's own split, as declared, never recomputed from one list, because the merge already lets a list's names land in more. So views [b, a] and [b, a, c] (merged pinned: [b, a, c]), or [alpha, beta, gamma, epsilon, delta] and [epsilon, delta] (merged pinned: [alpha, beta, gamma], more: [epsilon, delta]), each move when replayed alone. Agreeing ⇒ the list moves and the arm is left as declared; the named actions still gain 'selection' where they lack it, and no arm is written. Any other arm (another order, a name of the list missing, not an arm) is the author's arrangement: never overwritten, the row stays as stored, and the TODO names the declared arm beside an arm that would keep the list's order.

Review N3 (the comment in packages/metadata-protocol/src/protocol-stored-view-selection.ts naming "an arm the object already declares" under left) is outside this claim's file surface and is left unchanged.

Tests

  • view-bulk-actions-to-action-selection-39395.test.ts: 16 cases. Equal arm (pinned only; pinned and more); six agreeing arms (empty more, wider after, wider between, wider in more, the same order split differently, wider with a named action in more); the source half over two lists then each row replayed alone in the stored half, for a prefix pair and for [alpha, beta, gamma, epsilon, delta] + [epsilon, delta]; five disagreeing arms (each pinning the TODO's declared-arm wording); and the undeclared/absent-object regression.
  • On the previous head's conversion (76b5105 source, new tests kept): Tests 3 failed | 13 passed (16), exit 1 (the two split cases and the [epsilon, delta] replay). On origin/main source the two equal-arm cases failed (first round). On this branch: pass.
  • vitest run src/conversions in @objectstack/spec at 171441c: Test Files 30 passed (30), Tests 897 passed (897), exit 0. Full @objectstack/spec suite left to CI (declared narrowing).
  • pnpm --filter @objectstack/spec build && typecheck: exit 0.

Acceptance notes

  • armKeepsOrder reads a declared arm as agreeing when it keeps the list's order; the arm's own pinned/more split is accepted as declared, as the source half's merge does (so more: [] and a re-split arm agree). A list already in the default order moves before any arm is read, as on main.

Verification

Read first: packages/spec/src/conversions/entries/19/view-bulk-actions-to-action-selection.ts (planObject early return and armKeepsOrder).

Two-minute check: pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/conversions/entries/19/view-bulk-actions-to-action-selection-39395.test.ts — expect 16 passed.

Local gates at 171441c

dispatch-gates --ran: 83 derived, 76 run (exit 0), 7 NOT-MEASURED (repo-wide scans timed out on the shared box or need dist of other packages / a full clone: comment-mask-corpus, plugin-teardown-shape self-test, dual-build-cjs-loads, lean-entry-closure, query-options-erasure, slot-lookup, type-check-debt; measured as such on the first round, not rerun), 0 UNRUN — left to CI. overlap-check: VERDICT clean exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6

@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 Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

3 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 71 of 256 client-bound route-ledger rows — the other 185 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 185: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 125 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 — 185 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 55d673c6e588251ee9b246df3c7edffa40c03db1 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 55d673c6e588251ee9b246df3c7edffa40c03db1

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4czfEjskBjZM6jhKWFR

2026-12-04T00:18Z · L1-a verdict: ACCEPT (L1) at head e20b5e75a7 (zone em-upgrade, card #39395) — L2 contract review still owed; CI not yet green

席位核对

Checklist verdict. Shape: open, draft, base main, Fixes #39395 first line, no keyword on another card; Fixes is right (the card's expected state: a stored row is rewritten when the declared selection equals what the row carries). Clause-②: no · Metadata-protocol: none hold: nothing an author can write changes; the conversion now rewrites one more stored shape it used to leave with a TODO. Changeset @objectstack/spec: patch, summary on the first body line; its sentences match the diff (the equality rule, the four unequal shapes left as stored, the TODO naming both arms, the re-save workaround).

Code read (view-bulk-actions-to-action-selection.ts).

  • The equal-arm path returns the plan with no arm, so the caller still strips bulkActions, still adds 'selection' to each named action's locations (gaining is filled from plan.names for every plan without a TODO), and writes no actionLayout: the declared arm stays byte-identical. Pinned by the test's applied filter (only views[0] paths change) and the actionLayout equality.
  • isSameArm compares the defined key set and each array's names and order; more is required exactly when the computed arm has one. The arm is built the same way as the write path, now hoisted above the branch, so "equal" means "the arm this entry would itself write".
  • The unequal-arm TODO keeps the old prescription and adds both arms as JSON; the undeclared-object path is unchanged (regression case 8).

The point the zone asked to judge — equality defined from the source half's own output. Accepted. upgrading.mdx "The stored half" is silent on what "equal" means, and the card's failing scenario is exactly the arm the source half writes. Reading a reordered or re-split arm as agreeing would mean the conversion decides that the author's arrangement covers the list's order, which is the overwrite-by-inference this entry refuses everywhere else. Strict equality keeps every unequal case as stored with a TODO that names both arms. This is a reading of an existing invariant, not a new product choice.

Evidence. Ablation reading: the new test fails 2/8 on the main copy (the two equal-arm cases) and passes 8/8 on the branch; src/conversions 889/889. Gates at this head: 11 success, 12 expected skip, 16 pending at read time (both floor checks among them), so not yet green; landing needs every check green or expected skip on the head that lands.

L2 owed. The diff touches packages/spec/src/** (non-test), so check-owed-reviews.mjs lists this PR with face schema at CONTRACT_REVIEW_TIER, no record, no claim, no hand-off on this head. This L1 ACCEPT does not stand in for it: the seat routes the L2 (contract-review.md) before landing.

Pointer for #39395: ACCEPT (L1) → PR #39444 (this comment).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Contract-review-claim: session_016WV4cxiJF5PkqquFk98Bh7 · head e20b5e7 · 2026-12-04T00:19Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: e20b5e75a772b6e8f3353714b6d1e0884f5ecdd6
Local-runs: none
Scope: packages/spec/src/conversions/entries/19/view-bulk-actions-to-action-selection.ts + none
Security-touching: no
Rule-change-verified: none

Read: card #39395 (body and its three comments), the PR body, its three-file list and the net diff against main, and the check-runs on this head. Read outside the diff, to judge and not to review: packages/metadata-protocol/src/protocol-stored-view-selection.ts (the stored pass that replays this entry), packages/spec/src/data/object-action-layout.ts (the protocol-19 arm), and the semantic migration entry 19.view-bulk-actions-declared-on-the-action.ts. The test file and the changeset are outside this record's ④: they are the lane seat's ACCEPT at TIER_DEFAULT.

① Derived judgments

No schema, export or accept-set moves: the diff changes one branch of planObject and adds two private helpers. What the conversion writes changes in exactly these ways.

  1. A list in non-default order, on an object whose declared actionLayout.selection is the arm the entry would build from that same run's lists (pinned = the first three names, more = the rest and present only when non-empty, same names, same order): on main every list of the object stayed as stored with a TODO; at this head planObject returns the plan with no todo and no arm. So the lists lose bulkActions, the named actions still gain 'selection' where they lack it, the Delete handling (needsDeleteDef, gainsBuiltinDelete) runs as for any moving list, and no objects[j].actionLayout.selection notice is emitted. Right. The end state is byte for byte what the entry writes on an object with no arm, so nothing an author declared is overwritten or reinterpreted.
  2. The stored pass (os migrate meta --stored --apply): judgeStoredViewBulkActions replays the entry over { views: [row], objects, actions } and answers moves only when every emitted path starts with views[0]. With case 1 that now holds whenever the named actions already carry selection, so the row is re-saved without bulkActions; where an action still lacks selection the answer is declared, naming those actions and no arm. Right, and it is the card's scenario: the state the source half leaves is now accepted by the stored half.
  3. Any other declared arm (another order, another pinned/more split, more: [], a subset, a superset, a non-object, null): still left as stored, as on main. The TODO text changes: it now prints the arm the row's order needs and the arm declared. Right as a fail-closed default; see S1 for the superset case, where the printed sentence is not true.
  4. isSameArm ignores keys whose value is undefined, so an arm that passed through a parse carrying more: undefined still compares equal. Right: the registry hands the stored pass parsed objects.
  5. Unchanged: an object with no arm (arm written), an object the stack does not declare (TODO), a list already in default order (moves before the comparison is reached, line 307, whatever arm is declared), and every earlier refusal (undeclared action, contradicting lists, object not told). Right that the diff leaves them alone.
  6. Idempotence: the entry acts only on a bulkActions key and deletes it. A second run over a converted row, or over a source stack already converted, finds no list and returns the stack untouched; a second run over a row left as stored reports the same TODO. Right.

② Semver level

@objectstack/spec: patch, Clause-②: no, Metadata-protocol: none, in the changeset and on the PR body, line-initial in both. That matches what the diff publishes: a bug fix in a released package that changes no schema, no export and nothing an author can write; the conversion only stops refusing an input whose correct output it already knew. none takes patch. No BREAKING banner or ADR-0087 marker is owed: nothing is removed or renamed, and the entry's id, surface, summary and fixture are untouched. Check Changeset on this head: success.

The changeset body states the equality rule and the unchanged workaround accurately against the tree. One sentence in the PR body ("nothing else is written") is narrower than the tree: the named actions still gain 'selection' where they lack it, which is correct behaviour and is what case 2 above relies on.

③ Boundary flags

  • Dev report on the card: open_questions: [], security_findings: none, out_of_scope_findings: []. Nothing to answer.
  • Declared deviation (resume from an existing branch, a merge of main): no effect on the contract; the net diff against main is the three files reviewed.
  • Declared narrowing of local tests (src/conversions only, full spec suite left to CI) and seven gates NOT-MEASURED locally: answered by CI, not by this record. On this head they are still pending: Test Core 1/12 to 12/12, Test UI 1/16 to 16/16, Build Core, Build & E2E UI, Live E2E UI, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Type Check UI, Lint · CI, release & engine gates, Lint · scoped · query-options erasure, v18 → v19 source upgrade. Completed and green: Type Check · source gates, Lint · ESLint, Lint · docs & code guards, Lint · repo & tooling gates, Lint · PM dispatch-gates, Lint · scoped · slot lookup & corpus, Lint · scoped · tooling self-tests, Spec property liveness, Governed Surface Queue Guard, PR-body guards, Check Changeset, Check PR Size, Dogfood Regression Gate, Build UI Deps. None failed. This PASS is a verdict on the contract and does not stand in for the pending runs; v18 → v19 source upgrade and Test Core are the two that exercise this entry.
  • SQL push-down (Prime Directive 5): not applicable. The diff is a pure in-memory comparison of two small arrays inside a metadata conversion; it adds no query, no id materialisation and no in-app join.
  • Escalations: none.

④ Design judgment

Against the protocol-19 shape. actionLayout.selection is a closed { pinned (at most 3), more? } arm of action names. The arm the entry builds (slice(0, 3) / the rest) is always a valid arm, and isSameArm compares the full key set, so an arm carrying anything else never passes as equal. Holds.

Against the sibling conventions. Still a leaf (no new import), still reports through context.reportTodo and emit, no second copy of the arm rule: the arm is now built once and used for both the comparison and the write, which removes the chance of the two drifting. The stored pass keeps reading the one predicate from ALL_CONVERSIONS. Holds.

Against the card's scenario (source half adds selection.pinned in the row's order, stored half then runs): the row's names produce exactly the declared arm, planObject returns clean, the only emitted paths are under views[0], the pass answers moves. Holds, by reading.

Attempts to break it.

  • Object declaring the arm but no actions: the names are undeclared, the earlier refusal fires before the new branch. Safe.
  • Equal arm, actions without selection: answered declared, row kept, the actions named. Safe.
  • Row already converted, or a second run: no bulkActions, nothing happens. Safe.
  • selection: null, a string, an array: isSameArm is false, row kept. Safe.
  • pinned holding non-strings: strict === against strings, false. Safe.
  • Mixed stored rows of one object: see S1.

S1 (should-fix) — A stored row that names fewer actions than the declared arm, in an order the arm agrees with, is still left as stored, and its new TODO states something false. This is the ordinary output of the source half on any object with more than one list: the source half merges every list of the object in walk order (lines 287 to 299, which accept a list whenever the merged order restricted to its names is the list), so two views [b, a] and [b, a, c] yield { pinned: [b, a, c] }. The stored pass replays each row alone, builds { pinned: [b, a] } for the first, finds it unequal and exits 1, while the second row moves. The TODO then says keeping the order "needs the object's actionLayout.selection to be" {"pinned":["b","a"]}; it needs nothing, the declared arm already draws b, a first, and an operator who writes the printed arm demotes c from a button on every view. The entry's own merge test is the criterion the full-stack pass already uses for "this list agrees with the object's order"; the stored half is stricter than the source half it is meant to follow. It fails closed (no row is lost or rewritten wrongly, re-saving the view still works) and the card's single-list scenario is met, so it does not block; it wants a follow-up card that either accepts a declared arm whose order, restricted to the row's names, is the row and keeps them on the same side of the pinned/more split, or at least words the TODO for that case as "delete the key; the declared arm already keeps this order". The test's "a superset of the names" row pins today's answer and would move with it.

N1 (nit) — The header's new sentence "Any other arm is the author's arrangement and is never overwritten, nor read as agreeing" is true only of a list in non-default order. A list already in default order returns at line 307 before any arm is read, so it moves under a declared arm of another order. That behaviour is main's and is not changed here; only the sentence is wider than the code.

N2 (nit) — TODO grammar: "needs the object's actionLayout.selection to be …, which it does not: it declares …" reads better as "which it is not".

N3 (nit) — packages/metadata-protocol/src/protocol-stored-view-selection.ts (outside the diff) still lists "an arm the object already declares" under left and "no actionLayout.selection is needed" under moves; both are now one word short ("a different arm", "needed or already declared the same"). Comment only.

No must-fix.

Implemented-by: claude/issue-39395-wip
Reviewed-by: session_016WV4cxiJF5PkqquFk98Bh7

VERDICT: PASS

…d list's order

A stored row replays alone, so an arm the source half merged from several
lists is wider than the row; judge it by the merge's own criterion.

Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Contract-review-claim: session_016WV4cxiJF5PkqquFk98Bh7 · head 76b5105 · 2026-12-04T01:16Z
Delta review of the rework for record 7396734393, on em-upgrade's request.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4czfEjskBjZM6jhKWFR

2026-12-04T01:16Z · L1-a delta verdict: REWORK at head 76b5105984 (delta from my ACCEPT 7396647923 at e20b5e75a7; zone em-upgrade, cards #39395 and #39446)

席位核对 (delta)

Read. git diff e20b5e75 76b51059, less the origin/main merge (#39430, #39424, #39414, #39397 come in unchanged): the changeset, view-bulk-actions-to-action-selection.ts (isSameArm → armKeepsOrder, the TODO text) and its -39395 test.

The defect. armKeepsOrder's docblock, the file docblock and the changeset all claim the criterion is "the same criterion the multi-list merge applies to each list, so an arm the source half built from several lists agrees with each of them read alone". The merge checks each list's order against the merged order only. armKeepsOrder also asks that each name sit on the side of the split its index in this one list would give it (pinned.includes(n) === i < 3). A list whose names sit past the third place of the merged order, but in its own first three, is refused. That is the #39446 class this delta says it folds in.

Measured on this head (probe test in a scratch worktree, not pushed), with the file's own five actions declared in alphabetical order:

source half, views [alpha, beta, gamma, epsilon, delta] and [epsilon, delta], object with no arm:
  todos 0, writes {"pinned":["alpha_act","beta_act","gamma_act"],"more":["epsilon_act","delta_act"]}
stored half, row [epsilon, delta] alone against that arm:
  todos 1 — "The selection bar of object `crm_lead` drew its actions in the order its list views name them (`epsilon_act`, `delta_act`) …"

So os migrate meta --stored --apply still exits 1 on a Studio-saved row the source half already converted. The new test "merged from several lists" passes only because its two lists are prefixes of each other, so every index agrees with the merged one.

Asked fix. Make the stored-half criterion match the source half: a row agrees when every name it lists is in the arm and the arm's order (pinned, then more), restricted to the row's names, is the row's order. The split is read from the arm, not recomputed per row, because the merge already lets a list's names land in more. This makes the "same order split differently" case ({ pinned: ['beta_act'], more: ['alpha_act'] } for [beta, alpha]) agree too. Either:

  • (a) move that case to the rewrite table, saying why (the arm keeps the row's order, and the merge would accept the same split); or
  • (b) keep a split rule, but then it has to be the rule the merge applies, and the docblocks and changeset have to stop claiming the two agree.

Pin the counterexample above as a test either way (source half over both lists, then each row replayed alone ⇒ no TODO). If (b) is chosen and that case stays a TODO, Fixes #39446 is not earned: it becomes Part of #39446, and the case is written into it.

Held. Accepting more: [], a wider arm, and the TODO's wording naming both arms; the "not an arm" refusal; armPart refusing a non-string entry. The L2 delta the seat is running reads the same lines; this verdict goes to the seat too.

…r a stored list

The source half's merge lets a list's names land in more, so a row replayed
alone agrees with the merged arm when the arm keeps its order.

Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Contract-review-claim: session_016WV4cxiJF5PkqquFk98Bh7 · head 171441c · 2026-12-04T01:44Z
Delta review of the round-2 rework for record 7396734393, on em-upgrade's request.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 171441c25ff3da46b4c5f7c5f5cfe8f73e181181
Local-runs: none
Scope: packages/spec/src/conversions/entries/19/view-bulk-actions-to-action-selection.ts + none
Security-touching: no
Rule-change-verified: none

Delta record: it follows the PASS at e20b5e75 (comment 7396734393: S1 should-fix, N1 to N3 nits) and judges the delta from that head to this one in the one hits file. Read: git diff of the conversion and the changeset between the two heads, the dev reports 7397614931 and 7398140200 on #39395, the rework note 7397657709, card #39446, the PR body, and the check-runs on this head. The net diff against main is still the same three files; the test and the changeset remain the lane seat's ACCEPT at TIER_DEFAULT.

① Derived judgments

The delta replaces isSameArm (exact equality with the arm built from this run's lists) by armKeepsOrder(declared, names): pinned and more are read as arrays of strings (an absent part reads as empty), and the arm agrees when pinned then more, restricted to the list's names, is the list's names. What the conversion now writes for a list in non-default order on an object that declares an arm:

  1. The arm the source half merged from several lists, each list replayed alone: the list moves. Right, and it is sound and complete against the merge: the merge at lines 287 to 299 accepts a list exactly when the merged order restricted to its names is the list, and the arm the entry writes is that merged order cut at three, so pinned then more is the merged order again. Every list the source half accepted therefore agrees with the arm it wrote, wherever its names fall in the split. Both pairs named in the rework ([b, a] with [b, a, c]; [alpha, beta, gamma, epsilon, delta] with [epsilon, delta]) come out as moves by reading.
  2. The split is read from the arm, never checked per row ({ pinned: [b], more: [a] } agrees with [b, a]): Right. In protocol 19 the split is the object's and one for every view; a row cannot keep a split of its own. The source half already moves a list whose first names land in more (the [epsilon, delta] view), and its header already declares that change. A per-row split test refuses rows the source half converted, which is the measured counterexample. The clause "on the same side of the pinned/more split" in this seat's earlier S1 wording was wrong against the merge rule; option (a) is the reading that matches it.
  3. more: [] now agrees: Right. It draws the same bar as an arm with no more, and the rule is about what the arm draws, not how it is spelled. The same holds for more: undefined.
  4. A wider arm agrees (names before, between or after the list's, in either part) provided the list's own names keep their order: Right, by the same merge rule.
  5. Still left as stored: an arm that misses a name of the list, an arm in another order, an arm naming a list's action twice, a part that is not an array of strings, a non-object, null. Right: fail closed. The missing-name refusal is stricter than strictly needed in one corner (an arm naming none of the list's later names could still happen to draw them in default order), but the source half never writes such an arm and refusing it loses nothing.
  6. Unchanged from the earlier record: no arm is written when one agrees, the named actions still gain 'selection' where they lack it, the stored pass answers moves only when every emitted path is under views[0], a list in default order moves before any arm is read, and a second run finds no bulkActions and does nothing.

② Semver level

Unchanged and still right: @objectstack/spec: patch, Clause-②: no, Metadata-protocol: none, line-initial in the changeset and the PR body. The delta moves no schema, export or authorable key. The changeset body now states the agreement rule as the tree implements it, including that actions still gain 'selection'. Fixes #39446 on the PR body is earned: both the refused subset row and the false TODO sentence that card describes are gone.

③ Boundary flags

  • Dev reports 7397614931 and 7398140200: open_questions: [], security_findings: none. The one out_of_scope_findings entry is this seat's N3, noted as outside the claim's file surface; it stays open as a nit for the seat to carry, not a condition of this verdict.
  • The round-1 report's "each name is pinned exactly when it is among the list's first three" described head 76b51059 and is superseded; no such test remains in the tree at this head.
  • Check-runs on this head, none failed. Green: Governed Surface Queue Guard, PR-body guards, Spec property liveness, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Dogfood Regression Gate, Check PR Size, Flag docs affected by code changes. Pending: Build Core, Build UI Deps, Plan Test Core shards and Plan Test UI shards (so no Test Core or Test UI shard has started), Type Check · workspace, · source gates, · consumer gates and · debt ledger, Lint · ESLint, · docs & code guards, · repo & tooling gates, · CI, release & engine gates, · scoped · query-options erasure and · scoped · slot lookup & corpus, Live E2E UI, v18 → v19 source upgrade. Check Changeset shows one green run and one still running. This PASS is on the contract and does not stand in for them.
  • SQL push-down (Prime Directive 5): not applicable; an in-memory comparison of two short arrays.
  • Escalations: none.

④ Design judgment

S1 from 7396734393: resolved. The subset row now moves, and the TODO no longer asserts that the object's arm must be one particular arm: it says the order needs an arm naming the list's actions in that order, gives the entry's own arm as an example ("as … does"), and prints the declared arm beside it.

N1: resolved. The header now limits the "never read as agreeing" sentence to a list not in the default order and says a default-order list moves before any arm is read.

N2: resolved in substance; see N4.

N3: stands, unchanged, outside the surface: the header comment of packages/metadata-protocol/src/protocol-stored-view-selection.ts still describes the old rule under left and moves.

New attempts to break it.

  • An arm with every list name in more and pinned: []: agrees, the view's buttons all go to 「More」. Consistent with judgment 2; the arm is the author's.
  • An arm naming a list action in both parts: the restricted order has the name twice, refused. Safe.
  • pinned holding a non-string: armPart returns undefined, refused. Safe.
  • An object declared twice, a null arm, an arm that is an array: unchanged, refused or first match as before.
  • Agreement with a wider arm in the full-stack pass: only the actions the lists name gain 'selection'; the arm's other names are untouched. Safe.

N4 (nit) — The reworked TODO sentence still does not parse cleanly: "Keeping it needs the object's actionLayout.selection to name them all in that order …, as X does, which the arm it declares, Y, is not." The antecedent of "which … is not" is a verb phrase; "which the arm it declares, Y, does not" reads correctly.

N5 (nit) — armPart(undefined) reads an absent pinned as empty, so { more: [b, a] } agrees although the protocol-19 arm requires pinned. The object's own parse refuses that arm before the stored pass sees it, so nothing wrong is written; the conversion is only more lenient than the schema on an input it cannot receive parsed.

N6 (nit) — Two sentences trail the rule. The header's refusal list at line 65 still says "one that already has a different selection arm", where the rule is now "an arm that does not keep the lists' order". The PR body's maintainer summary still says the rewrite happens only when the declaration and the view's order match exactly, where the tree accepts any arm that keeps the order; the body is the seat's to patch.

No must-fix, no should-fix.

Implemented-by: claude/issue-39395-wip
Reviewed-by: session_016WV4cxiJF5PkqquFk98Bh7

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4czfEjskBjZM6jhKWFR

2026-12-04T01:48Z · L1-a delta verdict: ACCEPT at head 171441c25f (from REWORK 7397657709 at 76b5105984; zone em-upgrade, cards #39395 and #39446) — CI not yet green at read time; the seat's delta L2 still governs landing

席位核对 (delta 2)

Read. git diff 76b51059 171441c2, less the origin/main merge 8b7575dc (#39432, #39431, #39356 come in unchanged): armKeepsOrder, the two docblocks, the TODO sentence, the changeset paragraph and the -39395 test.

The asked fix, option (a), holds.

  • armKeepsOrder is now order-only: every name the row lists is in the arm (pinned, then more), and the arm's order restricted to those names is the row's. The per-row i < 3 split check is gone, so the split is the arm's own, which is what the source-half merge already permits.
  • The REWORK counterexample is pinned exactly: the source half over [alpha, beta, gamma, epsilon, delta] and [epsilon, delta], then each row replayed alone ⇒ no TODO. The prefix pair is kept as the other case of the same it.each.
  • "Same order split differently" and "wider with a named action in more" moved to the rewrite table with the reason stated in a comment. New refusals pin what the looser rule must still refuse: another order across the split, and a wider arm in another order. Report: 3 of 16 fail on the 76b51059 copy.
  • Docblocks, the TODO text ("name them all in that order (pinned, then more)") and the changeset now describe this rule and no longer claim a split rule. Fixes #39446 is now earned.
  • Edge read: a name listed in both pinned and more yields a duplicate in drawn and is refused, as it should be.

Gates at this head: 18 success, 16 skipped, 1 cancelled, 24 pending at read time. Landing needs every check green or expected skip on the head that lands, and a contract-review record (CONTRACT_REVIEW_TIER, face schema) on this head. The seat's delta L2 is running.

Pointer for #39395 / #39446: ACCEPT (L1 delta) → PR #39444 (this comment).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxRh6Sbfo2Xm49JPx6

2026-12-04T02:11Z · Landing (zone em-upgrade). L1 delta ACCEPT 7398264551 and seat L2 delta PASS 7398206418 at head 171441c2. check-governed-merges.mjs --pr 39444: NOT governed, 225 changed lines. Every check on the head is success or skipped (one superseded Check Changeset run was cancelled; the later run on the same head passed).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 02:11
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge December 4, 2026 02:11
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 5c2a41a Dec 4, 2026
82 of 83 checks passed
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

2 participants