Skip to content

feat(evidence): add bounded WARC resource records - #210

Draft
seonghobae wants to merge 67 commits into
feat/extraction-schema-contractfrom
feat/warc-resource-record-contract
Draft

feat(evidence): add bounded WARC resource records#210
seonghobae wants to merge 67 commits into
feat/extraction-schema-contractfrom
feat/warc-resource-record-contract

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Buyer-visible boundary

This is the next bounded slice of #199, stacked on extraction-schema work owned by #209.

The buyer-facing evidence lane exposes one reusable immutable WARC 1.1 resource record boundary over already-authorized bytes. The record binds its target URI to independently verified provenance, enforces bounded UUID/date/content-type/payload inputs, computes a lowercase SHA-256 block digest, emits deterministic WARC bytes, preserves explicit complete-versus-truncated capture state, and validates line-oriented target URI presentation before serialization.

Fresh stack truth

  • protected main: exact b05d5acca82b9d916ada2c8e82f59f92a89817e1;
  • live prerequisite feat(evidence): define schema-bound extraction contract #209 (feat/extraction-schema-contract): exact b35d739017aa5d361b605be48045be50b5a35f6f, directly based on current protected main;
  • this PR's contributor head: exact efb5dfae50e2a32e74ac92cf76bdcf252dece98c;
  • GitHub records the live PR base SHA as exact b35d739017aa5d361b605be48045be50b5a35f6f and reports this Draft mergeable;
  • exact base→head ancestry is 67 ahead / 0 behind with merge base equal to the current prerequisite head.

The branch was deliberately realigned to the current prerequisite without force-push or destructive rebase. A first forward merge commit reused the historical child tree; the immediate base→head compare falsified that tree assumption because it removed newer prerequisite/main content. That created defect was repaired forward-only: the branch was rebuilt from the exact current #209 tree plus the child-owned WARC source/tests/dependency/ADR bindings, and lib.rs was adapted against the current extraction-schema/provenance surface. The final base→head tree contains only the ten intended WARC/dependency/ADR files and no .github, MCP, or unrelated current-main deletions.

The current prerequisite tightened ProvenanceRecord::new URL admission. Exact-head CI on predecessor reconstruction head 760d5c30ccdd64b5fe07384dfe877ead4b5290d8 correctly exposed four WARC URI tests that attempted to construct invalid provenance before exercising the WARC target-URI validator. The current head repairs those regressions by supplying a valid unrelated provenance URL only for invalid-target cases; production still validates the WARC target URI before provenance equality, so the intended fail-closed WARC boundary is exercised without weakening provenance.

Current exact-head evidence

For unchanged exact head efb5dfae50e2a32e74ac92cf76bdcf252dece98c:

  • CI run 32833353803: success;
  • Rust contracts job 97756728200: repository contracts, formatting, locked workspace check, full tests, strict Clippy, and rustdoc success;
  • Production coverage job 97756728470: success;
  • the exact coverage verifier reports owned production functions / lines / regions / branches = 100%;
  • exact coverage artifact 9557676841, ZIP SHA-256 456709ceefdf349cd74e4c75dc2da627d564ba693b03321fbae8713c19af56ab;
  • coverage checkout evidence records exact SHA efb5dfae50e2a32e74ac92cf76bdcf252dece98c.

SAST, Security Scan, Manifest V3, model-review, review, or predecessor-head status is not promoted to passing for this exact stacked head unless independently present and current. Current PR discussion contains only the Draft CodeRabbit notice; no independent approval is claimed or inferred.

Test-first repair lineage

Earlier RED/GREEN cycles on this canonical branch repaired timestamp, URI-presentation, bounded-field error semantics, public Rust error integration, explicit WARC truncation state, and bracket general-delimiters in path segments while preserving bracketed IPv6 authority. Those predecessor heads remain historical evidence only.

Safety and truth boundary

This slice does not claim durable PostgreSQL/S3 persistence, tenant retention, legal hold, key rotation, request/response capture, PROV-JSON-LD export, offline replay execution, or live Chromium integration. It does not contact a live origin or grant browser/network/secret/model authority. The caller must supply bytes already authorized by the applicable capture policy; later persistence and policy ports remain separate work under #199.

Protected-main AGENTS.md remains authoritative. No workflow, secret, governance, release, tag, publish, approval, Ready-state, merge, force-push, or destructive-rebase mutation is included.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

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.

1 participant