Skip to content

release: verify sealed SBOM evidence before attestation - #54

Draft
seonghobae wants to merge 31 commits into
mainfrom
feature/sealed-release-evidence-verifier
Draft

release: verify sealed SBOM evidence before attestation#54
seonghobae wants to merge 31 commits into
mainfrom
feature/sealed-release-evidence-verifier

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • ship a credential-free verifier for one sealed EgressWeave release-evidence set;
  • require exactly one canonical wheel, one source distribution, paired CycloneDX 1.7 SBOMs, and canonical SHA256SUMS;
  • independently recompute UUIDv5 document identity and exact root-artifact bindings;
  • enforce descriptor-bound path identity, finite reads, strict JSON, repeated digest checks, and deterministic repository/source-bound manifest output;
  • retain the accepted SHA256SUMS snapshot through final manifest issuance so mutation of any accepted file fails closed;
  • create the handoff manifest through an exclusive owner-only descriptor, refuse overwrite/final-path symlinks, durably synchronize it, and rebind the final path to the opened descriptor after writing;
  • document the operator and credential-separation boundary with authoritative APA 7th references;
  • update CHANGELOG.md.

Exact-head scope

  • Original protected-main base and current merge base: 7c4792c06261bafddcfb1e083cb0f1f606f9d6a5.
  • Current protected-main head after PR release: make deterministic CycloneDX evidence attestable #52 integration: b235fac34b75964d63250ed31d65db95f0eb1960.
  • Exact proposed head: b17e8a044704bb98b59970510492c4915d374f5a.

The branch is now diverged from protected main by one integrated commit and remains draft. It is 29 commits ahead and one commit behind. No auditable credential-separated exact-tree integration mechanism is currently available in this repository context, so the branch has not been rebased, merged, force-updated, or retargeted.

Changed paths are limited to CHANGELOG.md, operator documentation, the credential-free verifier, and its tests. No GitHub Actions workflow, release permission, token contract, signing identity, publication job, tag behavior, or protected branch is modified. Distributions and SBOMs remain inert data.

Test-first evidence

Initial exact test-only head 50e0351f4a3f0890b47c6396d1b78f5f08b02c69 produced 32 failures before implementation. Subsequent RED exact heads independently demonstrated path replacement, mutation, bounded-read, parser-recursion, checksum-lifetime, and handoff-output gaps before each fix was added. The final output-boundary RED head a28cfcd82c34a8c28a1d334d0d172e804a846637 produced seven failures before exclusive private output, strict detached encoding, durable synchronization, and descriptor/path rebinding were implemented.

Exact-head verification

Exact head b17e8a044704bb98b59970510492c4915d374f5a passed:

  • Python 3.10–3.13 CI matrix;
  • 697 tests on Python 3.13;
  • 100% production statement and branch coverage over 1,543 statements and 526 branches;
  • Ruff, compile checks, product-guard self-test, and public-docstring contracts;
  • wheel and source-distribution package acceptance and installed-wheel smoke testing;
  • SAST Semgrep;
  • Security Scan.

Every counted run checked out exact head b17e8a044704bb98b59970510492c4915d374f5a with persisted credentials disabled and read-only repository permissions. Predecessor, queued, cancelled, stale, skipped-required, or wrapper-only results are not counted. Exact-head automated review reported no actionable code or documentation defect. There are no submitted reviews or unresolved inline review threads.

Trust boundary

This slice prepares evidence only. It does not sign, publish, create or move tags, claim provenance, or grant a pull-request-controlled tree access to id-token: write, attestations: write, package publication, release, or repository-write credentials.

Protected SBOM attestation and publication integration remains tracked in ContextualWisdomLab/.github#783; repository-level completion remains tracked in #46. A future credentialed job must consume only a sealed copy, independently recheck identity, cardinality, and digests, and never rebuild or execute caller-controlled source under a write identity.

Remaining gates

Before integration or merge, require:

  • an auditable credential-separated mechanism that constructs the exact combined tree with current protected main without publishing it first;
  • independent verification of that exact combined tree;
  • exact-current-head CI, SAST Semgrep, Security Scan, package acceptance, and automated review after integration;
  • qualifying independent approval anchored to the unchanged integrated exact head;
  • branch protection and repository-policy satisfaction.

Progresses #46.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7583f3d5-7d43-423f-8dc5-f44b849a9c8c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@opencode-agent @cwl-noema-review Please independently review exact current head beceb436fbb2baaf94b5aec71dc4206cdc8c9e9e. Verify strict evidence cardinality and size bounds, checksum canonicalization and exact digest parity, RFC 8259 duplicate/non-finite rejection, CycloneDX 1.7 envelope enforcement, independently recomputed canonical RFC UUIDv5 identity, exact root-artifact filename/hash/purl/bom-ref binding, public and CLI symlink-boundary preservation, deterministic repository/source-bound manifest output, credential-free workflow scope, 26-test local slice evidence, beginner-readable docstrings, and APA 7th operator references. Treat queued CI and the open sequencing dependency on PR #52 as incomplete. Submit APPROVE only if no blocker remains.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

@seonghobae I will review pull request #54 against exact head beceb436fbb2baaf94b5aec71dc4206cdc8c9e9e.

I will treat queued CI and the open dependency on #52 as incomplete. I will not approve unless all requested checks pass and no blocker remains.

⚠️ Action not completed

Review rate limited.

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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@opencode-agent @cwl-noema-review Please independently review exact current head ee93da2a0e68176c32fae65a139212d4cbe15a2b. Verify strict evidence cardinality and size bounds, checksum canonicalization and exact digest parity, RFC 8259 duplicate/non-finite rejection, CycloneDX 1.7 envelope enforcement, independently recomputed canonical RFC UUIDv5 identity, exact root-artifact filename/hash/purl/bom-ref binding, public and CLI symlink-boundary preservation, deterministic repository/source-bound manifest output, credential-free workflow scope, beginner-readable docstrings, APA 7th operator references, and the Ruff correction after failed exact head beceb436fbb2baaf94b5aec71dc4206cdc8c9e9e. Treat in-progress CI/SAST and the open sequencing dependency on PR #52 as incomplete. Submit APPROVE only if no blocker remains.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

@seonghobae I will review PR #54 at exact head ee93da2a0e68176c32fae65a139212d4cbe15a2b.

I will verify the evidence contract, symlink boundaries, manifest determinism, credential-free scope, documentation, and the Ruff correction. I will treat in-progress CI/SAST and the open dependency on PR #52 as incomplete. I will not approve unless all required checks pass and no valid blocker remains.

⚠️ Action not completed

Review rate limited.

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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please perform a full review of exact current head ee93da2a0e68176c32fae65a139212d4cbe15a2b; the earlier beceb436fbb2baaf94b5aec71dc4206cdc8c9e9e request is superseded. Verify exact five-file evidence cardinality, symlink and size boundaries, canonical SHA256SUMS, strict RFC 8259 and CycloneDX 1.7 parsing, independently recomputed UUIDv5 and root-artifact bindings, deterministic repository/source manifest output, unchanged credential boundary, and completed exact-head CI, package, SAST, and security results. Report concrete findings or state that no actionable finding remains.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Checkout identity =='
git rev-parse HEAD
git status --short
git diff --name-status 7c4792c06261bafddcfb1e083cb0f1f606f9d6a5..HEAD

echo '== Verifier outline =='
ast-grep outline src/egressweave/release_evidence.py --items all --view expanded

echo '== Test outlines =='
ast-grep outline tests/test_sealed_release_evidence.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_symlink_boundary.py --items all --view expanded

echo '== Workflow changes in PR range =='
git diff --name-only 7c4792c06261bafddcfb1e083cb0f1f606f9d6a5..HEAD -- .github

echo '== GitHub PR and checks =='
gh pr view 54 --repo ContextualWisdomLab/EgressWeave \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup,url

Length of output: 15466


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== release_evidence.py =='
nl -ba src/egressweave/release_evidence.py | sed -n '1,430p'

echo '== Evidence contract tests, part 1 =='
nl -ba tests/test_sealed_release_evidence.py | sed -n '1,245p'

echo '== Evidence contract tests, part 2 =='
nl -ba tests/test_sealed_release_evidence.py | sed -n '246,450p'

echo '== Symlink regression =='
nl -ba tests/test_sealed_release_evidence_symlink_boundary.py

echo '== Operator document =='
nl -ba docs/sealed-release-evidence.md | sed -n '1,500p'

echo '== Changelog change =='
git diff --unified=80 7c4792c06261bafddcfb1e083cb0f1f606f9d6a5..HEAD -- CHANGELOG.md

echo '== Current exact-head check states =='
gh pr view 54 --repo ContextualWisdomLab/EgressWeave \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup \
  --jq '{headRefOid, isDraft, mergeStateStatus, checks: [.statusCheckRollup[] | select(.status != "COMPLETED" or (.conclusion != "SUCCESS" and .conclusion != "SKIPPED")) | {name,workflowName,status,conclusion,detailsUrl}]}'

Length of output: 1406


🏁 Script executed:

#!/bin/bash
set -euo pipefail

numbered() {
  awk '{ printf "%6d\t%s\n", NR, $0 }' "$1"
}

echo '== release_evidence.py =='
numbered src/egressweave/release_evidence.py

echo '== Evidence contract tests =='
numbered tests/test_sealed_release_evidence.py

echo '== Symlink regression =='
numbered tests/test_sealed_release_evidence_symlink_boundary.py

echo '== Operator document =='
numbered docs/sealed-release-evidence.md

echo '== Changelog change =='
git diff --unified=80 7c4792c06261bafddcfb1e083cb0f1f606f9d6a5..HEAD -- CHANGELOG.md

echo '== Current exact-head non-success checks =='
gh pr view 54 --repo ContextualWisdomLab/EgressWeave \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup \
  --jq '{headRefOid, isDraft, mergeStateStatus, checks: [.statusCheckRollup[] | select(.status != "COMPLETED" or (.conclusion != "SUCCESS" and .conclusion != "SKIPPED")) | {name,workflowName,status,conclusion,detailsUrl}]}'

Length of output: 53843


@seonghobae I reviewed exact head ee93da2a0e68176c32fae65a139212d4cbe15a2b.

I found no actionable code or documentation defect.

The changed-path scope matches the stated five files. No GitHub Actions workflow changed.

The verifier enforces the requested evidence boundary. It rejects unsafe directories and entries. It requires the exact five-file set. It bounds distribution, SBOM, and checksum sizes. It enforces canonical SHA256SUMS syntax, ordering, completeness, and digest parity. It rejects duplicate JSON names and non-standard JSON numeric constants. It verifies the CycloneDX 1.7 envelope, recomputes the UUIDv5 serial number, and validates the root artifact filename, digest, purl, and bom-ref.

The test suite statically covers the public and CLI paths, deterministic manifest output, cardinality, checksum ambiguity, JSON ambiguity, SBOM identity and artifact bindings, and the public evidence-directory symlink boundary.

The operator document accurately describes the credential-free scope, required later credentialed checks, explicit non-claims, bounds, and references. The changelog entry matches the implementation.

The current GitHub status prevents approval. The Python 3.10–3.13 matrix, package build, Semgrep, and Security Scan checks succeeded on this exact head. However, Strix Security Scan / strix remains IN_PROGRESS. The PR is also draft and has merge status BLOCKED.

No approval is appropriate until strix completes successfully and the remaining repository merge gates are satisfied.

⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 52 minutes.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@opencode-agent @cwl-noema-review Please independently review exact current head e637b3c147ffbbd27a8757ee3118f3b47d7acc96. Treat every predecessor-head request or verdict as superseded. Verify strict five-file evidence cardinality and finite bounds; descriptor-to-current-path regular-file identity; stable checksum and SBOM byte snapshots bracketed by bounded digests; final complete-payload rehash after semantic verification; canonical SHA256SUMS; RFC 8259 duplicate and non-finite rejection; exact CycloneDX 1.7 envelope; independently recomputed canonical RFC UUIDv5 identity; exact root artifact filename, hash, purl, and bom-ref binding; deterministic repository/source-bound manifest output; credential-free workflow scope; six-file PR scope with no workflow changes; CHANGELOG.md hardening evidence; and exact-head CI, package acceptance, SAST, Security Scan, 681-test, and 100% statement/branch coverage results. Submit concrete findings or an exact-head verdict. Do not reuse predecessor-head analysis, and do not treat draft status, rate limiting, or the sequencing dependency on PR #52 as successful review evidence.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@opencode-agent @cwl-noema-review Please independently review exact current head e637b3c147ffbbd27a8757ee3118f3b47d7acc96. Treat every earlier-head request or verdict as superseded. Verify descriptor-to-path device/inode binding, symlink and non-regular-file rejection, streamed size bounds, exact parsed SHA256SUMS and SBOM byte snapshots bracketed by bounded digests, final complete-payload rehash before manifest issuance, exact five-file cardinality, strict RFC 8259 and CycloneDX 1.7 parsing, independently recomputed UUIDv5 and root-artifact bindings, deterministic repository/source manifest output, unchanged credential boundary, RED evidence at adedffe3ff6195dfdc9db2601218a65a30bf4a87, and exact-head CI/package/SAST/security success. Submit concrete findings or an exact-head verdict; do not reuse predecessor-head analysis.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='e637b3c147ffbbd27a8757ee3118f3b47d7acc96'
repo='ContextualWisdomLab/EgressWeave'

echo '== Local identity and PR scope =='
printf 'HEAD: '; git rev-parse HEAD
git status --short
git diff --name-status "${base}..${head}"
echo '-- workflow paths changed --'
git diff --name-only "${base}..${head}" -- .github

echo '== GitHub PR identity and checks =='
gh pr view 54 --repo "${repo}" \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup,url \
  --jq '{url,headRefOid,isDraft,mergeStateStatus,checks:[.statusCheckRollup[]|{name,workflowName,status,conclusion,detailsUrl}]}'

echo '== Production module structure =='
ast-grep outline src/egressweave/release_evidence.py --items all --view expanded

echo '== Production module: bounded reads, descriptor identity, parsing, validation, manifest =='
nl -ba src/egressweave/release_evidence.py | sed -n '1,520p'

echo '== Evidence contract regression tests =='
ast-grep outline tests/test_sealed_release_evidence.py --items all --view expanded
nl -ba tests/test_sealed_release_evidence.py | sed -n '1,520p'

echo '== Snapshot and symlink boundary regression tests =='
nl -ba tests/test_sealed_release_evidence_snapshot_boundary.py
nl -ba tests/test_sealed_release_evidence_symlink_boundary.py

echo '== Operator documentation =='
nl -ba docs/sealed-release-evidence.md | sed -n '1,520p'

echo '== Changelog diff at requested head =='
git diff --unified=100 "${base}..${head}" -- CHANGELOG.md

Length of output: 11443


🏁 Script executed:

#!/bin/bash
set -euo pipefail

numbered() {
  awk '{ printf "%6d  %s\n", NR, $0 }' "$1"
}

echo '== release_evidence.py =='
numbered src/egressweave/release_evidence.py

echo '== test_sealed_release_evidence.py =='
numbered tests/test_sealed_release_evidence.py

echo '== test_sealed_release_evidence_snapshot_boundary.py =='
numbered tests/test_sealed_release_evidence_snapshot_boundary.py

echo '== test_sealed_release_evidence_symlink_boundary.py =='
numbered tests/test_sealed_release_evidence_symlink_boundary.py

echo '== docs/sealed-release-evidence.md =='
numbered docs/sealed-release-evidence.md

echo '== CHANGELOG.md range diff =='
git diff --unified=100 \
  7c4792c06261bafddcfb1e083cb0f1f606f9d6a5..e637b3c147ffbbd27a8757ee3118f3b47d7acc96 \
  -- CHANGELOG.md

echo '== Completed CI log: tests, package acceptance, coverage =='
gh run view 31015751478 --repo ContextualWisdomLab/EgressWeave --log 2>&1 \
  | grep -Ei -C 2 '681 passed|passed.*test|coverage|TOTAL|100%|wheel|sdist|Ruff|compileall' \
  || true

echo '== Completed required-review log: coverage evidence =='
gh run view 31015741601 --repo ContextualWisdomLab/EgressWeave --log 2>&1 \
  | grep -Ei -C 2 'coverage|1496|516|100%|release.evidence' \
  || true

Length of output: 210041


@seonghobae I completed an independent review of exact head e637b3c147ffbbd27a8757ee3118f3b47d7acc96.

I found no actionable implementation or documentation defect.

The changed range contains exactly the six stated paths. It contains no .github workflow change.

src/egressweave/release_evidence.py enforces the exact five-file set and finite size limits. It rejects symlinked directories, symlinked entries, nested entries, non-files, missing files, and extra files.

The verifier binds each hash read to a current regular-file descriptor. It compares device and inode identity. It brackets checksum and SBOM byte snapshots with bounded pre-read and post-read digests. It rehashes the four distribution and SBOM payloads after semantic verification.

The checksum parser enforces ASCII, LF termination, canonical syntax, filename ordering, uniqueness, completeness, and exact digest parity.

The SBOM parser rejects duplicate JSON names and non-finite numeric tokens. The verifier enforces the exact CycloneDX 1.7 envelope. It independently recomputes the canonical UUIDv5 identity. It verifies the paired artifact filename, SHA-256, PyPI purl, and bom-ref.

The regression tests cover public evidence-directory symlinks, descriptor metadata failures, stale pre-read and post-read digests, and mutation after initial digest capture. The manifest is deterministic and binds the fixed repository and a lowercase 40-character source SHA.

The operator document states the credential-free trust boundary and explicit non-claims. It includes finite limits, operator procedure, and APA-style primary-source references. CHANGELOG.md records the descriptor, stable-snapshot, and final-rehash hardening.

Exact-head CI evidence shows:

  • Python 3.10–3.13 checks passed.
  • 681 tests passed.
  • 1,496 statements and 516 branches have 100% coverage.
  • Ruff and compileall passed.
  • Wheel and source-distribution acceptance passed.
  • Installed-wheel smoke testing passed.
  • SAST Semgrep and Security Scan passed.

At inspection time, the separate strix check was still IN_PROGRESS. Therefore, the code review verdict is clear, but the complete check set is not yet green. I cannot give an all-gates-passed approval verdict until that check completes successfully.

⚠️ Action not completed

Review rate limited.

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 commented Aug 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='e637b3c147ffbbd27a8757ee3118f3b47d7acc96'
repo='ContextualWisdomLab/EgressWeave'

echo '== Checkout identity and scope =='
git rev-parse HEAD
git status --short
git diff --name-status "$base..$head"
echo
echo '== Verifier structure =='
ast-grep outline src/egressweave/release_evidence.py --items all --view expanded
echo
echo '== Regression-test structure =='
ast-grep outline tests/test_sealed_release_evidence.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_snapshot_boundary.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_symlink_boundary.py --items all --view expanded
echo
echo '== Workflow changes in exact range =='
git diff --name-only "$base..$head" -- .github
echo
echo '== Exact-head PR metadata and checks =='
gh pr view 54 --repo "$repo" --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup,url
echo
echo '== Check runs associated with requested head =='
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name, .status, (.conclusion // "null"), .html_url] | `@tsv`'
echo
echo '== RED commit and test-only scope =='
git show --no-patch --format='commit=%H%nauthor=%an%ndate=%cI%nsubject=%s' adedffe3ff6195dfdc9db2601218a65a30bf4a87
git diff-tree --no-commit-id --name-status -r adedffe3ff6195dfdc9db2601218a65a30bf4a87

Length of output: 21598


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Verifier implementation =='
nl -ba src/egressweave/release_evidence.py | sed -n '1,460p'
echo
echo '== Primary evidence-contract tests =='
nl -ba tests/test_sealed_release_evidence.py | sed -n '1,470p'
echo
echo '== Snapshot-boundary regressions =='
nl -ba tests/test_sealed_release_evidence_snapshot_boundary.py | sed -n '1,260p'
echo
echo '== Symlink-boundary regression =='
nl -ba tests/test_sealed_release_evidence_symlink_boundary.py | sed -n '1,180p'
echo
echo '== Operator guidance and changelog diff =='
nl -ba docs/sealed-release-evidence.md | sed -n '1,520p'
git diff --unified=80 7c4792c06261bafddcfb1e083cb0f1f606f9d6a5..e637b3c147ffbbd27a8757ee3118f3b47d7acc96 -- CHANGELOG.md
echo
echo '== RED commit test diff =='
git diff --unified=100 adedffe3ff6195dfdc9db2601218a65a30bf4a87^ adedffe3ff6195dfdc9db2601218a65a30bf4a87 -- tests/test_sealed_release_evidence_snapshot_boundary.py
echo
echo '== RED commit check runs =='
gh api 'repos/ContextualWisdomLab/EgressWeave/commits/adedffe3ff6195dfdc9db2601218a65a30bf4a87/check-runs?per_page=100' \
  --jq '.check_runs[] | [.name, .status, (.conclusion // "null"), .html_url] | `@tsv`'

Length of output: 1556


🏁 Script executed:

#!/bin/bash
set -euo pipefail

numbered() {
  awk '{ printf "%6d  %s\n", NR, $0 }' "$1"
}

echo '== Verifier implementation =='
numbered src/egressweave/release_evidence.py
echo
echo '== Primary evidence-contract tests =='
numbered tests/test_sealed_release_evidence.py
echo
echo '== Snapshot-boundary regressions =='
numbered tests/test_sealed_release_evidence_snapshot_boundary.py
echo
echo '== Symlink-boundary regression =='
numbered tests/test_sealed_release_evidence_symlink_boundary.py
echo
echo '== Operator guidance =='
numbered docs/sealed-release-evidence.md
echo
echo '== Changelog diff =='
git diff --unified=80 7c4792c06261bafddcfb1e083cb0f1f606f9d6a5..e637b3c147ffbbd27a8757ee3118f3b47d7acc96 -- CHANGELOG.md
echo
echo '== RED commit test diff =='
git diff --unified=100 adedffe3ff6195dfdc9db2601218a65a30bf4a87^ adedffe3ff6195dfdc9db2601218a65a30bf4a87 -- tests/test_sealed_release_evidence_snapshot_boundary.py
echo
echo '== RED commit check runs =='
gh api 'repos/ContextualWisdomLab/EgressWeave/commits/adedffe3ff6195dfdc9db2601218a65a30bf4a87/check-runs?per_page=100' \
  --jq '.check_runs[] | [.name, .status, (.conclusion // "null"), .html_url] | `@tsv`'

Length of output: 78520


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/EgressWeave'
head='e637b3c147ffbbd27a8757ee3118f3b47d7acc96'

echo '== Current exact-head check state =='
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | select(.name == "strix" or .name == "test (3.13)" or .name == "coverage-evidence" or .name == "Build and verify wheel and sdist" or .name == "Semgrep (multi-language SAST)" or .name == "osv-scan" or .name == "trivy-fs") | [.name, .status, (.conclusion // "null"), .html_url] | `@tsv`'

echo
echo '== Python 3.13 job evidence =='
gh run view 31015751478 --repo "$repo" --job 92339228122 --log 2>&1 \
  | grep -E -i '([0-9]+ passed|[0-9]+ tests? passed|coverage|TOTAL|fail|error)' \
  | tail -n 80 || true

echo
echo '== Coverage evidence job =='
gh run view 31015741601 --repo "$repo" --job 92339285274 --log 2>&1 \
  | grep -E -i '(1496|516|100%|coverage|branch|statement|miss|partial|pass|fail|error)' \
  | tail -n 120 || true

echo
echo '== Package, SAST, and Security job conclusions =='
gh run view 31015751478 --repo "$repo" --json conclusion,jobs \
  --jq '.jobs[] | select(.databaseId == 92339228096) | [.name, .conclusion] | `@tsv`'
gh run view 31015749176 --repo "$repo" --json conclusion,jobs \
  --jq '.jobs[] | select(.databaseId == 92339220526) | [.name, .conclusion] | `@tsv`'
gh run view 31015747347 --repo "$repo" --json conclusion,jobs \
  --jq '.jobs[] | select(.databaseId == 92339215053 or .databaseId == 92339215088) | [.name, .conclusion] | `@tsv`'

Length of output: 12003


@seonghobae I reviewed exact head e637b3c147ffbbd27a8757ee3118f3b47d7acc96.

I found no actionable code or documentation defect.

The diff contains the stated six files. No GitHub Actions workflow changed.

The verifier enforces the requested boundary:

  • It rejects symlinked evidence directories, symlinked entries, and non-regular direct-child files.
  • It compares device and inode values for each opened payload descriptor and current path.
  • It applies byte limits while it streams each payload.
  • It brackets parsed SHA256SUMS and SBOM snapshots with bounded digests.
  • It rejects unstable parsed snapshots.
  • It performs a final digest pass for all distributions and SBOMs before it returns a manifest.
  • It requires the exact five-file evidence set.
  • It enforces canonical SHA256SUMS.
  • It rejects duplicate JSON names and non-finite JSON values.
  • It validates the CycloneDX 1.7 envelope, canonical UUIDv5 identity, and exact root-artifact bindings.
  • It emits deterministic repository- and source-bound manifest data outside the verified input directory.

The snapshot-boundary regression commit adedffe3ff6195dfdc9db2601218a65a30bf4a87 added the relevant race tests. Its Python 3.10–3.13 jobs failed. This supports the reported RED state.

The exact-head Python 3.13 job passed 681 tests. It reports 1,496 statements and 516 branches with zero misses and zero partial branches. The Python matrix, package acceptance, Semgrep, OSV, and Trivy checks also succeeded for the requested head.

An exact-head success verdict is not yet available. The strix check remains IN_PROGRESS. The requested CI and security gate evidence is incomplete until that check completes successfully.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@opencode-agent @cwl-noema-review Please independently review exact current head b2f797436cab8ccd1dfdf0cde5e3c3398cdfd763; every earlier review request is superseded. In addition to the existing sealed-evidence contract, verify the test-first resource-limit hardening: exact RED head 06f086696002a4c52d7451014edd4976efadd9ae produced exactly 2 failures and 681 passes because a post-hash oversized SHA256SUMS replacement reached an unbounded path read and deeply nested JSON leaked RecursionError. The current implementation reads checksum and SBOM snapshots through descriptor-bound finite chunks with one over-limit detection byte, normalizes filesystem and recursion failures, preserves before/after digest binding, and adds regression coverage for the new failure paths. Exact current-head CI, Python 3.10–3.13, package acceptance, 684-test suite, 1,514 production statements and 520 branches at 100%, SAST Semgrep, and Security Scan all completed successfully. No workflow file or credential boundary changed. Report concrete actionable findings or state that none remain; do not treat the open PR #52 sequencing dependency or absent qualifying independent approval as satisfied.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='b2f797436cab8ccd1dfdf0cde5e3c3398cdfd763'
red='06f086696002a4c52d7451014edd4976efadd9ae'
repo='ContextualWisdomLab/EgressWeave'

echo '== Checkout and requested-head identity =='
printf 'checkout='; git rev-parse HEAD
git status --short
git cat-file -e "${head}^{commit}"
git show --no-patch --format='head=%H%nparents=%P%nsubject=%s%ncommitted=%cI' "$head"

echo '== Exact changed-path scope =='
git diff --name-status "${base}..${head}"
echo '-- workflow changes --'
git diff --name-only "${base}..${head}" -- .github

echo '== Changed-file outlines =='
ast-grep outline src/egressweave/release_evidence.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_snapshot_boundary.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_symlink_boundary.py --items all --view expanded

echo '== Resource-limit symbols and use sites =='
rg -n -C 5 -P 'read|chunk|limit|RecursionError|JSONDecodeError|OSError|SHA256SUMS|digest|snapshot|descriptor|st_size' \
  src/egressweave/release_evidence.py \
  tests/test_sealed_release_evidence.py \
  tests/test_sealed_release_evidence_snapshot_boundary.py \
  tests/test_sealed_release_evidence_symlink_boundary.py

echo '== Exact source module =='
nl -ba src/egressweave/release_evidence.py

echo '== Exact resource-limit test changes =='
git diff --unified=100 "${red}^..${head}" -- \
  tests/test_sealed_release_evidence.py \
  tests/test_sealed_release_evidence_snapshot_boundary.py \
  tests/test_sealed_release_evidence_symlink_boundary.py \
  src/egressweave/release_evidence.py

echo '== RED commit scope and checks =='
git show --no-patch --format='red=%H%nparents=%P%nsubject=%s%ncommitted=%cI' "$red"
git diff-tree --no-commit-id --name-status -r "$red"
gh api "repos/$repo/commits/$red/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.html_url] | `@tsv`'

echo '== Exact-head PR and check state =='
gh pr view 54 --repo "$repo" \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup,url
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.html_url] | `@tsv`'

Length of output: 63592


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='b2f797436cab8ccd1dfdf0cde5e3c3398cdfd763'
red='06f086696002a4c52d7451014edd4976efadd9ae'
repo='ContextualWisdomLab/EgressWeave'

numbered() {
  awk '{ printf "%6d  %s\n", NR, $0 }' "$1"
}

echo '== Complete production module =='
numbered src/egressweave/release_evidence.py

echo '== New resource-limit regressions =='
numbered tests/test_sealed_release_evidence_resource_limits.py

echo '== Exact implementation and regression diff after RED =='
git diff --unified=120 "${red}^..${head}" -- \
  src/egressweave/release_evidence.py \
  tests/test_sealed_release_evidence_resource_limits.py \
  tests/test_sealed_release_evidence.py \
  tests/test_sealed_release_evidence_snapshot_boundary.py \
  tests/test_sealed_release_evidence_symlink_boundary.py

echo '== RED test-only commit patch and associated checks =='
git show --format=fuller --stat --find-renames "$red"
gh api "repos/$repo/commits/$red/check-runs?per_page=100" \
  --jq '.check_runs[] | {name,status,conclusion,details_url:.details_url}'

echo '== Requested exact-head PR identity and complete check state =='
gh pr view 54 --repo "$repo" \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup,url \
  --jq '{url,headRefOid,isDraft,mergeStateStatus,checks:[.statusCheckRollup[]|{name,workflowName,status,conclusion,detailsUrl}]}'
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | {name,status,conclusion,details_url:.details_url}'

echo '== Exact-head workflow runs and selected test/coverage log evidence =='
gh run list --repo "$repo" --commit "$head" --limit 30 \
  --json databaseId,name,status,conclusion,workflowName,url \
  --jq '.[] | {databaseId,name,workflowName,status,conclusion,url}'

Length of output: 82764


@seonghobae I independently reviewed exact head b2f797436cab8ccd1dfdf0cde5e3c3398cdfd763.

I found no actionable implementation or documentation defect.

The exact range changes seven paths. It includes the new resource-limit regression file. It changes no .github path. The credential boundary is unchanged.

The resource-limit hardening is correct.

  • src/egressweave/release_evidence.py Lines 98-121 reads checksum and SBOM snapshots from a descriptor-bound regular file.
  • Each snapshot read uses finite chunks.
  • The final read permits one extra byte. This detects content above the configured size limit before the verifier materializes an oversized payload.
  • Checksum and SBOM parsing retain the bounded pre-read and post-read digest checks.
  • Line 249 normalizes JSON parser RecursionError as a strict-JSON failure.
  • Line 275 normalizes canonical JSON serialization RecursionError as a strict-JSON failure.
  • The final payload rehash remains in place before manifest return.

tests/test_sealed_release_evidence_resource_limits.py covers the reported RED cases. It rejects an oversized SHA256SUMS replacement after the initial hash. It verifies bounded-snapshot filesystem failure handling. It verifies that deeply nested JSON produces SystemExit instead of leaking RecursionError.

The prior sealed-evidence controls remain present. These controls include exact five-file cardinality, regular-file descriptor and path identity, canonical checksums, strict RFC 8259 parsing, CycloneDX 1.7 envelope checks, recomputed UUIDv5 identity, root-artifact bindings, and deterministic repository/source-bound manifest output.

The RED commit 06f086696002a4c52d7451014edd4976efadd9ae changed only the resource-limit regression test. Its Python 3.10–3.13 jobs failed. This supports the stated test-first failure state.

The exact-head Python 3.10–3.13 matrix, package acceptance, Semgrep, Security Scan, coverage checks, and CodeQL checks are successful.

An all-gates-passed verdict is not available yet. The exact-head strix check is still IN_PROGRESS.

PR #54 is also draft and BLOCKED. This review does not treat the PR #52 sequencing dependency or qualifying independent approval as complete.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@opencode-agent @cwl-noema-review Please independently review exact current head 975a16665236acb1d5583ff84ce36807cc24c1af; every earlier-head request or verdict is superseded. Verify the final sealed-evidence lifetime fix: exact RED head c9bd8811f5c80288a802068c6d676fec6e5bcb37 produced 1 failed and 684 passed across Python 3.10–3.13 because replacing SHA256SUMS after SBOM verification did not prevent manifest issuance. The current implementation retains the canonical descriptor-bound checksum snapshot digest, independently rehashes SHA256SUMS after final distribution/SBOM verification, and fails closed before manifest issuance if any of the five accepted evidence files changed. Also verify the existing cardinality, descriptor identity, finite reads, strict RFC 8259 parsing, CycloneDX 1.7 envelope, independently recomputed UUIDv5 identity, exact artifact bindings, repository/source identity, standalone package API, beginner-readable docstrings, APA 7th guidance, and unchanged credential boundary. Exact current-head CI passed on Python 3.10–3.13 with 685 tests, 1,516 production statements and 522 branches at 100%, package acceptance, SAST Semgrep, and Security Scan. No .github path changed. Report concrete actionable findings or state that none remain; do not treat the open PR #52 sequencing dependency or absent qualifying independent approval as satisfied.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='975a16665236acb1d5583ff84ce36807cc24c1af'
red='c9bd8811f5c80288a802068c6d676fec6e5bcb37'
repo='ContextualWisdomLab/EgressWeave'

echo '== Exact checkout and scope =='
printf 'checkout='; git rev-parse HEAD
git cat-file -e "${head}^{commit}"
git show --no-patch --format='head=%H%nparents=%P%nsubject=%s%ncommitted=%cI' "$head"
git diff --name-status "${base}..${head}"
echo '-- .github changes --'
git diff --name-only "${base}..${head}" -- .github

echo '== Verifier and regression-test outlines =='
ast-grep outline src/egressweave/release_evidence.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_checksum_snapshot.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_resource_limits.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_snapshot_boundary.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_symlink_boundary.py --items all --view expanded

echo '== Final checksum-lifetime implementation and tests =='
rg -n -C 8 -P 'SHA256SUMS|checksum.*(?:digest|snapshot)|(?:digest|snapshot).*checksum|final.*(?:hash|digest)|rehash|manifest|_read|_digest|RecursionError|uuid5|bom-ref|purl' \
  src/egressweave/release_evidence.py \
  tests/test_sealed_release_evidence_checksum_snapshot.py \
  tests/test_sealed_release_evidence.py \
  tests/test_sealed_release_evidence_snapshot_boundary.py \
  tests/test_sealed_release_evidence_resource_limits.py

echo '== Production source =='
nl -ba src/egressweave/release_evidence.py | sed -n '1,560p'

echo '== Final-lifetime regression file =='
nl -ba tests/test_sealed_release_evidence_checksum_snapshot.py

echo '== Delta since final RED commit =='
git diff --unified=100 "${red}^..${head}" -- \
  src/egressweave/release_evidence.py \
  tests/test_sealed_release_evidence_checksum_snapshot.py \
  docs/sealed-release-evidence.md \
  CHANGELOG.md

echo '== API and operator documentation =='
rg -n -C 4 -P 'release_evidence|verify|sealed|SHA256SUMS|credential|APA|References|UUID|manifest' \
  src/egressweave docs/sealed-release-evidence.md
nl -ba docs/sealed-release-evidence.md | sed -n '1,520p'

echo '== Requested-head check runs =='
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.html_url] | `@tsv`'

echo '== PR metadata and status rollup =='
gh pr view 54 --repo "$repo" \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup,url \
  --jq '{url,headRefOid,isDraft,mergeStateStatus,checks:[.statusCheckRollup[]|{name,workflowName,status,conclusion,detailsUrl}]}'

Length of output: 83285


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='975a16665236acb1d5583ff84ce36807cc24c1af'
red='c9bd8811f5c80288a802068c6d676fec6e5bcb37'
repo='ContextualWisdomLab/EgressWeave'

numbered() {
  awk '{ printf "%6d  %s\n", NR, $0 }' "$1"
}

echo '== Evidence selection and descriptor binding =='
sed -n '64,225p' src/egressweave/release_evidence.py

echo '== Final lifetime regression =='
numbered tests/test_sealed_release_evidence_checksum_snapshot.py

echo '== Relevant final implementation diff =='
git diff --unified=100 "${red}^..${head}" -- \
  src/egressweave/release_evidence.py \
  tests/test_sealed_release_evidence_checksum_snapshot.py

echo '== Documentation =='
numbered docs/sealed-release-evidence.md

echo '== Changelog diff =='
git diff --unified=100 "${base}..${head}" -- CHANGELOG.md

echo '== Public package exports and package metadata references =='
rg -n -C 3 -P 'release_evidence|build_evidence_manifest|write_evidence_manifest|python -m egressweave\.release_evidence' \
  src README.md pyproject.toml 2>/dev/null || true

echo '== Exact-head check runs =='
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.html_url] | `@tsv`'

echo '== PR status rollup =='
gh pr view 54 --repo "$repo" \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup,url \
  --jq '{url,headRefOid,isDraft,mergeStateStatus,checks:[.statusCheckRollup[]|{name,workflowName,status,conclusion,detailsUrl}]}'

echo '== Requested RED commit metadata and check results =='
git show --no-patch --format='red=%H%nparents=%P%nsubject=%s' "$red"
gh api "repos/$repo/commits/$red/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null")] | `@tsv`'

Length of output: 71906


@seonghobae I independently reviewed exact head 975a16665236acb1d5583ff84ce36807cc24c1af.

I found no actionable implementation or documentation defect.

The exact range changes eight files. It changes no .github path. The credential boundary is unchanged.

The final lifetime fix is correct.

  • _load_checksums() returns the accepted descriptor-bound SHA256SUMS snapshot digest.
  • build_evidence_manifest() rehashes all four payloads after SBOM validation.
  • It then rehashes SHA256SUMS.
  • It compares that digest with the retained checksum snapshot before it returns a manifest.
  • A mismatch raises SystemExit("SHA256SUMS changed during verification").

tests/test_sealed_release_evidence_checksum_snapshot.py covers the stated RED case. It replaces SHA256SUMS after SBOM verification. It requires manifest issuance to fail.

The existing controls remain present:

  • exact five-file cardinality and canonical wheel/source-distribution pairing;
  • symlink and non-regular-file rejection;
  • descriptor-to-path device and inode binding;
  • finite streamed reads and one-byte over-limit detection;
  • stable checksum and SBOM byte snapshots;
  • strict RFC 8259 duplicate-name, non-finite-value, and recursion-failure rejection;
  • exact CycloneDX 1.7 envelope validation;
  • recomputed canonical UUIDv5 identity;
  • exact filename, digest, purl, bom-ref, and root-component bindings;
  • fixed repository and lowercase 40-character source SHA binding;
  • deterministic external manifest output; and
  • standalone module and CLI support.

