Skip to content

feat(auth): close prepared artifact boundaries - #211

Merged
abiorh-claw merged 3 commits into
mainfrom
codex/ws-xint-002-02-prepared-feature-boundaries
Jul 27, 2026
Merged

feat(auth): close prepared artifact boundaries#211
abiorh-claw merged 3 commits into
mainfrom
codex/ws-xint-002-02-prepared-feature-boundaries

Conversation

@Abiorh001

@Abiorh001 Abiorh001 commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

WS-XINT-002-02 PR Trust Bundle

Chunk

WS-XINT-002-02 — Prepared Operation Boundaries (L1).

Goal and human-approved intent

Close the reusable PREP-to-ART interface without activating any planned ART
action. Prevent the stale status wording that previously reached main.

What changed and why

  • Durable ART mutation requests now carry a process-local opaque
    PreparedAuthorizationHandle, not raw request authentication context.
  • The obsolete upload-session port was removed with no compatibility alias.
  • Guide, submission, and checker-output binding use distinct request types and
    typed methods, preventing action and resource confusion.
  • Static guards reject prepared handles in routes, schemas, async payloads,
    provider/public interfaces, and unauthorized method signatures.
  • PREP tests prove every planned ART action issues no handle/evidence, a wrong
    fixed service denies before availability, and all rollback/cancellation
    classes burn the handle without kernel or evidence reentry.
  • Initiative status now records durable merged facts only and never duplicates
    transient active, merge-pending, or next-chunk state.

Design and alternatives

Chosen: one existing PREP capability protocol plus closed operation-specific
requests. Exact feature row composers, locks, and resource contexts remain in
their evidence-backed activation chunks.

Rejected: generic binding requests, caller-selected actions/facts, raw
AuthorizationContext mutation authority, a second capability protocol,
premature feature truth, and compatibility upload-session aliases.

Scope and product behavior

No action activation, catalogue/migration, evaluator, kernel, repository,
route, provider I/O, durable write, or lifecycle change. Operator read/recovery
remains on its existing bounded path. Review packet/evidence work remains
deferred to WS-XINT-002-07.

Acceptance proof and checks

  • Isolated PostgreSQL authorization/architecture run: 364 passed.
  • PREP coverage: 98.32 percent, above the 90 percent changed-subsystem floor.
  • Final isolated PostgreSQL rollback atomicity regression: passed.
  • Artifact architecture: 11 passed.
  • Full Ruff, markdown links, stale authorization docs, stale artifact
    contracts, stale Workstream wording, and git diff --check: passed.
  • No CI/config/dependency changes, skips, xfails, bypasses, or lowered gates.
  • GitHub Backend / test and Agent Gates / agent-gates remain required for
    full exact-head coverage.

Reviewer results

Senior, architecture, QA, security, product/ops, CI integrity, docs, and test
delta: PASS. Reuse/dedup: PASS WITH LOW RISK for one intentionally retained
focused test overlapping the new exhaustive regression.

External review

Pending GitHub Actions and CodeRabbit on the exact PR head.

Remaining risks and follow-up

This chunk intentionally activates nothing. Chunks 03-07 and 05A-D must supply
their exact non-forgeable feature proofs, lock order, stale/race tests, and
activation evidence. Full repository coverage is delegated to GitHub Actions.

Human review focus and merge ownership

Confirm no raw authentication context or generic resource/action selector can
enter durable ART mutation ports, no planned action issues a handle, and the
status file cannot become stale at merge. The user retains merge approval for
this specific PR.

Summary by CodeRabbit

  • New Features

    • Added distinct artifact binding capabilities for guide sources, submissions, and checker outputs.
    • Added prepared bundle creation and materialization workflows.
    • Durable artifact operations now use opaque prepared authorization rather than raw authorization context.
  • Updates

    • Removed the obsolete upload-session interface.
    • Strengthened validation to prevent unauthorized or incomplete artifact mutations.
  • Documentation

    • Updated artifact storage and authorization specifications with the revised operation boundaries.

@coderabbitai

coderabbitai Bot commented Jul 27, 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: 28 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: 7e1e2475-3546-4308-9b13-ed2c93f3643f

📥 Commits

Reviewing files that changed from the base of the PR and between e69d322 and f8bc5f9.

📒 Files selected for processing (3)
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/reviews/WS-XINT-002-02-external-review-response.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/reviews/WS-XINT-002-02-pr-trust-bundle.md
  • docs/spec_artifact_storage_service.md
📝 Walkthrough

Walkthrough

The PR closes the PREP-to-ART interface around opaque prepared authorization, introduces typed artifact binding and bundle operations, removes legacy upload contracts, strengthens architecture and authorization tests, and updates related initiative specifications and status records.

Changes

Prepared ART boundary

Layer / File(s) Summary
PREP-to-ART contract and scope
.agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/..., docs/spec_*.md
Contracts and review records define opaque prepared authority, typed operations, removed upload-session paths, deferred activation facts, and durable-only status tracking.
Artifact operation contracts
backend/app/interfaces/artifact_operations.py
Request types and ports now use PreparedAuthorizationHandle, expose typed binding and bundle preparation methods, and remove legacy upload interfaces.
Artifact boundary enforcement
backend/tests/test_artifact_architecture.py
AST-based tests validate the revised ports and requests and reject prepared-handle leakage into public transport or provider contracts.
Prepared authorization validation
backend/tests/test_authorization.py
Tests cover unavailable planned actions, incorrect service identities, and handle burn behavior across failure and cancellation phases.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 39.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: closing prepared artifact boundaries.
Description check ✅ Passed The description covers the chunk, goal, changes, design, scope, tests, risks, and review notes, though it doesn't use every template heading verbatim.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ws-xint-002-02-prepared-feature-boundaries

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: 1

🤖 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 `@docs/spec_artifact_storage_service.md`:
- Around line 378-383: Update the `PreparedBundleMaterializationRequest`
description to include its `task_id` and `assignment_id` fields, ensuring the
exhaustive “wraps only” list matches the dataclass while preserving the existing
references to prepared authority, `PreparedArtifact` generation, and
policy/checker selectors.
🪄 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: fa32381b-d5ca-4df0-a4e4-aa29e620796e

📥 Commits

Reviewing files that changed from the base of the PR and between 89956cf and e69d322.

📒 Files selected for processing (12)
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/CHUNK_MAP.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/DECISIONS.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/PLAN.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/STATUS.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/chunks/WS-XINT-002-02-prepared-feature-boundaries.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/reviews/WS-XINT-002-02-internal-review.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/reviews/WS-XINT-002-02-pr-trust-bundle.md
  • backend/app/interfaces/artifact_operations.py
  • backend/tests/test_artifact_architecture.py
  • backend/tests/test_authorization.py
  • docs/spec_artifact_storage_service.md
  • docs/spec_authorization_service.md

Comment thread docs/spec_artifact_storage_service.md Outdated
@abiorh-claw
abiorh-claw self-requested a review July 27, 2026 13:53
@abiorh-claw
abiorh-claw merged commit f4cebb0 into main Jul 27, 2026
3 checks passed
@abiorh-claw
abiorh-claw deleted the codex/ws-xint-002-02-prepared-feature-boundaries branch July 28, 2026 01:45
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