Skip to content

ci: attest release artifacts before publication - #154

Closed
seonghobae wants to merge 16 commits into
mainfrom
ci/release-provenance-attestation-v3
Closed

ci: attest release artifacts before publication#154
seonghobae wants to merge 16 commits into
mainfrom
ci/release-provenance-attestation-v3

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Superseded by #167. Exact comparison on 2026-08-10 proved that #167 owns the same ten release paths on the current protected-main lineage. Seven independent files are byte-identical; package.json and CHANGELOG.md retain the same bounded additions on current source; and .github/workflows/release.yml preserves every release-provenance/version/concurrency semantic while retaining protected main's newer immutable rust-cache pin. No check, review, approval, or synthetic result transfers. Continue only in #167.

Purpose

Current-protected-main reconstruction of the release-provenance and exact release-version slice from stale/non-mergeable #151, which itself preserves the release-owned work from stacked #138. No old checks, reviews, approvals, or merge-tree evidence transfer.

Reconstruction boundary

Exact protected base at reconstruction start: 7a86b3dae0c941bc59edfde146c9d7498a0c75a0.

Only release-owned semantics are being reconstructed: least-privilege build/attest/publish authority separation, exact 17-file artifact admission, adjacent operational-CLI checksum validation, unflattened artifact namespaces, retry-safe release concurrency, exact cross-manifest SemVer/tag admission, deterministic tests, authoritative doctoring, and changelog entries. Generic Test/coverage workflow ownership remains separate (#152). Canonical acquisition documentation remains separate (#149).

Keep Draft until reconstruction is complete, exact-current-head Test/Release/security/SAST and applicable coverage/package/provenance evidence pass, all valid current-head findings are addressed, and live repository/governance policy is satisfied.

Summary by CodeRabbit

  • 개선 사항

    • 릴리스 버전이 관련 설정 및 Git 태그와 일치하는지 자동 검증합니다.
    • 릴리스 재시도 시 중복 실행을 방지하고, 명시적 재실행은 안전하게 처리합니다.
    • 릴리스 파일의 구성, 체크섬, 경로, 파일 형식을 검증해 신뢰성을 강화했습니다.
    • 검증이 완료된 산출물만 게시되도록 릴리스 절차를 개선했습니다.
  • 문서

    • 릴리스 버전 계약과 산출물 provenance 확인 절차를 추가했습니다.
  • 테스트

    • 버전 검증, 산출물 무결성, 허용 파일 목록 및 재시도 동작에 대한 검증을 추가했습니다.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 90be1f70-bacf-47c6-b5c5-86ad775a4afd

📥 Commits

Reviewing files that changed from the base of the PR and between 4f116c8 and e30088f.

📒 Files selected for processing (4)
  • .github/workflows/release.yml
  • scripts/ci/release-version.mjs
  • src/lib/releaseVersionContract.test.ts
  • src/lib/releaseWorkflowRetryContract.test.ts
📝 Walkthrough

Walkthrough

릴리스 빌드 전에 세 manifest와 Git 태그의 버전을 검증한다. 플랫폼별 산출물을 공통 artifact로 업로드한다. 태그 릴리스는 allowlist·checksum 검증과 attestation을 완료한 뒤 GitHub Release에 게시한다.

Changes

릴리스 무결성

Layer / File(s) Summary
릴리스 버전 계약
scripts/ci/release-version.mjs, package.json, src-tauri/..., docs/doctoring/release-version-contract.md, src/lib/releaseVersionContract.test.ts, CHANGELOG.md
package.json, Cargo manifest, Tauri 설정의 버전과 v* 태그를 검증한다. 검증은 빌드와 Tauri 패키징 전에 실행된다. 파싱, SemVer, 태그, CLI 오류 처리를 테스트한다.
빌드 및 아티팩트 수집
.github/workflows/release.yml, src/lib/releaseWorkflowRetryContract.test.ts, CHANGELOG.md
첫 실행만 취소하도록 release concurrency를 변경한다. PR 헤드 커밋을 체크아웃한다. macOS·Linux·Windows 빌드와 CLI 검증을 구성한다. 플랫폼 산출물을 공통 artifact로 업로드한다.
Attestation 및 publication
.github/workflows/release.yml, docs/doctoring/release-artifact-provenance.md, src/lib/releaseProvenanceContract.test.ts, src/lib/releaseArtifactAllowlistContract.test.ts, CHANGELOG.md
태그 릴리스에서 정확한 번들·CLI·checksum 집합, SHA-256, regular file 경로와 파일 수를 검증한다. 검증 후 build provenance를 생성한다. Attestation 성공 후 전체 artifact를 GitHub Release에 게시한다. 문서와 계약 테스트가 권한, allowlist, checksum, 중복 namespace, decoy 파일 및 검증 절차를 확인한다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions as GitHub Actions
  participant BuildJobs as build jobs
  participant ArtifactStore as artifact store
  participant AttestRelease as attest-release
  participant PublishRelease as publish-release
  participant GitHubRelease as GitHub Release

  GitHubActions->>BuildJobs: manifest·태그 검증 및 플랫폼 빌드
  BuildJobs->>ArtifactStore: 공통 release artifact 업로드
  AttestRelease->>ArtifactStore: artifact 다운로드
  AttestRelease->>AttestRelease: allowlist·파일 수·SHA-256 검증
  AttestRelease->>ArtifactStore: build provenance 생성
  PublishRelease->>ArtifactStore: 검증된 artifact 다운로드
  PublishRelease->>GitHubRelease: 전체 artifact 게시
Loading

Possibly related issues

  • ContextualWisdomLab/mightyETL#165 — release artifact provenance, exact source-head 검증, attestation 및 통제된 publication 흐름을 함께 다룬다.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 릴리스 산출물의 attestation을 publication 전에 수행하는 핵심 변경을 정확하고 간결하게 설명합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-provenance-attestation-v3

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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed.

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.

@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 cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 4f116c883f42286e7a70086f7dc03270cc19256d.

  • Head SHA: 4f116c883f42286e7a70086f7dc03270cc19256d

  • Workflow run: 31361408478

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: release.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: release.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (6 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (6 files)"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs (2 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs (2 files)"]
  R3 --> V3["docs review"]
  Evidence --> S4["CI script: release-version.mjs"]
  S4 --> I4["review and security gate shell path"]
  I4 --> R4["Review risk: CI script: release-version.mjs"]
  R4 --> V4["bash -n plus Strix self-test"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 4f116c883f42286e7a70086f7dc03270cc19256d
  • Workflow run: 31361408478
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 4f116c883f42286e7a70086f7dc03270cc19256d.

  • Head SHA: 4f116c883f42286e7a70086f7dc03270cc19256d

  • Workflow run: 31361408478

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: release.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: release.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (6 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (6 files)"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs (2 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs (2 files)"]
  R3 --> V3["docs review"]
  Evidence --> S4["CI script: release-version.mjs"]
  S4 --> I4["review and security gate shell path"]
  I4 --> R4["Review risk: CI script: release-version.mjs"]
  R4 --> V4["bash -n plus Strix self-test"]
Loading

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 153-158: Update the “Upload release artifact set” name in
.github/workflows/release.yml (lines 153-158) to include github.run_attempt, and
update the attest-release/publish-release download patterns there to match only
that attempt’s artifacts. Extend src/lib/releaseWorkflowRetryContract.test.ts
(lines 14-18) to verify both artifact names and download patterns include
github.run_attempt.

In `@scripts/ci/release-version.mjs`:
- Around line 18-23: Update the manifest parsing validation before accessing
parsed.version in the release-version loader to reject parsed === null and any
non-object value with the existing stable manifest error. Preserve the current
non-empty string validation for object manifests, and add a regression test in
releaseVersionContract.test.ts covering a JSON null manifest.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f3adbc37-5cf4-4d98-9a5d-d5bdeb230516

📥 Commits

Reviewing files that changed from the base of the PR and between 7a86b3d and 4f116c8.

📒 Files selected for processing (10)
  • .github/workflows/release.yml
  • CHANGELOG.md
  • docs/doctoring/release-artifact-provenance.md
  • docs/doctoring/release-version-contract.md
  • package.json
  • scripts/ci/release-version.mjs
  • src/lib/releaseArtifactAllowlistContract.test.ts
  • src/lib/releaseProvenanceContract.test.ts
  • src/lib/releaseVersionContract.test.ts
  • src/lib/releaseWorkflowRetryContract.test.ts

Comment thread .github/workflows/release.yml
Comment thread scripts/ci/release-version.mjs Outdated
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