Skip to content

fix ci: ambiguous .into() in the log_vacuum traversal arm (E0283) - #13

Merged
marcuspat merged 2 commits into
mainfrom
fix/ci-fmt
Oct 4, 2026
Merged

marcuspat merged 2 commits into
mainfrom
fix/ci-fmt

Conversation

@marcuspat

Copy link
Copy Markdown
Owner

Follow-up to #12: the Build & Test job surfaced a compile error in the round-2 log_vacuum edit — "log_dir must not contain ..".into() against CapabilityResult::failure's impl Into<String> parameter leaves the target type uninferable (E0283). Pass the &str directly. One line, no semantic change.

Four formatting hunks CI caught (rustc is broken on the authoring
Mac): the traversal assert chain, the jt/jf tuple loop, the
jump-count assert, and the two golden-target asserts - exactly the
forms rustfmt wants, no semantic change.
The traversal-rejection arm used "...'...'.into()" against an
impl Into<String> parameter - the target type cannot be inferred
(E0283). Pass the &str directly; &str implements Into<String>.
@marcuspat

Copy link
Copy Markdown
Owner Author

Gate review — reviewer: claude

Lanes: reviewed by claude

GATE USAGE reviewer=claude in=2 cached=41,432 out=643 11s model=claude-haiku-4-5-20251001,claude-opus-5[1m] $0.311 API-equiv (not billed on subscription)

Diff is pure rustfmt reflow plus one real change.

The only semantic edit is sentinel-capabilities/src/filesystem.rs:265: dropping .into() from CapabilityResult::failure("'log_dir' must not contain '..'", false). Per the base commit message (88115df), failure takes impl Into<String>, so a &'static str argument is accepted directly and produces the identical String — behaviour-neutral, and it removes the inference ambiguity. Nothing else in the hunk changes the control flow: the else arm still returns early before log_dir is rebound or older_than_days is unwrapped.

Everything else is whitespace-only line wrapping with identical token streams:

  • filesystem.rs:563-567 — same normalise_components(...).unwrap_or_default().starts_with(&prefix) assertion, still negated.
  • sentinel-exec/src/sandbox.rs:818-820 — array literal reflowed; both ("jt", i+1+f.jt) and ("jf", i+1+f.jf) tuples preserved, so the bounds assertion still covers both branch targets.
  • sandbox.rs:830-848 — assert!(jumps >= 5, ...) and the three assert_eq! target checks keep their operands and messages verbatim.

No new checks are introduced, so there's no always-pass surface to hunt; the existing assertions retain their failing conditions (jumps >= 5 would still fail on a filter with no jump chain, and the t(..) equalities are compared against hard-coded indices, not recomputed from the same source).

One note, not a finding: I can't verify from the diff that cargo fmt --check now passes — the claim is that this is the formatting fix, and the reflow is consistent with rustfmt's default max_width = 100, but that's unverified here.

VERDICT: APPROVED


VERDICT: APPROVED

@marcuspat
marcuspat merged commit 832c8f4 into main Oct 4, 2026
3 of 5 checks passed
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.

1 participant