1.0 fix round
A pre-release audit on 2026-10-30 found defects in behavior that 1.0 would freeze. They were fixed in 0.11.0, apart from E6, which shipped in 1.0.0 with a performance fix for reference scanning. The 1.0 evidence in 1.0-readiness.md was then collected again on the fixed code.
Every fix has a regression test that fails on the 0.10.4 code.
Decisions
Section titled “Decisions”| Topic | Decision |
|---|---|
| CLI exit codes | 0 success, 1 findings (diagnostics, differences, required formatting, a missing get key), 2 usage, I/O failure or input the command cannot process, for every command. |
| Insert collisions | Edit::Insert rejects a key that already exists or that another edit in the batch creates. Removing that key in the same batch frees it. |
| Rename collisions | Edit::Rename follows the same rule as Insert: the new key must name exactly one declaration of the output. Removing, commenting out or renaming away the old key frees it, so renames can swap keys, and two edits that produce one key fail with EditError::Duplicate. Decided after 0.11.0 and shipped in 1.0.0. |
| Sort and references | When one key references another in the same group, sort keeps their current relative order. Resolved values do not change under sequential or whole-file scope. |
| Adapter versions | adotenv, adotenv-process and adotenv-cli go to 1.0. adotenv-config and adotenv-figment keep their own 0.x line, so a new major of config or figment is a 0.x minor release. |
config version |
adotenv-config moves to config 0.15 with its own MSRV of 1.88. The core MSRV stays 1.81. |
| Reference containers | Reference names its innermost container by index into the same list instead of carrying the whole container chain, so Entry::references stays linear in memory. Reference::is_eligible keeps its signature. |
| Loaded resolution scope | LoadedEnvironment::resolve_contextual rejects sequential scope with the error resolve_decoded already returns. Winning declarations come from different files, so no single order defines sequential bindings. |
Core parser and model
Section titled “Core parser and model”These changes are fuzz-relevant and restart the scheduled fuzz count.
- P1. Node and Python: blank and whitespace-only lines become
Blankitems instead of leading whitespace of the next statement. Groups, leading comments, removal, sorting, blank-line collapsing and portability then agree with the other presets. - P2. Compose: a quoted entry’s item extends over the rest of its physical line (trailing whitespace, inline comment and line ending) when no further statement follows on that line. Sorting, inserting, removing, formatting and example generation then keep line structure.
- P3. Parse time stays linear when many statements share one physical line (Compose and Node).
- P4. Reference scanning stays linear for long
$runs and deep nesting. - P5. Diagnostic line numbers account for line breaks in leading whitespace before quoted keys in custom dialects.
- P6.
Entry::referencesuses memory linear in the value length (decision above). Before,nnested forms produced aboutn * n / 2container records, whichsort,adotenv fmtand the fuzz targets reach.
Resolution and loading
Section titled “Resolution and loading”- R1. Resolution enforces a total budget on resolved provenance, so small inputs cannot allocate unbounded memory. A structured error reports the limit.
- R2. Resolution time stays linear in the number of references in one value.
- R3.
LoadedEnvironment::resolve_decodedresolves loaded keys exactly as loaded. A key that the synthetic document cannot represent is a structured error, never a different key. - R4.
LoadedEnvironment::resolve_contextualrejects sequential scope (decision above), so a reference to a key that a later cascade file overrides is never left unresolved.
Edits, formatting and sorting
Section titled “Edits, formatting and sorting”- E1.
Edit::Insertrejects key collisions (decision above). - E2. Sort keeps the relative order of referencing pairs (decision above). The README and rustdoc example change accordingly.
- E3. Sort handles a last group that has no final line ending.
- E4. Batches that set an entry and insert after it stay linear.
- E5. Documentation states that text edits apply in reverse order of the returned slice. Edits that start at the same offset are ordered.
- E6. Rename collisions follow the decision above (1.0.0).
- C1. Temporary files for
fmt --writeandsetare created with restrictive permissions before any content is written, then receive the target’s permissions. - C2. Exit codes follow the decision above. The frozen exit-code test and
cli.mdagree. - C3.
runreports a child killed by a signal as128 + signalon Unix and never maps a failing Windows status to0. - C4.
loadprints values encoded so the output parses back to the same values. - C5.
fmt --writeandseton a symlink replace the link target and keep the link.
Documentation
Section titled “Documentation”- D1.
cli.mdlists every JSON field, includingok,errorand the diagnostic object. - D2. The README describes what
runpasses to the child, thatdiffprints values, and thatDebugoutput includes values. - D3.
ExpandOptions::composeis documented as Compose-style reference rules, not a full Compose interpolation emulation. - D4.
DoubleEscapesrustdoc shows single backslashes. - D5. Mode-name rules in
loading.mdmatch the implementation.
Release engineering
Section titled “Release engineering”- X1. Per-crate versions in the release workflow and
RELEASING.md. - X2.
adotenv-configonconfig0.15; the MSRV job builds it with 1.88. - X3. Restore
CHANGELOG.mdand add a migration section for 0.x users. - X4. Anchor the core package
includepatterns to the package root. - X5. The semver check also runs on pushes to
main. - X6.
RELEASING.mdcovers the GitHub Release notes.
Tests and fuzzing
Section titled “Tests and fuzzing”- T1. The resolution fuzz target also runs with default limits.
- T2. Parser and resolution fuzzing include long single-line inputs.
- T3. An invariant test checks that blank-line groups agree across presets for inputs that every preset reads the same way.
- T4. Format fuzzing covers trimming with the final newline preserved,
blank-line collapsing with quote styles, and
QuoteStyle::Unquoted.
After 1.0
Section titled “After 1.0”Tracked for 1.x, not part of 1.0:
- Windows:
exec::Shellargument quoting forcmd /S /CviaCommandExt::raw_arg, and the process environment value length limit inadotenv-process. - A lone CR at the end of a CRLF file in LF-only dialects (
edit,example,sort). - Serde errors that report an empty key (key errors now report the offending key name, including post-deserialization
try_fromkey failures). - Optional value masking for
Debug,diffand serde errors. - Formatting idempotence with custom line limits and LF-only line breaks, and
with a quote style in Python for a key that is U+FEFF followed by
export(post-edit byte inspection for CR-trim/final-newline planning underLineBreaks::Lf, native\n-sentinel preservation inappended_body_end, and regression + fuzz coverage). - Serde map keys that are not strings, such as
BTreeMap<u16, String>, and non-string fields inside#[serde(flatten)](map keys now parse with the same scalar rules as values;#[serde(flatten)]keeps buffered values as strings because Serde’sContentDeserializerrejects numbers intoString, with#[serde(deserialize_with = ...)]documented and tested for typed fields). -
Document::exampleturns bare text after a Compose closing quote into a#comment (A="x"tail\n->A=""\n#\n), preventing secret tails from leaking while keeping explicit second assigned declarations (A="x" B=2\n->A=""\n B=\n).
For 2.0, because the variant’s fields cannot change in 1.x:
ResolveError::Requiredcarries the operator, so its message can say whether the variable was unset or empty. 1.x says that it has no value.
Release sequence
Section titled “Release sequence”Completed on 2026-10-31:
- Landed the items above with regression tests.
- Released 0.11.0 for all five crates.
- Confirmed alint on 0.11.0.
- Landed E6 and the reference-scanning performance fix.
- Ran four consecutive scheduled fuzz runs on the release code.
- Re-ran the reference-host performance record.
- Ran the release gate and the semver check, then released 1.0.0 of
adotenv,adotenv-processandadotenv-cliand 0.12.0 ofadotenv-configandadotenv-figment.