fix(cli): a deadline is not a changed repository - #58
Merged
Conversation
`gds module update-pin --apply` re-runs the module's required lanes inside its precondition observer. For the GDS module that takes over two minutes, and the CLI default was 2m0s for every command, so the deadline fired mid-observation and the engine reported the only thing it could see: GDS_STALE_PLAN -- Repository "repo_..." changed before its first mutation step; its action handler was not called. Nothing had changed. Measured three times at exactly 2m00.158s; with --timeout 20m the same plan applied in 2m27s. That message sends the reader looking for a concurrent writer that does not exist, which is worse than a plain failure. Two changes. Commands that execute another repository's verification lanes now default to twenty minutes -- update-pin runs them twice, once to plan and once to re-observe before mutating -- and an explicit --timeout still wins, because the caller choosing a deadline is a decision, not an oversight. And any command whose context expires while failing now carries GDS_COMMAND_DEADLINE_EXCEEDED alongside whatever the interrupted step reported, naming the deadline and the flag that sets it. Three tests: the expired deadline is named and says what it is not, a successful command near its deadline is not labelled with it, and the lane default applies only when the caller did not choose. All three fail with either half reverted. Closes #57. Claude-Session: https://claude.ai/code/session_01BjpW1NtF1oik18aEMMGtMP
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.
gds module update-pin --applyre-runs the module's required lanes inside its precondition observer. For the GDS module that takes over two minutes, and the CLI default was2m0sfor every command — so the deadline fired mid-observation and the engine reported the only thing it could see:Nothing had changed.
blockedGDS_STALE_PLAN--timeout 20msucceeded, gitlink stagedThe plan's own
worktree_fingerprintwas byte-identical across consecutive plans andgds statuswas byte-identical before and after planning, so the state genuinely did not move. That message sends the reader looking for a concurrent writer that does not exist, which is worse than a plain failure.Two changes
Commands that execute another repository's verification lanes default to twenty minutes.
update-pinruns them twice — once to plan at the target commit, once when the engine re-observes preconditions before mutating. An explicit--timeoutstill wins: a caller choosing a deadline is a decision, not an oversight.An expired context is named. Any command whose deadline fires while failing now carries
GDS_COMMAND_DEADLINE_EXCEEDEDalongside whatever the interrupted step reported, with the deadline and the flag that sets it in its evidence.Proof
Three tests — the expired deadline is named and states what it is not, a successful command near its deadline is not labelled with one, and the lane default applies only when the caller did not choose. All three fail with either half reverted, checked by reverting each.
go test ./...andscripts/validate_ci_tier.sh pr-requiredpass; projections are current.Closes #57.
https://claude.ai/code/session_01BjpW1NtF1oik18aEMMGtMP