Skip to content

docs: state the open-salt MUST NOT as agreement, not data provenance - #250

Open
thedavidmeister wants to merge 2 commits into
mainfrom
2026-09-21-issue-165-open-salt-must-not-property
Open

thedavidmeister wants to merge 2 commits into
mainfrom
2026-09-21-issue-165-open-salt-must-not-property

Conversation

@thedavidmeister

Copy link
Copy Markdown
Contributor

Closes #165

The obligation clause stated the rule as: the guarantee "holds only while no
OTHER entry point on the same factory can CREATE2 at an effective salt in this
derivation's image WITH CALLER-SUPPLIED INITIALIZATION DATA […] a factory
implementing this interface MUST NOT expose any entry point that does." The
trailing "that does" binds the whole qualified clause, so the MUST NOT reached
only entry points whose initialization bytes come from the caller.

The provenance of those bytes is irrelevant to the property the clause protects.
An entry point that reaches the image while initializing from a constant, from
storage, or from an oracle, and one that reaches it and calls nothing on the
proxy at all — the permanently-uninitialized hazard ICloneableV2 names — both
supply no caller data, so neither was forbidden, and both leave the pinned
address holding a clone the address does not describe. Both outcomes are
unrecoverable in the way the section already says: the address is occupied and
nobody can redeploy over it.

The clause is now the property rather than a data-provenance test: every entry
point that can reach this derivation's image MUST initialize the clone with
exactly the data hashed into that salt, wherever those bytes come from. Stating
it as agreement rather than as bare reachability keeps a conforming wrapper —
one that hashes into the salt the very bytes it passes to initialize
conforming. The inherited cloneDeterministic still fails it, for the reason it
always did: its data is outside its own derivation.

Comment-only. No source, ABI or bytecode change.

QA

  • Discriminating tests: n/a — comment-only change; tests never assert NatSpec
    text. The disjointness the clause relies on is already pinned by
    test/src/lib/LibICloneableFactoryV4.t.sol, which recomputes both effective-salt
    preimages against the library.
  • Mutations applied: n/a — no executable src line changes, so there is nothing
    to mutate.
  • Oracle: src/lib/LibICloneableFactoryV4.sol
    cloneAndInitialize(implementation, derivedSalt, data, salt) takes the derived
    salt and the data as separate internal arguments, so a concrete can reach the
    open-salt image with any bytes it likes in one line; the interface is the only
    thing constraining that author.
  • Category check: the category is "a normative clause narrower than the rule it
    exists to state". Read the other MUSTs in this interface — the salt derivation,
    the caller-derived-value ban, the atomic-initialize chain and the tx.origin/gas
    obligations are each stated as a property with no comparable qualifier.
    src/interface/deprecated/** is frozen and has no equivalent clause. Distinct
    from ICLONEABLE_FACTORY_V4_OPEN_SALT_DOMAIN NatSpec credits the distinct tags with keeping every other entry point off open-salt addresses, which only the factory's MUST NOT provides #97/PR docs: scope the open-salt domain tag's NatSpec to what the tags give #101, which takes this clause as the correct statement of the rule
    and sharpens the domain-tag NatSpec's reliance on it without touching it.

🤖 Generated with Claude Code

claude and others added 2 commits September 21, 2026 11:18
The clause forbade only entry points taking caller-supplied initialization
data, so one reaching the same effective-salt image while initializing from a
constant, from storage, or not at all was conformant and still occupied the
pinned address with a clone the address does not describe. The property is
agreement between the `data` hashed into the salt and the bytes `initialize`
receives.

Closes #165

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

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 4565a9f8-39b8-4c9e-8291-81481ec18e15

📥 Commits

Reviewing files that changed from the base of the PR and between 710dff5 and ac92ae5.

📒 Files selected for processing (1)
  • src/interface/ICloneableFactoryV4.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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants