Skip to content

fix(plugin-auth)!: Copy Invite Link is no longer offered or answered for a pending invitation past its expiry - #28529

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-rypvzz
Nov 1, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-rypvzz

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #28384

Clause-②: no (narrowing)
Metadata-protocol: none

维护者速读

  • 改了什么:邀请的「复制邀请链接」现在除了看状态是否为 pending,还看 expires_at。邀请已过期但状态仍是 pending 时,行菜单和记录页头不再显示这个操作;直接调用也会被拒,返回 409 RESOURCE_CONFLICT,文案说明邀请已过期、请重新发送。
  • 为什么改:卡 copy_invitation_link: a sys_invitation still status=pending past expires_at is offered the action and answered a link (visible and the handler read status only) #28384 与分诊 6541933328:过期邀请没有任务把状态改成 expired,管理员仍能复制并发出一个对方打开即被拒的链接。
  • 风险与回滚:这是对一个平台操作的收紧(changeset 已标 BREAKING,Clause-②: no (narrowing))。未过期的 pending 邀请照旧拿到链接;「重新发送邀请」不受影响,过期邀请上仍然显示,是补救办法。回滚即 revert 本 PR。
  • 先看:packages/plugins/plugin-auth/src/invitation-link-action.ts 的新过期门(排在 pending 门之后)与 isBeforeExpiry;packages/platform-objects/src/identity/sys-invitation.object.ts 中 copy_invitation_link 的 visible;invitation-delivery-outcome.test.ts 末尾新增的 describe 块。
  • 两分钟验证:pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2 src/invitation-delivery-outcome.test.ts,预期 32 条全绿,其中过期 pending 邀请得 409。
  • 需要你做的:无,席位落地。

What changes

The rule. An expired invitation's link is no longer offered or answered. A sys_invitation row can still read pending after its expires_at has passed, because nothing moves it to expired.

  • Handler (packages/plugins/plugin-auth/src/invitation-link-action.ts). createCopyInvitationLinkHandler now reads expires_at with the row and adds a sixth gate after the pending gate, in the order the docblock lists: a row whose expires_at is not in the future is refused 409 RESOURCE_CONFLICT with "This invitation has expired, so its link no longer lets anyone join. Resend the invitation to give the person a link that works." A missing or unreadable expires_at counts as expired, the way the vendor's own check reads it. The value is read whether the driver returns a Date, ISO text or epoch milliseconds. Reach is still judged first, so a caller outside the invite reach learns nothing about an expired row.
  • Visibility (packages/platform-objects/src/identity/sys-invitation.object.ts). copy_invitation_link's visible adds has(record.expires_at) && record.expires_at != null && datetime(record.expires_at) > now(). has() opens the operand for the sparse list_item face, as status is opened, and the != null half is the one an ordering comparison needs (the rule in materializeDeclaredFields, packages/objectql/src/declared-fields.ts). The grid already puts every record.FIELD an action predicate names into the row $select (collectPredicateFieldRefs), so no list view needed a new column.
  • Resend is unchanged. Measured before touching it: resend_invitation does not share the copy-link check (its visible is the lowered feature and reach gates only), and it is the remedy, so it stays offered on an expired row and gets no expiry gate.

Tests

  • packages/plugins/plugin-auth/src/invitation-delivery-outcome.test.ts, new block #28384 (e), on a real AuthManager over the installed better-auth: an expired pending row is refused 409 RESOURCE_CONFLICT and the message's first sentence is pinned; a row with an unreadable expires_at is refused the same way; controls: a pending row before expiry still answers its link for a Date, ISO text and epoch-milliseconds value; a plain member on an expired row still gets 403 (reach before expiry); Resend still answers 200 for the invitee and its answer has a link to copy.
  • packages/platform-objects/src/identity/invitation-delivery-copy.test.ts: the evaluated visible is false on a pending row past expires_at, and on a pending row projected without, or holding no, expires_at; Resend's evaluated visible stays true on that expired row. The existing "offered on a pending row" fixtures now carry a future expires_at.

