Integrate safe Stop defer boundaries - #13
Open
BananaAccurate wants to merge 8 commits into
Open
Conversation
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is a stacked Tailtest repair branch on top of the existing prerequisites in PRs #8, #10, #11, and #12. The new Stop-specific commits are:
cd984ea— honor safe Stop defer boundaries6793f43— preserve matching Stop fencesRoot cause / behavior
The Stop hook needed stricter separation between trusted current-user stop directives and untrusted transcript/repository data. This branch keeps default queue-blocking behavior, preserves queued work across explicit one-turn defer/no-more-tools flows, and only honors defer wording when it is attributable to the latest supported user directive.
The follow-up fix tracks Markdown fence opener marker/length so mixed backtick/tilde fences cannot prematurely expose an embedded
/tailtest defercommand as executable control text.Security boundaries
Validation
On
6793f43104d9a5fbdefc246cb9990b9de81cfac1:python -m pytest -q: first full-suite run exposed a non-reproducedtests/test_mtime_sweep.py::TestGitCleanMtimeChurnSkipped::test_clean_tracked_file_with_new_mtime_is_skipped_when_git_requiredfailure; focused test passed, default-order prefix passed, and full rerun passed with435 passed in 71.07s.python -m ruff check .: passed.python -m ruff format --check .: passed,28 files already formatted.git diff --check: passed.python3 -m pytest -q && python3 -m ruff check . && python3 -m ruff format --check .: passed with434 passed, 1 skipped, Ruff check passed, and28 files already formatted.Remaining limitations
main.Maintainer edits are enabled.