Skip to content

docs: @param tags for UnexpectedDeployedAddress - #118

Merged
thedavidmeister merged 1 commit into
mainfrom
2026-08-15-issue-70-unexpecteddeployedaddress-params
Aug 16, 2026
Merged

docs: @param tags for UnexpectedDeployedAddress#118
thedavidmeister merged 1 commit into
mainfrom
2026-08-15-issue-70-unexpecteddeployedaddress-params

Conversation

@thedavidmeister

Copy link
Copy Markdown
Contributor

Closes #70

error UnexpectedDeployedAddress(address expected, address actual) in
src/lib/LibRainDeploy.sol carried a single prose line and zero @param tags,
while every other error-declaring file in src/ documents its error params with
@param. This adds the tags.

The two revert sites

The error is raised at two points, both inside deployToNetworks (and so
reachable through deployAndBroadcast, which delegates to it):

  • src/lib/LibRainDeploy.sol:399 — before any fork, when
    zoltuAddress(creationCode) derives an address other than expectedAddress.
    Nothing is deployed at this point.
  • src/lib/LibRainDeploy.sol:431 — after vm.stopBroadcast(), when the address
    actually deployed to is not expectedAddress.

actual therefore means something different at each site, which is what the
missing @param tags left undocumented.

Two corrections to the issue's proposed text

The issue's proposed fix is not applied verbatim. Its own collapsed verification
block identifies both problems, and the diff resolves them:

  1. The summary line is corrected, not preserved. The proposed fix keeps
    Thrown when the deployed address does not match the expected address. The
    verification block states this line "is factually wrong for that site" —
    nothing is deployed when the pre-fork check fires, so there is no deployed
    address to mismatch. Adding @param tags underneath a false summary would
    have left the documented defect in place. The summary now covers both sites
    and says outright that nothing is deployed at the first.

  2. expected is described from the signature, not from a sibling file. The
    proposed The address the suite records. is flagged in the verification
    block as "imported phrasing from RainDeployVerifySnapshot" — here expected
    is the caller-supplied expectedAddress argument, not necessarily
    suite-sourced. Confirmed against both revert sites: each passes the
    expectedAddress parameter through unmodified.

QA

  • Discriminating tests: n/a — the diff changes only NatSpec comment text. There
    is no runtime behaviour a test could discriminate on, and Solidity has no
    assertion surface over @param tags. The obligation this change has is the
    inverse one — that it changes NOTHING — which is what the bytecode equality
    below establishes.
  • Mutations applied: n/a — docs-only diff. Comment text has no line whose
    mutation produces a distinguishable program: cbor_metadata = false and
    bytecode_hash = "none" in foundry.toml strip metadata, so comments are not
    reachable from the compiled output at all. Verified, not assumed — see below.
  • Oracle: the source itself, read independently of the issue. Both revert sites
    were read in full (src/lib/LibRainDeploy.sol:399 and :431) and the
    argument each passes as expected traced back to the expectedAddress
    parameter of deployToNetworks; deployAndBroadcast was read and confirmed to
    delegate rather than raise the error itself. This is what caught both defects
    in the issue's proposed text, which its own verification block had flagged.
  • Category check: the issue asks for (a) @param tags on both parameters and
    (b) the two distinct meanings of actual documented. Both covered. The
    summary-line correction is not extra scope — the issue's verification block
    records that line as "factually wrong for that site", so it is part of the
    documented defect.

Verification

Comment-only change — no bytecode, address or code-hash pin can move. Verified
rather than assumed: AddressRegistry and MigrationRegistry were built at
this branch and at main, and the sha256 of both bytecode.object and
deployedBytecode.object is identical across all four pairs.

The repo's own pin authority agrees: RegistryDeploySnapshotTest,
RainDeployVerifySnapshotTest and GeneratedSnapshotShapeTest are 27/27 green,
including testSnapshotMatchesSource, which asserts each recorded
CREATION_CODE equals type(X).creationCode.

Full suite: 168 passed, 47 failed — every one of the 47 failing on a missing
*_RPC_URL env var (no .env in this environment), which is the fork-test
requirement CLAUDE.md documents. Zero failures with any other cause; checked by
grepping every [FAIL] line, not by sampling.

forge fmt --check and forge build are clean, pre-commit hooks pass, and all
new comment lines sit within the file's 80-column comment convention.

`error UnexpectedDeployedAddress(address expected, address actual)` had a
single prose line and no `@param` tags, while every other error-declaring
file in `src/` documents its error params.

The error is raised at two points, both in `deployToNetworks` and so also
reachable via `deployAndBroadcast`: before any fork, when the creation code
derives an address other than `expectedAddress`, and after broadcasting,
when the address deployed to is not `expectedAddress`. `actual` means a
different thing at each, which is what went undocumented.

The summary line is corrected rather than kept. "Thrown when the deployed
address does not match the expected address" is false at the pre-fork site,
where nothing has been deployed at all, so `@param` tags underneath it would
have documented the parameters and left the wrong statement standing.

`expected` is described from the signature — the caller-supplied
`expectedAddress` — not as "the address the suite records", which is
`RainDeployVerifySnapshot`'s notion and not what either site passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Aug 15, 2026
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 12 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: ASSERTIVE

Plan: Pro Plus

Run ID: 06491f7f-e45c-4c04-843b-bf4ab258bfa0

📥 Commits

Reviewing files that changed from the base of the PR and between 86f8d96 and f4381de.

📒 Files selected for processing (1)
  • src/lib/LibRainDeploy.sol

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.

@thedavidmeister

Copy link
Copy Markdown
Contributor Author

Reviewed f4381de: ready — Closes #70. Docs only, and I checked the claim it adds against the source: UnexpectedDeployedAddress is raised at exactly two sites in LibRainDeploy.sol — line 399 with derivedAddress, before any fork, and line 431 with deployedAddress, after broadcasting. The new @param text describes both correctly, including that nothing is deployed at the first.

CI green, 0 unresolved threads — vacuous, CodeRabbit reports Review rate limited.

@thedavidmeister
thedavidmeister merged commit 57aba71 into main Aug 16, 2026
4 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.

UnexpectedDeployedAddress has no @param tags

1 participant