Acceptance notes

  • Clause-② measured as no (narrowing). The claim expected yes (narrowing). Measured: the diff narrows one surface (the handler refuses a row it answered, and visible follows) and widens none, so the value is no, with the narrowing arm.
  • Metadata-protocol: none. No key of any schema moves and no authorable value is refused: the visible value of one platform action changes, not its shape.
  • Noted, not filed (seat to judge): measured on the vendor route in this PR's harness, a resend of an expired pending invitation does not renew that row. better-auth 1.7.12 finds pending invitations with an expiry filter, so it issues a new invitation (a new id) and leaves the expired row reading pending. Resend's confirmation text ("Its expiry date starts over") is therefore not what happens on an expired row, and the Pending list then shows both rows for the same person. Out of this card's scope.

Verification

All readings on head 52e7cd7 (branch claude/project-thread-rypvzz, base origin/main 1f1a369).

Red first: production sources at base, new tests kept

git restore --source=1f1a369b on the two production files, tests at head (both suites import src/ directly):

  • platform-objects invitation-delivery-copy.test.ts: 2 failed / 29 passed. Failed: "is not offered on a row still pending after its expires_at", "is not offered on a pending row projected without, or holding no, expires_at".
  • plugin-auth invitation-delivery-outcome.test.ts: 2 failed / 30 passed. Failed: "a row still pending after expires_at is refused 409", "a pending row with no readable expires_at is refused the same way". The controls (future row, reach before expiry, Resend) passed on base.
  • Restored with git checkout HEAD --; git diff HEAD empty.
Ablation: the handler gate alone

node scripts/ablation-replace.mjs on invitation-link-action.ts, anchor if (!isBeforeExpiry( → if (["ABL28384"].length < 0 && !isBeforeExpiry( (anchor x1 → x0, marker x0 → x1, blob df97aacb → c0980674), visible left at head: plugin-auth suite 2 failed / 30 passed, the same two handler cases. Restore: blob after restore df97aacb = blob at HEAD; marker count 0. The visible change alone does not pass the handler cases, since visible is courtesy.

Package suites, typecheck, lint
  • pnpm --filter @objectstack/platform-objects test: exit 0, 104 files, 1477 passed.
  • pnpm --filter @objectstack/plugin-auth test: exit 0, 207 files, 3943 passed, 10 skipped.
  • pnpm --filter @objectstack/platform-objects typecheck: exit 0. pnpm --filter @objectstack/plugin-auth typecheck: exit 0.
  • Scoped lint pnpm exec eslint --no-inline-config packages/platform-objects/src/identity packages/plugins/plugin-auth/src/invitation-link-action.ts packages/plugins/plugin-auth/src/invitation-delivery-outcome.test.ts: exit 0.
Derived gates

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 62 families; --ran reconciliation: 61 run with exit 0, 1 NOT MEASURED (pnpm check:dual-build-cjs-loads, exit 3, PREREQUISITE NOT MET: it needs every package's dist, only the dogfood closure was built; CI runs it). check-plugin-teardown-shape --self-test first answered exit 3 on the shallow clone and exit 0 after fetching its pinned control commit. Also check-commit-card-trailers --range origin/main..HEAD exit 0 and check-platform-checklist --changed-from origin/main exit 0.

Dogfood battery

Head 52e7cd7, pnpm --filter '@objectstack/dogfood^...' build (exit 0), then under the lock pnpm --filter @objectstack/dogfood test with no shard and no path: os-verify-lock: VERDICT command-exit 0, Test Files 363 passed / 3 skipped (366), Tests 2932 passed / 28 skipped (2960), no failure.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5mvxN1Jh9iwvcsEv1R


Generated by Claude Code

…ending invitation past its expiry

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5mvxN1Jh9iwvcsEv1R
@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 Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

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

  • content/docs/ai/connect-mcp.mdx (via expires_at (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/api/error-catalog.mdx (via RESOURCE_CONFLICT (literal, a string literal in createCopyInvitationLinkHandler), expires_at (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/api/error-handling-server.mdx (via RESOURCE_CONFLICT (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/data-modeling/objects.mdx (via expires_at (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/deployment/cloud-connection.mdx (via RESOURCE_CONFLICT (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/deployment/install-modes.mdx (via RESOURCE_CONFLICT (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/deployment/self-hosting.mdx (via expires_at (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/permissions/authentication.mdx (via expires_at (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/permissions/permission-sets.mdx (via RESOURCE_CONFLICT (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/permissions/sharing-rules.mdx (via RESOURCE_CONFLICT (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/protocol/kernel/realtime-protocol.mdx (via expires_at (literal, a string literal in createCopyInvitationLinkHandler))

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

  • content/docs/releases/v15.mdx (via expires_at (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/releases/v17/17-6.mdx (via RESOURCE_CONFLICT (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/releases/v17/17-7.mdx (via RESOURCE_CONFLICT (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/releases/v18/18-0.mdx (via RESOURCE_CONFLICT (literal, a string literal in createCopyInvitationLinkHandler), expires_at (literal, a string literal in createCopyInvitationLinkHandler))
  • content/docs/releases/v18/18-1.mdx (via RESOURCE_CONFLICT (literal, a string literal in createCopyInvitationLinkHandler))

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
  • 1 anchor(s) matched too much of the corpus to be a work list: organization_id (literal, 38 pages)
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 60 of 212 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 — 23 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 35b178bd0a9090aaccf9c767b0c6abf1067eff01 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 35b178bd0a9090aaccf9c767b0c6abf1067eff01

⚠️ 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 35b178bd0a9090aaccf9c767b0c6abf1067eff01 → 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

domain:server#2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 52e7cd7ccff36f221153d1dec165045f87bf5899
Local-runs: none
Scope: packages/plugins/plugin-auth/src/invitation-link-action.ts, packages/platform-objects/src/identity/sys-invitation.object.ts, packages/plugins/plugin-auth/src/invitation-delivery-outcome.test.ts, packages/platform-objects/src/identity/invitation-delivery-copy.test.ts + packages/objectql/src/declared-fields.ts, packages/formula/src/stdlib.ts, packages/formula/src/cel-engine.ts, packages/plugins/plugin-security/src/objects/sys-user-permission-set.object.ts, ui/packages/core/src/utils/predicate-fields.ts, ui/packages/plugin-grid/src/objectGridQueryInputs.ts, packages/platform-objects/src/identity/invitation-screens-copy.test.ts, packages/platform-objects/src/apps/translations/en.objects.generated.ts, ui/packages/app-shell/src/views/ObjectView.inviteOutcome-27797.test.tsx, scripts/pm/clause2-line.mjs, scripts/check-changeset-no-major.mjs (the changeset .changeset/28384-expired-invitation-link.md is a prose face, read for its declaration lines and for security discipline, not reviewed)

Face: narrowing (Clause-②: no (narrowing) on the PR body and on the changeset). No path under packages/spec/src/** and no governed path is in the committed tree (record-recognisers.mjs --paths on the five files decides no face by path and defers to the changeset's Clause-②: line), so the narrowing face is the only face owed and its floor is every non-prose path of the diff, listed first in Scope:. Inputs read: card #28384 and triage comment 6541933328, the seat's order for #28384, the dev report comment 6553647203, the PR body and its one commit, the head's check runs through the REST API. PR author is objectstack-fleet[bot], so no login note is owed under ③.

① Derived judgments

  1. Which calls move from answered to refused. Exactly one: the platform action door sys_invitation.copy_invitation_link, for a caller who already passes every earlier gate (not cloud-managed, a named record, a signed-in caller, invite reach in the invitation's organization, status == 'pending'), on a row whose expires_at is not strictly in the future. Before this head that call answered 200 { acceptUrl }; at this head it answers 409 RESOURCE_CONFLICT. Correct: that is the whole narrowing the card asks for, and nothing else in the handler's accept set moves. The handler's fields read gains expires_at and nothing else; the four earlier refusals keep their status, code and sentence; the pre-expiry pending row keeps its answer (pinned for a Date, ISO text and epoch-milliseconds value). Judged correct.
  2. Boundary at expires_at == now. isBeforeExpiry answers ms > Date.now(), so a row whose expiry equals the instant of the call is read as expired and refused; the visible predicate's datetime(record.expires_at) > now() hides it at the same instant. Handler and courtesy agree on the closed boundary, and for a bearer credential the closed side is the right one: the link is offered only while it still has a future. Judged correct.
  3. Null, absent or unreadable expires_at. The field is required: true on sys_invitation, so a null is a row the vendor never wrote; the handler reads it as expired (isBeforeExpiry answers false for anything that is not a Date, string or number, and for a value whose getTime() is not finite) and visible hides it (has(record.expires_at) && record.expires_at != null fails). Fail-closed on both faces, and the test pins both the handler case ('not a date') and the predicate cases (key absent, key null). Judged correct. One caveat in ④ below on the vendor claim the docblock makes.
  4. Gate order. The new gate is the sixth, after the pending gate, in the order the docblock lists (cloud-managed, record, caller, reach, pending, not expired). A caller outside invite reach on an expired row still answers 403 PERMISSION_DENIED and learns nothing about the row, pinned by the new reach-before-expiry test. Judged correct.
  5. Code and wording family. 409 RESOURCE_CONFLICT, the same status and code as the status gate, and the same sentence frame as the status gate's first sentence (..., so its link no longer lets anyone join.), with a second sentence naming the remedy. The order proposed Resend it to start its expiry over.; the dev wrote Resend the invitation to give the person a link that works. The dev's wording is the correct one: measured on the installed vendor, a resend on an expired pending row issues a new invitation rather than renewing the row, so the order's sentence would have promised something the system does not do. Judged correct, and an improvement on the order.
  6. The visible expression. features.cloudManaged != true && has(record.status) && record.status == 'pending' && has(record.expires_at) && record.expires_at != null && datetime(record.expires_at) > now(). The ordering comparison carries the full conjunction has(record.x) && record.x != null that materializeDeclaredFields (packages/objectql/src/declared-fields.ts) prescribes for the sparse action face before any ordering use, which is one half more than the equality-only status operand needs, and the comment on the declaration says exactly why. The comparison's form, datetime(record.FIELD) against a temporal, is the form the repo already uses on a declared predicate (sys-user-permission-set.object.ts: datetime(record.valid_until) <= datetime(record.valid_from)); datetime(dyn) resolves through toDate, which accepts a Date, ISO text or epoch number, so the list row's ISO text and a detail read both evaluate; now() is the stdlib temporal bound to the evaluation's ctx.now ?? new Date(), and the engine's temporal equality rewrite does not touch an ordering. Judged correct.
  7. Every list view that offers the action projects expires_at. pending projects it as a column. all_invitations does not, and the pending rows it lists are the ones the action reaches; it is covered because the grid harvests every record.FIELD an action visible names into $select (listViewPredicates pushes rowActionDefs[].visible, collectPredicateFieldRefs reads record.expires_at out of the datetime(...) call by its \b(record|data)\.name match, and isProjectableField admits it as a declared field). accepted and expired never show a pending row. The predicate test pins the absent-key case as false, so a surface that neither projects nor harvests hides the action rather than offering it. Judged correct; see ③ for the one surface outside this repo.
  8. visible is courtesy, the handler is the enforcement. The dev's ablation disabled the handler gate alone with visible at head and the two handler cases went red; the handler re-reads the row under the system context and never trusts the projected record. Read from the report, not re-run. Judged correct.
  9. Generated translation files. None of the four *.objects.generated.ts bundles is in the diff. The bundle carries the action's label and resultDialog only, never its visible; the handler's refusal sentences are not bundled (the existing status-gate sentence is not either). Nothing was hand-edited and nothing needed regenerating. Judged correct.
  10. Served shape of the object definition. No field, key, option, list view or action is added, removed or renamed on sys_invitation; one action's visible value changes. Metadata-protocol: none is true. Judged correct.
  11. First-party callers assuming the old answer. None found. The console runs the action through the generic action runtime and shows whatever the door answers; ui/packages/app-shell/src/console/organizations/manage/InviteMemberDialog.tsx composes its link from invite-member's own answer, not from this action; docs/adr/0011-actions-as-ai-tools.md only names the action; no skills/**, packages/client or content/docs consumer reads acceptUrl from this door. The UI fixture ObjectView.inviteOutcome-27797.test.tsx carries its own status-only copy of the predicate and mocks the door at 200, so it asserts nothing about an expired row; it does not fall out of step with this change.
  12. Security discipline. PR body, the one commit message, the changeset, the handler docblock, the declaration comment and the test names all stay on the public story (an expired invitation's link is no longer offered or answered; resend is the remedy). None describes a mechanism for using a stale link. Nothing logs the link. Judged clean.
  13. Resend. The ruling says apply the same check to resend; the card's own Expected line reads the same rule applies to resend if it shares the check. The dev measured that resend_invitation does not share the check (its visible is the lowered feature and reach gates only, no status operand), left it offered on an expired row and added no expiry refusal, and says so in the PR body and in the changeset's Unchanged bullet. That reading is sound: nothing moves a row to expired, so a resend that refused on expiry would remove the only way an admin can give the invitee a working link, which is the opposite of the card's purpose; and the PR pins that a resend on an expired row answers 200 and that the link of the invitation it answers is then copyable. Judged correct.

② Semver level

The changeset grades @objectstack/plugin-auth and @objectstack/platform-objects both patch, declares Clause-②: no (narrowing) with Metadata-protocol: none, and carries a **BREAKING** banner. That is the shape the gates require: under scripts/check-changeset-no-major.mjs a none must grade every entry it introduces patch and may not move an authorable-surface/ or authorable-defaults/ baseline, and no packages/spec/** file (so no packages/spec/authorable-surface/ shard) is in the diff; narrowed is not owed, because the protocol an author writes against does not change, only a platform action's own predicate value. Both packages publish (neither manifest is private), so a changeset, not skip-changeset, is right under scripts/check-empty-changeset.mjs, and the frontmatter is not empty. The Clause-② value is the correct one: scripts/pm/clause2-line.mjs reads no (narrowing) as "NOT a widening, but breaking", and yes (narrowing) as a diff that widens one surface and narrows another; this diff widens none, and scripts/pm/dispatch-gates.mjs says the same ("a card that only NARROWS one is Clause-②: no"). The order expected yes (narrowing); the dev measured and corrected it, and says so under Acceptance notes. The adr-0087: not-required (no-migration-prescription) disposition beside a BREAKING banner is a pairing the ADR-0087 gate's own docblock names as an author's entitlement, and Check Changeset and the three Lint jobs that run the two gates are green on this head. Level and declaration agree.

③ Boundary flags

  • The dev raised no open_questions. One out_of_scope_findings entry, carrier none, noted in the PR and not filed: on the installed vendor a resend of an expired pending invitation issues a new invitation and leaves the expired row reading pending, so Resend's confirmation sentence (Its expiry date starts over.) is not what happens there and the Pending list then shows two rows for one person. This review agrees it is outside the card and does not block; it is a real defect in the remedy path this PR points admins at, so the seat should file it as its own card rather than leave it as a note in a PR body. Not a must-fix here.
  • The card says cloud's team page uses the framework's action as-is (objectstack-ai/cloud PR 3429). That repository is not readable from this session. If that page evaluates the action's visible over a row projection of its own without expires_at, the new has(record.expires_at) operand hides the action there, fail-closed; that is the right direction for a credential and the handler is unaffected, but the cloud lane should confirm the page projects expires_at or harvests predicate operands as the console grid does. Flag for the seat to relay; not a must-fix in this repository.
  • The vendor's source (better-auth 1.7.12, pinned in pnpm-lock.yaml) could not be opened from this session (no installed node_modules, registry egress refused). The handler docblock's statements about the vendor (its accept route refuses past expires_at; an unreadable value reads as expired) rest on the dev's measurements in the plugin-auth harness over the installed vendor, which the new tests pin at the behaviour level (an expired row is refused by this handler; a pre-expiry row answers for three value shapes). The handler's own correctness does not depend on the vendor claim.
  • At review time every Lint, Build Core, Check Changeset, Governed Surface Queue Guard, PR-body guards and Dogfood Regression Gate check run is green; the eight Test Core shards and Type Check · workspace are still in progress. The landing pre-check (all checks green on the landing head) is the seat's read before the queue, not this record's.
  • The commit subject reads fix(plugin-auth): while the PR title reads fix(plugin-auth)!:; the squash title is what lands and check-commit-card-trailers is green, so nothing is owed. Noted only.
  • Author objectstack-fleet[bot]; no login to name.

④ Design judgment

The narrowing against the spec on main: no declared capability is taken away from a consumer. copy_invitation_link was declared, and documented in its own resultDialog, as a link that stops working once the invitation expires; before this head the action handed over a link that the accept route would already refuse, so the published promise and the served behaviour disagreed, and this head makes the action's own refusal real rather than removing anything an author or a consumer could rely on. The two halves land in the right places for a bearer credential: the handler, which runs system-elevated at the action door and re-reads the row, carries the enforcement, and the declaration's predicate follows it as courtesy, exactly the division the handler's docblock has stated since the action was added. The refusal is a 409 in the status gate's family, so a client that already handles the non-pending refusal handles this one with no new branch. Reading missing or unreadable expiry as expired is fail-closed in the direction the four-axis rule prefers (a strict door over a lenient consumer), and the test pins it so an AI-written row or driver cannot widen it silently. The remedy sentence tells the admin the one thing that works and does not promise a renewal the vendor does not perform, which is why the dev's wording is preferred over the order's. The visible expression is the published form for this face (the full guard conjunction, datetime() on the operand, now() from the stdlib), so it neither faults on the sparse row nor offers the action when the key is absent, and the grid's predicate harvest keeps the all_invitations view honest without a new column. Leaving resend_invitation ungated is the design the ruling's purpose requires: the ruling wants no dead link offered, and the resend is how a live one is obtained. The changes hold against the code they cite (materializeDeclaredFields, collectPredicateFieldRefs, the stdlib temporal functions) and against the card's acceptance scenario (a pending row past expires_at is hidden and refused, pre-expiry and non-pending rows keep their answers, resend is unchanged). No must-fix.

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

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo

席位核对

ACCEPT · domain:server seat 2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo · 2026-11-01T05:19Z · head 52e7cd7c · #28384

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

  1. Shape:
    • A draft against main with no assignees, Fixes #28384, and patch changesets.
    • check-governed-merges --pr 28529 reads NOT governed, 151 changed lines. Landing tier S.
    • The claim (6553067811) names this PR's branch, claude/project-thread-rypvzz.
  2. Against the order:
    • An expired invitation's link is no longer offered or answered. The Copy Invite Link handler refuses a pending invitation past its expiry with 409 RESOURCE_CONFLICT. The gate sits after the pending gate, in the status gate's wording family.
    • The action's visible hides it on the same boundary. That is courtesy only, and the ablation shows the handler is the enforcement.
    • Resend stays offered as the remedy. The dev measured that it does not share the copy-link check.
    • Clause-②: no (narrowing) is the right form.
  3. Contract review: owed for the narrowing. PASS at CONTRACT_REVIEW_TIER on this head, comment 6553749742.
  4. Gates: CI on head 52e7cd7c shows 35 success, 13 skipped and 0 red. The state is clean.
  5. Overlap: no other open PR touches either changed source file. git merge-tree reports no conflict against main bff315cd.
  6. Follow-ups (after landing): the dev's out-of-scope finding on resend for an expired invitation, and a cloud-lane note for the cloud invitations page. Both are carded by the seat.
  7. Landing: pr_ready + automerge_enable through the relay.

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

1 participant