Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ mappings, and availability must remain identical.
|---|---|
| `WS-AUTH-001-ART-02D-INTERNAL` | `artifact.verification.execute`, `artifact.pending_work.scan`, `artifact.put_attempt.resolve` |
| `WS-AUTH-001-ART-02D-OPERATOR` | `artifact.binding.read`, `artifact.replica.read`, `artifact.receipt.read`, `artifact.verification_job.read`, `artifact.verification_job.retry`, `artifact.recovery_attempt.read`, `artifact.audit.read`, `operations.artifact_storage_admission.read` |
| `WS-AUTH-001-ART-03` | `artifact.guide_source.ingest`, `artifact.guide_source.read`, `artifact.guide_source.binding.create` |
| `WS-AUTH-001-ART-03` | `artifact.guide_source.read`, `artifact.guide_source.binding.create` |
| `WS-XINT-002-04A` | `artifact.guide_source.ingest` |
| `WS-XINT-002-05A` | `artifact.submission_bundle.prepare` |
| `WS-AUTH-001-ART-04B` | `artifact.pre_submit.checker_input.materialize` |
| `WS-AUTH-001-ART-05` | `artifact.submission.binding.create` |
Expand All @@ -52,10 +53,12 @@ mappings, and availability must remain identical.
`WS-AUTH-001-ART-CUSTODY` historically transferred 25 rows. WS-XINT-002-01
reconciles the live catalogue by removing the six unused multi-step upload rows
and registering three end-to-end bundle/review rows. The resulting 22 rows have
exact owner cardinalities `3/8/3/1/1/1/1/2/2` in the table order above. The
exact owner cardinalities `3/8/2/1/1/1/1/1/2/2` in the table order above. The
`OPERATOR` suffix denotes only future activation custody; it grants no Operator
entitlement. All 22 actions remain planned, including independently gated
`artifact.verification_job.retry`, which
entitlement. Eighteen actions remain planned after the three fixed-service ART
actions and `artifact.guide_source.ingest` activate. The independently
gated `artifact.verification_job.retry`
remains planned and
cannot be activated by read/status proof. The historical transfer added no
migration because owner and availability are typed metadata. WS-XINT-002-01
reconciles PostgreSQL parity through migration `0036`; the live catalogue has
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# WS-XINT-002-04A External Review Response

## CodeRabbit

The first review against `main` produced two actionable documentation findings.

- The ART custody reconciliation still described nine activation custodians
after guide ingest introduced the tenth owner. The operations text and its
independent exact-substring test now require ten.
- The registry summary mixed the total artifact inventory with the remaining
planned count. It now states that the 19 other artifact actions comprise 18
planned actions plus active `artifact.guide_source.ingest`; the separate
18-remaining statement is unchanged.

The description-template warning was addressed by replacing the PR body with
the repository trust-bundle structure. The bot's docstring warning does not
identify a missing production docstring and is checked independently by the
unchanged hosted docstring gate; no documentation threshold was weakened.

## Verification

- stale authorization documentation: passed
- stale artifact contracts: passed
- Markdown links: passed
- Ruff for the affected exactness test: passed
- independent ART custody documentation fixture: passed
- `git diff --check`: passed

The exact corrected head still requires the hosted Backend gate and CodeRabbit
incremental review to complete.
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# WS-XINT-002-04A Internal Review

## Scope reviewed

Guide-source ingest activation based on planning correction `35b9bffb`:
Project Manager policy/custody, human PREP preparation and consumption, ART-owned
project/draft-guide/snapshot/item locks, final byte-fact evidence, and denial
atomicity. Guide read and binding remain planned.

## Pre-implementation review

Architecture, security, product/ops, QA, senior engineering, and CI review found
that the original contract omitted the canonical Project Manager policy file and
ART-owned project/guide lineage locks. Implementation did not bypass those
findings. The correction was split into its own planning commit and expanded the
allowed surface narrowly. Review also clarified that a covered Project Manager
grant follows the canonical scope rule: system-scoped grants cover every project;
project-scoped grants cover only their exact project.

## Implementation review

- Architecture: pass with low transaction-ownership reuse risk; no AUTH/ART
boundary violation.
- Security: pass after canonical Project Manager scope clarification; no
blocking authorization finding.
- Product/ops: pass with low wording risk, corrected in the custody table.
- QA: pass with low risk; hosted database proof remains required.
- Senior engineering: pass with low risk after separating the planning commit.
- CI integrity: pass with low risk; no gate, threshold, or runner change.
- Docs: findings on PREP narrative and catalogue counts were corrected.
- Reuse/dedup: pass with a low-risk note about the existing duplicated PREP
request-digest domain literal; no new abstraction required in 04A.
- Test delta: pass after correcting the real-database grant fixture and adding
adapter-specific final-fact and denial proofs.

The first hosted exact-head run then exposed two stale closed-registry
assertions after guide ingest moved from planned ART-03 custody to active 04A
custody. The contract was corrected to own those exactness surfaces; the audit
active-action set, custody owner counts, canonical custody ledger, and catalogue
totals were updated without weakening an assertion. CI integrity, QA, senior,
docs, reuse, and test-delta tracks were rerun on the corrective delta. Their
valid stale-document findings were also corrected before the final hosted run.
The next hosted run passed semantic-lane custody but reported artifact foundation
coverage at 89.94 percent. Focused safety tests were added for nested-transaction
denial, caller-owned root commit/rollback, and PREP consume-error translation.
They execute eleven previously uncovered production statements, restoring margin
without changing the 90 percent gate.

## Local evidence

- Ruff passed for backend application and affected tests.
- Focused authorization catalogue/policy/PREP tests passed.
- The two exact assertions that failed in the first hosted run pass after the
corrective change.
- `tests/test_guide_artifacts.py` passes with the new transaction/error safety
paths and raises focused coverage of ART authorization from 32 to 37 percent.
- `tests/test_guide_artifacts.py` passed, including activated adapter binding,
forged/unissued handle, mismatch, and reuse proofs.
- Stale authorization docs, stale artifact contracts, Markdown links, agent
static gate, and `git diff --check` passed.
- The full database-backed coverage command was intentionally not run locally
because `WORKSTREAM_TEST_DATABASE_URL` is unavailable and the user's machine
is not the full-suite execution environment.

## Hosted evidence required

The exact implementation head must pass `Backend / test` and
`Agent Gates / agent-gates`. Hosted CI owns the database-backed focused tests,
repository-wide 78 percent baseline, and authorization/artifact 90 percent
coverage gates.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# WS-XINT-002-04A PR Trust Bundle

## Intent

Activate only `artifact.guide_source.ingest` for an active covered Project
Manager grant through the shared opaque, transaction-bound PREP protocol.

## Design

The route obtains a request-local human PREP adapter. Preparation locks the
actor, exact identity link, and matched Project Manager grant before scratch or
body-byte intake. ART later locks the project, draft guide, source snapshot, and
source item, computes byte facts, and consumes the same handle before capacity,
put intent, or provider I/O. The allowed decision digest and protected database
mutation commit in one root transaction.

## Scope

- Activates only guide-source ingest and assigns activation custody to
`WS-XINT-002-04A`.
- Adds the existing ingest permission only to Project Manager policy.
- Adds one typed guide-ingest resource context and prepared-kernel path.
- Completes ART-owned project/draft-guide/snapshot/item locking.
- Keeps guide read, guide binding, submissions, reviews, and generic downloads
unavailable.

## Tests and evidence

- Catalogue availability/custody and exact role-policy matrix.
- Exact grant permission/project/`FOR UPDATE` request.
- Opaque handle forgery, lineage/request mismatch, complete final fact
projection, and reuse denial.
- Real PostgreSQL proof for wrong-project, revoked-link, revoked-grant, locked
lineage, non-draft lineage, successful admission, and zero denied side
effects.
- Existing canonical PREP tests retain copied/serialized, cross-session/root,
wrong-action/resource, concurrent consume, and replaced-transaction proof.
- The audit active-action set and independent custody/count fixtures prove the
planned-to-active transition exactly; the first hosted failure caught their
stale values and the correction preserves their strict equality checks.
- Transaction tests prove nested PREP scopes deny, successful caller-owned roots
commit once, failed roots roll back once, and consume failures close and deny.
- Local static and focused non-database checks passed; hosted database coverage
and full-suite evidence are pending on the exact PR head.

## CI integrity

No workflow, test runner, skip, coverage pragma, threshold, or failure-handling
configuration changes are included. A hosted 89.94 percent artifact-foundation
result was corrected by covering eleven additional production statements.
Required thresholds remain global 78 percent and affected
authorization/artifact subsystems at least 90 percent.

## Review result

All required internal tracks completed. Valid planning, test, wording, and
fixture findings were addressed. Remaining notes are low risk and documented in
the internal review record.

CodeRabbit's two exact documentation findings after retargeting to `main` were
fixed and recorded in `WS-XINT-002-04A-external-review-response.md`. The final
incremental review and exact-head hosted Backend result remain required.

## Human review focus

Confirm PM-only policy, canonical system/project grant coverage, pre-byte
preparation, final ART-owned draft lineage locks, final resource-context digest,
denial atomicity, and that only guide ingest becomes active.
Loading
Loading