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 @@ -32,7 +32,7 @@ they cross multiple L1 boundaries.
| `WS-ART-001-04A4` | Former early removal of the legacy independently invocable caller-owned submission-precheck route and contract. | L1 | Superseded by PLAN5; complete removal belongs to 05B |
| `WS-ART-001-04B1` | Add the single versioned checker catalogue and compile one effective execution plan from platform defaults plus locked project policy. | L1 | Merged PR #276 |
| `WS-ART-001-04B2` | Materialize the sealed manifest tree once and execute the mandatory platform/default catalogue phases. | L1 | Merged PR #282 |
| `WS-ART-001-04B3` | Execute locked project-policy rules through the same plan and persist one bounded immutable evidence set. | L1 | Active implementation |
| `WS-ART-001-04B3` | Execute locked project-policy rules through the same plan and persist one bounded immutable evidence set. | L1 | Merged PR #291 as `8f516e6d` |
| `WS-ART-001-04C1` | Reauthorize and atomically persist capacity plus durable put intent, then write the checked ZIP once. | L1 | Proposed after XINT-06A |
| `WS-ART-001-04C2` | Reuse verification/recovery to publish one capacity-charged ready admission and compose the hidden continuous endpoint. | L1 | Proposed after 04C1 |
| `WS-ART-001-05A` | Atomically consume ready admission into one immutable Submission and binding under fresh human/service authority. | L1 | Proposed after XINT-05A |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ PR #282. It owns only fixed-service authorization before byte access,
quota-reserved callback-scoped sealed ZIP projection, platform/default phase
execution, bounded non-durable results, and cleanup. It performs no
project-policy execution, durable evidence/admission/Submission write, route
exposure, provider I/O, or AUTH activation. `WS-ART-001-04B3` implementation
and internal L1 review are complete on its bounded branch. It executes the
project-policy continuation through that same plan and sealed tree and persists
one immutable platform-plus-project evidence set. Hosted PR gates, CodeRabbit,
human review, and merge remain pending.
exposure, provider I/O, or AUTH activation. `WS-ART-001-04B3` merged through
PR #291 as `8f516e6d`. It executes the project-policy continuation through that
same plan and sealed tree and persists one immutable platform-plus-project
evidence set. ART-04C1 remains stopped until AUTH `WS-XINT-002-06A` activates
the mandatory fixed pre-submit materializer.

## Gate

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mappings, and availability must remain identical.
| `WS-XINT-002-04B` | Active: `artifact.guide_source.read`, `artifact.guide_source.binding.create` |
| `WS-XINT-002-04A` | Active: `artifact.guide_source.ingest` |
| `WS-XINT-002-05A` | Planned: `artifact.submission_bundle.prepare` |
| `WS-XINT-002-06A` | Planned: `artifact.pre_submit.checker_input.materialize` |
| `WS-XINT-002-06A` | Active: `artifact.pre_submit.checker_input.materialize` |
| `WS-XINT-002-05B` | Planned: `artifact.submission.binding.create` |
| `WS-XINT-002-06B` | Planned: `artifact.post_submit.checker_input.materialize`, `artifact.checker_output.write`, `artifact.checker_output.binding.create` |
| `WS-XINT-002-07A` | Planned: `artifact.review_packet.materialize` only |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ stopped.
| `WS-AUTH-001-12E` | Guide Sufficiency Mutation Cutover | L1 | Merged through PR #263 |
| `WS-AUTH-001-12F` | Submission Artifact Policy Planning Parent | L1 | Split after failed L1 pre-start review; zero activation |
| `WS-AUTH-001-12F1` | Submission Policy Authority Foundation | L1 | Merged through PR #286; zero activation |
| `WS-AUTH-001-12F2` | Manual Submission Policy Drafts | L1 | In progress after passed corrected pre-start review |
| `WS-AUTH-001-12F2` | Manual Submission Policy Drafts | L1 | Merged through PR #292 as `81f281bd` |
| `WS-AUTH-001-12F3` | Fixed-Service Policy Derivation | L1 | Proposed after 12F2 |
| `WS-AUTH-001-12F4` | Submission Policy Approval Chain | L1 | Proposed after 12F3 |
| `WS-AUTH-001-12G` | Post-Submit Checker Policy Mutation Cutover | L1 | Proposed after 12F4 |
Expand All @@ -92,7 +92,7 @@ feature manifest exists, then requires a separate explicit start.
| `WS-AUTH-001-ART-02D-INTERNAL` | ART 02D Internal Action Activation | L1 | Feature-gated |
| `WS-AUTH-001-ART-02D-OPERATOR` | ART 02D Operator Read/Status And Independently Evaluated Retry Activation | L1 | Feature-gated |
| `WS-AUTH-001-ART-03` | ART 03 Guide Source Action Activation | L1 | Feature-gated |
| `WS-XINT-002-06A` | Pre-Submit Materialization Activation | L1 | After hidden ART-04B; before 05A |
| `WS-XINT-002-06A` | Pre-Submit Materialization Activation | L1 | After merged ART-04B3/AUTH-12F2; before ART-04C1 and 05A |
| `WS-XINT-002-05A` | Submission Bundle Preparation Activation | L1 | Feature-gated on complete ART-04A1-04C2 hidden behavior and 06A |
| `WS-XINT-002-05B` | Submission Binding Activation | L1 | Feature-gated on hidden ART-05A |
| `WS-XINT-002-06B` | Post-Submit Materialization And Checker Output Activation | L1 | Feature-gated on ART-06A/06B |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,15 @@ setup-run binding findings were repaired.

