Skip to content

Model deploy pins as a rolling candidate + frozen releases (audited 0_1_1 preserved) - #283

Merged
thedavidmeister merged 7 commits into
mainfrom
consolidate-prod-to-audited-0-1-1
Jul 25, 2026
Merged

Model deploy pins as a rolling candidate + frozen releases (audited 0_1_1 preserved)#283
thedavidmeister merged 7 commits into
mainfrom
consolidate-prod-to-audited-0-1-1

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

What & why

The deploy repo had grown ten version-numbered snapshots (0_1_10_1_11) and LibProdDeployCurrent pinned prod to 0_1_8 — but live production on Base runs the audited 0.1.1 (all three production beacons resolve to the 0_1_1 implementations on-chain, and DeployProdV4_0_1_1.sol deploys that set from stored creation code). The extra snapshots were bad-autopublish-workflow noise that made stale, never-adopted versions look deployable — a footgun. The repo was also on the wrong (autopublish) release lifecycle, leaving testDeployTag permanently red.

The model

The current deployment snapshot is now an unnamed, rolling src/generated/candidate/ — always regenerated from source, so it is whatever the source compiles to. LibProdDeployCurrent and all source self-references point at it. A numbered snapshot is only ever cut when a sol-vX.Y.Z git tag freezes the candidate into src/generated/<version>/ and publishes it. This means the source is always a self-consistent audit candidate: the instant auditors sign off a commit, you tag it, the candidate freezes into that version, and you deploy it.

  • 0_1_1/ — kept, byte-identical (verified against main). The frozen audited snapshot = what's live (the 3 beacons) = what DeployProdV4_0_1_1.sol deploys.
  • candidate/ — the current source (which sits ahead of 0_1_1: the orchestrator, added post-audit, plus a corporate-actions change — all deployed on Base but not adopted by the production beacons). This "source-ahead-of-prod" reality is now modelled explicitly instead of hidden behind version noise.
  • Deleted 0_1_20_1_11 snapshots (their sol-v* tags are dropped separately).

Changes

  • BuildPointers.sol: the current tag is the constant candidate (not version-derived); only candidate is regenerated, numbered dirs stay frozen; candidate sorts last after the frozen releases.
  • testDeployTagtestCandidateSelfConsistent: asserts each candidate contract's stored CREATION_CODE == type(C).creationCode (fails if source changes without regenerating the candidate). Plus the testDeployAddress* suite deploys current source and asserts == candidate.
  • package-release.yamlrainix-tag-release (tag-triggered deploy-repo lifecycle, mirroring rain.factory.deploy); new script/cut-release.sh performs the candidate→numbered freeze at release.
  • 15 test files + script/Deploy.sol repointed _0_1_3 → _CANDIDATE; the multi-version chain tests (whose premise is gone) dropped.

Verification

  • src/generated/0_1_1 byte-identical to main (audited snapshot frozen). ✓
  • forge build clean; forge fmt --check clean.
  • forge test: 525 passed (incl. testCandidateSelfConsistent and every testDeployAddress*). The 24 failures are all RPC-environmental (public eth.llamarpc.com 521 / Base 429 rate-limit / missing ARBITRUM|BASE_SEPOLIA|FLARE|POLYGON_RPC_URL) — none are assertion failures; they run in CI with the org RPC secrets.

Notes

  • No new bytecode to deploy: the candidate pins reference contracts already live on Base, and 0_1_1 is unchanged — so this is a repo-model change, not a deploy.
  • Do not merge without review. The non-audited sol-v* git tags are dropped as a separate landing step.

Follow-up commit: deploy path is audited-only

Deploys must be audited versions only, so this branch also removes the current-source deploy path:

  • Deleted script/Deploy.sol (which deployed the rolling candidate), its test, and the manual-sol-artifacts.yaml workflow that dispatched it.
  • Dropped the now-dead LibStoxDeployNetworks.supportedNetworks(); kept the ETHEREUM/HYPEREVM constants the audited DeployProdV4_0_1_1.sol uses.
  • The only deploy path is now the audited, version-specific DeployProdV4_0_1_1.sol (and a future DeployProdV4_0_1_N.sol per audited version). candidate is never a deploy target — only tests + testCandidateSelfConsistent.

Summary by CodeRabbit

  • New Features

    • Added candidate snapshot handling for deployment artifacts.
    • Release automation now runs from version tags and freezes candidate artifacts into immutable, versioned snapshots.
    • Added consistency checks for candidate deployment artifacts.
  • Refactor

    • Updated deployment verification and integration coverage to use candidate artifacts.
    • Removed the manual Solidity artifact workflow.
  • Documentation

    • Clarified audited deployment procedures, network handling, and snapshot usage.
    • Updated the package release version to 0.1.1.

claude added 2 commits July 25, 2026 13:21
Move st0x.deploy to the tag-release lifecycle with a rolling, unnamed
`candidate` snapshot as the source-of-truth for current source:

- BuildPointers regenerates src/generated/candidate/ from current source
  every run (CANDIDATE_TAG constant, _CANDIDATE constant suffix, tag sort
  places candidate last); numbered snapshots (0_1_1) are frozen-historical
  and never regenerated. LibProdDeployCurrent -> candidate, so source
  self-references (incl. the orchestrator) track current source.
- Drop the non-audited numbered snapshots 0_1_2..0_1_11 (bad-workflow
  noise). Keep only the audited, live-on-Base 0_1_1 snapshot, byte-identical.
- Repoint tests/scripts off the removed 0_1_3 pins to _CANDIDATE; drop the
  cross-version (0_1_2 twin) tests. Replace testDeployTag with
  testCandidateSelfConsistent (stored CREATION_CODE == type(C).creationCode).
- package-release.yaml -> rainix-tag-release (tag-triggered); script/cut-release.sh
  freezes candidate into src/generated/<version>/ at release.
- foundry.toml [package].version = 0.1.1 (last published baseline).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Jul 25, 2026
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 38 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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

Plan: Pro Plus

Run ID: 107895e2-a82f-42a4-b910-3e3a68a0f362

📥 Commits

Reviewing files that changed from the base of the PR and between b526e20 and 0f64809.

📒 Files selected for processing (5)
  • .github/workflows/manual-broadcast.yaml
  • script/BuildPointers.sol
  • script/cut-release.sh
  • test/src/concrete/deploy/StoxProdV4.t.sol
  • test/src/lib/LibProdDeployV4.t.sol
📝 Walkthrough

Walkthrough

The release workflow now runs on sol-v* tags, freezes the rolling candidate snapshot into a versioned directory, regenerates deployment pointers, and updates deployment documentation and tests to validate candidate addresses, codehashes, runtime code, and beacon wiring.

Changes

Candidate release lifecycle

Layer / File(s) Summary
Candidate snapshot generation and release wiring
.github/workflows/package-release.yaml, foundry.toml, script/BuildPointers.sol, script/cut-release.sh
Candidate aliases are generated and sorted, release versions come from foundry.toml, snapshots are frozen into versioned directories, and tagged releases invoke snapshot generation.

Candidate deployment expectations

Layer / File(s) Summary
Deployment documentation and network contracts
CLAUDE.md, script/DeployProdV4_0_1_1.sol, src/lib/LibStoxDeployNetworks.sol, test/src/lib/LibStoxDeployNetworks.t.sol
Deployment guidance now distinguishes audited versioned artifacts from candidate snapshots, while network constants and tests cover Ethereum and HyperEVM names.
Candidate deterministic deployment checks
test/lib/LibTestDeploy.sol
Deterministic deployment assertions use candidate address constants.

Candidate artifact and redeploy verification

Layer / File(s) Summary
Candidate artifact and redeploy verification
test/src/lib/LibProdDeployV4.t.sol, test/src/concrete/deploy/StoxProdV4.t.sol
Tests validate candidate creation code, runtime code, codehashes, addresses, beacon wiring, and frozen redeployments.

Candidate address adoption across tests

