fix(checkpoints): import shared helpers by location - #20
Merged
Merged
Conversation
…ath[0] checkpoints.py reached continuity.py through a bare import that only works because the script's own directory happens to be sys.path[0]. Under python3 -P that entry is absent and the import raises ModuleNotFoundError. For a hook that is worse than an ordinary failure. The import sits above main()'s try, so the usual fail-open never runs: the process exits non-zero without printing the empty result a hook is required to return, and the host sees a broken handler rather than a quiet one. standards.py already avoided this by inserting its own directory explicitly, and recorded the older form as debt not to imitate. This pays that debt with the same two lines, and a test now runs all three runtime scripts under -P so a fourth cannot reintroduce it. The planning records are updated as the workflow requires after a merge: the rollout record now lists the standards work, the portable registration and the Codex trust finding, keeps the two open items visible, and restates the operator's standing instruction to keep this lightweight, which already changed one decision in flight. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016cCs5DdUjLDkP8V3Z5x6XH
-P and PYTHONSAFEPATH arrived in Python 3.11, and 3.9 answers -P with "Unknown option", which failed both 3.9 jobs while both 3.12 jobs passed. Skipping is correct rather than a weakening: without a safe-path mode there is no sys.path[0] to be absent, so the failure the test guards against cannot arise on those interpreters. CI still runs it on 3.12. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016cCs5DdUjLDkP8V3Z5x6XH
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.
Why
checkpoints.pyreachescontinuity.pythrough a barefrom continuity import …, which works only because the script's own directory happens to besys.path[0]. Underpython3 -Pthat entry is absent:For a hook this is worse than an ordinary failure. The import sits above
main()'stry, so the usual fail-open never runs: the process exits non-zero without printing the empty result a hook is required to return, and the host sees a broken handler rather than a quiet one.standards.pyalready avoided this by inserting its own directory explicitly, and recorded the older form as debt not to imitate. Two lines pay it.Validation
Ran 166 tests ... OK (skipped=1);--checkPASS on all five checks.A new test runs all three runtime scripts under
python3 -P, so a fourth cannot reintroduce this.Also: the backward update the workflow asks for
The rollout record now lists the standards work (#13, #15, #17, #18, #19), the portable registration (#11) and the Codex trust finding (#16), and keeps the two open items visible:
PostToolUsedelivery under an authenticated turn is still not directly observed, andmerge-guardis still unimplemented.It also restates the standing instruction to keep this lightweight, which already changed one decision in flight — Step 4b went from five commits to two by dropping a
Stopmapping onto an event that does not mean what the trigger meant.🤖 Generated with Claude Code
https://claude.ai/code/session_016cCs5DdUjLDkP8V3Z5x6XH