## Active implementation chunk

`WS-AUTH-001-12E`; the user started the current-main guide-sufficiency
authorization cutover after PR #257 merged REV-AUTH readiness. AUTH-12B, 12C,
and 12D are merged. XINT-003-02A/02B supplied the immutable policy lineage and
authorized mutation path that supersede the old 12D2 dependency. The 12E
contract and preimplementation review are complete. Runtime implementation is
under deterministic proof; its three actions become active only with this
bounded merge.
`WS-XINT-002-06A`; the user started the fixed pre-submit materializer
activation after ART-04B3 and AUTH-12F2 merged. This cross-initiative chunk
activates only `artifact.pre_submit.checker_input.materialize` before ART-04C1.
AUTH-12F3 remains the next AUTH-12 successor and resumes while ART proceeds
through 04C1/04C2 after 06A merges.

## Current review branch

`codex/ws-auth-001-12e-guide-sufficiency`.
`codex/ws-xint-002-06a-pre-submit-materialization`.

## Chunk status

Expand Down Expand Up @@ -185,7 +183,7 @@ bounded merge.
| `WS-AUTH-001-12E` | Merged | `codex/ws-auth-001-12e-guide-sufficiency` | #263 | Three guide-sufficiency actions plus fixed setup-service run PREP merged as `b510bc4f`. |
| `WS-AUTH-001-12F` | Planning split | `codex/ws-auth-001-12f-submission-artifact-policy` | - | Combined contract failed required L1 pre-start review; parent now activates nothing and delegates to 12F1-12F4. |
| `WS-AUTH-001-12F1` | Merged | `codex/ws-auth-001-12f1-submission-policy-foundation` | #286 | Submission-policy PREP, replay, provenance, and audit custody foundation merged as `5a4186cc`; zero activation. |
| `WS-AUTH-001-12F2` | In progress | `codex/ws-auth-001-12f2-manual-submission-policy` | - | Corrected contract passed all required L1 pre-start reviews; governed Project Manager append-only manual-draft create/update cutover is active. |
| `WS-AUTH-001-12F2` | Merged | `codex/ws-auth-001-12f2-manual-submission-policy` | #292 | Governed Project Manager append-only manual-draft create/update cutover merged as `81f281bd`. |
| `WS-AUTH-001-12F3` | Proposed | - | - | Fixed setup-service derivation and asynchronous executor cutover. |
| `WS-AUTH-001-12F4` | Proposed | - | - | Project Manager approval and atomic effective/pre-submit policy chain. |
| `WS-AUTH-001-12G` | Proposed | - | - | Post-submit checker policy approval/correction cutover after 12F4. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| `03` | Activate verifier, scheduler scan, and put resolver. | L1 | Merged |
| `04A` | Activate Project Manager guide ingest. | L1 | Merged/active |
| `04B` | Activate fixed-service guide binding and read. | L1 | Merged/active in PR #245 (`6babf81b`) |
| `06A` | Activate only pre-submit checker-input materialization. | L1 | Hidden ART-04B evidence; must precede 05A |
| `06A` | Activate only pre-submit checker-input materialization. | L1 | Merged ART-04B3/AUTH-12F2 evidence; must precede ART-04C1 and 05A |
| `05A` | Activate initial contributor preparation and durable ready admission. | L1 | 06A plus ART-04A1-04C2 evidence |
| `05B` | Activate fresh human Submission creation plus fixed binding/consumption. | L1 | 05A plus ART-05A/TASK evidence |
| `05C` | Activate checker-remediation submission context. | L1 | 05B plus checker remediation evidence |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Chunk Contract: WS-XINT-002-06A — Pre-Submit Materialization Activation

