Skip to content

feat(spec): notices on an action, warnings its dialog draws before submit (#39182) - #39201

Merged
os-zhuang merged 2 commits into
mainfrom
claude/project-thread-cgszok
Dec 3, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/project-thread-cgszok

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #39182

Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up #39203

维护者速读

  • 做了什么:动作可声明 notices(具名映射),在确认框或参数框里、条件成立时显示提示;字段沿用 record:alert 的 severity/title/body/visible,severity 与横幅共用同一个枚举。
  • 范围:spec 键与拒收、翻译槽与覆盖、lint 三条腿、台账(planned)、文档;控制台尚未绘制,属 Invite user: the dialog does not warn that mail is not configured; the invite is created and only then reported as undeliverable #39045 的另一半。
  • 要你做什么:暂无;席位在定稿 head 上安排契约档 L2 后再交棒。
  • 风险:只加不收(widening);RecordAlertProps.severity 换成共享枚举,取值不变。

What changes

ActionSchema.notices is a map from a snake_case notice name to a notice the dialog an action opens before it runs (its param dialog, or the confirm dialog of confirmText) draws above its description, each while its condition holds. Ruling A on #39045 (comment 7359751238): a general action-dialog notice key in record:alert's vocabulary. The seat accepted the named map in the card thread: ruling term 1 leaves one-or-several to this card, as long as each notice has a stable translation key.

  • One severity set. packages/spec/src/ui/alert-severity.ts holds AlertSeveritySchema (info | warning | error | success). RecordAlertProps.severity and the notice's severity mount the same schema object. The edit to component.zod.ts is the import plus that one line (the file is shared with Tidy leftovers after the form-view subforms retirement (#38140): step-18 entry, stale comments, lookup-child prescription #39067).
  • The notice (packages/spec/src/ui/action-notices.ts): { severity?, title?, body?, visible? }, strict. title / body are I18nLabels (a non-blank string or an inline locale map), at least one required (requiredOneOf, a projectable refinement). visible is the action's own ActionConditionInputSchema, passed into the factory so the three predicates share one source and one scope (record, user, features; no new root, no dialog values). icon, action, dismissible and dismissKey from the banner are refused with guidance; message/text/description → body, visibleWhen/visibility/showWhen → visible, level → severity.
  • Dialog host only. On an action with neither confirmText nor non-empty params the key is refused at parse, the same rule as cancelText. alerts / warnings on an action rename to notices.
  • Translation. actionTranslationSchema.notices.<notice>.{title, body} at both addresses; translateAction overlays leaf by leaf, only for declared notices (system/i18n-action-notices.ts), and returns the same reference when nothing changes.
  • Lint. The extractor names each declared leaf (lint/src/i18n-walk-action-notices.ts); validate-translation-references reports a translated notice the action does not declare (translation-target-unknown); validate-expressions checks each notice's visible like the action's visible, as the served-row site action notice visible.
  • Field mask (contract review S1). metadata-core/src/object-schema-fls-references.ts gives an action's notices its own read: title / body are prose and severity is vocabulary, so a notice sentence that mentions a denied field does not remove the action from a field-masked caller's served schema; only a notice's visible (or an unclassified key) is read, and a hit removes the action as any other predicate does. ACTION_NOTICE_POSITIONS is pinned closed against the spec's notice schema. PROSE_KEYS is untouched (an action's top-level body is its script).
  • Review nits. The overlay translates only leaves a notice authors, and the lint leg reports a translated leaf the notice does not write (N1); label → title on a notice as on the translation entry (N3).
  • Ledgers. Liveness row action.notices (planned, authorWarn, children drilled); expression-conformance row cel-action-notice-visible (experimental / unevaluated); evaluated-slot population 33 → 34; metadata-form reconciliation omit row; meta-types action key count 55 → 56; @object-ui/core SPEC_ACTION_KEYS.
  • Docs. content/docs/protocol/objectui/actions.mdx: the property line and a "Warning before submit: notices" section with a planned callout. Generated references regenerated.

New modules are named without .zod.ts so the skill reference index (skills/**, governed) does not move.

Tests

  • packages/spec/src/ui/action-notices.test.ts (24): parse on both hosts, every severity, locale maps, every condition form and its normalization; refusals for an unknown severity, a non-string label, a blank, neither title nor body, a non-snake_case name, a no-dialog host, the banner keys; aliases; the one-source pin (RecordAlertProps.severity and the notice's severity are the same AlertSeveritySchema); the translation slot and the overlay.

  • packages/lint: validate-translation-references.test.ts (a notices.<notice> describe and a coverage row with a ghost leg at both addresses), validate-expressions.test.ts (bare-field notice visible is an error; record/features forms pass; the receiver key list), i18n-walk.test.ts (extractor slots).

  • packages/metadata-core/src/object-schema-fls-references.test.ts: a notice body/title naming a denied field keeps the action, a visible reading it (bare or envelope) or an unclassified key drops it; the notice-key classification pin. Ablation: with the notices read removed, the first test fails.

Acceptance notes

Verification

  • vitest: spec src/ui src/system/translation src/system/i18n + evaluated-slot + metadata-form reconciliation (8099 passed); lint translation-references, expressions, i18n-walk; metadata-protocol degenerate-derivation; qa dogfood expression-conformance.test.ts; ui core actionKeys.pin.test.ts.
  • pnpm --filter @objectstack/spec typecheck, pnpm --filter @objectstack/lint typecheck: green.
  • dispatch-gates.mjs --commands: 105 non-self-test commands run; 101 green on the first pass. check:skill-examples, check:i18n-walk-parity and check:dts-closure stopped on an unbuilt prerequisite and went green after building their closures; check:page-declaration-shape lost a temp file to a concurrent run and went green alone. Not cleared here: check:dual-build-cjs-loads (exit 3, needs every package built) and pnpm --dir ui exec vitest run scripts/ (unit-registry-absence-collision cannot import 59 unbuilt ui workspace modules in this container); CI runs both on a built tree. check-nul-bytes: clean.
  • overlap-check.mjs --base=origin/main --pr=39184: clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6Cb58xg59SdrVcwv1bK

…submit (#39182)

An action that opens a confirm or param dialog can declare `notices`: a
map from a snake_case notice name to a notice in `record:alert`'s
vocabulary (`severity`, `title`, `body`, `visible`). The severity enum
moves to `ui/alert-severity.ts`, one schema mounted by both the record
banner and the notice. The condition takes the action's own condition
schema and scope. Text is a plain I18nLabel translated at
`..._actions.<action>.notices.<notice>.title|body`.

- spec: the key and its refusals, the translation slot, the
  `translateAction` overlay, the liveness row (planned), the docs.
- lint: the translation extractor's slots, the dangling-notice leg, the
  condition check as a served-row site.
- ui core: `notices` in the spec action key list.

Ruling A on #39045 (comment 7359751238).

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

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/lint, @objectstack/metadata-core, @objectstack/spec, touching 27 documentable anchor(s). ⚠️ 5 changed file(s) yielded no anchor (packages/spec/authorable-surface/ui.json, packages/spec/docs/references/kernel/metadata-plugin.md, packages/spec/docs/references/system/translation.md, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

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

  • content/docs/deployment/troubleshooting.mdx (via ActionSchema (symbol, a top-level const))
  • content/docs/frontend/architecture-overview.mdx (via ActionSchema (symbol, a top-level const))
  • content/docs/frontend/troubleshooting.mdx (via ActionSchema (symbol, a top-level const))
  • content/docs/protocol/objectui/actions.mdx (via ActionSchema (symbol, a top-level const))

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

  • content/docs/releases/v17/17-1.mdx (via ActionSchema (symbol, a top-level const))
  • content/docs/releases/v17/17-3.mdx (via ActionSchema (symbol, a top-level const))
  • content/docs/releases/v17/index.mdx (via ActionSchema (symbol, a top-level const))
  • content/docs/releases/v18/18-2.mdx (via ActionSchema (symbol, a top-level const))
  • content/docs/releases/v18/18-3.mdx (via ActionSchema (symbol, a top-level const))
  • content/docs/releases/v18/18-4.mdx (via ActionSchema (symbol, a top-level const))

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

What this run could not see
  • 5 changed file(s) yielded no anchor (packages/spec/authorable-surface/ui.json, packages/spec/docs/references/kernel/metadata-plugin.md, packages/spec/docs/references/system/translation.md, …) — pages documenting those are invisible to this run
  • 6 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 71 of 255 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 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; 124 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 — 183 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 f1df7a8f4c408734a4a77e6fb83a92b6f286177c → packageMentionDocs.

Which tree this was computed on

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

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

⚠️ 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 f1df7a8f4c408734a4a77e6fb83a92b6f286177c → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 18cddafdb7cf4854d267ac0c9b5bf2857098f083
Local-runs: probe — maskDeniedFieldReferences (a scratch copy of packages/metadata-core/src/object-schema-fls-references.ts at this head, no imports) run on one action with and without a notice, to confirm should-fix S1 below rather than assert it from reading
Scope: packages/spec/src/system/i18n-action-notices.ts, packages/spec/src/system/i18n-resolver.ts, packages/spec/src/system/translation.zod.ts, packages/spec/src/ui/action-notices.ts, packages/spec/src/ui/action.zod.ts, packages/spec/src/ui/alert-severity.ts, packages/spec/src/ui/component.zod.ts + packages/lint/src/i18n-walk-action-notices.ts, packages/lint/src/i18n-walk.ts, packages/lint/src/validate-expressions.ts, packages/lint/src/validate-translation-references.ts, packages/spec/liveness/action.json, packages/spec/liveness/state-counts/action.md, packages/spec/authorable-surface/ui.json, packages/qa/dogfood/test/expression-conformance.ledger.ts, packages/spec/src/shared/evaluated-slot-population.test.ts, packages/spec/src/system/metadata-form-zod-reconciliation.test.ts, packages/spec/src/ui/action-notices.test.ts, ui/packages/core/src/actions/actionKeys.ts, .changeset/39182-action-notices.md
Security-touching: no
Rule-change-verified: none

PR #39201 (draft), one commit on main f1df7a8, 30 files. Read: the diff, card #39182, ruling 7359751238 on #39045, claim amendment 7362026806, os-dev report 7361980937 (read for its flags only, not its conclusions), the head's check-runs. Read outside the diff, not reviewed: RecordAlertProps and I18nLabelSchema at head, ActionConditionInputSchema, InlineActionSchema, translateAction, packages/spec/src/ui/index.ts and the package exports, packages/metadata-core/src/object-schema-fls-references.ts, sys-metadata.object.ts.

① Derived judgments

Against the ruled terms of 7359751238:

  • Term 1, vocabulary. Holds. A notice declares severity, title, body, visible, the four names RecordAlertProps has; the banner's icon, action, dismissible, dismissKey are refused with guidance. One closed severity set, not a copy: AlertSeveritySchema in ui/alert-severity.ts is the one z.enum, mounted by RecordAlertProps.severity (component.zod.ts, the import and that one line) and by the notice; action-notices.test.ts pins both by identity (toBe(AlertSeveritySchema)), which is the card's "one source, not a copy" acceptance line. The extraction is forced, as the module says: component.zod.ts imports action.zod.ts, so the action side cannot read the set out of RecordAlertProps.
  • Term 1, one-or-several and stable keys. Holds. A map from a snake_case notice name to the notice; the name is the translation address (objects.OBJECT._actions.ACTION.notices.NAME.title / .body, globalActions.ACTION.notices.NAME.*). An array could not give a stable key; the outcomeMessages precedent is the same shape. The stored body is a text column (sys_metadata.metadata, textarea), so declared order survives storage.
  • Term 2, scope. Holds. visible is the file-local ActionConditionInputSchema handed into the factory, the very schema visible and disabled mount (action.zod.ts:1281, :1991, :2330, :2355), so shape and normalization cannot drift. The lint leg checks it in the record scope with the action's own check call, as a served-row site. No new root; the dialog's typed values are not in scope and the docs say so.
  • Term 3, plain text. Holds. title / body are a non-blank string or InlineLocaleMapSchema; no template envelope, no link or button key (strict object). A non-string label is refused at parse; tested.
  • Term 4 (console draws it) is not this PR; the ledger row and the docs callout say planned.
  • Term 5, display only. Holds in the diff: nothing in the diff reads the key except the overlay and the lint legs; no endpoint, outcome or outcome-copy path is touched. Does NOT hold on the served object schema for a field-masked caller: see should-fix S1.
  • Refusal on an action that opens no dialog. Holds. declaresNoticesWithoutDialog (neither confirmText nor a non-empty params) is a ActionSchema refinement beside cancelText's, same host rule; params: [] is refused, tested. InlineActionSchema does not pick the key. actionObject() has these two consumers only.
  • Translation slot. Holds. actionTranslationSchema.notices at both addresses, strict, leaves title / body; translateAction overlays leaf by leaf only over declared notices and only on a dialog host, returning the same reference when nothing changes.
  • Liveness. Holds. action.notices is planned, authorWarn with a hint, four children drilled, each planned; state counts 2 to 6 planned, 91 to 95 classified; the "Spec property liveness" check-run is green on this head.
  • Lint legs. Three, all present with tests: extractor slots (both carriers, i18n-walk.ts:1651 and :1760), dangling translated notice (translation-target-unknown), notice visible in validate-expressions.
  • Docs. content/docs/protocol/objectui/actions.mdx gains the property line and a section with a Planned callout; generated references regenerated. Prose face, not graded here beyond agreeing with the schema, which it does.
  • RecordAlertProps not broken. The enum members, their order, optionality and the .describe text are unchanged; z.input and z.infer are the same literal union; no exported name in component.zod.ts moves. alert-severity.ts and action-notices.ts are not re-exported by ui/index.ts and are not addressable through the package exports map, so no new published name is added and none removed. Generated record:alert references do not move in the diff, which agrees.

② Semver level

  • Clause-②: yes (widening) and Metadata-protocol: added are line-initial in the PR body and in .changeset/39182-action-notices.md. Correct kind: one new authorable key and one new translation slot; nothing an author could write before is refused now (the refusals are all on the new key; alerts / warnings on an action were already refused as unknown keys by the strict object and now carry a rename).
  • Levels: @objectstack/spec minor, @objectstack/lint minor, @object-ui/core patch. added takes at least minor on a package the diff moves: spec and lint are at minor. @object-ui/core moves by one entry in SPEC_ACTION_KEYS (a pin list, no behaviour); patch there is the one deviation from the letter of the rule, see nit N4.
  • No breaking change found, so no BREAKING banner, migration or ADR-0087 marker is owed.
  • Skills-docs: follow-up owed — skills/objectstack-i18n/SKILL.md, skills/objectstack-ui/SKILL.md: present and true (skills/objectstack-i18n/SKILL.md:81 lists the _actions.{action} keys without notices). The seat files the card and rewrites the line to its number before ACCEPT (L1 checklist).

③ Boundary flags

  • Dev flags: open_questions empty; security_findings none; one out_of_scope_findings entry (the skills line above), answered in ②.
  • Author: PR user.login is read as the fleet relay with the os-bill attribution block; no third login to name.
  • SQL push-down: no query, id materialisation or in-app join in the diff. Nothing to find.
  • Check-runs on this head at review time: 11 completed green (Spec property liveness, Check Changeset, PR-body guards, Governed Surface Queue Guard, Dogfood Regression Gate among them), the build, type-check, lint and test shards still in progress, none red. The landing check reads them again; this record does not stand in for them. The dev's two locally uncleared gates (check:dual-build-cjs-loads, the ui scripts/ vitest) are CI's to answer.
  • Draft PR on a governed-surface diff: landing waits for its tier's record and for S1's disposition.

④ Design judgment

Per hits file:

  • ui/alert-severity.ts: holds against the ruling (one closed set) and its first consumer RecordAlertProps. No default in the schema, same as before.
  • ui/component.zod.ts: holds; the one-line mount changes no accepted input and no exported type.
  • ui/action-notices.ts: holds against the ruling's terms 1 to 3 and 5 as written. The factory-takes-the-condition design is the right way to keep one source without exporting the file-local alias.
  • ui/action.zod.ts: holds; key, aliases, and the host refinement sit beside the cancelText precedent they copy.
  • system/translation.zod.ts, system/i18n-action-notices.ts, system/i18n-resolver.ts: hold against translateAction's existing per-key overlays.

Implementing files: the three lint legs and the ledgers agree with the contract they enforce.

Findings:

  • should-fix S1 — the served-schema field mask reads a notice's body as an expression and drops the whole action. packages/metadata-core/src/object-schema-fls-references.ts (outside the diff, read) scrubs each served action with presentationEntry: any non-prose mention of a denied field name in any key drops the action. PROSE_KEYS has title but not body, and severity is a vocabulary key, so a notice's body sentence is token-matched against the caller's denied field names. Probe at this head: an action on an object with a denied field email is served without a notice, served with a title-only notice, and REMOVED from the served document when the notice body is "This deployment does not deliver email." (same for a locale-map body). So for a field-masked caller a notice decides whether the action is offered at all, which is the opposite of ruled term 5 and of the sentence the PR publishes four times ("Display only: the action runs and answers the same with or without a notice"). It fails closed (over-masks, never leaks), the mask's own header says a new key over-masks until classified "on the day it lands", and no metadata declares the key yet, hence should-fix and not must-fix. But the ruled adoption is exactly the trigger: invite and resend actions on objects that carry an email field, with copy about email. Close it before Invite user: the dialog does not warn that mail is not configured; the invite is created and only then reported as undeliverable #39045's adoption declares a notice: classify notices in the action entry with its own read (only each notice's visible is a reference; title / body are prose), with a test, either here by claim amendment or on a card Blocked-by nothing and blocking Invite user: the dialog does not warn that mail is not configured; the invite is created and only then reported as undeliverable #39045. Do not add body to PROSE_KEYS globally: an action's top-level body is the script body (HookBodySchema) and must stay read. Whether a notice visible over a denied field should drop the action or only the notice is the fixer's call; dropping the action is the existing rule for a predicate and is acceptable.
  • nit N1 — the bundle can add a leaf the notice does not declare: overlayActionNotices writes a translated title onto a notice that authors only body. The module header says "a bundle cannot add a notice", which is true; the extractor seeds declared leaves only and the lint leg reports undeclared notices, not undeclared leaves. Consistent with how cancelText is overlaid; say so in the header or report the leaf.
  • nit N2 — noticeText refuses a blank string where the banner's I18nLabelSchema accepts one. A deliberate tightening on a new key, documented; noted only because "the banner's vocabulary" is not literally the banner's label schema.
  • nit N3 — the translation entry aliases label to title; the notice schema itself does not. Either both or neither.
  • nit N4 — @object-ui/core at patch under a Metadata-protocol: added changeset: the package moves only by a pin-list entry. Accepted deviation unless check:adr-0087-registration or the changeset gate objects; "Check Changeset" is green on this head.
  • nit N5 — a {{ record.x }} or ${...} hole in a notice is drawn as written and no lint leg says so; validate-action-copy-templates covers the template keys only. A hint would save an author a silent literal; follow-up at most.

Accepted deviations: N2, N4. Carried to a follow-up or the console half: N1, N3, N5. Open: S1.

Implemented-by: claude/project-thread-cgszok
Reviewed-by: session_01Utp6CaQsbKBMQtm6Tpsamd

VERDICT: PASS

…39182)

Contract review S1 on the action `notices` key: the served object
schema's field mask read every non-prose key of an action, so a notice
`body` that mentions a denied field's name (an invite notice saying
"email" on an object whose `email` the caller cannot read) removed the
whole action, against the key's display-only contract. `notices` now
has its own read: `title` / `body` are prose, `severity` is vocabulary,
and only `visible` (or an unclassified key) is read against the object.
`ACTION_NOTICE_POSITIONS` is pinned closed against the spec's notice
schema. The global PROSE_KEYS is left alone: an action's top-level
`body` is its script body.

Also, from the review's nits:
- `translateAction` overlays only the leaves a notice authors, and
  `os validate` reports a translated leaf the notice does not write.
- `label` renames to `title` on a notice, as in the translation entry.
- The banner-key refusal test checks each key's own sentence.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 29c02ea9106f6b93f4945d2e412886b18e4ebfd7
Local-runs: none
Scope: packages/spec/src/system/i18n-action-notices.ts, packages/spec/src/system/i18n-resolver.ts, packages/spec/src/system/translation.zod.ts, packages/spec/src/ui/action-notices.ts, packages/spec/src/ui/action.zod.ts, packages/spec/src/ui/alert-severity.ts, packages/spec/src/ui/component.zod.ts + packages/metadata-core/src/object-schema-fls-references.ts, packages/metadata-core/src/object-schema-fls-references.test.ts, packages/lint/src/validate-translation-references.ts, packages/lint/src/validate-translation-references.test.ts, packages/spec/src/ui/action-notices.test.ts, .changeset/39182-action-notices.md
Security-touching: yes
Rule-change-verified: none

① Derived judgments

This is a delta of contract review 7362137624 (head 18cddaf, PASS with should-fix S1 open). Read: git diff 18cddafd..29c02ea9 (one commit, 8 files, +185 −40), the claim amendment 7362152845 on #39182 widening the surface to object-schema-fls-references.ts, the PR body's declaration lines, and the check-runs of the new head. Of the hits files only ui/action-notices.ts (one alias line) and system/i18n-action-notices.ts (one guard line and its header) move; the other five are byte-identical to the reviewed head, so the judgments of 7362137624 on ruled terms 1 to 4, the dialog-host refusal, the translation slot, the liveness row and RecordAlertProps stand unchanged.

Findings of 7362137624, by id:

  • S1: closed. packages/metadata-core/src/object-schema-fls-references.ts gives an action's notices its own read (actionNotices, mounted as presentationEntry({}, { params: actionParams, notices: actionNotices })). Per notice, ACTION_NOTICE_POSITIONS classifies title / body as prose and severity as vocabulary, both skipped; visible and any key the table does not name are read through mentionsDenied(…, 'skip', 'classified'), so an unclassified key still fails safe. A value of the wrong shape is read whole. PROSE_KEYS is untouched, so an action's top-level script body stays read, as the finding asked. The test pins the eight cases: prose body, locale-map body and a notice NAMED like the denied field are served as written; a string or envelope visible over the denied field, an unknown notice key carrying the name, and a script body reading it drop the action; a second test pins the table against the live notice schema in both directions, so a new notice key must be classified the day it lands. Ruled term 5 now holds on the served schema: a notice's sentence decides nothing. A notice visible over a denied field drops the action, the existing rule for any predicate; the changeset states it.
  • N1: closed. overlayActionNotices skips a leaf the notice does not author (if (notice[leaf] === undefined) continue), and checkActionNotices reports a translated leaf the notice does not write as translation-target-unknown at …notices.NOTICE.LEAF; both tested (never adds a leaf the notice does not author; the lint case expecting exactly one finding at .body). Header and changeset reworded to match.
  • N3: closed. The notice schema aliases label to title, as the translation entry does; tested.
  • N2: accepted deviation, unchanged (a blank title / body is refused where the banner accepts one; documented).
  • N4: accepted deviation, unchanged (@object-ui/core at patch for a pin-list entry; "Check Changeset" green on this head).
  • N5: nit, carried (a {{ }} or ${ } hole in a notice is drawn as written with no lint hint); follow-up at most, no effect on the contract.
  • The banner-key test now asserts each refused key's own guidance sentence at the notice's path, where it asserted only an unrecognized_keys issue.

No new finding in the delta.

② Semver level

  • .changeset/39182-action-notices.md adds '@objectstack/metadata-core': minor. Correct: the changeset's kind is Metadata-protocol: added, and a kind takes at least minor on every package the diff moves; metadata-core now moves. The body states the mask's reading of a notice.
  • Clause-②: yes (widening) and Metadata-protocol: added unchanged in the PR body and the changeset; still the right kind. The delta's two tightenings (the overlay no longer adds an unauthored leaf; lint reports one) act only on the key this PR introduces, so nothing an author could write before is refused: not narrowed.
  • The PR body now reads Skills-docs: follow-up #39203, the filed card in place of follow-up owed.
  • No breaking change; no migration or ADR-0087 marker owed.

③ Boundary flags

  • Security: the delta changes what the field mask serves a caller who is denied a field, hence Security-touching: yes. Direction judged: it stops over-masking on prose and loosens nothing that carries a value. A notice's title / body are plain text with no interpolation, so serving them exposes no field value; every position that can reference a field (visible, unknown keys, wrong shapes) is still read fail-closed. Notice names are not read; a name equal to a denied field's name is a map key the author chose and exposes nothing the fields mask hides beyond that word. No leak found.
  • Author: PR user.login is objectstack-fleet[bot].
  • SQL push-down: no query, id materialisation or in-app join in the delta.
  • Check-runs on 29c02ea9: 78 runs, all completed, 65 success, 13 skipped (the opt-in and schedule-gated jobs), none failed, none pending. The two gates the dev could not clear locally on the earlier head are covered by this run.
  • The PR is still a draft; landing takes its tier's record and the seat's own checks.

④ Design judgment

  • ui/action-notices.ts: the label alias holds against the translation entry it mirrors.
  • system/i18n-action-notices.ts: the guard makes the overlay agree with the extractor (which seeds authored leaves only) and with the lint leg; the three now state one rule, a bundle translates text and adds none.
  • object-schema-fls-references.ts (implementing): agrees with ruled term 5 and with the mask's own contract (classified on the day the key lands, fail-safe for the unclassified). Keeping the table apart from PROSE_KEYS is the right call for the script body.
  • validate-translation-references.ts (implementing): the leaf finding sits at the leaf's own path with a fix in the hint; a declared notice with both leaves authored yields none.

No must-fix, no should-fix.

Implemented-by: claude/project-thread-cgszok
Reviewed-by: session_01Utp6CaQsbKBMQtm6Tpsamd

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

维护者速读

席位核对

ACCEPT · head 29c02ea9106f6b93f4945d2e412886b18e4ebfd7 · repo:objectstack@os-bill

  1. Shape: spec ActionSchema.notices (named map; severity from one shared AlertSeveritySchema also mounted by RecordAlertProps; title, body, visible over the action's own condition scope), translation slot and overlay, three lint legs, liveness row planned, docs; metadata-core field mask classifies notices. Inside claim 7360606484 and amendments 7362026806 and the seat's S1 amendment.
  2. Premises measured: report 7361980937 and the delta round (mask test, 7 cases, ablation red then restored).
  3. Gates: 78 check-runs on this head: 65 success, 13 skipped, 0 failed, 0 running; mergeable clean. Contract review at CONTRACT_REVIEW_TIER: 7362137624 (PASS, S1 open), delta 7362924195 (PASS, no must-fix, no should-fix). Seat L1: code read sound; its one blocker (Skills-docs card) closed by skills: teach the action notices key (dialog notice before submit) in objectstack-ui and objectstack-i18n #39203.
  4. Accepted deviations: N2 (blank notice text refused), N4 (@object-ui/core patch); N5 carried as a nit.
  5. Out of scope: console renderer + adoption Invite user: the dialog does not warn that mail is not configured; the invite is created and only then reported as undeliverable #39045 (Blocked-by: #39182); Skills-docs: follow-up skills: teach the action notices key (dialog notice before submit) in objectstack-ui and objectstack-i18n #39203.
  6. Landing: Tier H (Security-touching: yes: the field mask changes what a field-denied caller is served, in the safe direction). The approver approves at this head; the seat then lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

维护者速读

Review requested · 2026-12-03T00:56Z · on the maintainer's choice on the seat's decision card (2026-12-03T00:56Z, 「先给 os-zhuang 审批」): check-governed-merges reads this PR as not governed, but its contract review marks it security-touching (the field mask), so it goes to the approver first. Seat ACCEPT 7362935205 and contract review PASS 7362924195 are at Head-sha: 29c02ea9106f6b93f4945d2e412886b18e4ebfd7. Please approve at this head; on approval the seat lands it (ready + auto-merge) under the maintainer's authorization of 2026-12-02T12:07Z (「审批人批准后的 Tier H PR 你可以自主落地」).

@objectstack-fleet
objectstack-fleet Bot requested a review from os-zhuang December 3, 2026 00:56
@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 3, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review December 3, 2026 00:57
@os-zhuang
os-zhuang added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit 724b369 Dec 3, 2026
86 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-cgszok branch December 3, 2026 01:28
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 3, 2026
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/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Actions can declare a notice their dialog shows before submit when a condition holds (record:alert vocabulary)

3 participants