ci: expand adr-anchors to the full authz/security ADR set — 8 → 15 (#4575 follow-up) - #4594
Merged
Merged
Conversation
…4575 follow-up) The seed anchors covered only #3723's blast radius. This is the bounded sweep promised in that PR: audit ADR-0057/0066/0068/0090/0091/0095/0105 for other load-bearing realizations — spots where a reasonable engineer could "fix" the code and be reverting a decision — and register them. Seven files added, each with its reversal story (see the changeset): the posture ladder (capability-derived, never role-read — #2836), grant validity (resolution-time, never a cleanup job), the tenant wall (no shared compiler with business RLS), the org-admin auto-grant (no_bypass under wall-less postures — F2), invitation placement (issuance dry-run; acceptance runs system context), position flatness (no `parent` — the retired ADR-0057 D5 mistake), and the permission evaluator (wildcard-derived superuser bypass, no stored boolean; scope depth). Plus ADR-0068 on the existing resolve-authz-context anchor: `platform_admin` is derived from an unscoped grant — the classic "add an is_admin column" reversal target. Zero code changes: every file already cited its governing ADRs, so the sweep only registers what must not be silently un-cited. All 15 pass; negative- tested by stripping ADR-0091 from grant-validity.ts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0186LhwkUBupmLJUUAMda5hU
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
os-zhuang
marked this pull request as ready for review
August 2, 2026 09:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bounded sweep promised in #4575's reviewer notes. The seed anchors covered only #3723's blast radius; the real question was always which other accepted decisions are one "reasonable improvement" away from being reverted. This audits ADR-0057 / 0066 / 0068 / 0090 / 0091 / 0095 / 0105 and registers the answers.
Selection discipline
Same bar as the seed, applied file by file: anchor it only if a competent engineer reading the file alone could "fix" the code and be reverting a decision. Every candidate was read, not pattern-matched; several plausible ones were left out (e.g.
rls-compiler.ts— its invariants are enforced by the authz-matrix gate, and its ADR citations are descriptive, not load-bearing).The seven additions, each with its reversal story
core/security/posture-ladder.tscore/security/grant-validity.tsplugin-security/tenant-layer.tsplugin-security/auto-org-admin-grant.tsorganization_admineverywhere." Under a wall-less posture that makes every org owner an environment-wide superuser (the F2 finding) — henceorganization_admin_no_bypass.plugin-security/invitation-placement.tsspec/identity/position.zod.tsparent." Literally the mistake ADR-0057 D5 retired (the oldsys_role.parentwalk queried a column that never existed).plugin-security/permission-evaluator.tsisTenantAdmin().Plus one extension: the existing
resolve-authz-context.tsanchor gains ADR-0068 —platform_adminis derived from an unscopedadmin_full_accessgrant, no trusted stored boolean. The "add anis_admincolumn" refactor is the single most classic reversal in this family.Verification
sys_member.roleapp-role channel reverses ADR-0057 D4 ("never as the authority for RBAC") — pin to the built-ins before the next RC; placement is the governed channel #3723 hit.pnpm check:adr-anchors→OK (15 anchored file(s)).ADR-0091fromgrant-validity.tsfails with the invariant printed.🤖 Generated with Claude Code
https://claude.ai/code/session_0186LhwkUBupmLJUUAMda5hU
Generated by Claude Code