Layer / File(s) Summary
Candidate address adoption across unit and integration tests
test/src/concrete/*, test/src/concrete/deploy/*, test/src/concrete/integration/*
Vault, beacon, orchestrator, fallback-routing, unified-deployer, and integration tests now use candidate constants while retaining their existing behavioral assertions.

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

Possibly related issues

Possibly related PRs

Suggested reviewers: claude

Poem

A rabbit hops through candidate code,
Freezing snapshots on the release road.
Pointers bloom, beacons align,
Hashes and addresses pass the line.
Tag the hare—let packages fly!

🚥 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 clearly matches the PR’s main shift to a rolling candidate snapshot with frozen releases while noting the preserved audited 0.1.1 path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch consolidate-prod-to-audited-0-1-1

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.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
script/BuildPointers.sol (1)

65-76: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Stale docstring contradicts the new deployTag() semantics.

The @param name doc still says src/generated/<tag>/ is the "frozen per-release snapshot for the current deployTag() (read from the canonical foundry.toml version)", but deployTag() was just changed to a pure function that always returns CANDIDATE_TAG — it no longer reads foundry.toml. This directly contradicts the correct doc a few lines above (L32-38) describing candidate as the rolling, never-frozen snapshot. Leaving both docs in the same file will mislead future readers about which directory is safe to overwrite.

📝 Proposed doc fix
     /// `@param` name Must exactly match the contract's Solidity filename (without
     /// `.sol`), as it determines the generated pointer file path under
-    /// `src/generated/<tag>/` — the frozen per-release snapshot for the current
-    /// `deployTag()` (read from the canonical `foundry.toml` version). Historical
-    /// tags are never regenerated; a release bump writes a new `<tag>/` snapshot
-    /// beside them.
+    /// `src/generated/<tag>/` — always `candidate` (`deployTag()` is now pure
+    /// and never reads `foundry.toml`), the rolling snapshot regenerated from
+    /// current source on every run. Numbered `<tag>/` snapshots are frozen only
+    /// by `script/cut-release.sh` and are never written here.
🤖 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 `@script/BuildPointers.sol` around lines 65 - 76, Update the `@param` name
documentation in buildContractPointers to describe src/generated/<tag>/ as the
rolling candidate snapshot selected by deployTag() and safe to overwrite, rather
than a frozen release snapshot read from foundry.toml. Keep the historical-tag
behavior and the correct candidate semantics documented consistently with the
surrounding deployTag documentation.
🤖 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/package-release.yaml:
- Around line 8-30: Replace the blanket secrets: inherit setting in the
rainix-tag-release reusable workflow invocation with explicit mappings for only
the release and publish secrets required by rainix-tag-release. Preserve the
existing permissions and with parameters, and use the repository’s established
secret names rather than exposing all available secrets.

In `@script/cut-release.sh`:
- Around line 25-32: Update the release-directory handling in cut-release.sh to
check whether src/generated/${TAG} already exists before removing or copying
anything. If it exists, stop with an error and preserve the existing snapshot;
only create the directory and copy candidate when the tag path is absent. Remove
the unconditional rm -rf so release snapshots remain append-only.

In `@test/src/concrete/ST0xOrchestrator.t.sol`:
- Around line 64-72: Update the comment above DEPLOYER, VAULT_BEACON,
RECEIPT_BEACON, EXPECTED_VAULT_IMPL, and EXPECTED_RECEIPT_IMPL to describe these
constants as the rolling candidate snapshot, removing the stale reference to
current-release 0.1.3 pins. Leave the constant definitions unchanged.

In `@test/src/lib/LibProdDeployV4.t.sol`:
- Around line 167-169: Replace stale “0.1.3” wording with candidate/current
mover set terminology: update the StoxCorporateActionsFacet comment beside the
_CANDIDATE reference in test/src/lib/LibProdDeployV4.t.sol lines 167-169, and
update the checkAllV4OnChain comments and all related assertion failure messages
in test/src/concrete/deploy/StoxProdV4.t.sol lines 195-333. No code or assertion
behavior changes are needed.
- Around line 548-559: Update the comment above
testFrozenRedeployStoxWrappedTokenVaultBeaconSetDeployer_CANDIDATE to remove the
stale “standalone”/no-predeploy implication. State that no beacon bytecode is
baked into the deployer artifact, while the deployed BeaconProxy checks the
beacon at proxy construction time; leave the test logic unchanged.

---

Outside diff comments:
In `@script/BuildPointers.sol`:
- Around line 65-76: Update the `@param` name documentation in
buildContractPointers to describe src/generated/<tag>/ as the rolling candidate
snapshot selected by deployTag() and safe to overwrite, rather than a frozen
release snapshot read from foundry.toml. Keep the historical-tag behavior and
the correct candidate semantics documented consistently with the surrounding
deployTag documentation.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4785a1aa-348e-4aef-84aa-94a995f0490e

📥 Commits

Reviewing files that changed from the base of the PR and between 479bfb9 and ae238d6.

⛔ Files ignored due to path filters (98)
  • src/generated/0_1_2/ST0xOrchestrator.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/ST0xOrchestratorBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/StoxCorporateActionsFacet.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/StoxOffchainAssetReceiptVaultAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/StoxOffchainAssetReceiptVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/StoxOffchainAssetReceiptVaultPaymentMintAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/StoxReceipt.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/StoxReceiptVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/StoxUnifiedDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/StoxWrappedTokenVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/StoxWrappedTokenVaultBeacon.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_2/StoxWrappedTokenVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/ST0xOrchestrator.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/ST0xOrchestratorBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/StoxCorporateActionsFacet.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/StoxOffchainAssetReceiptVaultAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/StoxOffchainAssetReceiptVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/StoxOffchainAssetReceiptVaultPaymentMintAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/StoxReceipt.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/StoxReceiptVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/StoxUnifiedDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/StoxWrappedTokenVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/StoxWrappedTokenVaultBeacon.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_3/StoxWrappedTokenVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/ST0xOrchestrator.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/ST0xOrchestratorBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/StoxCorporateActionsFacet.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/StoxOffchainAssetReceiptVaultAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/StoxOffchainAssetReceiptVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/StoxOffchainAssetReceiptVaultPaymentMintAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/StoxReceipt.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/StoxReceiptVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/StoxUnifiedDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/StoxWrappedTokenVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/StoxWrappedTokenVaultBeacon.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_4/StoxWrappedTokenVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/ST0xOrchestrator.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/ST0xOrchestratorBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/StoxCorporateActionsFacet.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/StoxOffchainAssetReceiptVaultAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/StoxOffchainAssetReceiptVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/StoxOffchainAssetReceiptVaultPaymentMintAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/StoxReceipt.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/StoxReceiptVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/StoxUnifiedDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/StoxWrappedTokenVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/StoxWrappedTokenVaultBeacon.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_5/StoxWrappedTokenVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/ST0xOrchestrator.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/ST0xOrchestratorBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/StoxCorporateActionsFacet.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/StoxOffchainAssetReceiptVaultAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/StoxOffchainAssetReceiptVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/StoxOffchainAssetReceiptVaultPaymentMintAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/StoxReceipt.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/StoxReceiptVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/StoxUnifiedDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/StoxWrappedTokenVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/StoxWrappedTokenVaultBeacon.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_6/StoxWrappedTokenVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/ST0xOrchestrator.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/ST0xOrchestratorBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/StoxCorporateActionsFacet.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/StoxOffchainAssetReceiptVaultAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/StoxOffchainAssetReceiptVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/StoxOffchainAssetReceiptVaultPaymentMintAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/StoxReceipt.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/StoxReceiptVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/StoxUnifiedDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/StoxWrappedTokenVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/StoxWrappedTokenVaultBeacon.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_7/StoxWrappedTokenVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/ST0xOrchestrator.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/ST0xOrchestratorBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/StoxCorporateActionsFacet.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/StoxOffchainAssetReceiptVaultAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/StoxOffchainAssetReceiptVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/StoxOffchainAssetReceiptVaultPaymentMintAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/StoxReceipt.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/StoxReceiptVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/StoxUnifiedDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/StoxWrappedTokenVault.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/StoxWrappedTokenVaultBeacon.pointers.sol is excluded by !**/generated/**
  • src/generated/0_1_8/StoxWrappedTokenVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/LibProdDeployCurrent.sol is excluded by !**/generated/**
  • src/generated/LibProdDeployV4.sol is excluded by !**/generated/**
  • src/generated/candidate/ST0xOrchestrator.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/ST0xOrchestratorBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxCorporateActionsFacet.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxOffchainAssetReceiptVaultAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxOffchainAssetReceiptVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxOffchainAssetReceiptVaultPaymentMintAuthorizerV1.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxReceipt.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxReceiptVault.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxUnifiedDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxWrappedTokenVault.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxWrappedTokenVaultBeacon.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxWrappedTokenVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
📒 Files selected for processing (20)
  • .github/workflows/package-release.yaml
  • foundry.toml
  • script/BuildPointers.sol
  • script/Deploy.sol
  • script/cut-release.sh
  • test/lib/LibTestDeploy.sol
  • test/src/concrete/ST0xOrchestrator.t.sol
  • test/src/concrete/StoxReceiptVaultFallbackRouting.t.sol
  • test/src/concrete/StoxWrappedTokenVault.t.sol
  • test/src/concrete/StoxWrappedTokenVaultBeacon.t.sol
  • test/src/concrete/StoxWrappedTokenVaultV2.t.sol
  • test/src/concrete/deploy/ST0xOrchestratorBeaconSetDeployer.t.sol
  • test/src/concrete/deploy/StoxProdV4.t.sol
  • test/src/concrete/deploy/StoxUnifiedDeployer.newTokenAndWrapperVault.t.sol
  • test/src/concrete/deploy/StoxUnifiedDeployer.t.sol
  • test/src/concrete/deploy/StoxWrappedTokenVaultBeaconSetDeployer.t.sol
  • test/src/concrete/integration/GuardHaltsAfterVaultBeaconUpgrade.t.sol
  • test/src/concrete/integration/GuardPassesAgainstRealV4Beacons.t.sol
  • test/src/concrete/integration/OrchestratorIntegrationTest.sol
  • test/src/lib/LibProdDeployV4.t.sol

Comment thread .github/workflows/package-release.yaml Outdated
Comment thread script/cut-release.sh
Comment thread test/src/concrete/ST0xOrchestrator.t.sol
Comment thread test/src/lib/LibProdDeployV4.t.sol Outdated
Comment thread test/src/lib/LibProdDeployV4.t.sol Outdated
thedavidmeister and others added 2 commits July 25, 2026 14:11
Deploys must be audited versions only. Deleted script/Deploy.sol (which
deployed the rolling current source = candidate), its test, and the
manual-sol-artifacts.yaml workflow that dispatched it. Dropped the now-dead
LibStoxDeployNetworks.supportedNetworks() (kept the ETHEREUM/HYPEREVM
constants the audited DeployProdV4_0_1_1.sol uses). Updated CLAUDE.md and
stale comments to the audited-only deploy model.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Deploy is audited-versions-only — candidate is never a deploy target:
- Delete script/Deploy.sol (deployed current source), test/script/Deploy.t.sol,
  and .github/workflows/manual-sol-artifacts.yaml. Keep the audited
  DeployProdV4_0_1_1.sol + manual-sol-artifacts-0-1-1.yaml.
- LibStoxDeployNetworks: drop the now-dead supportedNetworks(); keep the
  ETHEREUM/HYPEREVM constants (audited script + fork tests use them). Update its
  test + scrub Deploy.sol/current-source NatSpec.
- CLAUDE.md Deployment: rewrite to the audited model.

PR#283 fixes:
- cut-release.sh: add SPDX header (reuse lint); replace unconditional rm -rf
  with an append-only guard that aborts if the numbered snapshot already exists
  (never clobber a frozen/audited snapshot).
- package-release.yaml: explicit secrets (not inherit) — exactly the set
  rainix-tag-release declares incl. the RPC_URL_*_FORK verify secrets; drop
  id-token (the reusable uses no OIDC), keep contents: write.
- Scrub stale 0.1.3/0.1.2/twin references in the deploy test comments/strings to
  describe the rolling candidate snapshot; leave _CANDIDATE constant refs intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
script/cut-release.sh (1)

20-23: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve the intended missing-version diagnostic.

With set -euo pipefail, a missing [package].version makes the grep in the assignment fail before the if [ -z "$VERSION" ] branch can emit the diagnostic and exit.

Proposed fix
-VERSION="$(grep -m1 -E '^version = ' foundry.toml | sed -E 's/^version = "([^"]+)"/\1/')"
+if ! VERSION="$(grep -m1 -E '^version = ' foundry.toml | sed -E 's/^version = "([^"]+)"/\1/')"; then
+  echo "cut-release: could not read [package].version from foundry.toml" >&2
+  exit 1
+fi
 if [ -z "$VERSION" ]; then
🤖 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 `@script/cut-release.sh` around lines 20 - 23, Update the VERSION assignment in
cut-release.sh so a missing grep match does not terminate the script under set
-euo pipefail before the existing empty-value check runs. Preserve the current
diagnostic and exit behavior in the VERSION validation branch.
🤖 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 `@test/src/concrete/deploy/StoxProdV4.t.sol`:
- Around line 192-207: Update checkAllV4OnChain so the Base-fork verification
uses only the frozen numbered release deployed on Base, removing its
candidate-specific contract/address assertions. Keep candidate snapshot
consistency validation confined to testCandidateSelfConsistent, and preserve the
existing released-version checks.

---

Outside diff comments:
In `@script/cut-release.sh`:
- Around line 20-23: Update the VERSION assignment in cut-release.sh so a
missing grep match does not terminate the script under set -euo pipefail before
the existing empty-value check runs. Preserve the current diagnostic and exit
behavior in the VERSION validation branch.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 26ae93a1-8c2c-44a5-b642-5a2307e5da38

📥 Commits

Reviewing files that changed from the base of the PR and between ae238d6 and b526e20.

📒 Files selected for processing (13)
  • .github/workflows/manual-sol-artifacts.yaml
  • .github/workflows/package-release.yaml
  • CLAUDE.md
  • script/20260619-deploy-v4-authoriser-clone.s.sol
  • script/Deploy.sol
  • script/DeployProdV4_0_1_1.sol
  • script/cut-release.sh
  • src/lib/LibStoxDeployNetworks.sol
  • test/script/Deploy.t.sol
  • test/src/concrete/ST0xOrchestrator.t.sol
  • test/src/concrete/deploy/StoxProdV4.t.sol
  • test/src/lib/LibProdDeployV4.t.sol
  • test/src/lib/LibStoxDeployNetworks.t.sol
💤 Files with no reviewable changes (2)
  • .github/workflows/manual-sol-artifacts.yaml
  • script/Deploy.sol

Comment thread test/src/concrete/deploy/StoxProdV4.t.sol Outdated
thedavidmeister and others added 3 commits July 25, 2026 14:45
The candidate model doesn't reset the version counter: Soldeer has published
st0x-deploy through 0.1.29 (sol-v git tags likewise), so the next release is
0.1.30 — matching main's next-version slot. 0.1.1 is already published and
can't be re-cut; it names only the frozen audited snapshot dir, not the
package version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- StoxProdV4.t.sol: remove the entire _CANDIDATE on-chain verification block
  from checkAllV4OnChain (it required candidate contracts to be deployed on a
  Base fork — a time-bomb, since candidate regenerates from source and is never
  a deploy target; it only passed incidentally because candidate==0_1_3==0_1_8
  is Zoltu-deployed). Inline the sole callsite to checkProd_0_1_1OnChain() and
  delete the function; the Base fork now verifies only the frozen audited 0.1.1
  set the in-use beacons actually adopt. candidate == current source is verified
  locally by testCandidateSelfConsistent, off-fork. Drop the now-unused Ownable
  and ST0xOrchestratorBeaconSetDeployer imports. checkProd_0_1_1OnChain and its
  _0_1_1 assertions untouched.
- LibProdDeployV4.t.sol: reword the beacon-set-deployer frozen-redeploy comment
  (no beacon bytecode baked into the deployer artifact; the deployed proxy
  checks the beacon at proxy construction time).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… cut-release

- manual-broadcast.yaml comments now reference manual-sol-artifacts-0-1-1.yaml
  (the surviving audited deploy workflow) instead of the deleted dispatcher.
- BuildPointers buildContractPointers NatSpec describes the candidate model
  instead of the removed version-derived tag.
- cut-release.sh refuses non-X.Y.Z versions, which would otherwise freeze an
  orphan snapshot dir the generator's numeric tag filter never picks up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister

Copy link
Copy Markdown
Contributor Author

Reviewed 0f64809: approve

Adversarial review + verification summary:

  • src/generated/0_1_1 byte-identical to main (audited/live snapshot untouched); generator writes only candidate/ — frozen dirs are read-only inputs.
  • testCandidateSelfConsistent covers all 12 candidate contracts and is mutation-verified (nibble-flipped a candidate pin → recompile → test fails → reverted).
  • cut-release.sh: append-only guard (cannot overwrite a frozen snapshot), strict X.Y.Z gate, SPDX, shellcheck clean. package-release.yaml: explicit secrets (incl. the six RPC_URL_*_FORK the verify step forks with), contents:write only; all reusable inputs exist.
  • Deploy path is audited-only: Deploy.sol (deployed rolling candidate) removed; DeployProdV4_0_1_1.sol logic untouched (comment-only diff).
  • All 4 CodeRabbit findings across two rounds fixed (secrets:inherit, cut-release overwrite guard, candidate-pins-on-Base-fork removal, comment nits); 0 unresolved threads.
  • CI reds on this head verified expected: static = frozen-snapshots-append-only only (fires on the deliberate 0_1_2–0_1_11 deletions; self-heals on main post-merge — main static is green today), test = pre-existing dead-Ankr RPC_URL_*_FORK secrets (identically red on main; fix is a secret swap, not code).

Merging with --admin over the intentional gate on the user's word.

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.

2 participants