chadtmiller.com/knotless
git that lives in your Atmosphere account
A login and a gateway's grant name knotless's own space types
MergedThis pull narrows the login scope and the gateway grant from space:* to the two named types, dev.knotless.space and dev.knotless.orgSpace. The collections come from the lexicons at build time. It also seeds the alpha PDS's lexicon store in the test harness.
I read the diff and found no bugs.
- The scope builder, the updated
behind()tests and the harness seeding look right. - Both design docs and the change file are updated with it, as AGENTS.md asks.
- The harness throws if it finds fewer than two space lexicons, so a bad path can't pass silently.
- The old-type (
dev.knotless.org) gap is already listed under Shortcomings, with the migration order that avoids it.
The test, e2e, check and docs checks were still queued when I looked. Those are the ones that exercise the narrowed scope against the alpha PDS, so wait for them to pass before merging.
Round 2. Since my approval the pull has added one commit, d9e61e8, and merged main. The commit removes the whole move out of the old dev.knotless.org organization spaces. That includes move_org_spaces, org::moved and OLD_SPACE_TYPE. It also removes the dual-space reads in the index, admit_as, join and leave, plus the telemetry, the gateway test and the design section.
I found one thing to fix and one to confirm.
- Wrong doc line. In
docs/design/access.md:163the organization's member-list space is nowat://<org>/space/dev.knotless.org/self. The code still usesSPACE_TYPE = "dev.knotless.orgSpace"and the same pull's scope names that type. The line looks like an over-eager revert to the pre-move wording. It should saydev.knotless.orgSpace. - The description is out of date. Its Shortcomings still say the earlier pull moves organizations under the old grants and that its log says what is left. They also say the appview syncs an old space and keeps a hidden member's join record counted. After this commit none of that exists: nothing moves, nothing reads or logs an old space, and a hidden member whose join record is still in an old space is simply not a member.
- Please reword the description to say that.
- Confirm that prod has already moved every organization (
org spaces movedwithfailed0). Confirm too that you accept losing theorg joins in old spacescount, because this deploy strands anything left.
I could not read the rest of the diff against main in full, so this review covers the new commit only.
The test, e2e, check and docs checks were still queued when I looked. They exercise the narrowed scope against the alpha PDS, so wait for them to pass before merging.
docs/design/access.mdline 163Outdated
readers know who of them pushes to it. A member shared it on their own as well, for | |
reading or writing, stays when they leave; unsharing a member leaves | |
them in while they are one. The organization's member list is a space of | |
its own, `at://<org>/space/dev.knotless.org/self`, which only it and its |
The code's org::SPACE_TYPE is still dev.knotless.orgSpace, so the organization's space is at://<org>/space/dev.knotless.orgSpace/self, not …/dev.knotless.org/self.
Fixed access.md:163 in the next commit. The description was rewritten with that commit: its Shortcomings now say the old space is left, empty, and read by nothing. Prod's log after the move deployed: org spaces moved count 1, failed 0, and org joins in old spaces count 0, so nothing is stranded. Losing that count is accepted: with the narrowed grant nothing could read an old space to count it.
Round 3. The new commit 346b9ed fixes docs/design/access.md:163, which now says at://<org>/space/dev.knotless.orgSpace/self, matching org::SPACE_TYPE. A search of the branch finds no other mention of space/dev.knotless.org. The description was rewritten as I asked. Your reply gives the prod log counts: org spaces moved 1 with failed 0, and org joins in old spaces 0. You accept losing that count. I have nothing further to ask for. The pull is queued, so the check and test pre-flight runs will exercise the narrowed scope against the alpha PDS before it lands.
8 passed, 2 skipped
What changes
The login names knotless's own space types.
oauth::SCOPEasks forspace:dev.knotless.space?authority=*&…andspace:dev.knotless.orgSpace?authority=*&…, each with the collections its lexicon lists (read fromlexicons/at build time,space_scope) andmanage=create&manage=update&manage=delete, in place ofspace:*?authority=*&collection=*. A knotless login no longer reaches other apps' spaces.So does a gateway's grant.
gateway::SCOPEnames the same two types,authority=self: a private repository's space with the records a push writes andorgMember, and an organization's space withorgMemberandorgAcceptance, stillmanage=create&manage=updatealone.Older logins and grants. Both still work, as
space:*covers the named types.behind()compares the scope as asked, so each is behind and asked for again:LOGIN_BEHINDon the command line and the pages,GRANT_BEHINDfor a gateway's grant.sessions_behind_what_is_askednow covers a broad login and a broad gateway grant.The test harness.
harness/pds.mjsputs every space lexicon underlexicons/into the alpha PDS's lexicon store before any account logs in. That is the account database'slexicontable, which the provider'sLexiconGetterreads, marked as resolved and fresh for good. The alpha resolves lexicons through DNS and its own PLC, so it cannot reach the published ones. This coverstest,e2eand the shots' worlds, which all start the PDS through it.The move out of
dev.knotless.orgspaces goes. A login or grant that names the types alone cannot read a space of the old type, and no scope can name it, as its lexicon is no space. So the move from the pull before (moved,move_space,App::move_org_spaces), and every reader of the old space (admit_as,join,leave,remove_as,delete_as, the index'sorg_roster_with,orgs_of,keep_org,resync,from_authority), could only ever be refused from here on. They are taken out, with their test and log lines, anddocs/design/gateway.mdloses its "Moving out of the old space" section. Prod's log after that pull deployed saidorg spaces movedcount 1, failed 0, andorg joins in old spacescount 0: nothing is left in an old space for any of it to read.Why
space:*gave every knotless login every app's spaces, which the space lexicon pull, The space type private repositories are has a lexicon, dev.knotless.space, left for this one.The alpha's authorization page resolves the lexicon of each space type a scope names and refuses the login if one fails. So this lands only after both lexicons were published:
dev.knotless.spacewith that pull,dev.knotless.orgSpacewith An organization's space has a type of its own, dev.knotless.orgSpace, andpublish-lexiconspassed on main after each.How it was checked
oauth::testspass here. With the alpha's dev-env,harness/pds.mjs's store makeslexiconManager.getSpacesFromScopeanswer both types, andbuildTokenScopekeep them.dev.knotless.orgstill fails, as it should. The Rust tests and e2e log in over OAuth against that PDS, so CI runs every login through the narrowed scope.Shortcomings
🤖 Generated with Claude Code