Implementation Plan: T5-P5-A11-WP2 — CI-Facing Shell Layer for Probe Canary State Machine#4142
Merged
Trecek merged 4 commits intoJun 28, 2026
Conversation
Add post-probe-failure.sh and create-probe-canary-issue.sh scripts that route CI probe failures into the Python canary state machine without reimplementing state-transition logic in shell. Add _cli_main() and _handle_post_failure() to _probe_canary.py for argparse-driven entry point, plus tests covering CLI subcommands and shell script syntax/executable/validation contracts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…l scripts Both scripts/create-probe-canary-issue.sh and scripts/post-probe-failure.sh were missing the required trailing newline at end of file per POSIX standard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Wrap ErrorKind(failure_type) in try/except ValueError so direct callers bypassing CLI validation get a clean error return instead of a traceback - Wrap ensure_issue() in try/except Exception so a GitHub API failure does not propagate before state.save(), preserving the in-memory streak increment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- test_post_failure_records_and_saves: track gh call count and assert run_gh is never invoked when streak is below threshold (explicit guard rather than implicit failure-path assumption) - test_post_failure_threshold_triggers_issue_creation: assert state file persists correct streak and last_issue_number after issue creation - test_rejects_missing_args: assert stderr contains "Usage" message, consistent with sibling GITHUB_REPOSITORY/GITHUB_TOKEN tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Create two shell scripts (
scripts/post-probe-failure.shandscripts/create-probe-canary-issue.sh) and a Python CLI entry point in_probe_canary.pythat connects them. The shell scripts format CI probe failure data and route it into the existing Python canary state machine — no state-transition logic is reimplemented in shell. Thepost-probe-failure.shscript accepts positional args, validates.venv/bin/python, and delegates topython -m autoskillit._probe_canary post-failure. Thecreate-probe-canary-issue.shscript validatesGITHUB_REPOSITORYandGITHUB_TOKEN, then callsgh issue create --label autoskillit-canary.Closes #4030
Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260628-071500-126668/.autoskillit/temp/make-plan/t5-p5-a11-wp2-ci-shell-layer_plan_2026-06-28_071500.md🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown