Skip to content

Add dry-run auction ceremony rehearsal#141

Merged
punk6529 merged 3 commits into
mainfrom
codex/dry-run-auction-ceremony
Jun 12, 2026
Merged

Add dry-run auction ceremony rehearsal#141
punk6529 merged 3 commits into
mainfrom
codex/dry-run-auction-ceremony

Conversation

@punk6529

@punk6529 punk6529 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #140.

Adds a local Anvil auction ceremony rehearsal for Gate E. The new RehearseAuctionCeremony script builds on the local deployment rehearsal, configures a deterministic local randomizer, signs and mints an auction drop through the EIP-712 path, verifies active NFT custody in StreamAuctions, places a bid, settles after the auction end, withdraws poster/protocol/curator proceeds, and asserts zero owed funds.

The PR also wires the ceremony into make deploy-rehearsal, scripts/check.sh, scripts/check.ps1, and CI, then updates deployment/tooling/status/blocker/test/script docs plus the roadmap/run-state and generated release manifest/checksum evidence.

Validation

  • forge fmt script\RehearseAuctionCeremony.s.sol test\StreamDeploymentManifest.t.sol
  • forge fmt --check script\RehearseAuctionCeremony.s.sol test\StreamDeploymentManifest.t.sol
  • forge test --match-path test\StreamDeploymentManifest.t.sol -vvv
  • forge script script\RehearseAuctionCeremony.s.sol:RehearseAuctionCeremony --sig "run()" --via-ir
  • python scripts\test_release_manifest.py
  • python scripts\generate_release_manifest.py --check
  • python scripts\test_release_checksums.py
  • python scripts\generate_release_checksums.py --check
  • python scripts\test_changelog_check.py
  • python scripts\check_changelog.py
  • forge build
  • forge test -vvv
  • forge build --sizes --via-ir --skip test --skip script --force
  • make check
  • bash -n scripts/check.sh scripts/bootstrap-ec2.sh
  • PowerShell parser check for scripts/check.ps1 and scripts/bootstrap-windows.ps1
  • powershell -NoProfile -ExecutionPolicy Bypass -File scripts\check.ps1
  • git diff --cached --check

Notes

This is local Anvil evidence only. Fork, testnet, and production broadcast ceremony evidence remain Gate E release work.

Summary by CodeRabbit

  • New Features

    • Added a local auction ceremony rehearsal to validate end-to-end auction flows (authorization, bidding, settlement, withdrawals, and accounting).
  • Tests

    • New test verifies the auction ceremony rehearsal executes, settles, and withdraws proceeds with expected outcomes.
  • Documentation

    • Updated deployment, tooling, status, roadmap, and run guides to document the auction rehearsal and revised gate checklists.
  • Chores

    • CI/check targets and release metadata updated to include the new rehearsal and refreshed checksums.

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

@coderabbitai

coderabbitai Bot commented Jun 12, 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: 3e014bd2-ade8-4dc6-a3aa-093aa70a6047

📥 Commits

Reviewing files that changed from the base of the PR and between 5e3ef63 and aca68f8.

📒 Files selected for processing (2)
  • ops/AUTONOMOUS_RUN.md
  • script/RehearseAuctionCeremony.s.sol
✅ Files skipped from review due to trivial changes (1)
  • ops/AUTONOMOUS_RUN.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • script/RehearseAuctionCeremony.s.sol

📝 Walkthrough

Walkthrough

Adds a local Foundry rehearsal script exercising the end-to-end auction ceremony (signed drop, mint, bid, settle, withdraw, and accounting assertions), integrates it into make/CI/check pipelines, adds a focused test, and updates docs, changelog, roadmap, and release checksum metadata.

Changes

Auction Ceremony Rehearsal

Layer / File(s) Summary
Auction ceremony script and helpers
script/RehearseAuctionCeremony.s.sol
AuctionCeremonyVm cheatcodes; AuctionCeremonyRandomizer deterministic token-hash writer; RehearseAuctionCeremony.run() deploys local stack, builds/signs EIP-712 drop, mints auction-backed token, verifies custody and auction Active state, funds bidder, places bid, warps to end, claims and settles to SettledWithBid, withdraws poster/protocol/curator proceeds, asserts drained credit buckets and zero owed, and returns AuctionCeremonyResult. Helper functions build/sign authorizations and perform withdrawals/assertions.
Test and test documentation
test/StreamDeploymentManifest.t.sol, test/README.md
Adds testLocalAuctionCeremonyRehearsalSettlesAndWithdrawsProceeds() which runs the ceremony and asserts chainId, deployment manifest hash, collection/drop/token IDs, final owner/highest bidder, bid amount, final status (SettledWithBid), proceeds/owed-after-withdrawals, and evidenceKind = local-anvil-auction-ceremony. Documents Gate E rehearsal coverage in test/README.md.
Build and CI wiring
Makefile, .github/workflows/ci.yml, scripts/check.sh, scripts/check.ps1
deploy-rehearsal and CI "Deployment rehearsal" step now invoke forge script script/RehearseAuctionCeremony.s.sol:RehearseAuctionCeremony --sig "run()" --via-ir; CI output is tee'd to ci-logs/forge-auction-ceremony-rehearsal.log. Shell and PowerShell check scripts run the rehearsal as part of make check/validation.
Deployment and tooling documentation
docs/deployment.md, docs/tooling.md, script/README.md
Adds the RehearseAuctionCeremony forge script command and a "local auction ceremony layer" section describing randomizer configuration, EIP-712 signing, mint/bid/settle/withdraw flows, and local-only evidence constraints. Updates smoke-check and tooling snippets to include the ceremony and refines beta-readiness checklist.
Status, blockers, and roadmap updates
docs/status.md, docs/known-blockers.md, ops/ROADMAP.md
Expands Gate A baseline and smoke commands to include ceremony steps and RehearseAuctionCeremony; reflows known-blockers text; revises ROADMAP verification metadata, Machine-Verifiable baseline evidence list, Gate E exit criteria, and Appendix B test-matrix to include auction ceremony evidence and follow-ups.
Changelog and run-state tracking
CHANGELOG.md, ops/AUTONOMOUS_RUN.md
Adds Unreleased changelog entry documenting the local auction ceremony rehearsal gate. Updates ops/AUTONOMOUS_RUN.md to set active branch/PR to codex/dry-run-auction-ceremony / #141, advance worklog items, and append Decision Log/run-log entries.
Release artifacts and checksums
release-artifacts/latest/SHA256SUMS, release-artifacts/latest/release-checksums.json, release-artifacts/latest/release-manifest.json
Updates checksums and sha256/size_bytes metadata for documentation files changed by this PR (CHANGELOG.md, docs/deployment.md, docs/tooling.md, docs/status.md) and adjusts recorded checksums for SHA256SUMS and release-manifest.json.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • 6529-Collections/6529Stream#92: Introduced the original rehearsal/deploy pipeline (RehearseDeployment) that this PR extends by adding RehearseAuctionCeremony to the deploy-rehearsal flow.

Poem

🐰 I hopped through Anvil's gentle hum,
Signed drops, soft bids—then outcomes come.
Time warped, claims settled, proceeds flow,
Buckets emptied, no debts to show.
A tiny rabbit cheers: rehearsal good to go!

🚥 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 directly summarizes the main change: adding a dry-run auction ceremony rehearsal script that is the core focus of this PR.
Linked Issues check ✅ Passed All requirements from issue #140 are met: local Anvil rehearsal [#140], EIP-712 auction drop minting [#140], custody verification [#140], bidding/settlement/withdrawal flows [#140], evidence exposure [#140], gate integration [#140], and documentation updates [#140].
Out of Scope Changes check ✅ Passed All changes are directly aligned with PR objectives: RehearseAuctionCeremony script, integration into CI/Makefile/shell scripts, documentation updates, release artifacts/checksums, and ops/roadmap state tracking are all in scope.
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/dry-run-auction-ceremony

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

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 12, 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: 3

🤖 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 154-171: Update the "Initial candidate files" list in
AUTONOMOUS_RUN.md to include the regenerated release artifacts under
release-artifacts/latest/* so the durable run state matches the changed surface
for Queue Item 73; specifically add entries for the generated release
manifest(s) and checksum evidence referenced by the PR (the
release-artifacts/latest files) and ensure the manifest/checksum names included
match the outputs produced by the release pipeline referenced by this change.

In `@script/RehearseAuctionCeremony.s.sol`:
- Around line 96-106: After minting via drops.mintDrop and getting tokenId
(retrieveTokenID), add an assertion that the token's hash written by the
deterministic randomizer is non-zero and (preferably) equals the expected
deterministic value: read the minted token hash from StreamCore (e.g.,
core.tokenHash(tokenId) or the actual getter on StreamCore) and assert it !=
bytes32(0); then compute the expected deterministic hash using the wired
AuctionCeremonyRandomizer helper (call the randomizer's deterministic hash
function, e.g., AuctionCeremonyRandomizer.computeDeterministicHash or similar
with the same inputs used in the rehearsal) and assert equality to ensure the
drop-to-randomizer callback actually wrote the expected hash.
- Around line 222-230: The current _withdrawFor uses account.balance -
balanceBefore which is flaky due to gas costs; instead have _withdrawFor not
compute balance deltas but accept or reuse the canonical credit amount obtained
by _withdrawProceeds (the value read from the auctions credit query) as the
withdrawn amount, call
auctions.withdrawAuctionProceedsCreditTo(payable(account)) only to execute the
transfer, and then perform any zero-credit or post-withdrawal assertions; update
callers (e.g., _withdrawProceeds) to pass the previously-read credit value into
_withdrawFor (or return that credit directly) so withdrawAuctionProceedsCreditTo
is only responsible for side effects and the canonical withdrawn value comes
from the credit-reading logic.
🪄 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: 2be36760-819c-4e45-b8f0-88a5a1578dcf

📥 Commits

Reviewing files that changed from the base of the PR and between e09e422 and 5e3ef63.

📒 Files selected for processing (18)
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • Makefile
  • docs/deployment.md
  • docs/known-blockers.md
  • docs/status.md
  • docs/tooling.md
  • ops/AUTONOMOUS_RUN.md
  • ops/ROADMAP.md
  • release-artifacts/latest/SHA256SUMS
  • release-artifacts/latest/release-checksums.json
  • release-artifacts/latest/release-manifest.json
  • script/README.md
  • script/RehearseAuctionCeremony.s.sol
  • scripts/check.ps1
  • scripts/check.sh
  • test/README.md
  • test/StreamDeploymentManifest.t.sol

Comment thread ops/AUTONOMOUS_RUN.md
Comment thread script/RehearseAuctionCeremony.s.sol
Comment thread script/RehearseAuctionCeremony.s.sol Outdated
@punk6529 punk6529 merged commit 1b3ad3d into main Jun 12, 2026
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.

Add dry-run auction ceremony rehearsal

1 participant