Skip to content

feat(spec,lint): a bulk action's confirmText is a template slot over count and its params, judged at validate, compile and the publish gate - #24947

Merged
objectstack-fleet[bot] merged 20 commits into
mainfrom
claude/issue-24798-bulk-confirm-template-slot
Oct 23, 2026
Merged

objectstack-fleet[bot] merged 20 commits into
mainfrom
claude/issue-24798-bulk-confirm-template-slot

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #24798

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

The spec half of ruling B on the decision card, step 1: a list-view bulk action's confirmText becomes an ADR-0032 template slot over a closed scope. The scope's roots are count and the action's params by name. Its holes are judged at objectstack validate, objectstack compile and the publish gate by the template judge the flow text slots already use.

The ruling this executes (comment 6285948976, items 1–2, verbatim)

  1. ui/bulk-action.zod.ts:403 confirmText becomes a TemplateExpressionInputSchema slot (ADR-0032 Decisions 2 and 3): a bare string is shorthand for { dialect: 'template', source }; holes are {{ path }} and {{ path | formatter }} over the bulk-confirm scope, whose bound roots the spec declares — count, the affected-record count, and the action's params by name (the PR fixes the root spelling, {{ tier }} or {{ params.tier }}, consistent with the flow scope's roots); an unbound root and a single-brace token are refused by name at objectstack validate, compile and the publish gate through the one judge the flow text slots use (automation/flow-text-slot-template.ts); ⛔ no CEL logic inside a hole (an ADR-0032 non-goal); formatters from the existing whitelist.
  2. The console fills the slot through the template engine the flow notifications render with: step 1 {{count}} now; step 2 the param roots once the spec PR states the display-value rule (option label against stored value for picklists and lookups; number, date and currency via the whitelist). The renderer half is list bulk action confirmText: fill the template slot's declared holes — {{count}} first, the action's params second (the renderer half of objectstack#24798 ruling B) #25942, pm:blocked on this card until the spec release is installable there (ruling D on [Decision] A card whose premise or fix lives in a repository its lane cannot reach (cloud today): who reads it, who acts, and what the lane does meanwhile #24591).

What changed

  • The slot. bulkActionDefs[].confirmText (packages/spec/src/ui/bulk-action.zod.ts) takes the input TemplateExpressionInputSchema takes: a bare string is shorthand for { dialect: 'template', source }, and an envelope must declare dialect: 'template'. Like a notify node's title / message, it is built from the package-internal templateExpressionInput constructor, so its refusal prescribes this slot's own hole, {{ count }}. The shared {{record.name}} would name a root this slot does not bind. A stored sentence with no hole parses as before, its text unchanged.

  • The declared roots. bulkConfirmTemplateRoots(def) and BULK_CONFIRM_COUNT_ROOT (@objectstack/spec/ui) return count, then each param's name in declaration order.

  • Root spelling: bare ({{ tier }}), not {{ params.tier }}. The flow text slots' scope writes its roots bare: a flow variable is {{ v }}, a node output {{ lookup.result }}, and nothing is namespaced. HotCRM's 12 sentences already write {{count}} / {{tier}}, and ruling item 3 has them stand unchanged. count wins over a param named count; such a param stays reachable only through its dialog field.

  • The display-value rule step 2 waits on, stated in the slot's .describe(). A param hole renders the param's DISPLAY value:

    • an option-bearing param renders the chosen option's label, with a multi-value param's labels joined by ', ';
    • a lookup or user param renders the picked record's display name;
    • any other param renders the entered value, so number, date and currency values take a whitelisted formatter ({{ amount | currency:EUR }}, {{ due | date:long }}).

    A hole holds no logic.

  • One judge, not a fork. packages/spec/src/automation/flow-text-slot-template.ts gains a closed-scope entry, closedScopeTemplateRefusal(text, { slot, roots }). It uses the same single-brace token reader, the same hole grammar and the same root rule as textSlotTemplateRefusal; the internals are factored to shared helpers (pathRoot, pathHoles, a predicate on doubled). The flow judge's verdicts and sentences are unchanged, with a control pin. The judge's envelope reader is exported as templateSlotSource, so a door reads a template slot the way the judge does.

  • The doors. validateStackExpressions (packages/lint/src/validate-expressions.ts) is the rule objectstack validate, compile and the publish gate all run. It gains a bulk confirmText pass with the same two steps as the flow text slots, in the same order:

    1. closedScopeTemplateRefusal names a single-brace token (with its {{ }} rewrite when the root is bound) and a hole over an unbound root;
    2. a text carrying neither is compiled with validateExpression('template', …), which names logic or an unknown formatter in a hole.

    A blank sentence is named too. The walk covers a view's list and listViews, a standalone view's flattened list overlay and its ViewItem record (the shapes PUT /meta/view stores), and an object's own listViews. The publish gate's expression rule now declares view in runtimeTypes. A view write runs this pass alone, by construction, and an object write also judges its own listViews.

The 「甲」 rule: what passes today, and why every finding is a warning

Measured on origin/main b42c621c05: confirmText was z.string().optional(). Every string passed, including an unbound {{ x }}, a single-brace {x}, a hole holding logic ({{ count * 2 }}) and a blank ''. Refusing any of them would be a narrowing that no ADR-0087 conversion carries. So, in 18.x:

The widening is the envelope form and the declared holes: Clause-②: yes (widening), minor for @objectstack/spec and @objectstack/lint.

Landing order: steps 1 and 2 have landed; this PR is step 3

⚠️ Retyping changes the served shape: a parsed confirmText is now { dialect: 'template', source }, not a string. objectui used to render it as a React child (plugin-grid/src/components/BulkActionDialog.tsx), so the renderer had to move first. It has:

  1. fix(plugin-grid,types): read bulk confirmText as a string or a template envelope objectui#13319, the envelope reader, landed as objectui cd14d8eeffe1. BulkActionDef.confirmText is string | { dialect?, source }, and the dialog renders through bulkConfirmTextSource.
  2. chore(console): move the objectui pin 56cf4d8e89b7 → cd14d8eeffe1, past objectui#13319's bulk confirmText envelope reader, so #24947 can land #25193 moved .objectui-sha to cd14d8eeffe1 (main 9057fd41f5).
  3. This PR carries both, through merge 823f523b15.

The fill step ({{count}}, then the param roots) stays on #25942, as ruling 6285948976 describes.

Why Fixes, not Refs

The ruling splits the work by repository (ruling D on #24591). This card carries the spec half, and the renderer half is its own card, #25942, whose body reads Blocked-by: objectstack-ai/objectstack#24798. If this card stayed open until the renderer landed, the renderer card would wait on a card that waits on it. So merging the spec half closes this card. The sibling sweep, #24814, is not addressed here; it stays open and follows serially. The landing-order hazard above is a sequencing condition on merging this PR, not a reason to keep the card open.

Contract review

This is a published @objectstack/spec schema, so it needs contract review at CONTRACT_REVIEW_TIER. The diff touches no governed surface (.claude/**, docs/adr/**, AGENTS.md, skills/** and .github/workflows/** are all untouched), so it is neither Tier S nor Tier H. It is under 800 changed lines, under the 3000-line human-merge threshold.

Tests (final head 823f523b15, after merging origin/main twice: ef2b46b524, then 2919ddb875, which carries #25193)

  • spec: 708 files / 21498 passed, 1 todo. test:repo 74 / 1269 passed. typecheck and check:generated exit 0.
  • lint: 154 files / 7091 passed. typecheck exit 0, with check:test-typecheck OK.
  • cli i18n unit tests (3 files) 50 passed, typecheck exit 0. dogfood expression-conformance 8 passed.
  • Changeset gates green. check-changeset-no-major --event against the live body reads Clause-②: yes (widening) and Metadata-protocol: added, and grades nothing patch.
  • dispatch-gates at 823f523b15: 115 derived, 114 run at exit 0, 1 NOT MEASURED (check:dual-build-cjs-loads, which needs a full build; CI owns it).

Earlier rounds (head 9fb508c8a0):

  • pnpm --filter @objectstack/spec test → Test Files 704 passed (704), Tests 21379 passed | 1 todo.
  • pnpm --filter @objectstack/lint test → Test Files 152 passed (152), Tests 7009 passed.
  • pnpm --filter @objectstack/dogfood exec vitest run test/expression-conformance.test.ts → 8 passed. The new slot is discovered and classified (template-bulk-confirm-text, experimental / unevaluated: nothing in this checkout fills the holes yet).
  • pnpm --filter @objectstack/cli exec vitest run --project unit on the seven i18n suites that read confirmText (i18n-bulk-action-coverage, i18n-coverage, i18n-extract, i18n-walk-output-parity, i18n-declared-surface-gate, i18n-duplicate-demand, i18n-extract-action-description) → 100 passed. pnpm --filter @objectstack/cli typecheck → OK. The cli integration layer is declared to CI.
  • Ablation of the extractor fix (node scripts/ablation-replace.mjs on packages/cli/src/utils/i18n-extract.ts, templateSlotSource(def.confirmText) → def.confirmText): the blob went 4c0e88d86ced → dc3e90d6ba5f, and the new envelope pin went red (Tests 1 failed | 17 passed). The restore leg brought the blob back to HEAD and git diff HEAD was empty.
  • pnpm --filter @objectstack/spec --filter @objectstack/lint typecheck → both Done.
  • pnpm --filter @objectstack/spec check:generated → stale api-surface/, export-origins/ and the reference docs, regenerated with --fix (exactly the five new exports and the confirmText rows).
  • The derived gate battery (node scripts/pm/dispatch-gates.mjs --commands, 115 families at 9fb508c8a0), reconciled with --ran: 114 run at exit 0, and 1 NOT MEASURED: check:dual-build-cjs-loads exited 3 (prerequisite not met: it loads the BUILT entry of every package, about 90), which is declared to CI. check:i18n, check:i18n-coverage, check:i18n-walk-parity and check:skill-examples went green after building the closures they name, and check:type-check-debt went green on a run without a timeout wrapper.
  • eslint, narrowed and proven:
    • population: eslint.config.mjs files: ['**/*.{ts,…}'] minus NEVER_LINTED, with --print-config confirming each touched file is linted;
    • npx eslint --no-inline-config --format json over the 15 touched TS files → 15 files, 0 errors, 0 warnings;
    • invariance: the config enables no type-aware linting (no parserOptions.project, per its own comment at eslint.config.mjs:325), so this diff cannot move a verdict on an untouched file.
  • Ablation of the publish-gate widening, done after committing (node scripts/ablation-replace.mjs on packages/lint/src/authoring-rules.ts, removing 'view' from runtimeTypes): the anchor went 1 → 0 and the blob 37ae7e87aacf → 82d615ca2df0. All 3 gate positives in validate-expressions.bulk-confirm-text.test.ts went red (Tests 3 failed | 11 passed), and the 3 controls stayed green. The restore leg brought the blob back to HEAD and git diff HEAD was empty. No dist was involved, since lint's own tests read src.

Acceptance notes

  • os i18n extract and an envelope-form confirmText (the seat extended the claim to packages/cli/src/utils/i18n-extract.ts). pushBulkActionDefs now reads the slot through templateSlotSource(def.confirmText), so a confirmText written as { dialect: 'template', source } is seeded (sourceValue / inline) exactly as the bare string. Before this, authoredEvidence read a string or an inline locale map only, and the envelope was recorded like an absent key. The new pin is in packages/cli/test/i18n-bulk-action-coverage.test.ts.
  • Translation bundles. A translated bulk confirmText in a bundle (objects.OBJ._views.VIEW.bulkActions.DEF.confirmText) is still a plain string, and nothing here judges its holes. Ruling item 1 binds the def's slot, and the bundle side is the sibling sweep's question.
  • A param named count is shadowed by the count root (documented in the slot and in bulkConfirmTemplateRoots). No such param exists in the repository corpus.
  • Corpus measured at b42c621c05: 6 bulk defs carry a confirmText (examples/app-showcase project.view.ts), none with a brace, so 0 findings at every door. HotCRM's 12 sentences ({{count}}, {{tier}}) are pinned clean in both spec and lint tests, the zh-CN form included.

Files outside the claim's listed paths, each forced by the slot change and named here:

  • packages/spec/src/shared/typed-expression-input.ts: one docblock line naming the constructor's new caller;
  • packages/spec/src/ui/component-props-unknown-members.pin.test.ts: the envelope's ast ledgered under EXPRESSION_AST, beside bulkActionDefs[].visible.ast;
  • packages/spec/src/ui/action-confirm-params-guard.test.ts: the parsed value is now the envelope;
  • packages/qa/dogfood/test/expression-conformance.ledger.ts: the slot's conformance row;
  • packages/lint/src/{authoring-rule-wiring,runtime-gate,runtime-gate.page-visibility-predicate-writes,validate-expressions}.test.ts: the view rule lists, and the receiver table of the declared-keys meta-test;
  • packages/cli/src/utils/i18n-extract.ts and packages/cli/test/i18n-bulk-action-coverage.test.ts: the envelope-form seed and its pin (claim extended by the seat); .changeset/24798-bulk-confirm-template-slot.md now also bumps @objectstack/cli.

Generated by Claude Code

claude added 10 commits October 20, 2026 15:46
… closed-scope judge

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz
…rmText's holes, warnings in 18.x

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz
… view-write gate

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz
…s for the bulk confirmText slot

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz
…nd the unknown-members ledger

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz
…ression-conformance ledger

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation protocol:ui tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/cli, @objectstack/lint, @objectstack/spec, touching 36 documentable anchor(s). ⚠️ 5 changed file(s) yielded no anchor (packages/spec/api-surface/automation.json, packages/spec/api-surface/ui.json, packages/spec/export-origins/automation.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

19 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 5f6c2f1952355504a7db5a956c4a86c11feefd57.

⛔ 3 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 5 changed file(s) yielded no anchor (packages/spec/api-surface/automation.json, packages/spec/api-surface/ui.json, packages/spec/export-origins/automation.json, …) — pages documenting those are invisible to this run
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 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 feat(app-shell): the AI usage indicator renders the reset line for the 5-hour pace window (objectui#11415) objectui#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 — 150 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 5f6c2f1952355504a7db5a956c4a86c11feefd57 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 5f6c2f1952355504a7db5a956c4a86c11feefd57

⚠️ 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 5f6c2f1952355504a7db5a956c4a86c11feefd57 → 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

Re-timed to 18.x (a triage note for this draft). Triage seat · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-21T01:38Z

The maintainer amended 「甲」 (#6015 6303865025): 「暂时不考虑 v19,协议的调整原则上也是尽快,不考虑退役版本」, then confirmed triage's re-timing list in the triage seat's chat (「18.x 收回清单 同意」).


Generated by Claude Code

@os-bill os-bill added the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Oct 23, 2026 — with Claude
@os-bill os-bill self-assigned this Oct 23, 2026

os-bill commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Takeover round · head a23235a99f

Taken over at the maintainer's word (os-bill, 2026-10-23T06:43Z). The seat 3 session's last report (6341399560 on #24798) was blocked: its fix for the contract-review finding sat in two unpushed commits, refused by check:commit-card-trailers, and that container is gone. This round redoes the fix from scratch on top of 823f523b15.

The finding. translateBulkActionDefs (packages/spec/src/system/i18n-resolver.ts) decided a confirmText override with valueOverridesPackagedBase, which compares strings. A served view and its packaged base can now each hold the parsed { dialect: 'template', source } envelope. So an edited envelope lost to the catalog, and a bare string never matched a parsed packaged sentence.

The fix (00012f791c): both sides go through templateSlotSource before the comparison. An unchanged envelope still takes the catalog, an edited envelope keeps the authored sentence, and a bare string matches an envelope with the same source. BulkActionDefLike.confirmText is widened to string | { dialect: 'template'; source }. The changeset now reads Metadata-protocol: semantic, matching the body, and gains one bullet on served translations.

Pins: 3 in i18n-resolver.test.ts (ADR-0029 D9.2a block), 1 in i18n-resolver.object-list-views.test.ts, and 1 in packages/rest/src/meta-view-container-i18n.test.ts. These files are outside the claim's listed paths. They are forced by the slot change, the same way i18n-extract.ts was.

Then origin/main 5e772c79bf merged in (a23235a99f, clean).

Measured on the merged tree:

  • spec: src/system/i18n-resolver*.test.ts + src/ui: 154 files, 5994 passed. typecheck exit 0, check:generated exit 0, build exit 0.
  • lint: 156 files, 7193 passed.
  • rest meta-view-container-i18n.test.ts: 11 passed.
  • Ablation: I reverse-applied the resolver hunk, then restored it, and the blob went back to 2956a32125af. 3 of the 4 new spec pins went red. The fourth, "unedited envelope still gets the catalog", stays green either way, as expected: a non-string authored value already fell to the catalog.

The full suites are left to CI. Labelled needs:contract-review for the CONTRACT_REVIEW_TIER review on this head.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a23235a99f05e66fbe60a06891c5aa43b75354eb
Local-runs: none
Scope: packages/spec/src/automation/flow-text-slot-template.ts, packages/spec/src/shared/typed-expression-input.ts, packages/spec/src/system/i18n-resolver.ts, packages/spec/src/ui/bulk-action.zod.ts + packages/lint/src/validate-expressions.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/runtime-gate.ts (read unchanged, the advisories split), packages/cli/src/utils/i18n-extract.ts, packages/spec/api-surface/automation.json, packages/spec/api-surface/ui.json, packages/spec/export-origins/automation.json, packages/spec/export-origins/ui.json, .changeset/24798-bulk-confirm-template-slot.md, and the pins packages/spec/src/ui/bulk-confirm-template.test.ts, packages/spec/src/automation/flow-text-slot-template.test.ts, packages/lint/src/validate-expressions.bulk-confirm-text.test.ts, packages/lint/src/validate-expressions.test.ts, packages/spec/src/system/i18n-resolver.test.ts, packages/spec/src/system/i18n-resolver.object-list-views.test.ts, packages/rest/src/meta-view-container-i18n.test.ts, packages/cli/test/i18n-bulk-action-coverage.test.ts. The remainder (content/docs/references/ui/*.mdx regenerated tables, packages/qa/dogfood/test/expression-conformance.ledger.ts, the lint wiring and runtime-gate rule-list pins, action-confirm-params-guard.test.ts, component-props-unknown-members.pin.test.ts) is the lane seat's ACCEPT at TIER_DEFAULT.

Inputs read: card #24798 body and all 12 comments (ruling 6285948976; the amended 「甲」 pointer 6303865025 on objectstack-ai/objectui#6015; seat hold 6296947690; dev reports 6296915438, 6339482401, 6341399560; takeover 6359413741; handover 6359795105), PR #24947 body, its 29-file list and net diff against main, its 3 comments (triage re-timing note 6305878399, takeover round 6359412711), card #25205, and the 47 check-runs on the head (every run is success or skipped; none failed; Governed Surface Queue Guard, Check Changeset, Type Check, Lint and Test Core all success; Console Pin Gate skipped as opt-in).

① Derived judgments

  1. Parse accept set of BulkActionDefSchema.confirmText (bulk-action.zod.ts): before, any string. After: any non-blank string (normalised to { dialect: 'template', source }), a blank string verbatim (the second union arm, z.string().regex(/^\s*$/)), and a dialect: 'template' envelope. A foreign-dialect envelope and a non-string are refused with the slot's own sentence prescribing {{ count }}; both were refused by z.string() before, so nothing an author could write is refused now that passed before. A pure widening. RIGHT. Pinned in bulk-confirm-template.test.ts (bare string, envelope, holeless sentence, blank, foreign dialect, near-miss keys).
  2. Parsed and served shape: a non-blank confirmText now parses to the envelope; BulkActionDefParsed.confirmText widens from string to string | envelope (the blank arm keeps string in the union). BulkActionDef is z.input, so the authoring type only gains the envelope. The changeset's "Parsed shape" bullet declares it. Every in-repo reader of a parsed bulk confirmText was found and judged: i18n-resolver.ts (fixed, item 6), cli i18n-extract.ts (fixed, item 7), lint validate-expressions.ts (reads through templateSlotSource). The other confirmText hits (metadata-protocol protocol.ts:817, platform-objects translations, explain.ts) are the object/global action slot, not this one. The console reader is objectui#13319 at cd14d8eeffe1, carried by chore(console): move the objectui pin 56cf4d8e89b7 → cd14d8eeffe1, past objectui#13319's bulk confirmText envelope reader, so #24947 can land #25193 (9057fd41f5), which is an ancestor of this head; the head's .objectui-sha is 5fef032b1ada, equal to main's. RIGHT.
  3. Public surface: five new exports, exactly as api-surface and export-origins record them — closedScopeTemplateRefusal, templateSlotSource, ClosedTemplateScope (automation) and BULK_CONFIRM_COUNT_ROOT, bulkConfirmTemplateRoots (ui). templateExpressionInput stays package-internal (docblock edit only; no barrel change, no api-surface row). RIGHT.
  4. The judge (flow-text-slot-template.ts): closedScopeTemplateRefusal reuses singleBraceTokens, the HOLE / HOLE_PATH grammar and the root reading (pathRoot), with the scope's roots in place of the engine's $ set. The refactor of doubled to take a predicate and the extraction of pathHoles / pathRoot are verdict-preserving for the flow judge: flowSpellable is the old inline predicate verbatim, and unboundRootHoles yields the same holes. The control pin ("the flow judge is unchanged") holds it. One judge, no fork, as ruling item 1 binds. RIGHT.
  5. The doors (validate-expressions.ts, authoring-rules.ts): the pass walks a view's list and listViews, the flattened list overlay and the ViewItem record, and an object's own listViews; on a view write it is the only pass (early return), on an object write it joins the object's own body. runtimeTypes adds view. Every finding is severity: 'warning'; runtime-gate.ts:1175 routes non-error severities to advisories, and the CLI validate/compile separate errors from warnings, so no door's accept set moves and no exit code changes. The gate pins drive the real dispatch with all three view-write shapes and assert errors empty. Consistent with Clause-②: yes (widening). RIGHT as the contract is declared — see ③ item 5 for the ruling question it leaves open.
  6. i18n-resolver.ts translateBulkActionDefs: the earlier FAIL finding (valueOverridesPackagedBase compared an envelope by reference, so an edited envelope lost to the catalog and a bare string never matched a parsed base) is answered: both sides pass through templateSlotSource before the comparison, with BulkActionDefLike.confirmText widened to string | envelope. An unchanged envelope takes the catalog, a diverged one keeps the authored envelope, bare-vs-parsed match by source. Output is mixed-shape (catalog string, else authored envelope), which the pinned console reads. Pinned in three files. RIGHT.
  7. cli i18n-extract.ts pushBulkActionDefs: the envelope is seeded through templateSlotSource, identical to the bare string; pinned. RIGHT.
  8. Declared scope and spelling: bulkConfirmTemplateRoots(def) returns count then params by name, bare, count winning over a param of that name. The ruling left the spelling to the PR; bare matches the flow scope's roots and HotCRM's 12 sentences, which are pinned clean in spec and lint tests (zh-CN included). The display-value rule ruling item 2 asks the spec PR to state is stated in the slot's describe and the changeset. RIGHT.
  9. Generated artifacts: api-surface, export-origins and the three reference .mdx tables are regenerated and CI's generated check is green. The .mdx type cell renders string | {...} | string (the blank arm shows as a second string) — tooling output, cosmetic, non-blocking.

② Semver level

Changeset .changeset/24798-bulk-confirm-template-slot.md: @objectstack/spec minor, @objectstack/lint minor, @objectstack/cli minor. Clause-②: yes (widening) — matches the diff: the accept set widens (envelope form), five exports are added, a new advisory pass runs, and nothing that passed is refused. Metadata-protocol: semantic — the diff both adds an accepted value (the envelope: added) and changes the meaning of a stored {{count}} from literal text to a filled hole (semantic); under the AGENTS.md precedence (narrowed over semantic over added) semantic is the right kind, and a kind takes at least minor on each package the diff moves. The PR body carries the same two lines. The packages touched only in test files (rest, qa/dogfood) publish nothing from this diff. No BREAKING banner and no ADR-0087 marker are owed on a widening. Check Changeset is green on the head. RIGHT.

③ Boundary flags

  1. Earlier contract-review FAIL (one blocking finding, translateBulkActionDefs / valueOverridesPackagedBase, reported by seat 3 in 6341399560 and 6359795105): answered at this head, as ① item 6 reads it. Note that no earlier ## Contract review record is on the card or the PR thread; the finding is known from the dev and takeover reports only, so this record is the first record on the PR.
  2. Dev open question 1 (landing order, 6296915438): answered. objectui#13319 (the envelope reader) landed at cd14d8eeffe1, chore(console): move the objectui pin 56cf4d8e89b7 → cd14d8eeffe1, past objectui#13319's bulk confirmText envelope reader, so #24947 can land #25193 moved the pin and is an ancestor of this head; the pin has since moved on to 5fef032b1ada on both main and this head. The reader's presence at the later pin is read from pin history, not measured here (Console Pin Gate is skipped on this head, opt-in).
  3. Dev open question 2 (i18n extract and the envelope form): answered in this PR (claim extended to i18n-extract.ts, pinned).
  4. Dev open question 3 (a 19.0 card for the refusal flip): superseded by the amended 「甲」 (6303865025: no 19.0 line). The refusal half is filed as spec + lint 18.x: refuse a bulk confirmText hole over an unbound root or a single-brace token at validate / compile / the publish gate (the refusal half of #24798, under the amended 「甲」) #25205 (18.x, p1, pm:blocked, order after this PR).
  5. ESCALATION — departure from the triage note on the PR (6305878399, 2026-10-21): that note applied the amended 「甲」 to this PR and said the bulk confirmText findings ship as errors IN THIS PR, the blank-string arm is dropped here, as a BREAKING minor, with no separate card. The head instead keeps every finding a warning, keeps the blank arm, declares a widening, and carries the refusal on spec + lint 18.x: refuse a bulk confirmText hole over an unbound root or a single-brace token at validate / compile / the publish gate (the refusal half of #24798, under the amended 「甲」) #25205. The amendment's own words ("the warning half alone is no longer the 18.x deliverable") and ruling item 1 ("refused by name at validate, compile and the publish gate") both point at the refusal; the seat's split (advisory now, refusal as its own BREAKING minor next, the lint 18.x: page-predicate-over-budget becomes an error, refusing a page component props CEL slot over the platform parse bounds (the refusal half of #24953) #25002 precedent) is a scheduling reading the dev made in f10bc73 and the seat confirmed in 6339482401 and 6359795105. No maintainer word on the card or the PR covers the split. This is a product/timing question for the maintainer (Tesla, os-tesla), not this review's to decide: either the split stands (this PR lands as the widening and spec + lint 18.x: refuse a bulk confirmText hole over an unbound root or a single-brace token at validate / compile / the publish gate (the refusal half of #24798, under the amended 「甲」) #25205 flips to errors), or the refusal must be in this PR (then the changeset becomes Clause-②: no (narrowing), Metadata-protocol: narrowed, BREAKING minor with its ADR-0087 disposition, and the blank arm is decided here). The contract as declared at this head is correct either way; what the word decides is whether this head is the whole 18.x deliverable.
  6. Metadata-protocol kind moved from added (dev round) to semantic (seat, 6359795105) — a seat call consistent with the AGENTS.md precedence rule; no escalation.
  7. Fixes #24798 closes the card at merge while objectui#13183 (the fill step) stays open and pm:blocked on this card — the PR body's reasoning (ruling D on [Decision] A card whose premise or fix lives in a repository its lane cannot reach (cloud today): who reads it, who acts, and what the lane does meanwhile #24591, split by repo; closing unblocks list bulk action confirmText: fill the template slot's declared holes — {{count}} first, the action's params second (the renderer half of objectstack#24798 ruling B) #25942) is consistent with ruling item 2, and the "Part-of PR must not also close its card" check is green. Non-blocking.
  8. Translated bulk confirmText strings in translation bundles are not judged for holes; the dev named it as spec: type the remaining person-facing text slots as template slots — confirmText ×3, successMessage / errorMessage ×6, emptyText ×2 (ADR-0032 Decision 2 and 3; the same mechanism as #24798) #24814's question and ruling item 1 binds the def's slot only. Non-blocking, carried by spec: type the remaining person-facing text slots as template slots — confirmText ×3, successMessage / errorMessage ×6, emptyText ×2 (ADR-0032 Decision 2 and 3; the same mechanism as #24798) #24814.
  9. A param named count is shadowed by the count root; documented in the slot and the function, 0 producers in the corpus. Non-blocking.

Implemented-by: claude/issue-24798-bulk-confirm-template-slot
Reviewed-by: session_01KQ2Gi2mpTFz92kJVK2tMw8

VERDICT: PASS

@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 Oct 23, 2026
@os-bill os-bill removed the protocol:system label Oct 23, 2026 — with Claude
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Maintainer ruling: the split stands · 2026-10-23T12:13Z

On the escalation in ③ item 5 of the contract-review record 6364081346 (warnings in this PR vs refusal in this PR), the maintainer (Tesla, os-tesla) chose A at 2026-10-23T12:12Z, in the project thread, on the card asking whether the refusal ships here or on #25205.

Landing now: pr_ready + automerge_enable on head a23235a99f (contract review PASS on this head, 47 check-runs green, not governed, 914 changed lines).


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 23, 2026 12:14
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 23, 2026 12:14
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 925fd07 Oct 23, 2026
59 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-24798-bulk-confirm-template-slot branch October 23, 2026 12:53
marchtian pushed a commit that referenced this pull request Oct 23, 2026
…370 (#25430, #25438)

objectui#13370 types the bulk confirmText envelope's `source` as optional,
so the console builds against the spec #24947 shipped. The pin now moves
5fef032 → 6fb31dc in one step: the 4603b8c changeset this
branch carried is replaced by one changeset over the whole range, and the
SDUI manifest record and the lockstep record are regenerated at the new pin.

Claude-Session: https://claude.ai/code/session_01CBtjEGZifSHGenaRcRBKYb
Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Oct 28, 2026
…te envelope (objectstack-ai#13319)

Refs #13183

Step 1 of the landing order for objectstack-ai/objectstack#24947 (the
order set in the seat-hold comment 6296947690 on
objectstack-ai/objectstack#24798): objectui reads a bulk action's
`confirmText` in both shapes, so objectstack's `.objectui-sha` can move
past this before objectstack-ai/objectstack#24947 lands. The fill step
of #13183 (`{{ count }}`, then the param roots) is not part of this PR,
so #13183 remains open.

## What changes

- `@object-ui/types`: `BulkActionDef.confirmText` is `string | {
dialect?: 'template'; source: string }`. The envelope arm is the shape
objectstack-ai/objectstack#24947 serves: there a bare string is
shorthand for `{ dialect: 'template', source }`, and a parsed def
carries the envelope (read from `BulkConfirmTextSchema` in
objectstack-ai/objectstack#24947's
`packages/spec/src/ui/bulk-action.zod.ts`; a blank string still parses
as itself there).
- `@object-ui/types` zod mirror:
`ObjectGridBulkActionDefSchema.confirmText` takes the same two arms. The
`zod-mirror-parity` ledger (`assertionDriftMatchesLedger`) compares the
mirror with the interface member for member and went red on the type
change alone. This file was not in the claim's declared file surface; it
is the same member's mirror in the same package.
- `@object-ui/plugin-grid`: new helper `bulkConfirmTextSource` (in
`components/bulkConfirmText.ts`) returns the string, or the envelope's
`source` verbatim, and `undefined` when the value is absent, blank or
has no string `source`. It follows the precedent of core's
`formatTitleTemplate`, which reads `titleFormat` as `string | { source
}`. `BulkActionDialog`'s confirm step renders through it and keeps the
default sentence (`grid.bulk.confirmDefault`) when it returns
`undefined`. Holes are not filled.
- Changeset: `.changeset/13183-bulk-confirm-text-envelope.md` (patch,
types + plugin-grid).

Behaviour change to note: a blank `confirmText` (`''` or whitespace)
used to render an empty description, because the dialog used `??`. It
now shows the default sentence, as the claim asked.

## Other readers of a bulk def's confirmText

Grepped every `confirmText` in `packages/*/src` and `apps/*/src`.
`BulkActionDialog` is the only place that reads a bulk def's
`confirmText` for display. The others either read an object action's
`confirmText` (a different slot; objectstack-ai/objectstack#24947 does
not change it), for example `toBulkActionDef` in
`resolveBulkActions.ts`, which forwards `action.confirmText` only when
it is a string, or just destructure it away (`stripCollectedActionKeys`
in `ObjectGrid.tsx`). No other TypeScript module outside plugin-grid and
types imports `BulkActionDef`. objectui has no i18n extractor for bulk
defs; the extractor gap is on the objectstack side and
objectstack-ai/objectstack#24947 fixes it.

## Verification (head fef2d04)

- `pnpm exec vitest run --maxWorkers=2 packages/types/
packages/plugin-grid/`: Test Files 629 passed (629), Tests 12745 passed
(12745).
- New test file
`packages/plugin-grid/src/__tests__/bulkConfirmTextEnvelope-13183.test.tsx`,
10 tests. Reader: string, envelope, envelope without `dialect`, blank
string or blank source, absent or null, envelope with no source. Real
`BulkActionDialog`: the envelope's source is the sentence and `[object
Object]` is absent; a plain string renders unchanged; absent and blank
keep the default sentence.
- Reverse check: with the render site set back to `def.confirmText`
(committed fix first, mutation checked on disk, then restored with `git
checkout HEAD`; restore proven by an empty `git diff HEAD` and a
matching HEAD blob hash), 2 failed and 8 passed: "renders an envelope's
source, never [object Object]" and "keeps the default sentence when the
slot is blank".
- `pnpm --filter @object-ui/types --filter @object-ui/plugin-grid run
type-check`: exit 0, both scripts named in the output, after building
plugin-grid's dependency closure (13 turbo tasks).
- `apps/console/src/__tests__/registry-inputs-spec-parity.test.ts`: 260
passed.
- eslint on the 5 touched source and test files: 0 errors (warnings
only, `no-explicit-any` and hook warnings already in the files plus two
`as any` casts in the new test). The repo-wide lint is left to CI.
- Gates: `check:new-line-citations`, `check:control-bytes`,
`check:spec-symbols`, `check:changeset-claims`,
`check:pending-changeset-literals`, `check:unreferenced-sources`,
`check:test-path-roots` and `scripts/check-changeset-presence.mjs` all
exit 0.

## Acceptance notes

- The `@object-ui/types` member is widened ahead of the installed spec,
which still types the slot as a plain string. The claim's order asks for
this (a renderer that reads both shapes, Clause-2 no). When
objectstack-ai/objectstack#24947 is released and pinned here, the
`string` arm stays: a bare string is still valid authoring.
- The commit `bbb06a1f1` carries a `Refs #13183` line in its message
body. Force-push is not allowed in this repo, so it stays.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:system protocol:ui size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

4 participants