Skip to content

WS-XINT-003-02C: add REV authorization readiness - #255

Merged
abiorh-claw merged 5 commits into
mainfrom
codex/ws-xint-003-02c-auth-readiness
Aug 3, 2026
Merged

WS-XINT-003-02C: add REV authorization readiness#255
abiorh-claw merged 5 commits into
mainfrom
codex/ws-xint-003-02c-auth-readiness

Conversation

@Abiorh001

@Abiorh001 Abiorh001 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

PR Trust Bundle: WS-XINT-003-02C

Intent and scope

Register the complete unavailable REV authorization vocabulary and exact fixed
service principals before REV implementation begins. This chunk adds four
planned actions, six closed identities, six static matrix rows, and database
parity only.

Design and safety

  • Catalogue totals become 71 permissions, 100 actions, 45 active, and 55 planned.
  • The fixed-service registry becomes fourteen rows with twenty-two memberships.
  • Two separate reconciliation identities share only review.reconcile.run;
    future REV code must derive their modes server-side.
  • Evidence-ingest actions remain planned, outside the service matrix, and
    protected by FUTURE_INTENT_REQUIRED_ACTIONS.
  • Migration 0049 seeds no principal or authority and refuses unsafe downgrade
    after direct/linked action evidence or use of any new identity.

Exclusions

No REV queue, lease, finding, decision, revision, recovery, projection,
lifecycle behavior, PREP protocol, route, worker, provider I/O, or action
activation is included.

Evidence

  • Ruff: pass.
  • Mypy: pass.
  • Focused tests: 33 passed.
  • Changed-module coverage: 100.00 and 97.89 percent.
  • Exact DB/API collection: 16 tests collected.
  • Internal architecture, security, product, QA, senior, CI, test-delta, reuse,
    and docs review: pass; valid findings resolved.
  • Markdown links, stale review contracts, and diff whitespace: pass.

Hosted GitHub Actions must provide PostgreSQL schema/API execution, full-suite
coverage (repository 78 percent and changed authorization/actor subsystems 90
percent), and the final exact-head merge evidence.

Human review focus

Verify the four action/permission/owner triples, the six identity-to-action
rows, the exact 0048-to-0049 constraint transformation, and that no availability
or product behavior changed.

Summary by CodeRabbit

  • New Features

    • Added four planned, unavailable review lifecycle actions.
    • Registered six additional review-related service identities.
    • Added controlled provisioning support for the review service identities.
  • Documentation

    • Updated authorization counts, service registry details, custody assignments, rollout status, and migration guidance.
    • Clarified that planned review actions and identities remain unavailable and non-authoritative.
  • Bug Fixes

    • Added safeguards preventing unauthorized activation or unsafe rollback of review authorization data.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Abiorh001, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 26 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 801d343f-f1f2-4b0e-afe7-668de0e65045

📥 Commits

Reviewing files that changed from the base of the PR and between b44855b and ed89467.

📒 Files selected for processing (6)
  • .agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/ACTIVATION_CUSTODY.md
  • .agent-loop/initiatives/WS-XINT-003-rev-auth-end-to-end/REVIEW_LOG.md
  • .agent-loop/initiatives/WS-XINT-003-rev-auth-end-to-end/chunks/WS-XINT-003-02C-auth-catalogue-principal-readiness.md
  • .agent-loop/initiatives/WS-XINT-003-rev-auth-end-to-end/reviews/WS-XINT-003-02C-external-review-response.md
  • backend/tests/conftest.py
  • backend/tests/test_alembic.py
📝 Walkthrough

Walkthrough

The change registers four planned REV actions and six service identities, adds migration 0049_rev_auth_readiness with guarded rollback, extends catalogue and provisioning tests, and updates specifications, operations documentation, custody records, and review evidence.

Changes

REV authorization readiness

Layer / File(s) Summary
Catalogue and identity registration
backend/app/modules/actors/service_identities.py, backend/app/modules/authorization/catalogue.py
Adds four planned REV actions, six review service identities, new custodians, service-action mappings, catalogue counts, and validation that future-intent actions remain unavailable and outside the service matrix.
Readiness migration and rollback guards
backend/alembic/versions/0049_rev_auth_readiness.py
Adds migration 0049 to register actions and identities, replace protected constraints, lock affected tables, and reject downgrade when action evidence or identity usage exists.
Migration and provisioning validation
backend/tests/test_alembic.py, backend/tests/test_auth.py, backend/tests/test_authorization.py
Adds migration round-trip and downgrade-refusal tests, provisions all six identities without grants, and updates catalogue, matrix, custody, and documentation assertions.
Specification and review records
.agent-loop/initiatives/..., docs/operations_authorization_service.md, docs/spec_authorization_service.md, docs/spec_review_lifecycle.md
Records 23 planned REV actions, 14 fixed-service identities, 22 matrix memberships, registered-but-unavailable status, migration behavior, and 02C review evidence.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AuthorizationCatalogue
  participant Alembic0049
  participant PostgreSQL
  participant ServiceActorAPI
  AuthorizationCatalogue->>Alembic0049: provide REV action and identity definitions
  Alembic0049->>PostgreSQL: register values and replace constraints
  ServiceActorAPI->>PostgreSQL: provision six fixed review identities
  PostgreSQL-->>ServiceActorAPI: return identities without grants
  Alembic0049->>PostgreSQL: check evidence and identity usage on downgrade
  PostgreSQL-->>Alembic0049: allow or reject rollback
Loading

Possibly related PRs

Suggested reviewers: abiorh-claw

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the intent, scope, design, exclusions, evidence, and review focus, but it omits most required trust-bundle sections and checklists. Restructure the description to include the template headings, allowed files, acceptance proof, test delta, reviewer results, CI gates, risks, follow-up, and merge ownership.
Docstring Coverage ⚠️ Warning Docstring coverage is 34.48% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the workstream chunk and its main change: adding REV authorization readiness.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ws-xint-003-02c-auth-readiness

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
@.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/ACTIVATION_CUSTODY.md:
- Around line 94-99: Update the WS-AUTH-001-REV-CUSTODY description to clarify
that AUTH_REV_05 through AUTH_REV_12 remain in the runtime ActionOwner catalogue
for the original 19 actions. State that the XINT-003 values represent planning
or future activation custody only, pending a later change that replaces the
runtime owners, and remove the claim that the seven historical REV owner enum
values are removed.

In
@.agent-loop/initiatives/WS-XINT-003-rev-auth-end-to-end/chunks/WS-XINT-003-02C-auth-catalogue-principal-readiness.md:
- Around line 5-6: Update the status line in the chunk document to indicate that
implementation is complete and the internal review has passed, with only hosted
CI evidence pending. Remove the outdated “Proposed for L1 plan review before
implementation” wording while preserving the surrounding implementation contract
text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7119331c-d010-4bfe-b9f6-0da1003993cb

📥 Commits

Reviewing files that changed from the base of the PR and between ac52da6 and b44855b.

📒 Files selected for processing (16)
  • .agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/ACTIVATION_CUSTODY.md
  • .agent-loop/initiatives/WS-XINT-003-rev-auth-end-to-end/ACTION_CUSTODY.md
  • .agent-loop/initiatives/WS-XINT-003-rev-auth-end-to-end/REVIEW_LOG.md
  • .agent-loop/initiatives/WS-XINT-003-rev-auth-end-to-end/STATUS.md
  • .agent-loop/initiatives/WS-XINT-003-rev-auth-end-to-end/chunks/WS-XINT-003-02C-auth-catalogue-principal-readiness.md
  • .agent-loop/initiatives/WS-XINT-003-rev-auth-end-to-end/reviews/WS-XINT-003-02C-internal-review.md
  • .agent-loop/initiatives/WS-XINT-003-rev-auth-end-to-end/reviews/WS-XINT-003-02C-pr-trust-bundle.md
  • backend/alembic/versions/0049_rev_auth_readiness.py
  • backend/app/modules/actors/service_identities.py
  • backend/app/modules/authorization/catalogue.py
  • backend/tests/test_alembic.py
  • backend/tests/test_auth.py
  • backend/tests/test_authorization.py
  • docs/operations_authorization_service.md
  • docs/spec_authorization_service.md
  • docs/spec_review_lifecycle.md

@abiorh-claw
abiorh-claw self-requested a review August 3, 2026 12:40
@abiorh-claw
abiorh-claw merged commit 745d9c3 into main Aug 3, 2026
9 checks passed
@abiorh-claw
abiorh-claw deleted the codex/ws-xint-003-02c-auth-readiness branch August 3, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants