Skip to content

Add deployment rehearsal baseline#92

Merged
punk6529 merged 3 commits into
mainfrom
codex/deployment-rehearsal
Jun 11, 2026
Merged

Add deployment rehearsal baseline#92
punk6529 merged 3 commits into
mainfrom
codex/deployment-rehearsal

Conversation

@punk6529

@punk6529 punk6529 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #91.

This starts Gate E with an executable local deployment rehearsal and release-artifact shape instead of leaving deployment readiness as documentation-only future work.

  • Add script/RehearseDeployment.s.sol to deploy and wire a local 6529Stream stack, configure placeholder Safe/pause/signer/emergency ceremony state, create a sample collection, revoke the temporary deployer admin, and transfer Ownable control for StreamAdmins/StreamCore to the Safe placeholder.
  • Add a deployment manifest schema plus a local example manifest covering all rehearsal-deployed contracts, constructor args, admin ceremony fields, external dependencies, verification state, release artifact placeholders, and rehearsal evidence.
  • Add StreamDeploymentManifest.t.sol coverage for local wiring, admin ceremony state, manifest JSON parsing, randomizer status, and sample collection mint/randomizer setup.
  • Integrate the rehearsal into make check, Windows/Linux check scripts, and CI while keeping production size evidence scoped to deployable contracts with --skip test --skip script.
  • Document the local rehearsal, manifest requirements, admin ceremony checklist, and remaining fork/testnet/release-artifact follow-ups.

Validation

  • forge test --match-contract StreamDeploymentManifestTest -vvv
  • make check
  • powershell -ExecutionPolicy Bypass -File scripts\check.ps1
  • forge fmt --check script\RehearseDeployment.s.sol test\StreamDeploymentManifest.t.sol
  • git diff --check
  • forge build --sizes --via-ir --skip test --skip script --force

Notes

This PR intentionally does not implement production broadcast, contract verification, real ABI/event-topic checksum generation, fork/testnet rehearsals, dry-run mint/auction ceremonies, or emergency redeployment rehearsal. Those remain follow-up Gate E/G work.

Summary by CodeRabbit

  • New Features

    • Local deployment rehearsal to validate contract stack wiring and admin ceremony
    • Standardized deployment manifest format as canonical release artifacts
  • Documentation

    • Comprehensive deployment and rehearsal docs plus manifest schema/examples
    • Updated build/smoke-check guidance to include production-size gating and rehearsal steps
  • Tests

    • New tests validating rehearsal wiring and manifest artifact parsing
  • Chores

    • CI and build targets updated to run size checks and include deployment rehearsal in the validation pipeline

@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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9a8bbee3-0aa4-4f7c-923f-2e167fc254fa

📥 Commits

Reviewing files that changed from the base of the PR and between 3c63675 and 7b1381a.

📒 Files selected for processing (2)
  • deployments/schema/deployment-manifest.schema.json
  • ops/AUTONOMOUS_RUN.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • deployments/schema/deployment-manifest.schema.json

📝 Walkthrough

Walkthrough

This PR implements the Gate E deployment rehearsal baseline by adding a canonical local deployment script (RehearseDeployment.s.sol), a JSON Schema and example manifest, tests that rehearse and parse manifests, CI/Make/script integration with enhanced size-gating (adds --skip script), user documentation, and ops/roadmap updates.

Changes

Deployment Rehearsal Gate (Gate E) Baseline

Layer / File(s) Summary
Deployment manifest schema, example, and specification
deployments/schema/deployment-manifest.schema.json, deployments/examples/anvil-6529stream-v0.1.0-001.json, deployments/README.md
Defines JSON Schema (draft 2020-12) enforcing structure for 6529Stream deployment manifests: versions, network/chain, git/commit, toolchain settings, deployed contract addresses with constructor args and ABI/bytecode hashes, admin ceremony roles, external dependencies, verification status, release artifacts, and rehearsal metadata. Provides concrete Anvil example with placeholder addresses and rehearsal metadata; adds deployments README describing manifest purpose and commit constraints.
Deployment rehearsal script orchestration
script/RehearseDeployment.s.sol, script/README.md
Implements RehearseDeployment with run()/deployLocal(config) orchestration that validates config, starts broadcast, deploys the 6529Stream stack, configures admin ceremony, wires contracts, creates a sample collection with VRF randomizer and timing, computes a manifest hash, and returns DeploymentResult; includes supporting README.
Deployment stack wiring and manifest validation tests
test/StreamDeploymentManifest.t.sol
Adds tests that rehearse a local deployment via RehearseDeployment and assert wiring/roles/ownership/timings/randomizer invariants, and tests that the manifest schema and example JSON parse successfully from deployments/.
CI/Makefile/script gate integration with enhanced size-gating
.github/workflows/ci.yml, Makefile, scripts/check.sh, scripts/check.ps1, foundry.toml
Adds --skip script to production forge build --sizes --via-ir invocations in CI, Makefile size target, and check scripts to avoid script-induced bytecode changes; adds deploy-rehearsal phony Makefile target and includes it in check; check scripts now run the RehearseDeployment script; foundry.toml fs_permissions now allows reading ./deployments.
User-facing documentation of deployment, rehearsal, and manifest requirements
docs/deployment.md, README.md, docs/tooling.md, docs/status.md, docs/known-blockers.md, test/README.md
Adds docs/deployment.md with deployment/rehearsal guidance and admin-ceremony checklist; updates README and tooling/status docs to document the two-step smoke gate (size then rehearsal), adds deployments/ to repo layout and important docs, and updates known-blockers/test docs to reflect --skip script.
Operational tracking and roadmap updates
ops/AUTONOMOUS_RUN.md, ops/ROADMAP.md
Records active branch/PR for deployment rehearsal, marks Gate E as In Progress with local rehearsal evidence and decision-log entries, updates machine-verifiable baseline and milestones, and documents the PR candidate/rehearsal scope and CI integration.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hop through scripts with a schema in paw,
Rehearsal deployed with a careful law,
Size gates that skip, manifests that sing,
Now deployment rehearsals are ready to spring! ✨

🚥 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 The title 'Add deployment rehearsal baseline' accurately summarizes the main change: introducing a local deployment rehearsal script, manifest schema, and testing infrastructure to establish a Gate E baseline.
Linked Issues check ✅ Passed All linked issue #91 requirements are met: deployment/rehearsal script added [script/RehearseDeployment.s.sol], manifest schema and example provided [deployments/schema, deployments/examples], local check command integrated [Makefile, check scripts, CI], ceremony/checklist docs added [docs/deployment.md], and tests validate wiring/manifest parsing [test/StreamDeploymentManifest.t.sol].
Out of Scope Changes check ✅ Passed All changes are directly related to the deployment rehearsal baseline: script, schema, examples, tests, documentation, CI/check integration, and roadmap/status updates all serve Gate E implementation per issue #91 objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/deployment-rehearsal

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.

@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: 1

🧹 Nitpick comments (1)
deployments/schema/deployment-manifest.schema.json (1)

3-3: 💤 Low value

Consider whether the $id should be a resolvable URL.

The $id currently points to https://github.com/6529-Collections/6529Stream/deployments/schema/deployment-manifest.schema.json, which is not a resolvable endpoint. If you want the schema to be retrievable via HTTP, use the raw GitHub URL format or host it separately. If $id is purely for identification (not retrieval), the current format is acceptable but consider documenting this choice.

🤖 Prompt for 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.

In `@deployments/schema/deployment-manifest.schema.json` at line 3, The $id in
deployment-manifest.schema.json currently points to a non-resolvable GitHub HTML
URL; either change the $id value to a resolvable raw GitHub URL (e.g.
raw.githubusercontent.com path to this file) so the schema can be retrieved over
HTTP, or explicitly document (in the repo README or a schema comment) that $id
is used solely as an identifier and not meant to be resolved; update the $id
field accordingly and add the documentation note if you choose the
identifier-only approach.
🤖 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 `@ops/AUTONOMOUS_RUN.md`:
- Around line 4166-4168: Update the inconsistent size evidence for
StreamMetadataRenderer so all occurrences match the authoritative value used in
the PR `#90` block: change the instance reporting "6,817" to "6,843" and verify
any other mentions in AUTONOMOUS_RUN.md (the entries that reference
StreamMetadataRenderer and the forge build output alongside StreamCore) are
updated to the same number to keep the audit trail consistent.

---

Nitpick comments:
In `@deployments/schema/deployment-manifest.schema.json`:
- Line 3: The $id in deployment-manifest.schema.json currently points to a
non-resolvable GitHub HTML URL; either change the $id value to a resolvable raw
GitHub URL (e.g. raw.githubusercontent.com path to this file) so the schema can
be retrieved over HTTP, or explicitly document (in the repo README or a schema
comment) that $id is used solely as an identifier and not meant to be resolved;
update the $id field accordingly and add the documentation note if you choose
the identifier-only approach.
🪄 Autofix (Beta)

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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7fdce6cf-7ab4-494a-8344-6ea1f22a4d9b

📥 Commits

Reviewing files that changed from the base of the PR and between 36d993a and 3c63675.

📒 Files selected for processing (19)
  • .github/workflows/ci.yml
  • Makefile
  • README.md
  • deployments/README.md
  • deployments/examples/anvil-6529stream-v0.1.0-001.json
  • deployments/schema/deployment-manifest.schema.json
  • docs/deployment.md
  • docs/known-blockers.md
  • docs/status.md
  • docs/tooling.md
  • foundry.toml
  • ops/AUTONOMOUS_RUN.md
  • ops/ROADMAP.md
  • script/README.md
  • script/RehearseDeployment.s.sol
  • scripts/check.ps1
  • scripts/check.sh
  • test/README.md
  • test/StreamDeploymentManifest.t.sol

Comment thread ops/AUTONOMOUS_RUN.md 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.

[P1-DEPLOY-002] Add deployment scripts, manifest schema, and rehearsal gate

1 participant