Skip to content

feat(auth): activate guide binding and read - #245

Merged
abiorh-claw merged 7 commits into
mainfrom
codex/ws-xint-002-04b-runtime
Aug 2, 2026
Merged

feat(auth): activate guide binding and read#245
abiorh-claw merged 7 commits into
mainfrom
codex/ws-xint-002-04b-runtime

Conversation

@Abiorh001

@Abiorh001 Abiorh001 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

PR Trust Bundle: WS-XINT-002-04B

Chunk

WS-XINT-002-04B — guide binding and guide read authorization activation.

Goal and human-approved intent

Activate exactly artifact.guide_source.binding.create for
workstream.artifact.binding and artifact.guide_source.read for
workstream.artifact.guide_reader, preserving exact transaction, identity,
lineage, verified-content, and no-provider-I/O-on-denial guarantees.

What changed and why

  • Added closed typed binding/read resource contexts to the existing PREP kernel.
  • Reconciled the two catalogue rows to active WS-XINT-002-04B custody.
  • Added production fixed-service adapters using the existing opaque single-use
    PreparedAuthorizationHandle protocol.
  • Removed the impossible caller-supplied read handle. The materializer obtains
    fresh authority in its owned session and holds exact lineage locks through the
    protected provider read and atomic classification write.
  • Added exact digest evidence and fixed runtime/docs/custody parity.

Design chosen

Reuse centralized PREP with two closed contexts and fixed service identities.
Binding retains the caller-owned transaction. Reading prepares and consumes
inside the materializer-owned transaction because handles cannot cross sessions.
The protected read holds canonical lineage locks through provider access.

Alternatives rejected

  • Serializable or reconstructable handles: violates opaque process-local PREP.
  • Preparing the read in an earlier worker/session: violates transaction binding.
  • Committing authorization before provider access and revalidating afterward:
    leaves a stale-lineage race.
  • Generic download or role-derived service authority: violates least privilege.

Scope control and product behavior

No new action/permission identifiers, migration, route, Celery payload,
submission/checker/review authority, generic download, parser behavior, or
ART-03C legacy cutover. Project Managers retain ingest only; neither human nor
Admin authority implies binding/read service authority.

Acceptance proof and test delta

  • Exact typed facts, action/service matrix, session/transaction, single-use,
    copied/wrong handle, replay, wrong service, human substitution, every adapter
    fact mismatch, cross-resource selectors, stale generation, wrong content, and
    wrong logical role are covered.
  • Denial tests assert no provider read, binding, classification, or allowed
    evidence where applicable.
  • Architecture tests prove materialization requests carry identifiers and an
    idempotency key, never a prepared handle.
  • No tests were skipped, deleted, or weakened. The prior post-read stale-incident
    expectation was replaced by the stronger lock-through-provider invariant.

Tests/checks run

  • ruff check app tests scripts: passed.
  • pytest tests/test_artifact_architecture.py -q: 20 passed.
  • Focused tests/test_authorization.py guide/custody/service cases: passed.
  • Stale AUTH docs, stale ART contracts, Markdown links, and diff check: passed.
  • Hosted full Backend coverage and database-backed guide tests: required on the
    exact PR head.

CI integrity

No workflow, dependency, package script, test config, skip/xfail, coverage
threshold, or fail-open changes.

Reviewer results

Security, architecture, QA, senior engineering, product/ops, CI integrity,
docs, reuse/dedup, and test-delta tracks pass after all blocking findings were
resolved. Details are in WS-XINT-002-04B-internal-review.md.

External review

Planning PR #244 has Agent Gates passing; hosted Backend and external review run
on its amended exact head. Runtime external review begins after this commit is
pushed and the stacked PR is opened.

Remaining risks and follow-up work

  • Holding lineage locks through bounded provider I/O is intentionally strict and
    operationally heavier; ART-03C worker tuning must preserve deadlines.
  • If more ART internal resource contexts are added, consolidate the small
    prepared/kernel mapping registries.
  • ART-03C later owns live worker/route composition and legacy-path removal.

Human review focus and merge ownership