The operator document accurately states the credential-free boundary, complete five-file lifetime boundary, operator procedure, explicit non-claims, and APA-style references. The CHANGELOG.md entry records the lifetime hardening.

The exact-head Python 3.10–3.13 jobs, package acceptance, Semgrep, Security Scan, coverage checks, and CodeQL checks succeeded.

The all-gates-passed verdict remains incomplete. The exact-head strix check is still IN_PROGRESS. PR #54 is draft and has merge status BLOCKED. I do not treat the PR #52 sequencing dependency or a qualifying independent approval as complete.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@opencode-agent @cwl-noema-review Please independently review exact current head 4b2f5b896d215f5f26849a586a176a6c52d220fd; every predecessor-head request or verdict is superseded. Verify the final-path output boundary and the full sealed-evidence contract. Exact RED head 471c225c71f6b61bd1c17d484fbaf0c7b02bc98b produced 1 failed and 696 passed on Python 3.10–3.13 because the CLI resolved a dangling final output symlink and created its attacker-selected target. The current implementation resolves only the output parent, preserves the final path component for exclusive no-follow creation, and refuses that symlink without creating its target. Exact current-head CI passed on Python 3.10–3.13 with 697 tests, 1,543 production statements and 526 branches at 100%, Ruff, compileall, product-guard self-test, package acceptance, SAST Semgrep, and Security Scan. Also verify exact five-file cardinality, finite descriptor-bound reads, stable checksum/SBOM snapshots, final complete-payload rehash, strict RFC 8259 parsing, CycloneDX 1.7 envelope, independently recomputed UUIDv5 identity, exact artifact bindings, deterministic repository/source identity, private exclusive manifest creation, unchanged credential boundary, no .github changes, beginner-readable docstrings, and APA 7th guidance. Report concrete actionable findings or state that none remain. Do not treat draft status, the open PR #52 sequencing dependency, or absent qualifying independent approval as satisfied.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='4b2f5b896d215f5f26849a586a176a6c52d220fd'
red='471c225c71f6b61bd1c17d484fbaf0c7b02bc98b'
repo='ContextualWisdomLab/EgressWeave'

echo '== Exact commit identity and changed scope =='
printf 'checkout='; git rev-parse HEAD
git cat-file -e "${head}^{commit}"
git show --no-patch --format='head=%H%nparents=%P%nsubject=%s%ncommitted=%cI' "$head"
git diff --name-status "${base}..${head}"
echo '-- .github paths in range --'
git diff --name-only "${base}..${head}" -- .github

echo '== Module and regression-test structure =='
ast-grep outline src/egressweave/release_evidence.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_checksum_snapshot.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_resource_limits.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_snapshot_boundary.py --items all --view expanded
ast-grep outline tests/test_sealed_release_evidence_symlink_boundary.py --items all --view expanded
fd -t f 'sealed.*evidence|release.*evidence' tests docs src

echo '== Output boundary, input snapshots, and manifest implementation =='
nl -ba src/egressweave/release_evidence.py | sed -n '1,620p'

echo '== Final-output RED delta and current regression tests =='
git show --format=fuller --stat "$red"
git diff --unified=120 "${red}^..${head}" -- \
  src/egressweave/release_evidence.py \
  tests/test_sealed_release_evidence.py \
  tests/test_sealed_release_evidence_checksum_snapshot.py \
  tests/test_sealed_release_evidence_resource_limits.py \
  tests/test_sealed_release_evidence_snapshot_boundary.py \
  tests/test_sealed_release_evidence_symlink_boundary.py

echo '== Relevant test files =='
for file in \
  tests/test_sealed_release_evidence.py \
  tests/test_sealed_release_evidence_checksum_snapshot.py \
  tests/test_sealed_release_evidence_resource_limits.py \
  tests/test_sealed_release_evidence_snapshot_boundary.py \
  tests/test_sealed_release_evidence_symlink_boundary.py
do
  if [ -f "$file" ]; then
    echo "-- $file --"
    nl -ba "$file"
  fi
done

echo '== Documentation and changelog =='
nl -ba docs/sealed-release-evidence.md | sed -n '1,560p'
git diff --unified=100 "${base}..${head}" -- CHANGELOG.md

echo '== Exact-head PR metadata and checks =='
gh pr view 54 --repo "$repo" \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup,url \
  --jq '{url,headRefOid,isDraft,mergeStateStatus,checks:[.statusCheckRollup[]|{name,workflowName,status,conclusion,detailsUrl}]}'
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.html_url] | `@tsv`'

echo '== Requested RED commit checks =='
gh api "repos/$repo/commits/$red/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null")] | `@tsv`'

Length of output: 8782


🏁 Script executed:

#!/bin/bash
set -u

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='4b2f5b896d215f5f26849a586a176a6c52d220fd'
red='471c225c71f6b61bd1c17d484fbaf0c7b02bc98b'
repo='ContextualWisdomLab/EgressWeave'

numbered() {
  awk '{ printf "%6d  %s\n", NR, $0 }' "$1"
}

echo '== Exact module =='
numbered src/egressweave/release_evidence.py

echo '== Output-boundary regression =='
numbered tests/test_sealed_release_evidence_output_boundary.py

echo '== Remaining verifier regression tests =='
for file in \
  tests/test_sealed_release_evidence.py \
  tests/test_sealed_release_evidence_checksum_snapshot.py \
  tests/test_sealed_release_evidence_resource_limits.py \
  tests/test_sealed_release_evidence_snapshot_boundary.py \
  tests/test_sealed_release_evidence_symlink_boundary.py
do
  echo "-- $file --"
  numbered "$file"
done

echo '== Delta from the final-output RED commit =='
git diff --unified=100 "${red}^..${head}" -- \
  src/egressweave/release_evidence.py \
  tests/test_sealed_release_evidence_output_boundary.py \
  docs/sealed-release-evidence.md \
  CHANGELOG.md

echo '== Documentation =='
numbered docs/sealed-release-evidence.md

echo '== Changelog change =='
git diff --unified=100 "${base}..${head}" -- CHANGELOG.md

echo '== Exact-head checks =='
gh pr view 54 --repo "$repo" \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup,url \
  --jq '{url,headRefOid,isDraft,mergeStateStatus,checks:[.statusCheckRollup[]|{name,workflowName,status,conclusion,detailsUrl}]}'
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.html_url] | `@tsv`'

echo '== Final-output RED checks =='
gh api "repos/$repo/commits/$red/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.html_url] | `@tsv`'

Length of output: 119667


@seonghobae I reviewed commit 4b2f5b896d215f5f26849a586a176a6c52d220fd.

I found no actionable implementation or documentation defect.

The final-path fix is correct. main() resolves only the output parent. It preserves arguments.output.name as the final path component. write_evidence_manifest() then uses exclusive creation and O_NOFOLLOW when the platform provides it. The CLI regression test confirms that a dangling final-path symlink fails and does not create the attacker-selected target.

The output writer also:

  • encodes and validates strict JSON before file creation;
  • refuses existing output paths;
  • creates a private 0o600 regular file;
  • flushes and synchronizes the descriptor; and
  • verifies that the final path still identifies that descriptor.

The sealed-evidence verifier retains the required controls. It enforces the exact five-file set, bounded descriptor reads, stable checksum and SBOM snapshots, final distribution/SBOM rehashing, final SHA256SUMS rehashing, strict RFC 8259 parsing, the CycloneDX 1.7 envelope, canonical UUIDv5 identity, exact artifact bindings, and deterministic repository/source-bound manifest data.

The documentation describes the credential-free boundary, operator procedure, output boundary, failure behavior, and APA-style references. The changed range contains no .github paths.

I cannot give an all-gates-passed verdict for this commit. Its Python 3.10–3.13 jobs, package check, Semgrep, and listed Security Scan component checks succeeded. However, the commit-level strix check is cancelled. A cancelled check is not successful evidence.

Also, PR #54 now points to b17e8a044704bb98b59970510492c4915d374f5a, not the reviewed commit. The current PR remains draft and BLOCKED. Its Analyze (python) and strix checks are still in progress. I do not treat those states, the PR #52 dependency, or absent independent approval as satisfied.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

Exact-head review requested for b17e8a044704bb98b59970510492c4915d374f5a.

Please ignore predecessor-head conclusions and review the current nine-file diff, with particular attention to the exclusive owner-only manifest output, strict JSON detachment, final-path no-follow behavior, durable synchronization, descriptor/path rebinding, and CLI handling of dangling output symlinks.

@coderabbitai review
@opencode-agent @cwl-noema-review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='b17e8a044704bb98b59970510492c4915d374f5a'
repo='ContextualWisdomLab/EgressWeave'

echo '== Exact checkout and commit identity =='
printf 'checkout='; git rev-parse HEAD
git cat-file -e "${head}^{commit}"
git show --no-patch --format='head=%H%nparents=%P%nsubject=%s%ncommitted=%cI' "$head"

echo '== Exact changed-path scope =='
git diff --name-status "${base}..${head}"
echo '== Workflow paths in exact range =='
git diff --name-only "${base}..${head}" -- .github

echo '== Changed source and test structure =='
ast-grep outline src/egressweave/release_evidence.py --items all --view expanded
fd -t f '^test_sealed_release_evidence.*\.py$' tests -x ast-grep outline {} --items all --view expanded

echo '== Output writer and CLI implementation =='
nl -ba src/egressweave/release_evidence.py | sed -n '1,680p'

echo '== Output-boundary regression tests =='
nl -ba tests/test_sealed_release_evidence_output_boundary.py

echo '== All sealed-evidence test files =='
for file in $(fd -t f '^test_sealed_release_evidence.*\.py$' tests | sort); do
  echo "== ${file} =="
  nl -ba "$file"
done

echo '== Exact diff for output writer, CLI, and output tests =='
git diff --unified=120 "${base}..${head}" -- \
  src/egressweave/release_evidence.py \
  tests/test_sealed_release_evidence_output_boundary.py \
  tests/test_sealed_release_evidence.py

echo '== Documentation and changelog =='
nl -ba docs/sealed-release-evidence.md | sed -n '1,560p'
git diff --unified=100 "${base}..${head}" -- CHANGELOG.md

echo '== Exact-head check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name, .status, (.conclusion // "null"), .html_url] | `@tsv`'

echo '== PR metadata =='
gh pr view 54 --repo "$repo" \
  --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup,url \
  --jq '{url,headRefOid,isDraft,mergeStateStatus,checks:[.statusCheckRollup[]|{name,workflowName,status,conclusion,detailsUrl}]}'

Length of output: 10293


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='b17e8a044704bb98b59970510492c4915d374f5a'
repo='ContextualWisdomLab/EgressWeave'

numbered_range() {
  awk -v start="$2" -v end="$3" 'NR >= start && NR <= end { printf "%6d  %s\n", NR, $0 }' "$1"
}
numbered_all() {
  awk '{ printf "%6d  %s\n", NR, $0 }' "$1"
}

echo '== Manifest output and CLI implementation =='
numbered_range src/egressweave/release_evidence.py 430 560

echo '== Input boundary implementation used before output =='
numbered_range src/egressweave/release_evidence.py 55 430

echo '== Output-boundary tests =='
numbered_all tests/test_sealed_release_evidence_output_boundary.py

echo '== Output-related test call sites =='
rg -n -C 5 -P '\b(write_evidence_manifest|_encode_evidence_manifest|_open_exclusive_manifest|main)\s*\(' \
  tests src/egressweave/release_evidence.py

echo '== Exact output implementation and test diff =='
git diff --unified=100 "${base}..${head}" -- \
  src/egressweave/release_evidence.py \
  tests/test_sealed_release_evidence_output_boundary.py

echo '== Operator output guidance and changelog =='
rg -n -i -C 5 'manifest|output|symlink|no-follow|fsync|descriptor|credential|reference' \
  docs/sealed-release-evidence.md CHANGELOG.md
numbered_all docs/sealed-release-evidence.md

echo '== Exact-head check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name, .status, (.conclusion // "null"), .html_url] | `@tsv`'

echo '== Exact-head workflow runs =='
gh run list --repo "$repo" --commit "$head" --limit 30 \
  --json databaseId,name,workflowName,status,conclusion,url \
  --jq '.[] | [.databaseId,.workflowName,.name,.status,(.conclusion // "null"),.url] | `@tsv`'

Length of output: 111951


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/EgressWeave'
head='b17e8a044704bb98b59970510492c4915d374f5a'

echo '== PR exact-head status and required checks =='
gh pr view 54 --repo "$repo" \
  --json headRefOid,isDraft,mergeStateStatus,reviewDecision,statusCheckRollup,url \
  --jq '{url,headRefOid,isDraft,mergeStateStatus,reviewDecision,checks:[.statusCheckRollup[]|{name,workflowName,status,conclusion,detailsUrl}]}'

echo '== Python 3.13 test and package evidence =='
gh run view 31030533311 --repo "$repo" --log 2>&1 \
  | grep -Ei -C 2 '697 passed|[0-9]+ passed|TOTAL|coverage|1543|526|100%|wheel|sdist|compileall|ruff|error|failed' \
  | tail -n 240 || true

echo '== Dedicated coverage evidence =='
gh run view 31030531622 --repo "$repo" --job 92389891259 --log 2>&1 \
  | grep -Ei -C 2 '1543|526|100%|TOTAL|coverage|branch|statement|miss|partial|error|failed' \
  | tail -n 180 || true

echo '== Failed non-PR workflow metadata =='
gh run view 31030529434 --repo "$repo" \
  --json workflowName,event,headSha,conclusion,createdAt,url \
  --jq '{workflowName,event,headSha,conclusion,createdAt,url}'

echo '== Current Strix check =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '.check_runs[] | select(.name == "strix") | {name,status,conclusion,started_at,completed_at,html_url}'

Length of output: 41781


@seonghobae I reviewed exact head b17e8a044704bb98b59970510492c4915d374f5a.

I found no actionable code or documentation defect.

The diff contains the expected nine paths. It contains no .github workflow change.

The manifest output boundary is implemented correctly.

  • write_evidence_manifest() creates the JSON payload before it accesses the output path.
  • _encode_evidence_manifest() requires a built-in dictionary, uses deterministic key ordering, rejects non-finite values, and round-trips the JSON data to reject Python-only or structurally coerced values.
  • The writer uses exclusive creation. It does not overwrite an existing output path.
  • _open_exclusive_manifest() adds O_NOFOLLOW where the platform supports it. The existing-path check also rejects a final-path symlink.
  • The writer requests mode 0o600, flushes the stream, and calls os.fsync().
  • The writer checks that the final path still names the same regular descriptor after the write and synchronization.
  • main() resolves only arguments.output.parent. It preserves arguments.output.name. A dangling final output symlink therefore reaches exclusive creation and fails. It does not resolve to an attacker-selected target.

tests/test_sealed_release_evidence_output_boundary.py covers overwrite refusal, final-path symlink refusal, non-strict JSON before file creation, private file mode, parent and creation failures, synchronization failure, post-write path replacement, and CLI refusal of a dangling final-path symlink.

The prior sealed-evidence boundary also remains intact. It enforces exact five-file cardinality, regular-file descriptor/path identity, bounded reads, stable checksum and SBOM snapshots, final payload and checksum rehashing, strict RFC 8259 parsing, CycloneDX 1.7 validation, recomputed UUIDv5 identity, exact root-artifact bindings, and deterministic repository/source-bound manifest data.

Exact-head CI evidence shows:

  • Python 3.10 through 3.13 passed.
  • The suite reports 697 passed tests.
  • Coverage reports 1,543 statements and 526 branches with zero misses and zero partial branches.
  • Ruff, compileall, the product-guard self-test, and wheel/source-distribution verification passed.
  • Semgrep, OSV, Trivy, Scorecard, and CodeQL checks passed.

An all-gates-successful verdict is not available yet. The exact-head strix check remains in progress. The PR is draft and its merge status is BLOCKED. I do not treat those states, the PR #52 sequencing dependency, or absent qualifying independent approval as satisfied.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@opencode-agent @cwl-noema-review Please independently review exact current head b17e8a044704bb98b59970510492c4915d374f5a against protected-main base 7c4792c06261bafddcfb1e083cb0f1f606f9d6a5. Inspect the complete changed-path set and distinguish actionable findings from stale predecessor-head analysis. Verify exact five-file evidence cardinality, bounded descriptor reads, canonical SHA256SUMS, strict RFC 8259 handling, CycloneDX 1.7 envelope and independently recomputed UUIDv5 identity, exact artifact filename/hash/purl/bom-ref binding, repeated digest lifetime, exclusive owner-only manifest creation, durable synchronization, descriptor/path rebinding, deterministic output, beginner-readable public docstrings, APA 7th references, and the unchanged credential-free workflow trust boundary. Exact-head ci, SAST Semgrep, and Security Scan are complete and successful; do not treat draft state, branch divergence, absent independent approval, or repository-policy gates as satisfied. Submit concrete findings or an exact-head verdict only; approve only if every applicable approval gate is independently satisfied.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='b17e8a044704bb98b59970510492c4915d374f5a'
repo='ContextualWisdomLab/EgressWeave'

echo '== Exact commit identity =='
printf 'checkout='; git rev-parse HEAD
git cat-file -e "${head}^{commit}"
git show --no-patch --format='commit=%H%nparents=%P%nsubject=%s%ncommitted=%cI' "$head"

echo '== Full changed-path set =='
git diff --name-status "${base}..${head}"
echo '== Workflow paths in range =='
git diff --name-only "${base}..${head}" -- .github

echo '== Changed-file structure =='
git diff --name-only "${base}..${head}" | while IFS= read -r path; do
  case "$path" in
    *.py) ast-grep outline "$path" --items all --view expanded ;;
  esac
done

echo '== Verifier: input boundary, semantic verification, and output boundary =='
nl -ba src/egressweave/release_evidence.py | sed -n '1,620p'

echo '== Sealed-evidence tests =='
for file in $(fd -t f '^test_sealed_release_evidence.*\.py$' tests | sort); do
  echo "== $file =="
  nl -ba "$file"
done

echo '== Exact implementation and test diff =='
git diff --unified=100 "${base}..${head}" -- \
  src/egressweave/release_evidence.py tests

echo '== Operator guidance and changelog =='
nl -ba docs/sealed-release-evidence.md | sed -n '1,560p'
git diff --unified=100 "${base}..${head}" -- CHANGELOG.md

echo '== Exact-head check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name, .status, (.conclusion // "null"), .html_url] | `@tsv`'

echo '== PR metadata and status rollup =='
gh pr view 54 --repo "$repo" \
  --json headRefOid,isDraft,mergeStateStatus,reviewDecision,statusCheckRollup,url \
  --jq '{url,headRefOid,isDraft,mergeStateStatus,reviewDecision,checks:[.statusCheckRollup[]|{name,workflowName,status,conclusion,detailsUrl}]}'

Length of output: 10098


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7c4792c06261bafddcfb1e083cb0f1f606f9d6a5'
head='b17e8a044704bb98b59970510492c4915d374f5a'
repo='ContextualWisdomLab/EgressWeave'

numbered() {
  awk '{ printf "%6d  %s\n", NR, $0 }' "$1"
}

echo '== Input selection, descriptor reads, checksums, and strict JSON =='
awk 'NR >= 55 && NR <= 296 { printf "%6d  %s\n", NR, $0 }' \
  src/egressweave/release_evidence.py

echo '== SBOM validation, lifetime rehashes, manifest construction =='
awk 'NR >= 297 && NR <= 446 { printf "%6d  %s\n", NR, $0 }' \
  src/egressweave/release_evidence.py

echo '== Manifest encoding, exclusive output, synchronization, CLI =='
awk 'NR >= 447 && NR <= 560 { printf "%6d  %s\n", NR, $0 }' \
  src/egressweave/release_evidence.py

echo '== Output-boundary regressions =='
numbered tests/test_sealed_release_evidence_output_boundary.py

echo '== Checksum lifetime and resource-limit regressions =='
numbered tests/test_sealed_release_evidence_checksum_snapshot.py
numbered tests/test_sealed_release_evidence_resource_limits.py

echo '== Snapshot and symlink boundary regressions =='
numbered tests/test_sealed_release_evidence_snapshot_boundary.py
numbered tests/test_sealed_release_evidence_symlink_boundary.py

echo '== Core contract test sections =='
awk 'NR >= 120 && NR <= 430 { printf "%6d  %s\n", NR, $0 }' \
  tests/test_sealed_release_evidence.py

echo '== Documentation =='
numbered docs/sealed-release-evidence.md

echo '== Changelog delta =='
git diff --unified=100 "${base}..${head}" -- CHANGELOG.md

echo '== Exact-head check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name, .status, (.conclusion // "null"), .html_url] | `@tsv`'

echo '== PR approval and merge state =='
gh pr view 54 --repo "$repo" \
  --json headRefOid,isDraft,mergeStateStatus,reviewDecision,reviews,url \
  --jq '{url,headRefOid,isDraft,mergeStateStatus,reviewDecision,reviews:[.reviews[]|{author:.author.login,state,commit:.commit.oid}]}'

Length of output: 90815


@seonghobae I independently reviewed exact head b17e8a044704bb98b59970510492c4915d374f5a against base 7c4792c06261bafddcfb1e083cb0f1f606f9d6a5.

I found no actionable code or documentation defect.

The exact range contains nine changed paths. It contains no .github path. The credential-free workflow trust boundary is unchanged.

The verifier enforces the requested input boundary:

  • It requires exactly one canonical wheel, one source distribution, two paired SBOMs, and SHA256SUMS.
  • It rejects symlinks, non-regular files, nested entries, missing files, and extra files.
  • It binds each read to a regular opened descriptor and the current path device/inode pair.
  • It enforces finite size limits while it streams each file.
  • It requires canonical ASCII and LF-only SHA256SUMS entries, sorted by filename, with exact payload coverage and digest parity.
  • It rejects duplicate JSON member names, non-finite JSON constants, parser recursion failures, and non-object SBOM documents.
  • It enforces the exact CycloneDX 1.7 envelope.
  • It independently recomputes the canonical UUIDv5 serial number.
  • It validates the root artifact filename, SHA-256, PyPI purl, and bom-ref.
  • It retains the accepted SHA256SUMS digest and rehashes all four payloads plus SHA256SUMS before manifest issuance.

The manifest-output boundary is also correct:

  • _encode_evidence_manifest() creates and validates a detached strict JSON payload before output-path access.
  • write_evidence_manifest() uses exclusive creation with mode 0o600.
  • _open_exclusive_manifest() adds O_NOFOLLOW when available.
  • The writer flushes and calls os.fsync().
  • The writer rechecks descriptor-to-final-path identity after synchronization.
  • main() resolves only the output parent and preserves the final output component. A dangling final-path symlink therefore fails without creating its target.

The regression tests cover overwrite refusal, symlink refusal, non-strict manifest values, private output mode, synchronization failure, final-path replacement, CLI dangling-symlink handling, bounded snapshot reads, deep JSON nesting, checksum mutation, payload mutation, and evidence-directory symlinks.

The operator document states the credential separation, failure procedure, output behavior, finite limits, and APA-style references. The public docstrings are clear and specific.

The exact-head check runs are complete and successful. This includes Python 3.10–3.13, package verification, Semgrep, Security Scan components, CodeQL, and strix.

I do not approve this PR. PR #54 is draft. Its merge state is DIRTY. It has no qualifying submitted independent approval. Those approval gates remain unsatisfied.

You are interacting with an AI system.

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