Skip to content

fix(plugin-auth,plugin-email)!: the invitation mail warns once on an untranslated role label and states when it expires - #26072

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/project-thread-r7o1xi
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/project-thread-r7o1xi

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Part of #25802 (the in-repo half; the card stays open for the cloud control plane's i18n composition, routed to that lane)

Clause-②: no (narrowing: the built-in auth.invitation rows declare a new required variable, expiresAt, so a sendTemplate of auth.invitation that names no expiresAt is now refused with MISSING_VARIABLES where it used to be sent)

Metadata-protocol: none (a built-in template row's declared variables, read by the email service at send time; no spec key, authorable spelling or stored shape moves)

What changes

Two fixes to the auth.invitation mail. Both are named on the card (the second is from its follow-up comment 6398750019).

  1. The role label: a warn when it stays untranslated. invitationRoleLabel (plugin-auth/src/invitation-role-label.ts) now logs one warn per send when the mail's locale is not English and a role token's label is still its authored (English) text. The warn names the locale, the tokens and what to check: [AuthManager] invitation mail: no 'zh-CN' label was found for the membership role(s) 'member'; the mail names the authored (English) label instead. …. Before this, only a read that threw was reported. The read that answers but holds no zh-CN entry, which is the reported shape (以 Member 的身份, no log line), was silent. Each degradation gets one warn: a thrown read keeps its own warn and gets no second one, and a token outside the option list keeps its existing warn and is not counted again. An en-US or en-GB mail reads the authored label as its own text and logs nothing. The mail is always sent.
  2. The expiry. The sender (auth-manager-organization-plugin.ts) passes invitation.expiresAt as a new required template variable, expiresAt, as an ISO-8601 instant. The engine has no conditionals, so every body states the expiry, and a send without it is refused (MISSING_VARIABLES: expiresAt) instead of being sent with a dangling "expires on ." sentence. If the value does not read as a date, the sender leaves it out and logs one warn that names the invitation id and says the mail will be refused, so the invitation can be resent. Each of the four built-in rows (en-US, zh-CN, ja-JP, es-ES), in both the HTML and the text body, ends with one sentence that renders it as {{ expiresAt | datetime:long }}. This uses the date formatter the template layer already has (ADR-0053 Phase 2). The date reads in the row's locale and in the reference timezone the send names. The long style prints the zone name, so a reader never has to guess the zone. With UTC the sentences render as 「此邀请将于 2031年3月4日 UTC 05:06:07 过期。」, "This invitation expires on March 4, 2031 at 5:06:07 AM UTC.", 「この招待の有効期限は 2031年3月4日 5:06:07 UTC です。」 and "Esta invitación caduca el 4 de marzo de 2031, 5:06:07 UTC.".

BREAKING

This is for code that sends auth.invitation itself. The built-in organization-invitation sender already passes the value, and it is the only sender in this repository (git grep at origin/main).

  • Before. A send naming inviter, organization, role, acceptUrl and appName was delivered.
  • Now. The same send is refused with MISSING_VARIABLES: expiresAt.
  • Fix (one line). Add the invitation's expiry instant to the send's data as expiresAt.

The changeset carries adr-0087: not-required (no-migration-prescription), and check-adr-0087-registration accepts it.

Measurement (the order's first step, at origin/main bbf7061)

  • objectstack ships the zh-CN labels: platform-objects/src/apps/translations/zh-CN.objects.generated.ts has sys_member.fields.role.options = 所有者 / 管理员 / 受托管理员 / 成员 / 外部成员.
  • objectstack reads them through the file-based adapter. A throwaway probe (not committed) booted a LiteKernel with the real I18nServicePlugin (the registered file-based i18n adapter the cloud log names) and the real PlatformObjectsPlugin, then called invitationRoleLabel('member', 'zh-CN', { getI18n }):
i18n service configuration getLocales() label warns on main
default en, zh-CN, ja-JP, es-ES 成员 0
defaultLocale: 'en', fallbackLocale: 'en' en, zh-CN, ja-JP, es-ES 成员 0
same + supportedLocales: ['en'] en Member 0
same + supportedLocales: ['en', 'zh'] en, zh Member 0
same + supportedLocales: ['en', 'zh-CN'] en, zh-CN 成员 0
defaultLocale: 'zh-CN', fallbackLocale: 'en' en, zh-CN, ja-JP, es-ES 成员 0

The card's symptom (Member and no log line) reproduces only when the service's reported locales do not name zh-CN. translateMetaList builds its bundle from getLocales(). So the label read here is correct. The cloud control plane's i18n composition is the likely cause: a declared supportedLocales, or bundle registration. I could not read that half from this repository, and I have reported it to the seat. This PR adds the warn, which names exactly that check.

Tests

Red first. The new and updated pins, run against the BASE implementation (the three source files restored from bbf7061, the tests kept): plugin-auth invitation-role-label.test.ts had 5 failed / 19 passed, and plugin-email (auth-templates-locales, builtin-auth-render-identity, plain-text-faces) had 11 failed / 90 passed. The source was then restored from HEAD and proven by git diff HEAD empty plus a blob-hash match on all three files.

Green, at head ee295b9 (after merging origin/main):

  • pnpm --filter @objectstack/plugin-auth --filter @objectstack/plugin-email run test: plugin-auth 197/197 files, 3753 passed, 10 skipped; plugin-email 38/38 files, 699 passed. The lock VERDICT was command-exit 0.
  • run typecheck on both packages (tsc, examples config, check:test-typecheck): exit 0.
  • pnpm exec eslint --no-inline-config over every .ts file this PR touches: exit 0.
  • Dogfood battery (owed by the (narrowing) arm): pnpm --filter @objectstack/dogfood test at ee295b9, after its ^... closure build. The lock VERDICT was command-exit 0. Test Files 296 passed, 3 skipped (299); Tests 2523 passed, 18 skipped (2541). 0 failures.

What the pins hold:

  • The role label. zh-CN with the platform bundles gives 成员 and no warn. A service whose locales omit zh-CN gives Member and one warn, whose meta names the role, the locale and that a service was present. No service at all on a zh-CN mail gives one warn: the existing pin asserted silence, and it now asserts the one warn. A list warns once, naming every English token. An out-of-list token is not double-counted. A thrown read produces exactly one invitation warn in total. en-US and en-GB mails produce no warn.
  • The expiry. A Date and a string both reach the template as the ISO instant. A missing or unreadable expiry is left out of the data, with one warn naming inv1 and the refusal. A readable expiry logs no expiry warn. In every locale, a send without expiresAt is refused with MISSING_VARIABLES: expiresAt and nothing reaches the transport. Per locale, both faces carry the expiry sentence for a UTC send. A send naming Asia/Shanghai moves the wall-clock and names GMT+8. A zh-CN mail carries no English expiry text. The existing every-fact-in-both-faces pin now covers expiresAt.
  • The byte-identity pin (builtin-auth-render-identity.test.ts) now renders with timezone: 'UTC', so its bytes never follow the machine's zone. Only the four auth.invitation rows' html/text digests moved. Every other template's 28 rows kept their digests under the UTC render.

Gates

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 69 families at ee295b9 (the same set as the first round). All were run there, with exit codes captured before any pipe. --ran reconciles: 69 derived, 68 run, 1 NOT-MEASURED, 0 UNRUN.

  • NOT MEASURED: pnpm check:dual-build-cjs-loads (exit 3, PREREQUISITE NOT MET: it needs a full-repo build). CI runs it.
  • The changeset gates, read on the committed narrowing changeset: check-adr-0087-registration --base origin/main exit 0 (it accepts the no-migration-prescription exemption), check-changeset-no-major exit 0 and check-empty-changeset exit 0.
  • CI families: see this PR's check-runs. Check Changeset reads this body's Clause-② line.

Acceptance notes

  • The same dangle in the TTL templates (follow-up observation, not this PR). auth.password_reset, auth.magic_link and auth.two_factor_otp declare expiresInMinutes required: false and print "expires in {{expiresInMinutes}} minutes" unconditionally. A send without the value renders a dangling sentence. auth.account_invitation already declares its own required: true.
  • No timezone is passed. The invitation send passes no reference timezone, like every other auth send today. So the wall-clock is the server's zone, named in the sentence by the long style. Passing the invitee's or the organization's timezone would be a separate change to the locale ladder, which this card does not ask for.
  • The two i18n providers handle a base-language locale differently. This was observed while measuring and is not filed. With supportedLocales: ['en', 'zh'], FileI18nAdapter.getTranslations('zh') answers {}: it matches exactly, and the bundles are keyed zh-CN. The kernel's in-memory provider resolves zh to the zh-CN bundle. So the same declaration translates on one provider and not on the other. The measurement is a composed-kernel probe only, with no public-door reading, so per the report contract it is a note here and not a card. Owner: none.
  • #24154 stays closed. Its ruling (the role in a Chinese invitation reads 「成员」) is what the label read already delivers, and this PR makes the residual miss loud.

Generated by Claude Code

… and states its expiry

Claude-Session: https://claude.ai/code/session_011Ed1XCLEcJnL1JmrzvGgmW
Co-authored-by: Claude <noreply@anthropic.com>
…he invitation expiry sentence

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

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/plugin-auth, @objectstack/plugin-email, touching 6 documentable anchor(s).

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

  • content/docs/api/client-sdk.mdx (via expiresAt (literal, a string literal on a changed line))
  • content/docs/kernel/contracts/auth-service.mdx (via expiresAt (literal, a string literal on a changed line))
  • content/docs/permissions/authentication.mdx (via expiresAt (literal, a string literal on a changed line))
What this run could not see
  • 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 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 — 24 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 0a6948210cc96a95cc568b30193895e157968c01 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 0a6948210cc96a95cc568b30193895e157968c01

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

@objectstack-fleet objectstack-fleet Bot changed the title fix(plugin-auth): the invitation mail warns once on an untranslated role label and states when it expires fix(plugin-auth,plugin-email)!: the invitation mail warns once on an untranslated role label and states when it expires Oct 26, 2026
…l, not one ICU release's wording

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

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 34331f6613fdcb19e8495de4210887c15bfc0566
Local-runs: none
Scope: packages/plugins/plugin-auth/src/auth-manager-organization-plugin.ts, packages/plugins/plugin-auth/src/invitation-role-label.test.ts, packages/plugins/plugin-auth/src/invitation-role-label.ts, packages/plugins/plugin-email/src/auth-templates-locales.test.ts, packages/plugins/plugin-email/src/builtin-auth-render-identity.test.ts, packages/plugins/plugin-email/src/plain-text-faces.test.ts, packages/plugins/plugin-email/src/templates/auth-templates.ts + packages/plugins/plugin-email/src/email-service.ts (resolveAndRenderTemplate, the required-variable check), packages/plugins/plugin-email/src/template-engine.ts (requireVars, the formatter call site), packages/plugins/plugin-email/src/template-loader.ts (the slot rule: any non-built-in item wins, with its own variables), packages/plugins/plugin-email/src/email-plugin.ts (the built-in rows are code-declared under the email plugin's package), packages/formula/src/template-engine.ts (asDate and the datetime formatter: dateStyle long, timeStyle long, the reference timeZone), packages/rest/src/meta-item-read-gate.ts (translateMetaList, translationBundleOf), packages/spec/src/system/email-template.zod.ts (the variable type enum already holds date; EMAIL_TEMPLATE_FLOOR_LOCALE is en-US), packages/spec/src/identity/membership-role.ts (the authored option labels), packages/platform-objects/src/apps/translations/en, zh-CN, ja-JP and es-ES .objects.generated.ts (the sys_member.role option labels per bundle), scripts/check-adr-0087-registration.mjs and scripts/check-changeset-no-major.mjs (what the two changeset gates read)

Inputs read: card #25802 (body and all four comments, the claim 6413932028 and the two os-dev-reports 6414584447 and 6415196510 included), PR #26072 (body, file list, net diff against origin/main at this head, and the diff from the previously reviewed head ee295b9bd00a5093859809fdce2962d4a1f9c893 to this one) and the check-runs on this head as they stood at 2026-10-26T12:30Z. Nothing was built, run or re-run.

This head supersedes the FAIL record on ee295b9bd00a5093859809fdce2962d4a1f9c893. The move from that head is one commit, test(plugin-email): pin the invitation expiry against this Node's Intl, not one ICU release's wording, and it is test-only: it touches auth-templates-locales.test.ts, builtin-auth-render-identity.test.ts and plain-text-faces.test.ts and nothing else (73 insertions, 30 deletions); the changeset, both plugin-auth source files, the template rows and the plugin-auth test are byte-identical to the reviewed head, and the merge base with origin/main is unchanged (e0fe7d35). The whole-PR diff against origin/main therefore publishes exactly what the earlier record judged, and ① items 1 to 8 and 10 below are restated unchanged; item 9 is re-judged on the patch.

① Derived judgments

  1. The narrowing, right. The four built-in auth.invitation rows (en-US, zh-CN, ja-JP, es-ES) each declare a new variable expiresAt, type: 'date', required: true, and every body (HTML and text) ends with one unconditional sentence rendering {{ expiresAt | datetime:long }}. resolveAndRenderTemplate (email-service.ts 1422-1431) reads variables_json off the resolved row and requireVars (template-engine.ts 171-179) refuses a send whose data holds no such key with MISSING_VARIABLES: expiresAt. So the accept set of sendTemplate({ template: 'auth.invitation' }) against the built-in rows shrinks: a send that used to be delivered is now refused. Declaring it required is the right choice: the engine has no conditionals (template-engine.ts docblock, line 32: branching belongs in the caller), so an optional variable would ship the dangling sentence the dev measured.
  2. The only in-repo sender, confirmed. git grep at this head over non-test code finds one template: 'auth.invitation' send: auth-manager-organization-plugin.ts:624 (the other five sendTemplate sites name verify_email, email_change_notice, magic_link, existing_account_sign_up, and service-messaging's email channel passes a caller-supplied name). objectui and hotcrm carry no reference. The built-in sender always passes expiresAt when better-auth's invitation.expiresAt reads as a date, so the narrowing bites only code outside this repository that sends auth.invitation itself, which is exactly what the BREAKING banner names.
  3. An override row escapes the requirement and is not broken by it, right. createRegistryEmailTemplateLoader (template-loader.ts 156-160) resolves one (name, locale) slot to any item whose _packageId is not the built-in package, and toRenderInput (79-94) serialises THAT item's own variables. An app or Studio (environment) override of auth.invitation therefore keeps its own bodies and its own declared variables: it is not refused for lacking expiresAt, and the extra expiresAt key the sender now passes is ignored by a body that does not interpolate it. The changeset's sentence on overrides is accurate. One consequence worth knowing: an override that replaces only one locale leaves the other locales on the built-in rows, which do now require the value; the built-in sender supplies it, so nothing breaks.
  4. No stored row is on the path, right. The loader's module doc (template-loader.ts 3-10) and email-plugin.ts (472-488) say the built-ins are code-declared under com.objectstack.service.email and nothing is copied into sys_email_template for the send path, so no stored row is read, rewritten or converted by this diff. That is the fact the adr-0087 disposition rests on, and it holds.
  5. Metadata-protocol: none, right. EmailTemplateDefinitionVariableSchema already admits type: 'date' (email-template.zod.ts:100); no spec file moves; the diff touches no packages/spec/** path, as the claim required.
  6. Nothing widens. invitationExpiryArg and AUTHORED_LABEL_LANGUAGE are module-private; plugin-email's index.ts exports are unchanged; the new hole is additive output and the two warns are logging. The declared arm is no (narrowing) and the diff carries no yes fact. The Clause-②: no (narrowing: ...) arm is the right one.
  7. The sender's unreadable-expiry path, right with one note. invitationExpiryArg accepts a Date, a string or a number and omits anything that does not parse (Invalid Date is never rendered). The omitted value makes the send refused; the existing catch at line 654-659 swallows that refusal with a console.error, and the new warn (613-621) names the invitation id and says the mail will be refused, so the operator can resend. Note, not a defect: a numeric epoch in seconds would be read as milliseconds and render a 1970 date; better-auth hands a Date, so the branch is unreachable from the built-in path.
  8. The untranslated-label warn (invitation-role-label.ts 116-132), correct as read. No false positive on English mails: isAuthoredLabelLanguage lowercases, splits on - or _ and compares the language subtag to en, so en-US, en-GB and the floor locale (EMAIL_TEMPLATE_FLOOR_LOCALE = en-US, the value when the send names none) all skip the block. One warn per degradation: the block is guarded by !readFailed, so a thrown read keeps its own warn and gets no second one; a token outside the option list fails labels.has(token) and stays with its own existing warn; a list of tokens produces one deps.warn call naming every untranslated token. The comparison is against the authored labels in @objectstack/spec/identity (Owner, Admin, Delegated Admin, Member, External); the en bundle carries the same five strings, so an English fallback-chain hit is detected, and the zh-CN, ja-JP and es-ES bundles carry no label equal to its English text, so a translated mail never warns. The meta names the role, the locale and whether a service was present. The only false-positive shape is a tenant translation that deliberately equals the English word, which is the mail being in English anyway.
  9. The ICU pin fix is test-only and does not weaken what the pins prove. The earlier head pinned ICU-rendered wording literally (hand-written expiry sentences per locale, and sha256 digests of faces that contained the datetime:long output), which is locale DATA of the running Node, not template text; the dev measured es-ES moving from 2031, 5:06:07 (ICU 77) to 2031 a las 5:06:07 (ICU 78), and that is what reddened Test Core (6/8) on the reviewed head. On this head: (a) auth-templates-locales.test.ts pins the sentence FRAME per locale literally and computes the instant with Intl.DateTimeFormat(locale, { dateStyle: 'long', timeStyle: 'long', timeZone }), the same options the formula datetime formatter uses (packages/formula/src/template-engine.ts 106-116), then asserts the instant carries the year and the zone name and that frame + instant + frame appears in both faces; a template that used date:long, datetime:medium or the wrong locale or zone would still fail, so what the pin proves (the row renders exactly that instant, in the row's locale and the send's zone, inside that sentence) is unchanged. The Asia/Shanghai case now asserts the Shanghai rendering differs from the UTC one, carries 13:06:07, and is what the zh-CN body prints. (b) builtin-auth-render-identity.test.ts cuts the formatted instant out of each face by literal split and digests the remainder with a {{EXPIRES_AT_LONG}} marker in its place; it additionally asserts the instant occurs exactly once in each auth.invitation face and zero times in every other row's faces, so every byte except the locale-data wording stays pinned and the position of the hole is pinned too. That is not weaker than the old digest; it is the same digest with one ICU-owned span held out, plus a presence-and-count assertion the old pin did not make. The digests themselves moved only for the four invitation rows. (c) plain-text-faces.test.ts replaces the \s-tolerant regex with exact equality against this Node's own Intl rendering plus the full stop, which is stronger. One honest limit, not a weakening: the frame tests now mirror the formatter's Intl options rather than an independent literal, so a regression that changed the formula formatter and the test together would pass; the formatter is not in this diff and the dogfood gate exercises it elsewhere.
  10. Timezone. The invitation send passes no timezone, so the wall-clock renders in the server's zone; the long style names the zone, so the sentence is unambiguous. Acceptable, and the dev names it as a separate change.

② Semver level

  • The changeset .changeset/25802-invitation-role-label-warn-and-expiry.md is byte-identical to the reviewed head. It bumps @objectstack/plugin-auth and @objectstack/plugin-email at patch, with a fix(...)!: title, a BREAKING banner carrying Before, Now and a one-line Fix, a Clause-②: line and a Metadata-protocol: line. The two packages are exactly the two whose published behaviour moves (the warn in plugin-auth, the rows in plugin-email).
  • The PR body's Clause-②: line reads no (narrowing: the built-in auth.invitation rows declare a new required variable, expiresAt, so a sendTemplate of auth.invitation that names no expiresAt is now refused with MISSING_VARIABLES where it used to be sent) and is identical to the changeset's line; the body is unchanged since the reviewed head. Check Changeset on this head is success; on the reviewed head its readings were declaration line declared, direction arm: narrowing, metadata-protocol: none, and the level axis accepts patch for a non-protocol change under the re-ruled decoupling. Nothing it reads moved. The Clause-② line matches what the diff publishes.
  • adr-0087: not-required (no-migration-prescription) is right on the facts in ① items 3 to 5: no authorable key, spelling or stored shape moves, the email-template schema is unchanged, and the repair is a value only a sender holds, which no ledger entry can derive. check-adr-0087-registration accepts it ([BREAKING+bang+clause-②-narrowing] not-required (no-migration-prescription)); the Before/Now/Fix block is a code-side instruction, not a FROM-to-TO metadata rewrite, so the prescription detector is right not to refuse it.
  • The dogfood battery the (narrowing) arm owes: the PR body reports it at the reviewed head (296 files passed, 3 skipped; 2523 tests passed, 18 skipped; exit 0), no non-test byte moved since, and the CI Dogfood Regression Gate on this head is success.

③ Boundary flags

  • Check-runs on this head (read 2026-10-26T12:30Z): 36 success, 11 skipped, 0 failure, 0 pending. Build Core, Lint and Repo Gates (all sub-jobs), TypeScript Type Check, Type Check workspace/consumer/debt/source, Check Changeset, Check Documentation Links, Governed Surface Queue Guard, Dogfood Regression Gate, Test Core and all eight shards, the four card/branch claim checks, Check PR Size, Flag docs, Auto Label: success. The skipped runs are the opt-in and UI-only families this diff does not reach. The red Test Core (6/8) of the reviewed head is green here; the one commit between the heads is the test-only ICU pin fix judged in ① item 9.
  • open_questions: [] in both os-dev-reports. Nothing to answer. No card or PR comment was added after the second os-dev-report; the PR carries one bot comment (docs-drift check) naming three hand-written docs that mention the literal expiresAt, which is a documentation-accuracy re-verification for the docs seat, not a contract matter.
  • Dev flag, cloud half: the measured remaining cause of the Member label is the cloud control plane's i18n composition (a declared supportedLocales that does not name zh-CN, or bundle registration). Routed to seat 2 by the dev, outside this repository; this PR adds the warn that names that check. Escalated to the seat as the card's second half; the card does not close on this PR alone until that half is read.
  • Dev flag, unfiled observation: FileI18nAdapter.getTranslations('zh') answers {} on exact-key match while the kernel memory provider resolves zh to zh-CN, so one supportedLocales declaration translates on one provider and not the other. Composed-kernel probe only, no public-door reach; the dev left it unfiled per the report contract. The seat decides whether to file; it is the shape the new warn's text already points at (zh-CN, not zh).
  • Dev flag, follow-up: auth.password_reset, auth.magic_link and auth.two_factor_otp declare expiresInMinutes required: false and print expires in {{expiresInMinutes}} minutes unconditionally, the same dangle this PR closes for the invitation. Not this card; a follow-up card is the right carrier.
  • Dev flag, timezone: no reference timezone is passed on the invitation send (see ① item 10). Acceptable; a separate change if wanted.
  • Claim boundary: the claim forbade packages/spec/**; the diff touches none. The claim's Clause-②: no (expected; additive) was superseded by the dev's measurement to no (narrowing) in the patch round, which is the right direction of correction.
  • #24154 stays closed: its ruling (the role in a Chinese invitation reads 成员) is what the label read delivers when the bundles reach it; this PR makes the residual miss loud rather than reopening it.

Implemented-by: claude/project-thread-r7o1xi
Reviewed-by: session_0186vfjHHMsRXC9EUT9hTFMo

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · domain:server seat 2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo · 2026-10-26T12:36Z · head 34331f6613fdcb19e8495de4210887c15bfc0566 · #25802

The maintainer's standing authorisation for landing reviewed PRs, verbatim: 「按照 pm-dispatch 规则复核过的都授权」.

  1. Shape: a draft against main, Part of #25802 (the in-repo half). Clause-②: no (narrowing) and Metadata-protocol: none are line-initial. The changeset carries patch for plugin-auth and plugin-email with a BREAKING banner and adr-0087: not-required (no-migration-prescription). check-governed-merges --pr 26072: NOT governed, 409 changed lines.
  2. Contract review: record 6416123051, VERDICT PASS, at this head. It finds:
    • the narrowing is confined to the four built-in auth.invitation rows, and the one in-repo sender always passes expiresAt;
    • a tenant or app override keeps its own bodies and variables, so it is not refused;
    • the patch since the earlier FAIL (ee295b9b) is test-only, and the new pins prove at least what the old ones did (the ICU-owned instant is cut out by literal split, the sentence frame is pinned exactly).
  3. Gates: at this stamp the head's 54 check-runs read 41 success and 13 skipped (path-filtered), with none failing or in progress, including Test Core, Dogfood Regression Gate and Check Changeset re-run on the patched body; mergeable, clean.
  4. Accepted deviations: the seat's Ruling A on this card: expiresAt is required on the built-in rows, a send without it is refused with MISSING_VARIABLES, and the sender warns with the invitation id when the value does not read as a date. The engine has no conditionals, so the expiry sentence is unconditional.
  5. Out of scope:
    • The card's second half, the cloud control plane's i18n composition (a declared supportedLocales that does not name the mail's locale, or bundle registration), is outside this repository and routed to the cloud lane. This PR adds the warn that names that check. The card stays open until that half is read.
    • A docs-drift note names three docs that mention expiresAt; that is a docs re-verification, not a contract matter.
  6. Landing: this seat runs pr_ready and then automerge_enable through the relay, confirms MERGED on both readings, and records the landing on plugin-auth: the zh-CN invitation mail sent by the cloud control plane names the role in English (以 Member 的身份) and logs nothing — residual of #24154 #25802, which stays open for the cloud half.

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants