Skip to content

fix(sbom): preserve portable Ruff hash locks - #226

Open
seonghobae wants to merge 17 commits into
mainfrom
repair/ruff-0.16.3-multihash-lock
Open

fix(sbom): preserve portable Ruff hash locks#226
seonghobae wants to merge 17 commits into
mainfrom
repair/ruff-0.16.3-multihash-lock

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Buyer problem

Ruff 0.16.3 publishes several platform-specific artifacts. Dependabot correctly records all reviewed SHA-256 hashes, but the release-SBOM validator rejected any lock entry with more than one hash, so every supported Python CI lane failed before release evidence could be generated.

Repair

This branch retains the Ruff 0.16.3 exact version and reviewed hashes, then changes the deterministic lock parser to accept one or more unique canonical SHA-256 digests for a pinned package. Runtime SBOM components must still match the pinned version and marker and their reviewed digest must be a member of the immutable hash set.

The bounded repair adds focused regressions for portable multi-hash entries, duplicate-hash rejection, and manifest-digest membership, updates the changelog, executes the complete hash-locked test/coverage/compile suite, and removes its one-shot writer workflow before delivery.

Scope

  • Supersedes Dependabot PR chore(deps): bump ruff from 0.16.1 to 0.16.3 #224 once the verified repair commit is present.
  • Does not change egress runtime behavior, public API, release credentials, or provider policies.
  • Does not weaken artifact digest validation or runtime SBOM traceability.

Summary by CodeRabbit

  • 버그 수정

    • 릴리스 검증이 하나의 고정 CI 패키지에 연결된 여러 플랫폼별 SHA-256 해시를 지원합니다.
    • 검토된 런타임 SBOM 다이제스트가 허용된 해시 목록에 포함되는지 확인하여, 유효한 아티팩트만 승인합니다.
    • 중복되거나 표준 형식이 아닌 해시는 계속 거부됩니다.
  • 기타

    • CI 환경에서 사용하는 Ruff 버전을 업데이트하고 플랫폼별 패키지 해시 검증 범위를 확대했습니다.

dependabot Bot and others added 4 commits August 16, 2026 20:04
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.1 to 0.16.3.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.16.1...0.16.3)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.16.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 1e7a510d-1f6e-4798-8979-03c6aeb5eb57

📥 Commits

Reviewing files that changed from the base of the PR and between 978f651 and b0a8119.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • requirements-ci.txt
  • scripts/ci/generate_release_sbom.py
  • tests/test_release_lock_hash_sets.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

CI 잠금 파일이 하나의 패키지에 여러 SHA-256 해시를 저장하도록 변경되었습니다. 런타임 SBOM 검증은 다이제스트가 해시 세트에 포함되는지 확인합니다. 중복 해시와 누락된 다이제스트에 대한 회귀 테스트가 추가되었습니다.

Changes

런타임 잠금 해시 세트

Layer / File(s) Summary
잠금 해시 세트 파싱
scripts/ci/generate_release_sbom.py, requirements-ci.txt, tests/test_release_lock_hash_sets.py
_load_runtime_lock이 여러 SHA-256 해시를 튜플로 저장합니다. 잘못된 형식과 중복 해시를 거부합니다. ruff 잠금 항목에 플랫폼별 해시가 추가됩니다.
런타임 SBOM 다이제스트 검증
scripts/ci/generate_release_sbom.py, tests/test_release_lock_hash_sets.py, CHANGELOG.md
validate_runtime_lock이 검토된 다이제스트의 해시 세트 포함 여부를 확인합니다. 포함된 다이제스트와 누락된 다이제스트를 검증하는 테스트가 추가됩니다. 변경 사항이 changelog에 기록됩니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 3f1d8

Release SBOM validation now supports platform-specific hashes for the pinned Ruff version while continuing to reject unreviewed artifact digests. The change has targeted regression coverage and is ready to merge.

Sequence Diagram(s)

sequenceDiagram
  participant LockFile as requirements-ci.txt
  participant Loader as _load_runtime_lock
  participant Validator as validate_runtime_lock
  participant Manifest as Runtime SBOM
  LockFile->>Loader: 여러 SHA-256 해시 제공
  Loader->>Validator: 버전, 마커, 해시 튜플 전달
  Manifest->>Validator: 검토된 다이제스트 제공
  Validator-->>Manifest: 포함 여부에 따른 검증 결과 반환
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 Ruff의 이식 가능한 해시 잠금 보존이라는 PR의 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (2 skipped: 2 …
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch repair/ruff-0.16.3-multihash-lock

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.

Comment thread .github/workflows/repair-pr-224.yml Outdated
Comment thread .github/workflows/repair-pr-226-final.yml Outdated
Comment thread .github/workflows/repair-pr-226-multihash.yml Outdated
@seonghobae

Copy link
Copy Markdown
Contributor Author

Additional exact-platform reproduction from the isolated model-response-lifetime lane based on protected bd0339b: uv venv .venv followed by uv pip install --python .venv/bin/python --require-hashes -r requirements-ci.txt fails before the owner Python suite. For Ruff 0.16.1 the lock expects 39897739f112253ee4fdd2e8aa9a4f9ded99fb2be367d5f31dfa4ded6025584c; macOS ARM64 download computes e0d4c20532fca4f7fa609369161d968dd28f65d83dabbd61d8e9c7edbf7001f6. The live PyPI JSON independently maps those digests to manylinux x86_64 and macosx_11_0_arm64 wheels respectively. This supports the portable hash-set requirement, not bypassing digest checks. No lock or SBOM-parser changes made in the runtime lane; preserving this PR as the existing repair owner. Please retain macOS ARM64 artifact admission in the reviewed multi-platform hash set and source-distribution/SBOM conformance evidence. This comment is a reproduction handoff, not approval or a claim that the unmerged repair was consumed.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Resolved the dependency-review availability prerequisite without weakening the gate.

Before: the exact dependency comparison 978f65172a23d69a9d92bf58bbcbe363a459238f...b0a811990b181a5d640cd2cfd64824418573c241 returned HTTP403; this repository's SBOM endpoint returned404. An authenticated control against contextual-orchestrator returned a populated SBOM. Actual Edge inspection of EgressWeave Settings → Advanced Security showed Enable dependency graph, confirming it was disabled (public and non-fork status alone did not prove enablement).

Changed only Dependency graph to enabled. The fresh page showed Disable dependency graph; automatic dependency submission remained Disabled. No permission, branch protection, secret protection, automatic update, billing, or approval settings changed.

After: the identical comparison succeeds with 2 changes, and SBOM succeeds with 30 packages. This is before/after API evidence following the actual setting change, not a reinterpretation of the old failed check.

Requested one rerun of the failed dependency-review job after the repair. Run 33664440481, attempt2, is currently queued at exact head b0a811990b181a5d640cd2cfd64824418573c241; new scope job 101572881988. Its terminal security verdict is still pending. Draft, independent review and exact current-base/head protected checks remain required; no merge or release claim.

@seonghobae
seonghobae marked this pull request as ready for review September 6, 2026 23:07
@seonghobae

Copy link
Copy Markdown
Contributor Author

EgressWeave #226: exact-head macOS review evidence

Reviewed head: b0a811990b181a5d640cd2cfd64824418573c241.
Platform: Darwin arm64, CPython 3.14.6. Detached review worktree:
/tmp/egress226-review.EDc1dW. No tracked source changes were made; the only
untracked entry after verification was the required local CodeGraph index.
The runtime implementation lane did not consume this unmerged branch.

Results

  • uv pip install --python .venv/bin/python --require-hashes -r requirements-ci.txt
    completed with exit 0, including Ruff 0.16.3. The release-toolchain hash-locked
    install also succeeded. Hash verification was never disabled.
  • Four focused portable hash-set regressions passed in 5.99 seconds.
  • Ruff, hourly product guard self-test and compileall completed with exit 0.
  • Full coverage run completed with exit 0: 1029 passed, no skips, pytest
    elapsed 172.06 seconds. JUnit independently reports 1029 tests, zero
    failures/errors/skips and suite time 146.125 seconds. These are separate
    reporter durations, not a product latency metric.
  • Coverage report completed with exit 0: 1758/1758 product statements and
    588/588 product branches
    , no partial branches. The configured coverage source
    is egressweave; this does not claim 100% coverage of the SBOM CI script.
  • Hatchling built the wheel and sdist. verify_distribution.py --dist-dir dist
    verified both artifacts and SHA256SUMS, exit 0.
  • A separate hash-locked smoke environment installed the built wheel without
    dependency resolution. From /tmp, Python isolated mode (-I) imported
    version0.3.0 from that environment's site-packages, exit 0. This is local
    distribution acceptance, not registry publication.

Full evidence: egress226-macos-full-pytest.log and
egress226-macos-full-junit.xml alongside this receipt. Full-run session75873
is terminal; do not restart or poll it.

Review and delivery boundary

The four-file PR diff was read and all three existing review threads were
resolved/outdated. Draft status had caused automatic review to be skipped.
The PR was moved to Ready for review without changing its head; a fresh read
confirmed non-Draft and REVIEW_REQUIRED. This is not self-approval.

The dependency-graph repair is recorded in comment5562755534. Its requested
run33664440481 attempt2 scope job101572881988 remains queued at the latest
direct read. No extra rerun was requested. Required terminal checks, independent
approval, current-main merge validation, protected merge and immutable release
are still required. The PR API base snapshot978f651 differs from live
mainbd0339bf and must not be presented as current-main evidence.

This validates the prerequisite PR on the previously failing macOS platform;
it does not deliver the Rust full-response lifetime, CO administrator timeout
controls, released consumer compatibility, or actual model performance.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae

seonghobae commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Egress226 ordinary protected-main integration

Local merge3f1d8767c08ae0f2d703e550c690369c7ac5e50c has parents
b0a8119 and
bd0339b. Common ancestor978f65172a23d69a9d92bf58bbcbe363a459238f.
The five already-merged main commits update CI lifecycle/concurrency and
centralize scheduled entrypoints. The resulting six-file change has33additions
and232deletions; no conflict occurred. Both complete histories are retained.

Explicit git diff against b0 is empty for src/, requirements-ci.txt,
scripts/ci/generate_release_sbom.py, tests/test_release_lock_hash_sets.py and
CHANGELOG.md. Existing lock/packaging repair and runtime source bytes remain
unchanged. The inherited main deletion of a retired hourly workflow and its two
tests is not a new removal of runtime tests.

Exact local merge verification session76004 terminated exit0:
7focused CI/lock tests passed15.85s, Ruff0.16.3 check. passed, hourly guard
self-test passed, compileall src/tests/scripts passed. Tracked tree clean.
Prior b0 full1029pass and packaging receipts are historical, not a full run of
this merge commit. Fresh hosted checks and independent review remain required.

Rationale: b0's only CodeQL-required run used old canonical8c085835 source and
failed at startup; current canonicalmainc9052e60 uses native dispatch. Ordinary
base integration yields a legitimate synchronization event without empty commits,
close/reopen toggles, blind old-run retries or permission changes. New check
admission/completion must be observed, not inferred from push success.

Normal push was initiated only after rechecking remote branch stillb0. No force,
protected-main merge, self-approval, administrative bypass or release operation
was requested. Push session27554 terminated exit0, advancing b0 to3f1d876.
Separate ls-remote session94306 terminated exit0 and confirmed full remote SHA
3f1d876. Fresh hosted checks remain separate.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • CHANGELOG.md — repository behavior
  • requirements-ci.txt — repository behavior
  • scripts/ci/generate_release_sbom.py — review and security gate shell path
  • tests/test_release_lock_hash_sets.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: CHANGELOG.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: CHANGELOG.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Repository file: requirements-ci.txt"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Repository file: requirements-ci.txt"]
  R2 --> V2["required checks"]
  Evidence --> S3["CI script: generate_release_sbom.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: generate_release_sbom.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test: test_release_lock_hash_sets.py"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_release_lock_hash_sets.py"]
  R4 --> V4["targeted test run"]
Loading

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: 3f1d8767c08ae0f2d703e550c690369c7ac5e50c
  • Workflow run: 34080563601
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: CHANGELOG.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: CHANGELOG.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Repository file: requirements-ci.txt"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Repository file: requirements-ci.txt"]
  R2 --> V2["required checks"]
  Evidence --> S3["CI script: generate_release_sbom.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: generate_release_sbom.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test: test_release_lock_hash_sets.py"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_release_lock_hash_sets.py"]
  R4 --> V4["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants