Skip to content

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.

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.

These changes are fuzz-relevant and restart the scheduled fuzz count.

  • P1. Node and Python: blank and whitespace-only lines become Blank items 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::references uses memory linear in the value length (decision above). Before, n nested forms produced about n * n / 2 container records, which sort, adotenv fmt and the fuzz targets reach.
  • 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_decoded resolves loaded keys exactly as loaded. A key that the synthetic document cannot represent is a structured error, never a different key.
  • R4. LoadedEnvironment::resolve_contextual rejects sequential scope (decision above), so a reference to a key that a later cascade file overrides is never left unresolved.
  • E1. Edit::Insert rejects 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 --write and set are 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.md agree.
  • C3. run reports a child killed by a signal as 128 + signal on Unix and never maps a failing Windows status to 0.
  • C4. load prints values encoded so the output parses back to the same values.
  • C5. fmt --write and set on a symlink replace the link target and keep the link.
  • D1. cli.md lists every JSON field, including ok, error and the diagnostic object.
  • D2. The README describes what run passes to the child, that diff prints values, and that Debug output includes values.
  • D3. ExpandOptions::compose is documented as Compose-style reference rules, not a full Compose interpolation emulation.
  • D4. DoubleEscapes rustdoc shows single backslashes.
  • D5. Mode-name rules in loading.md match the implementation.
  • X1. Per-crate versions in the release workflow and RELEASING.md.
  • X2. adotenv-config on config 0.15; the MSRV job builds it with 1.88.
  • X3. Restore CHANGELOG.md and add a migration section for 0.x users.
  • X4. Anchor the core package include patterns to the package root.
  • X5. The semver check also runs on pushes to main.
  • X6. RELEASING.md covers the GitHub Release notes.
  • 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.

Tracked for 1.x, not part of 1.0:

  • Windows: exec::Shell argument quoting for cmd /S /C via CommandExt::raw_arg, and the process environment value length limit in adotenv-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_from key failures).
  • Optional value masking for Debug, diff and 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 under LineBreaks::Lf, native \n-sentinel preservation in appended_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’s ContentDeserializer rejects numbers into String, with #[serde(deserialize_with = ...)] documented and tested for typed fields).
  • Document::example turns 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::Required carries the operator, so its message can say whether the variable was unset or empty. 1.x says that it has no value.

Completed on 2026-10-31:

  1. Landed the items above with regression tests.
  2. Released 0.11.0 for all five crates.
  3. Confirmed alint on 0.11.0.
  4. Landed E6 and the reference-scanning performance fix.
  5. Ran four consecutive scheduled fuzz runs on the release code.
  6. Re-ran the reference-host performance record.
  7. Ran the release gate and the semver check, then released 1.0.0 of adotenv, adotenv-process and adotenv-cli and 0.12.0 of adotenv-config and adotenv-figment.