Skip to content

fix(#825): scrub the real path/username PR #824 reintroduced into two files - #826

Merged
fdaviddpt merged 2 commits into
mainfrom
fix/825
Sep 27, 2026
Merged

fdaviddpt merged 2 commits into
mainfrom
fix/825

Conversation

@fdaviddpt

Copy link
Copy Markdown
Contributor

Summary

PR #824 (merged as 379f712) fixed #822 by scrubbing a leaked local checkout path out of
trap.d/804.edit-op-defaulted-to-main-clone-not-worktree.md, but reintroduced the same real
maintainer path/username into two other tracked files that same commit added:

  • changelog.d/822.fixed.md -- prose literally quoted /Users/floriandavid/....
  • tests/test_trap_fragment_no_leaked_home_paths_822.py -- docstring, two regex comments, and
    the positive-control fixture all spelled out the real path.

This fix replaces every occurrence with a generic placeholder (/Users/someone/...), keeping the
detector test's own logic and fixture shape unchanged -- only the value is fake now, not the
shape. A new changelog.d/825.fixed.md fragment documents the fix without itself quoting a real
username.

This branch also carries a second, non-required commit: trap.d/825.ci-skip-lets-username-leaks-reach-main.md,
a trap.d fragment (not a code fix) logging why tests/test_no_real_home_paths_467.py's
username scanner can miss this exact class of regression under CI (it skips itself whenever
CI/GITHUB_ACTIONS is set, by design, to avoid false positives on CI runner account names). #822's
own fix shipped this shape once already; #825 is the second occurrence. The issue text itself
flagged this as optional / not required for #825's own scope, so it is logged for the curation
pass rather than fixed here -- a real fix needs a genuinely CI-safe way to tell a maintainer's
real username apart from a CI runner's account name, which is a design decision better made
holding all trap fragments at once.

Adjacent findings (not required, not blocking)

Test plan

  • python3 -m pytest tests/test_no_real_home_paths_467.py -k username -q -- RED at 379f712
    (1 failed, found floriandavid in both files), GREEN at 242fae4 (4 passed, 11 deselected).
  • python3 -m pytest tests/test_no_real_home_paths_467.py tests/test_trap_fragment_no_leaked_home_paths_822.py -q
    -- 15 passed, before and after.
  • Full repository pytest -- not run locally; CI (13 legs, 3 OSes, 4 interpreters) is the gate.

Closes #825

🤖 Generated with Claude Code

[AI-generated]

fdaviddpt and others added 2 commits September 27, 2026 13:00
… files

PR #824 (merged as 379f712) fixed #822 by scrubbing a leaked local checkout
path out of trap.d/804.edit-op-defaulted-to-main-clone-not-worktree.md, but
put the same real maintainer path/username back into two other tracked files
it added in that same commit:

- changelog.d/822.fixed.md's own prose quoted the literal
  /Users/floriandavid/... path it was describing the scrub of.
- tests/test_trap_fragment_no_leaked_home_paths_822.py's docstring, regex
  comments and positive-control fixture all spelled out the same real path.

Both now use a generic made-up path/username (/Users/someone/...) instead.
The positive-control fixture keeps the same shape (an absolute POSIX home
path under a worktree directory naming issue #804), so it still exercises
the detector's regex identically -- only the value is fake now, not the
shape.

tests/test_no_real_home_paths_467.py::test_no_tracked_file_leaks_the_current_machine_username
was red before this change (found floriandavid in exactly these two files)
and is green after.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
… real username

Not a code fix -- a trap.d fragment for the curation pass, per the developer
brief's "log it and carry on" for something observed but not decided:
tests/test_no_real_home_paths_467.py's username scan skips itself under CI
(by design, to avoid false positives on CI runner account names like
runneradmin), so this whole class of leak only surfaces on a maintainer's
own local run. #822's own fix (PR #824) already shipped this exact shape
once, and #825 is a second occurrence. Deciding what to do about it -- new
jit-context rule, filed issue, or leave as-is -- is left to the curation
pass, per this issue's own text.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@fdaviddpt
fdaviddpt merged commit 50d4932 into main Sep 27, 2026
16 checks passed
@fdaviddpt
fdaviddpt deleted the fix/825 branch September 27, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant