Fail-safe global dedup: auto-clear stale repo-hooks-active markers#41
Draft
Copilot wants to merge 2 commits into
Draft
Fail-safe global dedup: auto-clear stale repo-hooks-active markers#41Copilot wants to merge 2 commits into
repo-hooks-active markers#41Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
[WIP] Clean up stale repo-hooks-active markers on session start
Fail-safe global dedup: auto-clear stale Jun 12, 2026
repo-hooks-active markers
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.
--globaldedup was treating any existingrepo-hooks-activemarker as valid, which could survive crashes/restarts and silently bypass all governance workflows. This change makes marker handling self-healing by aging out stale session markers before skip decisions.Global dedup hardening
runWithRawInput(..., global=true)beforerepo hooks already activeshort-circuit.allow.INFOlog with session id, marker age, and threshold when stale cleanup occurs.Configurable staleness policy
HOOKFLOW_REPO_HOOKS_ACTIVE_STALE_THRESHOLD(default:24h).Session sentinel support
IsRepoHooksActiveStale(threshold)to centralize marker age evaluation (exists+mtime+age).Coverage updates
Docs
Example (new behavior in global dedup path):