Repository navigation
fix(plugin-auth)!: an invited sign-up the audience posture admits receives the declared self-registration set, and is refused when that set cannot be resolved - #36312
Conversation
…ration grant (#34971) Work in progress, released to the queue under the maintainer's 2026-11-21T15:25Z stop. Ruling A (7063130499 thread, card comment 7063136215): fail-closed narrowing; still owes the ! title, ADR-0087 entry, dogfood battery and the presented-invitation.test.ts:369 rewrite.
…lowlist-invite-grant
…fused when the declared set cannot be resolved Ruling A: one rule for invited and uninvited self-registration. Adds the unresolvable-set pins for an invited sign-up under open and email_domain (on the allowlist) with the off-allowlist control, rewrites the presented-invitation row that pinned the removed branch, states the fail-closed refusal in the module doc and self-hosting.mdx, moves the changeset to a BREAKING narrowing, and registers the ADR-0087 semantic entry self-registration-permission-set-reaches-invited-sign-ups. Claude-Session: https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1 Co-authored-by: Claude <noreply@anthropic.com>
…p in presented-invitation.test.ts check-test-source-alias judges the edited file: its collection reaches the dynamic import of @objectstack/core/egress through auth-manager. The same module-top import the two sibling test files already carry. Claude-Session: https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1 Co-authored-by: Claude <noreply@anthropic.com>
…e declared set on its first membership The walled organization census pinned the removed branch: an invitee under the open posture was admitted by its invitation and owed no declared set. Under the ruled rule the posture admits it, invitation or not, so its declared grant settles on its first membership, the organization whose invitation it accepted. Found by the dogfood battery the ! title owes. Claude-Session: https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 179 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin e86eaa0c85cfb3f1b32a02197724de0ca5525987 && git checkout e86eaa0c85cfb3f1b32a02197724de0ca5525987
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8925d5bcb1a96beb59ff6ae35fada6f69f4f893d ffffab17796cbb730feccdd343962ce1f65aedc9 && git checkout -B drift-repro 8925d5bcb1a96beb59ff6ae35fada6f69f4f893d && git merge --no-ff ffffab17796cbb730feccdd343962ce1f65aedc9
node scripts/docs-audit/affected-docs.mjs --json 8925d5bcb1a96beb59ff6ae35fada6f69f4f893d
|
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1 Final head declared (area a4-B) · 2026-11-22T06:07Z:
|
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5nbzs5iP1HcMCFhZo5 L1 verdict (L1-a): REWORK, one evidence item (no code) at head 席位核对Shape and gates (declaration 7075188247):
Against ruling A. The code follows it as ruled.
R1 (must fix: the narrowing's battery is not green at any head).
Next. R1, then ACCEPT. After that the seat runs the contract-tier review (security-touching) and lands it. |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1 Dogfood battery at the final head (area a4-B) · 2026-11-22T07:33Z: answers L1-a REWORK 7075251832 (R1, evidence only). Head unchanged:
|
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5nbzs5iP1HcMCFhZo5 L1 verdict (L1-a): ACCEPT at head 席位核对R1 (full dogfood battery at the head): closed by 7075987084.
The full read in 7075251832 stands for everything else: the code, docs, controls and ablations follow ruling A. Next. The PR goes to seat 7 for the contract-tier review (security-touching, |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1 Final head for seat 7 L2 · 2026-11-22T07:35Z: |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract-review-claim: session_01QsR2jTeURPvEm465RcoYEC · head ffffab1 · 2026-11-22T07:49Z |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Inputs: card #34971 with all twelve comments (ruling A is 7063136215, analysis 7062693710), PR #36312 body and comments, the net diff of 8 files against merge-base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix, no should-fix. Nits (no effect on correctness or the contract; none is to be fixed in this PR outside the prose faces):
Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv 席位核对Awaiting the maintainer's merge (narrowing) · 2026-11-22T07:57Z · head
|
Requested by Leehom · project thread
Fixes #34971
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill under
skills/**teaches the audience posture's invitation sign-up orselfRegistrationPermissionSet;content/docs/deployment/self-hosting.mdxgains the rule in this change.Security-touching: yes
repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1 (dev executor, area a4-B; resumed from the released WIP
claude/issue-34971-allowlist-invite-grant@706e93675).维护者速读
What changes
The rule (ruling A, card comment 7063136215). Under
open, and underemail_domainfor an address onallowedEmailDomains, a self-serve sign-up is admitted by the posture's own rule whether or not it also holds a pending invitation. It receives the declaredselfRegistrationPermissionSet, and when that set cannot be resolved it is refused403 AUTH_CONFIG_ERROR, like an uninvited sign-up. The invitation no longer admits it with no grant.packages/plugins/plugin-auth/src/audience-posture.ts: a module-privateisAdmittedByPostureRule(audience, email)(open: every address;email_domain: an address on the allowlist;invite_onlyand an invalid posture: none).decideAudienceAdmissionreads it after the social-provider address rule and before the invitation carve-out, answeringgrantPermissionSet: true;isAdmittedByInvitationAlonereads it to answer false for an address the rule admits. The grant path inauth-manager-membership-admission.tsis unchanged: a verdict that asks for the set already refusesAUTH_CONFIG_ERRORwhenselfRegistrationSetResolvableanswers false, so the invited sign-up now meets that refusal. The module doc's invitation carve-out and fail-posture paragraphs state the exception.invite_onlyan invitation admits with no self-registration grant; underemail_domainan off-allowlist sign-up an invitation admitted gets the account and no grant, whatever state the declared set is in;admin_full_accessstays refused as the self-registration set; operator, bootstrap and provider creations.content/docs/deployment/self-hosting.mdx: "admitted by its domain, invitation or not" now holds for the grant and the binding, and a new paragraph states the fail-closed refusal for both postures.packages/spec/src/migrations/entries/semantic/18.self-registration-permission-set-reaches-invited-sign-ups.ts: the ADR-0087 D3 semantic entry (the one spec path), registered by the changeset'sregisteredmarker.packages/qa/dogfood/test/signup-organization-census-walled.dogfood.test.ts: the open-posture invitee now holds the declared set on its first membership (the battery found the stale fixture)..changeset/34971-allowlist-invite-grant.md: BREAKING,Clause-②: no (narrowing),Metadata-protocol: none,patchon@objectstack/plugin-authand@objectstack/spec.invite_onlyemail_domainemail_domainopenopen/email_domainon listAUTH_CONFIG_ERROR(the narrowing)Tests
All readings under
scripts/pm/os-verify-lock.sh, treeobjectstack-ai/objectstack; the source of the change is unchanged fromca290ccdcto the headffffab1779(the two later commits touch only test files).plugin-auth and spec (at ca290cc, after merging origin/main a5a5312)
pnpm --filter @objectstack/plugin-auth test: Test Files 291 passed (291); Tests 6204 passed, 10 skipped (6214); exit 0. The one red the WIP left (presented-invitation.test.ts, theopenrow) is rewritten here.pnpm --filter @objectstack/plugin-auth typecheck: exit 0;check:test-typecheckOK (debt ledger held).pnpm --filter @objectstack/spec build,typecheck, andexec vitest run --maxWorkers=2 src/migrations(5 files, 198 tests): all exit 0; the new entry reachesregistry.tsanddist/migrations/index.{js,mjs}.0ef10daa0b: the three target files,audience-posture.test.ts,invitation-acceptance-verified-address.test.ts,presented-invitation.test.ts: 3 files, 152 tests passed.Ablations (src read by relative import, no dist leg), restored to the HEAD blob fc4dbd6fa055
if (isAdmittedByPostureRule(audience, email))mutated toif (!hasPendingInvitation && isAdmittedByPostureRule(audience, email))(the old order). Mutation landed (anchor 1 to 0, blob changed); 3 files: 9 failed, 143 passed. Red: the four invited unresolvable-set refusal rows (open and email_domain on the list, missing and switched off), the two invited verdict rows, the social on-list row, and the invited grant pins under email_domain on the list and under open. Restored: blob equals HEAD,git diff HEADempty.grantPermissionSet: falsemutated totrue. 36 failed, 116 passed. Red include every CONTROL: the off-allowlist invited sign-up with a missing set, the off-allowlist andinvite_onlyno-grant pins, and thepresented-invitation.test.tsemail_domain row. Restored: blob equals HEAD,git diff HEADempty.Dogfood battery (the title carries !)
0ef10daa0b: closure buildpnpm --filter '@objectstack/dogfood^...' buildexit 0, thenpnpm --filter @objectstack/dogfood test: Test Files 1 failed, 483 passed, 3 skipped (487); Tests 2 failed, 4105 passed, 68 skipped (4175). Both failures are one stale fixture this change makes false:signup-organization-census-walled.dogfood.test.ts, the grant-writer case undergroupandisolated, asserting the open-posture invitee holds no declared set.ffffab1779to the ruled behaviour (the invitee's declared grant settles on its first membership, the inviting organization). Rerun atffffab1779: that file and itssinglesiblingsignup-organization-census.dogfood.test.ts, 2 files, 15 tests passed. The full battery was not rerun on the new head; the only change is that test file.Acceptance notes
boot-sign-in-reachability.ts(outside this card's file surface) saysdecideAudienceAdmissionshort-circuits onhasPendingInvitationbefore the posture switch, admitting under every posture. It stays true of the switch; the posture-rule check now precedes the invitation, and underopen/ on-listemail_domainwith an unresolvable set an invitation no longer admits. Not edited here. Carried by docs(plugin-auth): boot reachability docblock and self-hosting open-posture sentence after #36312 #36355 (with theself-hosting.mdxopen-posture half-clause, contract review 7076202877 N1 and N3).Clause-②: no (narrowing)(copied); the decision analysis 7062693710 suggestedyes (narrowing)for a diff that widens who receives the set and narrows the unresolvable case. Left for the contract review.not-required (no-migration-prescription)instead. This change registers a semantic entry, soos migrate metaand the upgrade guide carry the notice.Verification
Dispatch-gate families at ffffab1
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackover 8 changed paths: 115 families, each run with its exit code recorded before any pipe;--ranreconciliation: 115 derived, 115 run, 0 NOT-MEASURED, 0 UNRUN, every one exit 0.ca290ccdc)check:test-source-aliaswas red on the editedpresented-invitation.test.ts(collection reaches the dynamic import of@objectstack/core/egress); fixed by the module-top import its two sibling test files carry (0ef10daa0b).check:adr-0087-registration: the changeset is[BREAKING+bang+clause-②-narrowing],registered self-registration-permission-set-reaches-invited-sign-ups (new here).overlap-checkbefore each push: clean against origin/main and chore: version packages #35129 (sharesself-hosting.mdx, merges cleanly).check:dev-prereqs: exit 1, the box's workspace is not fully built (35ui/and other dists absent); a machine-state reading, not about this diff.Read first (by risk):
audience-posture.tsdecideAudienceAdmission(the newisAdmittedByPostureRulebranch ahead ofif (hasPendingInvitation));isAdmittedByInvitationAlone; the newit.eachrefusal pins inaudience-posture.test.ts(end-of-chain describe).Two-minute check:
pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2 src/audience-posture.test.ts src/invitation-acceptance-verified-address.test.ts src/presented-invitation.test.ts— expect 3 files green.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1