Source-file gate refuses a quoted filename that contains -tail-
Repro: run_command('P="docs/issues/x-tail-y.md src/tools/mod.rs"; echo assigned') is refused as "shell access to source files is blocked". The same line without -tail- in the filename (P="docs/research/x.md src/tools/mod.rs"; echo assigned) runs. Re-confirmed on 2026-09-24.
Cause (likely): the reader-command scan in check_source_file_access (src/util/path_security.rs) looks inside quoted values, so tail between two - in a filename reads as the tail command. mask_heredoc_bodies in the same file solves the same problem for heredocs, so it's a good model to follow.
Tests first:
- the command above must be allowed;
tail src/tools/mod.rsmust still be refused.
Test 2 is what keeps the security gate honest: a fix that simply stops detecting tail would pass test 1 and fail test 2.
Full context in the bug file: docs/issues/2026-09-24-source-gate-reads-tail-inside-a-quoted-hyphenated-filename.md.
Base your branch on a fresh origin/experiments.
Taking this one.