Skip to content

WS-ART-001: correct guide materialization and extraction plan - #220

Merged
abiorh-claw merged 5 commits into
mainfrom
codex/ws-art-001-03b-extraction-planning
Jul 29, 2026
Merged

WS-ART-001: correct guide materialization and extraction plan#220
abiorh-claw merged 5 commits into
mainfrom
codex/ws-art-001-03b-extraction-planning

Conversation

@Abiorh001

@Abiorh001 Abiorh001 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

PR Trust Bundle: WS-ART-001-03B Planning Correction

Chunk

WS-ART-001-03B-PLAN — planning-only correction before implementation.

Goal

Define the safe path from verified Project Manager guide-source bytes to exact
same-generation sufficiency input without confusing it with contributor ZIPs.

Human-Approved Intent

  • contributors always submit one outer ZIP;
  • Project Managers upload guide items in supported document/data/image formats;
  • v0.1 excludes audio and video;
  • upload stores opaque bytes and performs no synchronous parsing;
  • AUTH later activates only fixed-service guide binding and read.

What Changed And Why

The old 03B contract combined too many boundaries. It is now five executable
PRs: 03B1 -> 03B2 -> 03B3A -> 03B3B -> 03B4 -> AUTH-04B -> 03C.

Design Chosen

Original bytes remain authoritative in ArtifactStore. Existing materialization
and scratch capabilities rehash every full read. Content-derived extraction is
separate from binding/run/generation usage. Canonical extraction is bounded
PostgreSQL processing evidence, not an unapproved provider write. Agent input
is typed, bounded, provenance-linked, and explicitly untrusted.

Alternatives Rejected

Parsing in upload, forcing guides into contributor ZIPs, direct provider access,
a second scratch manager, one large parser PR, image OCR by implication, raw
binary/excerpt agent input, and provider writes under guide-read authority.

Scope Control And Product Behavior

Planning/specification only. Guide items support PDF, DOCX, PPTX, CSV, XLSX,
Markdown, text, JSON, and PNG/JPEG/WebP metadata. Audio/video and ordinary ZIP
guide semantics are unsupported. Artifact/extraction failures create redacted
setup_blocked outcomes, not guide-insufficiency decisions.

Acceptance Proof, Test Delta, And CI Integrity

  • diff, Markdown links, stale artifact contracts, and stale wording: PASS;
  • no executable CI/test/package delta;
  • every future contract names focused tests, Ruff, 90% changed-subsystem
    coverage, the 78% repository gate, Agent Gates, and hosted Backend checks;
  • 03B3B requires a human-approved, CI-enforced parser dependency allowlist.

Reviewer Results

All nine tracks passed after repairs. Details are in
WS-ART-001-03B-PLAN-internal-review-evidence.md.

External Review

Pending CodeRabbit and hosted GitHub checks after the PR opens.

Remaining Risks And Follow-Up

  • 03B3B cannot start until exact pinned parser dependencies are approved.
  • Images provide metadata only; image text requires a future OCR capability.
  • Immediate post-merge implementation successor is 03B1.

Human Review Focus

Confirm the upload separation, five-PR split, AUTH-04B placement, PostgreSQL
canonical extraction records, v0.1 format boundary, and dependency approval gate.

Human Merge Ownership

A maintainer must explicitly approve this planning PR. Merge starts no
implementation automatically.

Summary by CodeRabbit

  • Documentation
    • Clarified guide-source uploads versus contributor submissions, including how images are treated and which ZIP types are excluded.
    • Expanded the guide processing plan by splitting the prior “03B” flow into a staged sequence (03B1–03B4) with explicit materialization, classification, isolated extraction, and same-generation continuation.
    • Refined authorization activation boundaries for guide binding/read and ensured extraction cannot imply write/provider privileges.
    • Specified deterministic, no-network extraction with strict format support, bounded limits, durable extraction provenance, and stable “setup_blocked” outcomes (using redacted incident codes) for corrupt/unsupported/truncated inputs.

@coderabbitai

coderabbitai Bot commented Jul 29, 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: 24f41c94-d0ed-4544-8e0e-bad1aa4b383a

📥 Commits

Reviewing files that changed from the base of the PR and between 60ec321 and 121b057.

📒 Files selected for processing (5)
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/DECISIONS.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/PLAN.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/REVIEW_LOG.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/reviews/WS-ART-001-03B-PLAN-external-review-response.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/reviews/WS-ART-001-03B-PLAN-pr-trust-bundle.md
📝 Walkthrough

Walkthrough

This planning-only change decomposes ART-03B into five ordered contracts covering guide binding, materialization, extraction, and Celery sufficiency continuation. It also defines canonical extraction provenance, failure outcomes, supported formats, and AUTH-04B fixed-service activation requirements.

Changes

Guide-source planning correction

Layer / File(s) Summary
03B planning decomposition
.agent-loop/.../{CHUNK_MAP.md,PLAN.md,STATUS.md}, .agent-loop/.../chunks/*03B*, .agent-loop/.../reviews/*
The monolithic 03B plan is split into ordered 03B1–03B4 contracts with planning, review, evidence, and gating requirements.
Binding and materialization contracts
.agent-loop/.../{DECISIONS.md,DISCOVERY.md,INTENT.md}, .agent-loop/.../chunks/{*03B1*,*03B2*}
Guide bindings, setup-generation fencing, verified reads, integrity checks, format classification, and supported source boundaries are specified.
Extraction and sufficiency continuation
.agent-loop/.../{DECISIONS.md,PLAN.md}, .agent-loop/.../chunks/{*03B3A*,*03B3B*,*03B4*,*03C*}, docs/spec_artifact_storage_service.md
Isolated extraction, approved complex-format handling, immutable PostgreSQL provenance, untrusted extracted content, and same-generation Celery consumption are documented.
AUTH activation and operational outcomes
.agent-loop/.../{AUTH_HANDOFF.md,DECISIONS.md,RISKS.md}, .agent-loop/.../chunks/WS-XINT-002-04B-*
AUTH-04B activation is limited to fixed guide actions after complete split-03B evidence, with stable blocked outcomes and documented extraction risks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: abiorh-claw

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the planning-only correction for guide materialization and extraction.
Description check ✅ Passed The description covers the required intent, change, design, scope, evidence, reviews, and risks, though a few template subsections are condensed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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-art-001-03b-extraction-planning

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.

@abiorh-claw
abiorh-claw self-requested a review July 29, 2026 07:25
abiorh-claw
abiorh-claw previously approved these changes Jul 29, 2026

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

🤖 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-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B4-guide-sufficiency-continuation.md:
- Around line 56-58: Align all listed verification recipes with the
repository-wide 78% coverage requirement: in
.agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B4-guide-sufficiency-continuation.md
lines 56-58, replace the pytest --cov-fail-under=0 option with an explicit
coverage report --fail-under=78 check while retaining the scoped 90% report; in
.agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B3A-extraction-framework-text.md
lines 39-40 and
.agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B3B-complex-format-extractors.md
lines 45-47, add the same repository-wide 78% coverage check.

In @.agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/DECISIONS.md:
- Around line 389-403: Update the 03B3A and 03B3B contracts to define concrete
values for every extraction limit named by D42, identify where each limit is
enforced, and specify stable outcomes for each breach. Add boundary tests
covering each configured limit, including input/output size, container, time,
memory, and document limits, plus cleanup and executor-loss behavior.

In @.agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/PLAN.md:
- Around line 528-536: The terminal extraction outcome section must define
stable public mappings for every canonical status, including explicit redacted
codes and recovery behavior for ambiguous and limit_exceeded alongside
guide_artifact_incident, guide_source_format_unsupported,
guide_source_malformed, and guide_source_extraction_failed. Update the
ProjectSetupRun.status=setup_blocked contract so API, Operator, and Project
Manager handling consistently uses these mappings, while preserving the
distinction that none is a guide-insufficiency decision.

In
@.agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/chunks/WS-XINT-002-04B-guide-read-binding-activation.md:
- Around line 5-6: Update the wording in the guide binding activation
description to hyphenate “guide-read” consistently, using “fixed-service guide
binding and guide-read actions” or equivalent without changing the activation
conditions or ART-03C requirement.

In `@docs/spec_artifact_storage_service.md`:
- Around line 1223-1239: Update the artifact extraction/report flow description
to require a second full lineage validation immediately before report
persistence. Explicitly state that project, guide, source snapshot, setup run
and generation, exact binding, content integrity, and extraction provenance are
revalidated before committing the report.
🪄 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: cdf94321-bcdb-4f51-b816-8a151e7fab79

📥 Commits

Reviewing files that changed from the base of the PR and between 8bb0094 and fa9d5dc.

📒 Files selected for processing (21)
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/AUTH_HANDOFF.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/CHUNK_MAP.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/DECISIONS.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/DISCOVERY.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/INTENT.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/PLAN.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/REVIEW_LOG.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/RISKS.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/STATUS.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B-guide-source-binding-materialization.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B1-guide-binding-generation.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B2-guide-materialization-classification.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B3A-extraction-framework-text.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B3B-complex-format-extractors.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B4-guide-sufficiency-continuation.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03C-guide-source-cutover-continuation.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/reviews/WS-ART-001-03B-PLAN-external-review-response.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/reviews/WS-ART-001-03B-PLAN-internal-review-evidence.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/reviews/WS-ART-001-03B-PLAN-pr-trust-bundle.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/chunks/WS-XINT-002-04B-guide-read-binding-activation.md
  • docs/spec_artifact_storage_service.md

Comment thread .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/PLAN.md Outdated
Comment thread docs/spec_artifact_storage_service.md
abiorh-claw
abiorh-claw previously approved these changes Jul 29, 2026

@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 @.agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/DECISIONS.md:
- Around line 459-469: Extend the exhaustive ProjectSetupRun.status mapping in
DECISIONS.md to cover D42’s timeout, memory termination, and executor-loss
failures, explicitly defining stable public statuses plus whether each is
retryable or requires a corrected/new snapshot; preserve bounded incident
references and the rule that limits are not raised inline. In
reviews/WS-ART-001-03B-PLAN-external-review-response.md, update the completion
claim only after these mappings and recovery semantics are documented.
🪄 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: 932dc04a-5b70-4c11-92bb-fa13aca54db1

📥 Commits

Reviewing files that changed from the base of the PR and between fa9d5dc and 60ec321.

📒 Files selected for processing (11)
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/DECISIONS.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/PLAN.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/REVIEW_LOG.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B2-guide-materialization-classification.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B3A-extraction-framework-text.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B3B-complex-format-extractors.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B4-guide-sufficiency-continuation.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/reviews/WS-ART-001-03B-PLAN-external-review-response.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/reviews/WS-ART-001-03B-PLAN-pr-trust-bundle.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/chunks/WS-XINT-002-04B-guide-read-binding-activation.md
  • docs/spec_artifact_storage_service.md
🚧 Files skipped from review as they are similar to previous changes (8)
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B2-guide-materialization-classification.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B4-guide-sufficiency-continuation.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B3B-complex-format-extractors.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/reviews/WS-ART-001-03B-PLAN-pr-trust-bundle.md
  • .agent-loop/initiatives/WS-XINT-002-art-auth-end-to-end/chunks/WS-XINT-002-04B-guide-read-binding-activation.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/chunks/WS-ART-001-03B3A-extraction-framework-text.md
  • docs/spec_artifact_storage_service.md
  • .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/PLAN.md

Comment thread .agent-loop/initiatives/WS-ART-001-immutable-artifact-storage/DECISIONS.md Outdated
@abiorh-claw
abiorh-claw merged commit e6573aa into main Jul 29, 2026
3 checks passed
@abiorh-claw
abiorh-claw deleted the codex/ws-art-001-03b-extraction-planning branch July 29, 2026 08:13
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