Skip to content

Correct injected-floor test explanation (#83) - #84

Merged
sehkone merged 1 commit into
mainfrom
sehkone/issue-83
Aug 29, 2026
Merged

Correct injected-floor test explanation (#83)#84
sehkone merged 1 commit into
mainfrom
sehkone/issue-83

Conversation

@sehkone

@sehkone sehkone commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

an_injected_floor_inside_the_implemented_range_refuses_only_below_itself proved the right thing but explained it with the wrong history. Its comment said the injected-floor-inside-the-range case became reachable only once the limit_nofile bump widened the build's window, and that the preceding accepted range was a point. Neither is true: the range was already 3..=4 before that bump, which is exactly what check_format_version's rustdoc says — values inside the implemented range have been observable since manifest format version 4.

The comment now states that the window has spanned more than one version since manifest format version 4, and draws the contrast the test actually exercises: a floor sitting inside the window (above the bottom, no higher than the top, leaving versions the build still accepts) versus one above the whole window, where the accepted set is empty. The floor this test injects is the producer's version — the top of the window rather than a strictly interior value — so the prose no longer implies otherwise.

The test's package construction, injected floor, and acceptance/refusal assertions are unchanged; the diff is four comment lines in src/verify.rs. No constant, parser, verifier, or descriptor-limit behavior was touched.

Closes #83

Part of #78

Test plan

  • cargo test --features test-support an_injected_floor_inside_the_implemented_range_refuses_only_below_itself passes
  • cargo fmt -- --check --config group_imports=StdExternalCrate
  • cargo clippy --all-targets -- -D warnings
  • cargo clippy --all-targets --features test-support -- -D warnings
  • cargo test and cargo test --features test-support
  • The comment no longer claims the case became reachable only with the descriptor-limit bump, nor that the preceding accepted range was a point
  • The comment and check_format_version's rustdoc agree that an injected floor can sit inside the implemented range since manifest format version 4
  • The test still proves a trust-set floor at the producer version refuses a manifest at the build floor and accepts the producer-version package

The comment claimed the injected floor could only sit inside the
implemented range once the descriptor-limit bump widened it, and that
the preceding range was a point. It was already 3..=4 before that bump,
which is what `check_format_version` says: values inside the range have
been reachable since manifest format version 4. The test behaviour was
right; only its history was wrong.

The floor the test injects is the producer's version, which is the top
of the window rather than strictly interior, so the contrast the comment
draws is with a floor above the whole window — where the accepted set is
empty — and not with one at the top.

Closes #83
Part of #78
@sehkone

sehkone commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

[Reviewer Round 1]

Approved — I found no review findings.

The edit at src/verify.rs accurately removes the false descriptor-limit history and explains the meaningful distinction: a floor above the build minimum but no higher than its maximum leaves an accepted set, unlike one above the window. It agrees with check_format_version’s rustdoc at src/verify.rs.

The test construction and assertions remain unchanged: it still rejects the manifest at MIN_MANIFEST_FORMAT_VERSION under the producer-version trust floor and accepts the producer-version package. PR hygiene also looks correct: it links Closes #83, retains the permitted Part of #78, and includes a test plan.

@sehkone

sehkone commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

[Review Verdict Round 1: APPROVED]

@sehkone
sehkone merged commit f9541a8 into main Aug 29, 2026
4 checks passed
@sehkone
sehkone deleted the sehkone/issue-83 branch August 29, 2026 09:06
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.

Correct injected-floor test explanation

1 participant