Move soldeer release metadata under foundry's [external] section - #144
Conversation
|
Warning Review limit reached
Next review available in: 10 minutes Limit details: You’ve used all 1 included review currently available under your plan. 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 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (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. Comment |
Closes #122
Verified against main first
The issue was filed weeks ago; main has moved a lot. Re-measured on
7620643(main at branch point):foundry.tomlstill opens with a bare[package], andnix develop -c forge configstill prints, on every invocation:The repo does call rainix's autopublish:
.github/workflows/package-release.yamlis
rainix-autopublish.yaml@mainwithsoldeer-package: rain-solmem, soversionis the next, unpublished slot and is rewritten by the release.The issue also says to fix prose naming
[package].version. This repo'sREADME does not name it —
grep -rn '\[package\]\|package\.version'over*.md/*.toml/*.yaml/*.nixhitsfoundry.toml:1and nothing else. Sothis PR is one file.
Changed
[package]→[external.package], with a comment saying what the section is.[external.*]is the section foundry reserves for another tool's config andignores (foundry-rs/foundry#5866), and it is excluded from
forge config --fix(#12723).
Publishing is provably untouched
rainix-static soldeer-gateat the SHArainix-autopublish.yamlpins(
53e96a7d), run with onlyfoundry.tomldiffering:Byte-identical content hash, same
version/next, samechanged=true(mainhas content changes vs the published
0.1.16from today's other merges; thisdiff contributes none —
foundry.tomlis in.soldeerignore). The gate runsforge soldeer push --dry-runinternally, so the dry-run also succeeds on thenew section. Autopublish's bump step
(
sed -i -E "0,/^version[[:space:]]*=.*/s//version = \"$NEXT\"/" foundry.toml)applied to the new file rewrites line 7 to
0.1.18and touches nothing else —the four comment lines contain the word
versionbut are#-prefixed, so theydo not match the
^versionanchor.Mutation table
There is no executable line in the diff, so the mutants are of the changed TOML
region and the oracles are the three tools that read it:
forge config,rainix-static soldeer-gate(what autopublish reads), and the bumpsed.Baseline first, so a "killed" is not a tool that errors on everything.
[external.package])forge configsoldeer-gateversion=0.1.17 next=0.1.18 NEW=81e4a496…[external.package]→[package](revert)forge configFound unknown config section in foundry.toml: [package][external.package]→[profile.package](forge config --fix's suggestion)forge configFound unknown 'name' config for profile 'package', same forversionversionline by two spacessoldeer-gate::error::foundry.toml has no [package].versionversion = "0.1.17"→"0.1.15"soldeer-gate::error::foundry.toml [package].version (0.1.15) is not ahead of the published revision (0.1.16)Mutants 3 and 4 are the ones that prove the rename did not detach the reader
from the value: the gate still finds that exact line under the new section
header, reports its value, and fails loudly on it. Mutants 3 and 4 both pass
forge configwith 0 warnings, and mutants 1 and 2 both pass the gate — neitheroracle alone kills all four, so neither is a rubber stamp.
Checks
nix develop -c forge config: warning before, silent after; the 209-lineconfig body is otherwise identical.
nix develop -c forge test: 353 passed / 0 failed / 34 suites.nix develop -c forge fmt --check: exit 0.taplo(pre-commit) passes on thenew TOML.
Not done here
## Publishsection is fiction on main — it names a.github/workflows/publish-soldeer.yamlthat does not exist and describestag-triggered publishing, while the repo publishes from
mainvia autopublish.That is already filed as
[A36] [MEDIUM] The README's release section is fiction, and the semantics of [package].version are undocumented #98, which also covers
documenting the version semantics; whoever takes it should write
[external.package].version.[package].version— thesoldeer-packageinputdescription in
rainix-autopublish.yamlandsoldeer-gate's failure messages(visible in mutants 3 and 4 above). Behaviourally correct, since the reader is
a line scan with no section awareness; it is a rainix change, not this repo's.
QA
test/src/**mirror position this belongs in (the tree mirrorssrc/**bysubject and release metadata has no
src/counterpart), and a test assertinga config file's prose is the kind of doc-binding test that is not written
here. The discriminating check is a command, run both ways:
nix develop -c forge configprintsWarning: Found unknown config section in foundry.toml: [package]onorigin/main(7620643) and prints no warning on this branch.[package]and →[profile.package], both killed byforge config;versionline indented and
versionvalue lowered below the published revision, bothkilled by
rainix-static soldeer-gateat the pinned rainix SHA53e96a7d.Every mutant was run against a recorded unmutated baseline (0 warnings, gate
exit 0), and each oracle passes two of the four mutants, so neither is
vacuously green.
foundry's treatment of
[external.*](feat: support external sections infoundry.tomlfoundry-rs/foundry#5866, #12723) ismeasured through
forge configat the nix-pinned toolchain;rainix-static/src/soldeer_gate.rs(read_local_version/is_version_line)and
rainix-autopublish.yaml's bumpsedat the SHA that workflow pins arewhat autopublish reads and writes, exercised directly rather than reasoned
about.
[package]to[external.package], keep theversionline unindented and first, add acomment naming the section as another tool's metadata, and fix any prose that
names
[package].version. All four covered; the prose clause is vacuous herebecause no file in the repo names it (grep evidence above). The issue's
explicit non-goals — running
forge config --fix, raising anything upstream —are not done, and mutant 2 reproduces in this repo the measurement the issue
gives for why
--fixis worse.