Skip to content

chore(agent): gate test-only disk_smart DERIVED_FIELDS behind cfg(test) - #380

Open
t11z wants to merge 2 commits into
mainfrom
claude/relaxed-fermat-vwh2pl
Open

t11z wants to merge 2 commits into
mainfrom
claude/relaxed-fermat-vwh2pl

Conversation

@t11z

@t11z t11z commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

What & why

Scheduled dead-code sweep. Gates disk_smart::core::DERIVED_FIELDS behind #[cfg(test)]. Only the row_fields_are_the_script_fields_plus_the_derived_ones seam test reads it. The module-wide allow(dead_code) on core was hiding that. With that allow lifted, the constant shows as unused on both the Linux build and a cargo check --target x86_64-pc-windows-gnu, so no platform reads it outside tests.

The sweep also looked at:

Checklist

  • Tests pass: cargo test (agent, 588 passed). The server is untouched.
  • Lint/format clean: cargo fmt --check, cargo clippy --all-targets
  • If the wire contract changed: n/a
  • If the change is architectural: n/a
  • Docs updated where relevant: n/a
  • Commits are signed off

Generated by Claude Code

`disk_smart::core::DERIVED_FIELDS` is read only by the
`row_fields_are_the_script_fields_plus_the_derived_ones` seam test. The
module-wide `allow(dead_code)` hid that: with it lifted, the constant is
reported unused on both the Linux build and a Windows (`x86_64-pc-windows-gnu`)
cargo check. Gating it keeps the seam test and stops the unused constant from
compiling into the binary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcqxZRm2PPzksU2suv6wqw
Signed-off-by: Claude <[email protected]>
`agent_update::tests::wait_times_out_while_another_process_runs_target`
fails on every `kenny-agent (Rust)` run on the ubuntu-26.04 runners,
independent of the change under test (also red on #375 and #356). This
takes the agent_update.rs hunk from #377 unchanged: the child is a copy of
the test binary running an ignored sleep helper instead of a copy of
/bin/sleep, spawning retries on ETXTBSY, and an early child exit fails
with its status. The hunk is byte-identical to #377's, so whichever PR
merges first, the other merges cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QcqxZRm2PPzksU2suv6wqw
Signed-off-by: Claude <[email protected]>

t11z commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

The kenny-agent (Rust) failure on dd06a9d isn't caused by this PR. It's agent_update::tests::wait_times_out_while_another_process_runs_target, which fails the same way on the ubuntu-26.04 runners for PRs that don't touch that code (#375, #356). #377 already fixes it, so 28d0121 ports #377's agent_update.rs hunk byte-for-byte. Whichever of the two merges first, the other still merges cleanly.


Generated by Claude Code

This branch has not been deployed

No deployments
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.

2 participants