Phase A: Identity & permissions (internal/identity) #3
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase A: Identity & permissions —
internal/identitySpec:
docs/features/01_identity_permissions.md(normative) + shared primitives P1–P9 indocs/features/README.md.Rollout: Wave A in
docs/features/09_rollout.md§3 — lands FIRST, everything else binds to roles. No dependencies.Recommended implementation (verified against the doc)
internal/identity(one new package, no new core package). Registers:api.Lanesfor repo-scoped).team:<org>/<slug>androle:<owner>/<repo>:<role>expansion (01 §6).access-bootstrapmigration (01 §10).walhub access get/put(thin store client over the same CAS path).users/<principal>/profile.json(CAS'd, lazy-create;<principal>= lowercased email,%40for@) +users/<principal>/invitations/index.json.orgs/<org>/org.json,orgs/<org>/members.json(one CAS'd roster object),orgs/<org>/teams/<slug>.json(CAS'd). Org create =Createoforg.json(409 if taken); everything else CASUpdate(version)with retry-on-412.repos/<o>/<r>/access.json(CAS'd):{version, visibility: public|private, role_bindings: [{subject: user:<email>|team:<org>/<slug>, role}], updated_at}. Full-document PUT, one binding per subject (400 on dup), sorted by subject.anonymous_readANDvisibility == "public").require_readhook (01 §4.1): implements the named-but-unspec'd hook from 14 §14.10.1 — anonymous denied gets real 401 withWWW-Authenticate: Bearer, never in-band error.orgs/<org>/invitations/<id>.json,repos/<o>/<r>/meta/invitations/<id>.json), delete-on-accept/cancel, inbox index P4-style; accept writes the binding first, then deletes the invite (idempotent loser path, 409 when no longer pending).Acceptance criteria
[]not null, RFC 3339).access-bootstrapmaterializes lazily (01 §10).make cover≥ 95% oninternal/identity;-raceclean; table-driven httptest per handler (AGENTS.md law 11).Wave A (identity + permissions) starting on branch feat/identity. Plan: new package internal/identity (orgs, teams, members, access.json resolution + LRU, invitations, require_read gate), Seam 1 both-lanes chaining via server.ChainAPI, Seam 3 team:/role: expansion helper in internal/policy, Seam 5 access-bootstrap op, Seam 7 walhub access get/put CLI, org settings + repo Access tab UI, SDK submodules, EVIDENCE entry. Will open a PR (no merge) with tests + coverage when the >=95% gate passes.
Wave A done — PR #7 (#7), branch feat/identity, commit
3e622b5. NOT merged per plan. Summary: internal/identity end to end (orgs/teams/members/access.json/invitations/require_read), all four seams, frozen-list amendment in the same change, UI (org settings + Access tab) + SDK, EVIDENCE E2. Gates: identity 98.5%, make cover green, -race clean, 129/129 node, full short suite green, live curl + token-mode 401s + real-Chromium drive (dark+light, zero console errors). Deviations/notes 1–6 in the PR description (synthesis without email owners, auth-required preview, fail-closed invite roles, 2 additive collection endpoints, silent-empty role: synthesis, shared-file rebase note for Repos.jsx). Only feature files/hunks committed; pre-existing worktree changes untouched.Wave A identity review round 1 done on PR #7 (full findings posted on the PR). Fixed + pushed in
6e67618: CAS-loop team-cleanup (was swallowing 412s), ?n= pagination for invite lists (P5), abort-safe org delete, team-cache eviction on NotFound. Tests: identity -race pass, 98.1% coverage; api/policy/server -race pass; build clean; JS 129/129. 3 non-blocking follow-ups recorded on the PR (anon link preview 401, top-level issuer cancel, discovery endpoints[]). Merge recommendation: ready to merge.Wave A complete: PR #7 (feat/identity) reviewed, review fixes pushed, and merged as
366971a. internal/identity at 98.1% coverage, -race clean. Closing.