Skip to content

Generate release artifact catalog#94

Merged
punk6529 merged 2 commits into
mainfrom
codex/release-artifact-catalog
Jun 11, 2026
Merged

Generate release artifact catalog#94
punk6529 merged 2 commits into
mainfrom
codex/release-artifact-catalog

Conversation

@punk6529

@punk6529 punk6529 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #93.

This PR adds the first deterministic Gate G release-artifact baseline for 6529Stream:

  • adds scripts/generate_release_artifacts.py to generate ABI checksums, bytecode checksums, interface IDs, and event topic catalog JSON from Foundry artifacts
  • tracks the generated baseline under release-artifacts/latest/
  • pins standard ERC interface IDs where advertised IDs differ from raw artifact selector XORs, while retaining computed XOR traceability
  • marks linked-library bytecode hashes explicitly as unlinked_artifact_object until broadcast/verification artifacts provide final deployed bytecode
  • wires the release artifact drift check into make check, Linux/Windows wrappers, and CI
  • updates deployment docs, tooling docs, roadmap/run state, and the local deployment manifest example to consume generated hashes

Validation

  • python scripts\test_release_artifacts.py
  • python scripts\generate_release_artifacts.py --check
  • python -m py_compile scripts\generate_release_artifacts.py scripts\test_release_artifacts.py
  • JSON parsing for generated release artifacts and deployments/examples/anvil-6529stream-v0.1.0-001.json
  • bash -n scripts/check.sh
  • PowerShell parser validation for scripts\check.ps1
  • make check
  • powershell -ExecutionPolicy Bypass -File scripts\check.ps1
  • git diff --check

Notes

The release catalog is generated from the production forge build --sizes --via-ir --skip test --skip script --force profile, not the default build profile. Live fork/testnet manifests, signed checksums, ABI diffing, release tags, address books, and verified deployed bytecode hashes remain follow-up Gate E/G work.

Summary by CodeRabbit

  • New Features

    • Added deterministic release artifact generation and validation tools, producing ABI checksums, bytecode checksums, interface IDs, and event topic catalogs as committed baselines.
  • Documentation

    • Expanded documentation covering release artifact workflows, validation procedures, and integration with deployment manifests.
  • Tests

    • Added automated tests for release artifact generation and verification.
  • Chores

    • Updated CI/build workflows and scripts to run release artifact checks.

@claude claude 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR implements a deterministic release artifact generator that produces ABI checksums, event topic catalogs, and interface IDs from Foundry build outputs. The generator reads a contract manifest, resolves artifacts in the Foundry out/ directory, computes stable hashes, derives event topics via Foundry cast, and writes deterministic JSON files for deployment manifest population and audit verification.

Changes

Release Artifact Generation and Integration

Layer / File(s) Summary
Release Artifact Configuration Schema
release-artifacts/contracts.json, release-artifacts/README.md
Configuration manifest defining production contracts and interfaces with source paths; README documents the baseline purpose, regeneration/verification workflow, and how event topics and interface IDs are derived.
Generator Core Implementation
scripts/generate_release_artifacts.py
Comprehensive CLI script that loads configuration, resolves Foundry artifacts, computes canonical ABI/bytecode SHA-256 hashes, derives event topic0 via cast sig-event, computes interface IDs by XOR'ing function selectors, writes four JSON output files with per-artifact digests, supports --check mode for drift detection, and provides error handling for missing artifacts and invalid data.
Generator Test Coverage
scripts/test_release_artifacts.py
Focused unittest that exercises artifact generation with mock Solidity ABI and bytecode fixtures, validates computed checksums, event signatures with indexed parameter metadata, and interface ID XOR logic; also verifies --check mode correctly detects file mutations.
Build System and CI Integration
Makefile, scripts/check.sh, scripts/check.ps1, .github/workflows/ci.yml
Makefile defines cross-platform Python variables and new release-artifacts / release-artifacts-check targets; shell/PowerShell scripts detect Python 3 availability at runtime; CI workflow adds syntax checks and new "Release artifact catalog" validation step that runs generator tests and --check verification, capturing output to ci-logs/.
Generated Release Artifact Outputs
release-artifacts/latest/abi-checksums.json, release-artifacts/latest/interface-ids.json, release-artifacts/latest/release-artifact-manifest.json
Tracked JSON artifacts containing deterministic baselines: per-contract ABI/creation-bytecode/runtime-bytecode SHA-256 hashes with linked/unlinked mode flags, flat and detailed interface ID mappings with function selector lists, event topic catalog entries, and manifest with per-file SHA-256 digests for auditor verification.
Deployment Manifest Integration
deployments/examples/anvil-6529stream-v0.1.0-001.json
Example manifest updated with concrete abi_hash and bytecode_hash SHA-256 values for all production contracts (StreamAdmins, StreamCore, StreamCuratorsPool, StreamMinter, StreamDrops, StreamAuctions, NextGenRandomizerVRF, NextGenRandomizerRNG) and reference to generated event-topic-catalog.json, replacing prior "TBD" placeholders.
Documentation and Operational Traceability
README.md, deployments/README.md, docs/deployment.md, docs/status.md, docs/tooling.md, ops/AUTONOMOUS_RUN.md, ops/ROADMAP.md
README updates include deterministic release-artifact checks in Status, new make check steps in Quickstart, and Repository Layout entry for baseline; deployment guides document exact generation commands and linking behavior; status docs list generator scripts in Gate A baseline; tooling docs add Release Artifacts section explaining manual workflow and contracts.json pinning; autonomous tracking and roadmap record Queue Item 48 milestone, progress toward deployment readiness, and remaining signed-checksum/broadcast work.

Sequence Diagram

sequenceDiagram
  participant Contracts as release-artifacts/contracts.json
  participant Generator as generate_release_artifacts.py
  participant Foundry as Foundry out/ artifacts
  participant Cast as cast (sig-event)
  participant Output as release-artifacts/latest/
  
  Contracts->>Generator: load config
  Foundry->>Generator: resolve contract JSON files
  Generator->>Generator: compute ABI SHA-256
  Generator->>Generator: extract bytecode hashes
  Generator->>Cast: sig-event for each event
  Cast->>Generator: topic0 values
  Generator->>Generator: XOR function selectors for interface IDs
  Generator->>Output: write abi-checksums.json
  Generator->>Output: write event-topic-catalog.json
  Generator->>Output: write interface-ids.json
  Generator->>Output: write release-artifact-manifest.json
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • 6529-Collections/6529Stream#4: Foundational check scripts (.github/workflows/ci.yml, Makefile, scripts/check.sh/scripts/check.ps1) extended by adding Python-based release-artifact generation and validation steps that directly build on the existing Forge build/test infrastructure.

Poem

🐰 A catalog of checksums, hashes, and events,
Deterministic artifacts from Foundry's contents,
SHA-256 verified, topics and selectors in place,
Release readiness markers for auditors to trace! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Generate release artifact catalog' accurately and concisely describes the primary change in the PR: adding deterministic release artifact generation scripts and baseline files.
Linked Issues check ✅ Passed All coding requirements from issue #93 are satisfied: deterministic ABI checksum generation [#93], event topic catalog with keccak256 computation [#93], interface ID generation from selectors [#93], deterministic JSON outputs [#93], SHA-256 checksums [#93], documentation updates [#93], and focused unit tests [#93].
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #93 requirements: generator script, tests, baseline artifacts, documentation, CI/build integration, and roadmap updates. No unrelated changes detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 codex/release-artifact-catalog

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

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

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

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

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.

@punk6529 punk6529 merged commit d89ac51 into main Jun 11, 2026
1 of 2 checks passed
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.

[P1-RELEASE-001] Generate ABI checksums and event topic catalog

1 participant