Repository navigation
Commit d24a502
docs(plugin-auth): boot reachability report and self-hosting page state the admission order the audience gate reads (#36724)
Fixes #36355
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:自托管运维者在启动日志里那条「无人能登录」报错,以及自托管部署文档,对邀请恢复路径的描述更准确;行为不变。
- 为什么做:上一轮受众策略调整后,文案仍说「邀请先于策略判断」,与代码实际顺序不符,属于其后续文字修正。
- 出错会怎样:只是文字,最坏是说法仍不够精确;可直接撤回,不影响任何准入结果。
- 要你做什么:无
## What changes
Prose only, no logic, no condition, no test change.
- `packages/plugins/plugin-auth/src/boot-sign-in-reachability.ts` (N1):
the module docblock no longer says `decideAudienceAdmission`
short-circuits on `hasPendingInvitation` before the posture switch. It
now states the order the function has at main: the posture's own rule is
read first (`isAdmittedByPostureRule`: `open`, and an on-allowlist
`email_domain` address), then the invitation branch (which admits under
`invite_only` and for an off-allowlist address). The
`no_sign_in_account_at_boot` message gets the same correction: the
verdict-level claim "that ONE creation is admitted under EVERY audience
posture" is kept (its pin stays green), and the mechanism now says which
branch admits it under which posture. The line-62 rider rule is
untouched: the no-mail-transport rider stays scoped to `invite_only`,
and nothing states the verification forcing for every non-`invite_only`
posture.
- `content/docs/deployment/self-hosting.mdx` (N3): "Under `open` every
address is admitted by the posture, invitation or not" gains the
half-clause the #36312 changeset states: except a social-provider
sign-in whose address the provider did not verify while email
verification is in force, refused `403 SELF_REGISTRATION_CLOSED`
(`admissionRestsOnAddress` reads `open` as resting on the address
exactly while `resolveEmailVerificationRequirement('open', …)` is true).
- Same page, the recovery paragraph's "The invitation carve-out admits
that one creation under every posture" carried the same imprecision as
N1; the module docblock says that page and the message "must keep
agreeing", so it is reworded the same way in this PR (same file, inside
the claimed surface).
- `.changeset/36355-auth-boot-reachability-admission-order.md`: `patch`
for `@objectstack/plugin-auth`. The message string ships in `dist`
(`files: ["dist", "README.md", "CHANGELOG.md"]`).
## Tests
No test changes. No test pins the reworded sentence verbatim: the "under
EVERY audience posture" text appears only in a `describe`/`it` title,
and the pins under it assert the admission verdict for every posture,
which this PR does not move. Every `toContain` pin on the message still
holds.
Read first: `boot-sign-in-reachability.ts` message hunk (around the
"That ONE creation" line), the risk being a `toContain` pin that spans a
reworded line; then the docblock bullet; then the doc paragraph.
## Acceptance notes
- Verdict-level claims are unchanged in both files; only the mechanism
sentences move.
- `check:skill-examples`, `check:dual-build-cjs-loads` exited 3 locally
(PREREQUISITE NOT MET: they read built output of packages outside this
diff's closure) and `check-plugin-teardown-shape --self-test` exited 3
on a shallow checkout. NOT MEASURED locally; CI runs them on a full
build.
## Verification
Two-minute check: `pnpm --filter @objectstack/plugin-auth exec vitest
run src/boot-sign-in-reachability.test.ts` — expect 51 passed.
<details><summary>Local readings at d1105b6</summary>
- `pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2
src/boot-sign-in-reachability.test.ts`: Test Files 1 passed (1), Tests
51 passed (51).
- Under the verify lock, `pnpm --filter @objectstack/plugin-auth build
&& … typecheck && … test`: VERDICT command-exit 0; Test Files 293 passed
(293), Tests 6265 passed, 10 skipped (6275).
- `dispatch-gates --commands` derived 91 families; all run, 88 exit 0, 3
exit 3 (NOT MEASURED, above); `--ran` reconciliation: 91 accounted, 88
run, 3 NOT-MEASURED.
- `check-nul-bytes`: OK. `overlap-check`: VERDICT clean exit 0 (main,
#36311, #35129 merge cleanly).
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0de93df commit d24a502
3 files changed
Lines changed: 31 additions & 10 deletions
File tree
- .changeset
- content/docs/deployment
- packages/plugins/plugin-auth/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
718 | | - | |
719 | | - | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
720 | 722 | | |
721 | 723 | | |
722 | 724 | | |
| |||
829 | 831 | | |
830 | 832 | | |
831 | 833 | | |
832 | | - | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
833 | 838 | | |
834 | 839 | | |
835 | 840 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
546 | 550 | | |
547 | 551 | | |
548 | 552 | | |
549 | | - | |
550 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
551 | 557 | | |
552 | 558 | | |
553 | 559 | | |
| |||
0 commit comments