Adds tests for the -x (--one-file-system) descent rules in subdirJob, which previously had no test executing the rejection
itself — only a case proving -x skips nothing when every path is on
one filesystem.
The tests call subdirJob directly with a fabricated operand device,
so no second real filesystem is needed (that would not be portable):
reject descent when the subdirectory is on a different device;
bypass the boundary check when the operand's own device is unknown
(rootDevOK false);
warn and refuse descent when the entry's Info() fails;
cross the boundary by default (no -x).
The real subdirectory's device drives the boundary comparison; the
operand device is fabricated as that device plus one. The Info()
failure is produced by a small directory-entry stub whose Info()
returns a sentinel error (the repo linter forbids dynamic errors and
inline error handling, so the stub and its error are separate).
Tests only; scan.go is unchanged. make check green.
Model: opus-4-8
Adds tests for the `-x` (`--one-file-system`) descent rules in
`subdirJob`, which previously had no test executing the rejection
itself — only a case proving `-x` skips nothing when every path is on
one filesystem.
The tests call `subdirJob` directly with a fabricated operand device,
so no second real filesystem is needed (that would not be portable):
- reject descent when the subdirectory is on a different device;
- bypass the boundary check when the operand's own device is unknown
(`rootDevOK` false);
- warn and refuse descent when the entry's `Info()` fails;
- cross the boundary by default (no `-x`).
The real subdirectory's device drives the boundary comparison; the
operand device is fabricated as that device plus one. The `Info()`
failure is produced by a small directory-entry stub whose `Info()`
returns a sentinel error (the repo linter forbids dynamic errors and
inline error handling, so the stub and its error are separate).
Tests only; `scan.go` is unchanged. `make check` green.
Model: opus-4-8
The -x descent rules in subdirJob had no test executing the actual
rejection: the only case proved -x skips nothing when everything is on
one filesystem. Add tests that call subdirJob directly with a fabricated
operand device, so no second real filesystem is needed:
- reject descent when the subdirectory is on a different device;
- bypass the check when the operand's own device is unknown;
- warn and refuse descent when the entry's Info() fails;
- cross the boundary by default (no -x).
Tests only; scan.go is unchanged.
Model: opus-4-8
TODO.md, new Completed Steps entry (top of the list): the entry runs five lines and narrates the four test cases ("reject across a boundary, bypass when the root device is unknown, stat-error warning, and default crossing"). The standing rule is at most three lines and no narration — what landed, date, issue link. Acceptable is a trimmed entry such as: what was tested, the date, and the issue URL, without the per-case list.
The tests themselves are correct and in scope: they exercise all four subdirJob branches from the definition of done, scan.go is untouched, and the gate is green.
Model: opus-4-8
One finding.
`TODO.md`, new Completed Steps entry (top of the list): the entry runs five lines and narrates the four test cases ("reject across a boundary, bypass when the root device is unknown, stat-error warning, and default crossing"). The standing rule is at most three lines and no narration — what landed, date, issue link. Acceptable is a trimmed entry such as: what was tested, the date, and the issue URL, without the per-case list.
The tests themselves are correct and in scope: they exercise all four `subdirJob` branches from the definition of done, `scan.go` is untouched, and the gate is green.
Model: opus-4-8
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds tests for the
-x(--one-file-system) descent rules insubdirJob, which previously had no test executing the rejectionitself — only a case proving
-xskips nothing when every path is onone filesystem.
The tests call
subdirJobdirectly with a fabricated operand device,so no second real filesystem is needed (that would not be portable):
(
rootDevOKfalse);Info()fails;-x).The real subdirectory's device drives the boundary comparison; the
operand device is fabricated as that device plus one. The
Info()failure is produced by a small directory-entry stub whose
Info()returns a sentinel error (the repo linter forbids dynamic errors and
inline error handling, so the stub and its error are separate).
Tests only;
scan.gois unchanged.make checkgreen.Model: opus-4-8
One finding.
TODO.md, new Completed Steps entry (top of the list): the entry runs five lines and narrates the four test cases ("reject across a boundary, bypass when the root device is unknown, stat-error warning, and default crossing"). The standing rule is at most three lines and no narration — what landed, date, issue link. Acceptable is a trimmed entry such as: what was tested, the date, and the issue URL, without the per-case list.The tests themselves are correct and in scope: they exercise all four
subdirJobbranches from the definition of done,scan.gois untouched, and the gate is green.Model: opus-4-8
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.