Review exact fixed identities, full fact manifests, lock-through-read ordering,
atomic decision evidence, no human inheritance, and the absence of ART-03C scope.
Planning PR #244 must merge first. Human approval owns every merge.

Summary by CodeRabbit

  • New Features

    • Added fixed-service authorization for guide-source reading and binding.
    • Added secure, single-use authorization handling with identity, resource, and lineage validation.
    • Guide-source materialization now supports idempotency keys and transaction-safe processing.
    • Added locking and validation to prevent stale, mismatched, or replayed operations.
  • Documentation

    • Updated authorization catalogues, rollout status, ownership, and activation records.
  • Tests

    • Expanded coverage for authorization, identity enforcement, replay protection, locking, and failure scenarios.

@coderabbitai

coderabbitai Bot commented Aug 2, 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: 52 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: 2550b9fe-e7a8-405f-bc94-12b78c6273ad

📥 Commits

Reviewing files that changed from the base of the PR and between 229af17 and 1cfdbb1.

📒 Files selected for processing (18)
  • .agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/ACTIVATION_CUSTODY.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/reviews/WS-XINT-002-04B-external-review-response.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/reviews/WS-XINT-002-04B-internal-review.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/reviews/WS-XINT-002-04B-pr-trust-bundle.md
  • backend/app/interfaces/artifact_operations.py
  • backend/app/modules/artifacts/authorization.py
  • backend/app/modules/artifacts/guide_materialization.py
  • backend/app/modules/authorization/catalogue.py
  • backend/app/modules/authorization/kernel.py
  • backend/app/modules/authorization/prepared.py
  • backend/app/modules/authorization/runtime.py
  • backend/tests/test_artifact_architecture.py
  • backend/tests/test_audit.py
  • backend/tests/test_authorization.py
  • backend/tests/test_guide_bindings.py
  • docs/operations_authorization_service.md
  • docs/spec_artifact_storage_service.md
  • docs/spec_authorization_service.md
📝 Walkthrough

Walkthrough

Guide-source read and binding operations now use fixed-service authorization with typed resource contexts, transaction-bound single-use handles, expanded lineage locking, updated catalogue ownership, and comprehensive tests and documentation.

Changes

Guide-source authorization

Layer / File(s) Summary
Authorization contracts and action wiring
backend/app/interfaces/artifact_operations.py, backend/app/modules/authorization/*, backend/tests/test_artifact_architecture.py
Guide-source resource contexts and action mappings were added. Materialization now accepts a UUID idempotency_key instead of a prepared handle.
Fixed-service authorization and materialization
backend/app/modules/artifacts/authorization.py, backend/app/modules/artifacts/guide_materialization.py, docs/spec_artifact_storage_service.md, backend/tests/test_guide_bindings.py
Fixed-service adapters prepare and consume single-use capabilities. Materialization validates and locks canonical facts, performs provider access within the transaction, and persists classification after successful inspection.
Authorization and integration validation
backend/tests/test_authorization.py, backend/tests/test_guide_bindings.py
Tests cover exact fact binding, replay, forged handles, service identity enforcement, human-admin rejection, owned sessions, lineage locking, and invalid binding inputs.
Activation records and specifications
.agent-loop/initiatives/..., docs/operations_authorization_service.md, docs/spec_authorization_service.md
Guide-source read and binding actions are active under WS-XINT-002-04B. Catalogue totals are updated to 43 active and 53 planned actions. Review records document verification and remaining hosted checks.

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

Sequence Diagram(s)

sequenceDiagram
  participant GuideMaterialization
  participant FixedServiceAuthorization
  participant Database
  participant Provider
  GuideMaterialization->>Database: Lock guide-source lineage facts
  GuideMaterialization->>FixedServiceAuthorization: Prepare and consume read capability
  FixedServiceAuthorization-->>GuideMaterialization: Return single-use authorization
  GuideMaterialization->>Provider: Inspect locked source replica
  GuideMaterialization->>Database: Persist classification in the transaction
Loading

Possibly related PRs

Suggested reviewers: abiorh-claw

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.90% 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
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.
Title check ✅ Passed The title clearly and concisely describes the activation of guide binding and guide read authorization.
Description check ✅ Passed The description covers the change, design, scope, tests, review status, risks, follow-up work, and merge ownership in sufficient detail.
✨ 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-002-04b-runtime

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.

@Abiorh001

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

🧹 Nitpick comments (5)
backend/tests/test_guide_bindings.py (1)

1688-1694: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the unused authority argument.

_materialization_request ignores its authority parameter; it only builds field values. This test supplies the real authority through authority_factory, so the _AllowReadAuthority() instance created here is discarded. Removing the parameter from the helper and its call sites makes the authority source unambiguous.

🤖 Prompt for 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.

In `@backend/tests/test_guide_bindings.py` around lines 1688 - 1694, Remove the
unused authority parameter from _materialization_request and update every call
site, including the materialize_guide_source test, to stop passing
_AllowReadAuthority(). Preserve the existing authority_factory-based authority
setup.
backend/tests/test_authorization.py (1)

5455-5476: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Drop the inert human_authority parameter.

del human_authority at Line 5476 discards the parameter. Both parameter sets then run identical logic, and the values project_manager and access_administrator never influence the context or the repository stub. A reader can conclude that two distinct human roles are covered, which is not the case.

Either remove the third parametrize value, or configure _runtime_context with the named role so each case exercises a distinct human authority.

♻️ Proposed cleanup
 `@pytest.mark.parametrize`(
-    ("action_id", "resource_type", "human_authority"),
+    ("action_id", "resource_type"),
     [
-        (
-            ActionId.ARTIFACT_GUIDE_SOURCE_BINDING_CREATE,
-            "guide_source_binding",
-            "project_manager",
-        ),
-        (
-            ActionId.ARTIFACT_GUIDE_SOURCE_READ,
-            "guide_source_read",
-            "access_administrator",
-        ),
+        (ActionId.ARTIFACT_GUIDE_SOURCE_BINDING_CREATE, "guide_source_binding"),
+        (ActionId.ARTIFACT_GUIDE_SOURCE_READ, "guide_source_read"),
     ],
 )
 `@pytest.mark.asyncio`
 async def test_human_admin_authority_cannot_substitute_for_fixed_guide_services(
     action_id: ActionId,
     resource_type: str,
-    human_authority: str,
 ) -> None:
-    del human_authority
     context = _runtime_context()
🤖 Prompt for 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.

In `@backend/tests/test_authorization.py` around lines 5455 - 5476, Remove the
inert human_authority parameter from
test_human_admin_authority_cannot_substitute_for_fixed_guide_services and its
`@pytest.mark.parametrize` entries, unless the test is updated to pass each role
into _runtime_context. Ensure the parametrized cases only represent values that
affect the test logic.
backend/app/modules/authorization/prepared.py (1)

357-367: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider gating the new branch on action_id and renaming the local variable.

Two consistency points, neither of which changes current behavior:

  1. Every other branch in _scope_from_resource pairs a resource type with its owning action_id. This branch maps by type(resource) only. A caller that pairs a guide-source context with an unrelated action_id still gets a valid scope here; the denial happens later in _require_prelocked. Gating on action_id keeps the fail-closed decision local.
  2. artifact_resource_type holds a str here and is reassigned to a class at Line 417. Use a distinct name for the new local.

Also consider hoisting the mapping to a module-level constant, since it is rebuilt on every call.

♻️ Proposed refactor
-        artifact_internal_types = {
-            GuideSourceBindingResourceContext: "guide_source_binding",
-            GuideSourceReadResourceContext: "guide_source_read",
-        }
-        artifact_resource_type = artifact_internal_types.get(type(resource))
-        if artifact_resource_type is not None:
+        guide_resource_type = _GUIDE_INTERNAL_RESOURCE_TYPE_BY_ACTION.get(action_id)
+        if guide_resource_type is not None and isinstance(
+            resource, (GuideSourceBindingResourceContext, GuideSourceReadResourceContext)
+        ) and resource.resource_type == guide_resource_type:
             return PreparedAuthorityScope(
                 kind=PreparedAuthorityScopeKind.ARTIFACT_INTERNAL,
-                artifact_resource_type=artifact_resource_type,
+                artifact_resource_type=guide_resource_type,
                 artifact_resource_id=resource.resource_id,
             )

Module-level constant:

_GUIDE_INTERNAL_RESOURCE_TYPE_BY_ACTION = {
    ActionId.ARTIFACT_GUIDE_SOURCE_BINDING_CREATE: "guide_source_binding",
    ActionId.ARTIFACT_GUIDE_SOURCE_READ: "guide_source_read",
}
🤖 Prompt for 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.

In `@backend/app/modules/authorization/prepared.py` around lines 357 - 367, Update
_scope_from_resource to gate the guide-source context branch by the matching
action_id, using the proposed module-level
_GUIDE_INTERNAL_RESOURCE_TYPE_BY_ACTION mapping instead of rebuilding a
type-only mapping per call. Rename the local string result to avoid colliding
with the later artifact_resource_type class assignment, while preserving the
existing PreparedAuthorityScope construction.
backend/app/modules/artifacts/guide_materialization.py (1)

181-214: 🩺 Stability & Availability | 🔵 Trivial

Consider a bounded lock_timeout/statement_timeout for this transaction.

The transaction now holds FOR UPDATE locks on the full guide lineage across provider I/O in self._preparation.prepare(self._store.open(...)). That is intentional and covered by test_authorized_read_locks_lineage_through_provider_access. The lock hold time is therefore bounded by the preparation deadline, not by database work, and concurrent project_setup_runs writers block for that whole period.

Set an explicit SET LOCAL lock_timeout and statement_timeout on this session so a slow provider cannot pin lineage rows for the full deadline, and add a metric for the lock hold duration.

🤖 Prompt for 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.

In `@backend/app/modules/artifacts/guide_materialization.py` around lines 181 -
214, Within the transaction in the guide materialization flow, configure
session-local lock_timeout and statement_timeout before loading and locking the
guide lineage, using bounded values compatible with the preparation deadline.
Measure the duration that the transaction holds the lineage locks through
self._preparation.prepare and record a metric for that lock-hold duration, while
preserving the existing provider-access locking behavior.
backend/app/modules/artifacts/authorization.py (1)

526-547: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Assert that the loaded profile matches the requested service identity.

_fixed_service_context selects the actor with get_service_actor(service_identity.value) but then builds the context from ServiceIdentity(profile.service_identity). The requested identity and the stored identity are never compared. Every downstream identity check (SERVICE_ACTIONS_BY_IDENTITY[context.service_identity] in _prepare_prelocked, and _locked_service_context) then validates the stored value against itself. If the repository lookup ever widens or the row is edited, an action reserved for one fixed service can be prepared under another identity. Add the explicit equality check to close the gap locally.

🔒️ Proposed check
     link = await actors.get_identity_link_for_actor(profile.id)
     if (
         link is None
         or link.actor_profile_id != profile.id
         or link.subject_kind != ActorKind.SERVICE.value
+        or profile.service_identity != service_identity.value
     ):
         raise ArtifactAuthorityDeniedError("artifact service principal is unavailable")
     try:
         return ServiceAuthorizationContext(
             actor_profile_id=UUID(profile.id),
             actor_kind=ActorKind.SERVICE,
             actor_status=ActorStatus(profile.status),
             identity_link_id=UUID(link.id),
             identity_link_status=IdentityLinkStatus(link.status),
-            service_identity=ServiceIdentity(profile.service_identity),
+            service_identity=service_identity,
             request_id=request_id,
             correlation_id=correlation_id,
         )
🤖 Prompt for 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.

In `@backend/app/modules/artifacts/authorization.py` around lines 526 - 547,
Update _fixed_service_context to explicitly compare profile.service_identity
with the requested service_identity.value after loading the profile and before
constructing ServiceAuthorizationContext; raise ArtifactAuthorityDeniedError
with the existing unavailable message when they differ, while preserving the
current link validation and context construction for matching identities.
🤖 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 41-46: Update the custody table’s availability annotations to
match its header: mark WS-AUTH-001-ART-02D-INTERNAL as Active and mark every
remaining unannotated action-chunk row as Planned. Keep the existing ActionIds
unchanged, and ensure each row explicitly states its availability so the table
is self-contained.

In
@.agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/reviews/WS-XINT-002-04B-internal-review.md:
- Around line 40-47: Update the “Verification evidence” section to record the
exact reviewed commit SHA, full commands, and test selectors for every listed
check. After the required rebase, rerun the verification against the final PR
head, refresh the evidence with those results, and confirm hosted checks passed
for that same commit.
- Around line 3-5: Update the Result section to state that local review passed
provisionally, while merge readiness remains pending hosted exact-head checks.
Incorporate the required hosted full-coverage and database-backed guide tests
into the status, and ensure the related sections at the referenced review areas
consistently describe these gates as outstanding rather than implying approval.

In `@backend/app/modules/artifacts/guide_materialization.py`:
- Around line 371-384: Remove ArtifactStorageNamespace from the
with_for_update(of=...) exclusive lock list in the guide materialization query.
If provider I/O still requires protecting the namespace row from deletion,
acquire it separately with a shared lock while keeping the existing per-lineage
exclusive locks unchanged.
- Around line 261-269: Update the _GuideReadIncident handler to call
_record_incident on a best-effort basis, catching and suppressing any
incident-write exception. Always re-raise GuideSourceMaterializationError for
the original incident, preserving its bounded error contract regardless of
database failures during recording.

In `@backend/app/modules/authorization/runtime.py`:
- Around line 1228-1240: Update GuideSourceBindingAuthorityFacts to include the
required logical_role field matching the binding resource context, and update
GuideSourceReadAuthorityFacts to use binding_id instead of resource_id. Ensure
both models’ field names and required values align with
_guide_source_resource_context and its **asdict(facts) construction so binding
writes and guide reads validate successfully.

In `@backend/tests/test_guide_bindings.py`:
- Around line 1858-1885: The lock-contention test currently treats all
DBAPIError failures as blocked and inserts an invalid snapshot hash. In the
test’s exception handler, assert that the PostgreSQL error SQLSTATE is 55P03
before setting blocked, and update the ProjectSetupRun construction to use the
seeded GuideSourceSnapshot.bundle_hash instead of recomputing the hash.

---

Nitpick comments:
In `@backend/app/modules/artifacts/authorization.py`:
- Around line 526-547: Update _fixed_service_context to explicitly compare
profile.service_identity with the requested service_identity.value after loading
the profile and before constructing ServiceAuthorizationContext; raise
ArtifactAuthorityDeniedError with the existing unavailable message when they
differ, while preserving the current link validation and context construction
for matching identities.

In `@backend/app/modules/artifacts/guide_materialization.py`:
- Around line 181-214: Within the transaction in the guide materialization flow,
configure session-local lock_timeout and statement_timeout before loading and
locking the guide lineage, using bounded values compatible with the preparation
deadline. Measure the duration that the transaction holds the lineage locks
through self._preparation.prepare and record a metric for that lock-hold
duration, while preserving the existing provider-access locking behavior.

In `@backend/app/modules/authorization/prepared.py`:
- Around line 357-367: Update _scope_from_resource to gate the guide-source
context branch by the matching action_id, using the proposed module-level
_GUIDE_INTERNAL_RESOURCE_TYPE_BY_ACTION mapping instead of rebuilding a
type-only mapping per call. Rename the local string result to avoid colliding
with the later artifact_resource_type class assignment, while preserving the
existing PreparedAuthorityScope construction.

In `@backend/tests/test_authorization.py`:
- Around line 5455-5476: Remove the inert human_authority parameter from
test_human_admin_authority_cannot_substitute_for_fixed_guide_services and its
`@pytest.mark.parametrize` entries, unless the test is updated to pass each role
into _runtime_context. Ensure the parametrized cases only represent values that
affect the test logic.

In `@backend/tests/test_guide_bindings.py`:
- Around line 1688-1694: Remove the unused authority parameter from
_materialization_request and update every call site, including the
materialize_guide_source test, to stop passing _AllowReadAuthority(). Preserve
the existing authority_factory-based authority setup.
🪄 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: 87ebd5e0-7eb3-41bc-abaa-2d0ab4e942ff

📥 Commits

Reviewing files that changed from the base of the PR and between 2d42d52 and 229af17.

📒 Files selected for processing (16)
  • .agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/ACTIVATION_CUSTODY.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/reviews/WS-XINT-002-04B-internal-review.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/reviews/WS-XINT-002-04B-pr-trust-bundle.md
  • backend/app/interfaces/artifact_operations.py
  • backend/app/modules/artifacts/authorization.py
  • backend/app/modules/artifacts/guide_materialization.py
  • backend/app/modules/authorization/catalogue.py
  • backend/app/modules/authorization/kernel.py
  • backend/app/modules/authorization/prepared.py
  • backend/app/modules/authorization/runtime.py
  • backend/tests/test_artifact_architecture.py
  • backend/tests/test_authorization.py
  • backend/tests/test_guide_bindings.py
  • docs/operations_authorization_service.md
  • docs/spec_artifact_storage_service.md
  • docs/spec_authorization_service.md

Comment thread backend/app/modules/artifacts/guide_materialization.py
Comment thread backend/app/modules/artifacts/guide_materialization.py
Comment thread backend/app/modules/authorization/runtime.py
Comment thread backend/tests/test_guide_bindings.py
@Abiorh001
Abiorh001 force-pushed the codex/ws-xint-002-04b-runtime branch from 229af17 to 71a1b17 Compare August 2, 2026 13:12
@Abiorh001
Abiorh001 changed the base branch from codex/ws-xint-002-04b-custody-scope to main August 2, 2026 13:12
@Abiorh001

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Abiorh001

Copy link
Copy Markdown
Collaborator Author

CodeRabbit review disposition on current head 8c48c01e:

  • Fixed every valid inline finding: complete custody availability labels; provisional/exact-head review wording; bounded incident errors when incident persistence fails; removed the singleton namespace exclusive lock; SQLSTATE-specific lock proof; and the dataclass request correction.
  • Also fixed all valid nitpicks: removed inert helper/test parameters, action-gated the guide PREP scope mapping, and verified the loaded fixed-service identity exactly.
  • Rejected one stale finding: the canonical fact dataclasses already contain logical_role for binding and binding_id for reading, with strict construction/consumption tests.
  • Deferred only the suggested database timeout/metric expansion: provider I/O is already bounded by ArtifactPreparationService; PostgreSQL statement_timeout does not bound time awaiting provider I/O after the lock query returns, and a new observability surface belongs in a dedicated ART operational-tuning chunk.

Local Ruff, focused AUTH/audit tests, architecture tests, stale-doc scans, link checks, and diff checks pass. Agent Gates passes on the exact head; hosted Backend full coverage is still running. A fresh CodeRabbit invocation was requested but was rate-limited, so this disposition is tied to the existing review threads and the checked diff.

@Abiorh001
Abiorh001 marked this pull request as ready for review August 2, 2026 14:21
@Abiorh001

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Abiorh001

Copy link
Copy Markdown
Collaborator Author

Final exact-head readiness evidence for 1cfdbb17:

  • Agent Gates: passed (30751320912).
  • Backend full semantic lanes and coverage: passed (30751320913, 15m56s), including the unchanged 90% per-file kernel gate.
  • CodeRabbit incremental review command completed on the final head with no new findings.
  • All seven prior CodeRabbit threads remain resolved.
  • Security, QA, CI integrity, product/ops, docs, senior engineering, reuse/dedup, and test-delta reviews have no blocking findings.
  • Worktree is clean and PR feat(auth): activate guide binding and read #245 targets main.

The PR is ready for human merge. No merge was performed.

@abiorh-claw
abiorh-claw self-requested a review August 2, 2026 14:47
@abiorh-claw
abiorh-claw merged commit 6babf81 into main Aug 2, 2026
4 checks passed
@abiorh-claw
abiorh-claw deleted the codex/ws-xint-002-04b-runtime branch August 2, 2026 15:38
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