Repository navigation
feat(local): add check-stalled command and stage timeout - #1171
Open
shengzhaowei wants to merge 1 commit into
Open
shengzhaowei wants to merge 1 commit into
shengzhaowei wants to merge 1 commit into
Conversation
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.
What changed
local/skills/devflow/config/workflow.jsonhasmax_stage_failures: 2but no stage timeout at all, andstatusnever reports how long anin_progressstage has been running, so a stuck stage waits silently — Hermesdelegate_taskwaits for a completion notice and Pi front-blocking waits for a return. This PR adds a reporting-only stall check, deliberately as a new standalone subcommand so it does not touchstatusorapprove: (1)config/workflow.json:"stage_timeout_minutes": 60(default for reporting only, not a kill switch;versionstays2.0). (2)scripts/workflow_state.py: newcheck-stalledcommand. For eachin_progressstage with astarted_atit prints one line with the elapsed minutes and flags stages over the timeout asSTALLED. It exits 1 if any stage is stalled, else 0. It writes no state and triggers no abort or retry. A stage with nostarted_atprintselapsed=unknownand is not flagged. (3) A regression test (LifecycleTests.test_check_stalled_flags_stage_over_timeout) runs the command on a freshly started stage (exit 0, noSTALLED), then backdates itsstarted_atby 2 hours and asserts exit 1 withSTALLEDin the output.Scope
Portable (checked); all other scope boxes unchecked, including Documentation only.
Compatibility
New subcommand and one new config key; no existing command, field, or behavior changes. No migration, no version bump. Old states without the new key still work because the timeout is read from config at run time.
Validation
Run locally on 2026-11-21, base d58a85a: validate_config OK (adapters=7 logical_roles=10 host_agents=6 artifacts=11); unittest 31 tests OK (incl. test_check_stalled_flags_stage_over_timeout); validate.sh [1/6]-[6/6] passed; build-classic-hosts.py --check OK; scan-secrets no leaks found; e2e tests passed (skipped=1); smoke-install passed; test-observability passed, source tree clean. Not run: go test, go vet, check-public.py — no Go or public-surface changes in this PR.
Safety
All four safety boxes checked: no credentials/internal endpoints/production data/organization-specific infrastructure; preserved user files and unrelated changes; updated generated Classic host bundles when applicable; documented third-party content and licensing changes when applicable.