Skip to content

fix(disk-hygiene): samefile only separator-carrying marker-free words (#3527) - #5068

Closed
kyle-sexton wants to merge 1 commit into
mainfrom
cursor/3527-samefile-separator-37e9
Closed

kyle-sexton wants to merge 1 commit into
mainfrom
cursor/3527-samefile-separator-37e9

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #3527.

Summary

The engine gate's marker-free fallback identity-checked every token of every shell command. It now checks separator-carrying words and Win32 filename aliases of hygiene.py (trailing dots/spaces, ::$DATA). Marker-carrying branches are unchanged. A hard link still gates when the invocation has a separator; a bare name stays the accepted PATH residual.

Companion corpus tests: PR #5051 (Refs).

Test plan

  • 39 engine-gate tests passed; ruff clean
  • git log --oneline --graph --decorate origin/main — samefile ran 4 times against origin/main
Open in Web Open in Cursor 

@github-actions

Copy link
Copy Markdown
Contributor

PR body contract — issue linkage

This PR body does not yet satisfy the issue-linkage contract:

  • Missing a "## Fix" section. State the concrete change and how it addresses the problem.
  • Missing a "## Verification" section. Record concrete evidence the change works (commands, gates, output).
  • Missing a "## Related" section. List related PRs, ADRs, or decision-log entries this PR does not close.

Edit the body and this comment updates itself on the next run.

The engine gate's marker-free fallback identity-checked every token of every
shell command. It now checks separator-carrying words and Win32 filename
aliases of hygiene.py, which is the set the contract already described.
Marker-carrying branches are unchanged.

Closes #3527

Co-authored-by: Kyle Sexton <[email protected]>
@cursor
cursor Bot force-pushed the cursor/3527-samefile-separator-37e9 branch from c1f5209 to 4b766e6 Compare September 28, 2026 12:38
@cursor
cursor Bot marked this pull request as ready for review September 28, 2026 13:13
@kyle-sexton

Copy link
Copy Markdown
Member Author

Closing by operator decision (2026-09-28): as written, the new marker-free identity filter skips main's engine-directory samefile check for bare relative words, so an alternate name for the engine file (a Windows 8.3 short name, or a hard link in the scripts directory) runs the engine ungated where main gates it. Re-file with that check kept and a regression test run from the scripts directory. #3527 stays open.

@kyle-sexton
kyle-sexton deleted the cursor/3527-samefile-separator-37e9 branch September 29, 2026 03:47
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.

disk-hygiene: _engine_gate_relevant samefile-scans every token of every command, not just separator-carrying words as documented

2 participants