Parent initiative: `WS-XINT-002` | Risk: L1 | Status: Proposed after ART-04B
Parent initiative: `WS-XINT-002` | Risk: L1 | Status: Active after merged ART-04B3 and AUTH-12F2

## Goal

Expand All @@ -9,8 +9,17 @@ preparation can become available.

## Allowed Files

AUTH catalogue/matrix/composition, ART authorization adapter/resource facts,
pre-submit checker materialization integration, focused tests/docs/CI evidence.
- `backend/app/modules/authorization/catalogue.py`
- `backend/app/modules/authorization/runtime.py`
- `backend/app/modules/authorization/kernel.py`
- `backend/app/modules/authorization/prepared.py`
- `backend/app/modules/audit/schemas.py`
- `backend/app/modules/artifacts/authorization.py`
- `backend/app/modules/artifacts/submission_materialization.py`
- focused authorization/materialization tests under `backend/tests/`
- canonical AUTH/ART/XINT status, chunk, specification, and review evidence
- hosted CI metadata only when required to run the existing gates; the gates
and coverage thresholds may not be weakened

## Not Allowed Changes

Expand All @@ -22,10 +31,21 @@ bindings, human checker authority, generic artifact reads, or new ActionIds.
- only `artifact.pre_submit.checker_input.materialize` changes availability;
- only the fixed pre-submit materializer identity may prepare and consume it;
- authority binds the process-local prepared-bundle/scratch generation,
task/project/guide/locked policy, archive/manifest, checker definition,
exact active assignment identity, task, project,
effective submission-artifact policy, pre-submit checker policy, plan and
catalogue hashes, archive digest and byte count, semantic-manifest hash,
server-selected ArtifactStore storage scheme, request, session, and
transaction facts; no durable admission exists yet;
- denial/replay/stale/cross-resource cases fail before scratch exposure;
- assignment currentness is revalidated from the locked assignment row by the
ART-04C1 caller before it prepares these facts; `TaskAssignment` has no
generation field, so 06A must not invent a parallel assignment version;
- cheap scalar lineage and digest consistency checks run before authorization
consumption without reading artifact bytes;
- service/action/lifecycle/scope denial occurs during PREP before
`PreparedArtifact.inspect()` or ZIP open; after inspection, final consumption
binds the server-computed semantic manifest and rejects replay or exact-fact
drift before workspace reservation/creation, projected checker facts,
checker dispatch, or provider access;
- prepared handles never enter Celery payloads.

## Verification Commands
Expand All @@ -40,5 +60,8 @@ reuse/dedup, test delta, and docs.

## Human Review Focus And Stop Conditions

Confirm this one activation precedes XINT-05A. Stop before contributor or
post-submit action activation.
Confirm this one activation follows merged ART-04B3 and AUTH-12F2 and unblocks
ART-04C1. Stop before contributor preparation/admission, `Submission`,
post-submit materialization, checker-output, review-packet, or generic-read
activation. After 06A merges, ART may execute 04C1 then 04C2 while AUTH resumes
at 12F3; neither successor is part of this chunk.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Internal Review: WS-XINT-002-06A

## Result

Local L1 review passes after repair. Hosted database-backed tests, full
coverage, and external review remain required on the exact PR head.

## Blocking findings resolved

- Architecture/product review confirmed that immutable `TaskAssignment.id` is
the assignment lineage token; replacement creates a new row/UUID and ART-04C1
must lock the current active row before PREP. No parallel generation was
invented.
- Security, QA, and senior review found that the original request had already
been ZIP-inspected before authorization. The final design uses two-stage PREP:
service/action/lifecycle/scope and scalar facts lock before inspection, then
the same handle consumes the server-computed semantic manifest before scratch
reservation or checker execution.
- QA found that manifest/change-gate equality alone did not prove the manifest
came from the supplied inspection. The materializer now rebuilds the canonical
manifest before final consumption and denies drift without touching authority
or workspace.
- Security found missing bounded audit coordinates. Allowed decisions now carry
the exact resource-context digest plus project and prepared-generation
coordinates.
- Docs and product review found stale planned/owner wording. Canonical specs,
operations, architecture, custody, chunk maps, and status now agree.
- Test-delta and reuse review found weak mocks and swapped protocol types. Tests
now assert exact adapter arguments, pre-inspection ordering, same-handle
two-stage flow, audit coordinates, manifest drift, replay, and real PREP
behavior; the protocol matches prepare/final-consume types.

## Final reviewer results

- Architecture: pass with low ART-04C1 composition risk.
- Security/auth: pass with low ART-04C1 composition risk.
- Product/ops: pass with low ART-04C1 assignment-lock risk.
- QA: pass with low risk after manifest-drift repair.
- Senior engineering: pass with low risk after interface cleanup.
- CI integrity: pass with hosted database/coverage proof required.
- Reuse/dedup: pass after reusing the shared artifact PREP adapter.
- Test delta: pass after strengthened two-stage and audit tests.
- Docs: pass after runtime and custody reconciliation.

## Local verification

- Ruff and Ruff format on all touched backend/test files: passed.
- Focused catalogue, real PREP, adapter, two-stage materialization, denial,
manifest-drift, and default-execution tests: 28 passed, 1 deselected.
- Lightweight agent gates: 11 passed.
- Stale Workstream wording, stale AUTH docs, stale ART contracts, Markdown links,
and `git diff --check`: passed.
- Full database-backed coverage is intentionally assigned to hosted Backend CI;
the local shell has no `WORKSTREAM_TEST_DATABASE_URL`.

## Scope confirmation

Only `artifact.pre_submit.checker_input.materialize` changes availability. No
contributor preparation, durable admission, Submission, post-submit,
checker-output, reviewer-packet, generic-read, route, migration, or Celery
payload capability is activated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# PR Trust Bundle: WS-XINT-002-06A

## Goal

Activate exactly `artifact.pre_submit.checker_input.materialize` for
`workstream.artifact.materializer`, fail closed before private contributor
bytes reach inspection/scratch/checkers, and unblock ART-04C1 without activating
contributor submission authority.

## Design

- Reuse the existing opaque, process-local, single-use, transaction-bound PREP
service and fixed-service identity matrix.
- Prepare before ZIP inspection using exact task, immutable assignment UUID,
project/guide/snapshot, locked-policy, plan/catalogue, prepared-generation,
archive, and storage-scheme facts.
- Consume the same handle after inspection with the server-computed canonical
semantic-manifest hash, before scratch reservation or checker execution.
- Persist bounded authorization evidence with the full resource-context digest
and project/prepared-generation coordinates.

## Scope

The catalogue changes one planned action to active `WS-XINT-002-06A` custody.
No new ActionId, PermissionId, service identity, migration, alternate evaluator,
serializable handle, public route, generic artifact read, durable admission,
Submission, post-submit checker, checker output, or review capability is added.

## Proof

- Catalogue/service tests prove the sole availability transition and fixed
materializer identity.
- Real PREP tests prove exact preflight/final binding, transaction ownership,
replay denial, cross-resource mismatch denial, and audit digest/coordinates.
- Materialization tests prove preparation denial precedes inspection, canonical
manifest drift precedes final consumption/workspace, and final consumption
precedes scratch/checker execution.
- No test, CI gate, coverage threshold, lint rule, or workflow was weakened.
- Local focused tests passed; hosted Backend and Agent Gates remain mandatory on
the exact PR head.

## Delivery order

After this PR merges, ART may run 04C1 then 04C2. AUTH can concurrently resume
at 12F3. ART-04C1 owns production composition and the locked-current-assignment
revalidation immediately before PREP.

## Reviewer result

Architecture, security, product/ops, QA, senior engineering, CI integrity,
reuse/dedup, test-delta, and docs reviewers pass after all valid findings were
repaired. See `WS-XINT-002-06A-internal-review.md`.

## Human review focus

Review the two-stage ordering, exact fixed identity, complete scalar/final fact
binding, audit digest, single action activation, and the explicit ART-04C1
composition boundary. Human approval owns merge.
Loading
Loading