Skip to content

Implementation Plan: T5-P5-A11-WP2 — CI-Facing Shell Layer for Probe Canary State Machine#4142

Merged
Trecek merged 4 commits into
developfrom
t5-p5-a11-wp2-provide-the-ci-facing-shell-layer-that-formats/4030
Jun 28, 2026
Merged

Implementation Plan: T5-P5-A11-WP2 — CI-Facing Shell Layer for Probe Canary State Machine#4142
Trecek merged 4 commits into
developfrom
t5-p5-a11-wp2-provide-the-ci-facing-shell-layer-that-formats/4030

Conversation

@Trecek

@Trecek Trecek commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Create two shell scripts (scripts/post-probe-failure.sh and scripts/create-probe-canary-issue.sh) and a Python CLI entry point in _probe_canary.py that 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. The post-probe-failure.sh script accepts positional args, validates .venv/bin/python, and delegates to python -m autoskillit._probe_canary post-failure. The create-probe-canary-issue.sh script validates GITHUB_REPOSITORY and GITHUB_TOKEN, then calls gh 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 Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 1 3.4k 25.1k 1.7M 102.4k 54 84.0k 16m 25s
verify* sonnet 1 840 10.7k 346.5k 59.6k 24 41.1k 5m 15s
implement* MiniMax-M3 1 117.2k 13.2k 1.6M 0 89 0 7m 52s
audit_impl* sonnet 1 2.1k 11.1k 229.1k 60.6k 17 44.6k 5m 19s
prepare_pr* MiniMax-M3 1 42.3k 1.7k 111.6k 0 11 0 1m 26s
compose_pr* MiniMax-M3 1 37.4k 1.6k 175.8k 0 13 0 47s
review_pr* sonnet 1 108 43.0k 743.2k 98.4k 38 80.7k 10m 23s
resolve_review* sonnet 1 229 24.7k 2.1M 98.2k 71 79.7k 8m 39s
Total 203.7k 131.0k 7.1M 102.4k 330.0k 56m 8s

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
verify 0
implement 384 4295.7 0.0 34.3
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 24 86909.0 3318.8 1030.7
Total 408 17337.6 808.9 321.2

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 3.4k 25.1k 1.7M 84.0k 16m 25s
sonnet 4 3.3k 89.5k 3.4M 246.1k 29m 37s
MiniMax-M3 3 197.0k 16.5k 1.9M 0 10m 5s

Trecek and others added 4 commits June 28, 2026 07:42
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>
@Trecek Trecek added this pull request to the merge queue Jun 28, 2026
Merged via the queue into develop with commit e9f153c Jun 28, 2026
3 checks passed
@Trecek Trecek deleted the t5-p5-a11-wp2-provide-the-ci-facing-shell-layer-that-formats/4030 branch June 28, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant