Skip to content

ci: expand adr-anchors to the full authz/security ADR set — 8 → 15 (#4575 follow-up) - #4594

Merged
os-zhuang merged 1 commit into
mainfrom
claude/sys-member-role-assessment-s09jvx
Aug 2, 2026
Merged

ci: expand adr-anchors to the full authz/security ADR set — 8 → 15 (#4575 follow-up)#4594
os-zhuang merged 1 commit into
mainfrom
claude/sys-member-role-assessment-s09jvx

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

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

File ADR The tempting "fix" that would be a reversal
core/security/posture-ladder.ts 0095 D3 "Just read the role — it's right there." That is the #2836 dual-track class, closed by construction only so long as posture derives from capability grants.
core/security/grant-validity.ts 0091 "Move expiry to a cleanup job." Banned by ADR-0049: correctness lives at resolution time, and unparseable bounds fail closed.
plugin-security/tenant-layer.ts 0095 D1 "Deduplicate Layer 0 into the RLS compiler." The whole point is that they share no compiler, no merge step and no bypass bit — merged, a business-RLS change can weaken tenant isolation.
plugin-security/auto-org-admin-grant.ts 0105 "Why two admin sets? Grant plain organization_admin everywhere." Under a wall-less posture that makes every org owner an environment-wide superuser (the F2 finding) — hence organization_admin_no_bypass.
plugin-security/invitation-placement.ts 0105 D8 "Skip the issuance dry-run; acceptance re-checks anyway." It doesn't — acceptance runs under system context. Skipping issuance is an escalation hole.
spec/identity/position.zod.ts 0090 D3 "Positions need hierarchy — add parent." Literally the mistake ADR-0057 D5 retired (the old sys_role.parent walk queried a column that never existed).
plugin-security/permission-evaluator.ts 0066 D2 + 0057 D1 "Add an admin fast-path / stored flag." The superuser bypass derives solely from the wildcard grant; that derivation is isTenantAdmin().

Plus one extension: the existing resolve-authz-context.ts anchor gains ADR-0068platform_admin is derived from an unscoped admin_full_access grant, no trusted stored boolean. The "add an is_admin column" refactor is the single most classic reversal in this family.

Verification

🤖 Generated with Claude Code

https://claude.ai/code/session_0186LhwkUBupmLJUUAMda5hU


Generated by Claude Code

…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
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Aug 2, 2026 9:30am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling size/s labels Aug 2, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review August 2, 2026 09:37
@os-zhuang
os-zhuang added this pull request to the merge queue Aug 2, 2026
Merged via the queue into main with commit b3235b5 Aug 2, 2026
17 checks passed
@os-zhuang
os-zhuang deleted the claude/sys-member-role-assessment-s09jvx branch August 2, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants