fix(test): stop a config test writing into the source tree #603
No reviewers
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea!603
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/test-writes-into-source-tree"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The intermittent
internal/gitexecfailure in the gate had a real cause.TestGetCredentialsWithSource_AmbientDegradesToNotConfiguredmade and then removed a directory underinternal/config. The gitexec contract test walksinternal/in the same parallelgo test ./..., and a directory removed mid-walk failed that walk. I found the writer withscripts/watch-tree-writes.py, a new script that logs files that appear or vanish underinternal/andcmd/during a run. After this change, a full gate run logs no writes into the tree.The test now keeps its config in a real temp directory and moves
TMPDIRto a sibling, so the guard still sees the config as outside temp. It also runs outside any git repo. Before, the origin rung and host corroboration blocked the token even with the guard call removed, so the test never proved the guard. With that call removed, the test now fails.The gate now keeps a failed leg's full log and prints its FAIL lines with context. Before, it showed only the last 25 lines and deleted the log, which hid this failure.