diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index f1ddffc..0953f5b 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -20,7 +20,7 @@ { "name": "agentic-engineering", "description": "The autonomous engineering system for repository portfolios and everything its agents need — engineer, read-only surveyor, meta-engineer and Flux troubleshooter agents; portfolio, product, spend and improvement workflows; GitHub, CodeRabbit review, security, library documentation, Go, Kubernetes, Flux, Talos, SvelteKit frontend, Stripe payments, engineering-practice, design, product-management, marketing, finance and productivity skills; and the MCP servers they use; configured by the consumer AGENTS.md", - "version": "7.10.0", + "version": "7.10.1", "source": "./plugins/agentic-engineering" }, { diff --git a/plugins/agentic-engineering/.claude-plugin/plugin.json b/plugins/agentic-engineering/.claude-plugin/plugin.json index 0465a9d..b0ddf19 100644 --- a/plugins/agentic-engineering/.claude-plugin/plugin.json +++ b/plugins/agentic-engineering/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "agentic-engineering", "description": "The autonomous engineering system for repository portfolios and everything its agents need — engineer, read-only surveyor, meta-engineer and Flux troubleshooter agents; portfolio, product, spend and improvement workflows; GitHub, CodeRabbit review, security, library documentation, Go, Kubernetes, Flux, Talos, SvelteKit frontend, Stripe payments, engineering-practice, design, product-management, marketing, finance and productivity skills; and the MCP servers they use; configured by the consumer AGENTS.md", - "version": "7.10.0", + "version": "7.10.1", "author": { "name": "devantler-tech", "url": "https://github.com/devantler-tech" diff --git a/plugins/agentic-engineering/.codex-plugin/plugin.json b/plugins/agentic-engineering/.codex-plugin/plugin.json index 4ebbcda..1acb6d7 100644 --- a/plugins/agentic-engineering/.codex-plugin/plugin.json +++ b/plugins/agentic-engineering/.codex-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "agentic-engineering", "description": "The autonomous engineering system for repository portfolios and everything its agents need — engineer, read-only surveyor, meta-engineer and Flux troubleshooter agents; portfolio, product, spend and improvement workflows; GitHub, CodeRabbit review, security, library documentation, Go, Kubernetes, Flux, Talos, SvelteKit frontend, Stripe payments, engineering-practice, design, product-management, marketing, finance and productivity skills; and the MCP servers they use; configured by the consumer AGENTS.md", - "version": "7.10.0", + "version": "7.10.1", "author": { "name": "devantler-tech", "url": "https://github.com/devantler-tech" diff --git a/plugins/agentic-engineering/CHANGELOG.md b/plugins/agentic-engineering/CHANGELOG.md index eaf009c..da8e04d 100644 --- a/plugins/agentic-engineering/CHANGELOG.md +++ b/plugins/agentic-engineering/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog — `agentic-engineering` +## 7.10.1 — 2026-11-25 + +**Fixed** — default-branch CI health excludes scheduled failures once GitHub confirms the workflow +was deleted. A failed lifecycle read leaves health unknown. + ## 7.10.0 — 2026-11-23 **Added** — `unslop` refines rough drafts and existing screens through an audit and focused design diff --git a/plugins/agentic-engineering/resources/provider-neutral.desired-state.json b/plugins/agentic-engineering/resources/provider-neutral.desired-state.json index f93e211..613ada1 100644 --- a/plugins/agentic-engineering/resources/provider-neutral.desired-state.json +++ b/plugins/agentic-engineering/resources/provider-neutral.desired-state.json @@ -18,7 +18,7 @@ }, { "path": "scripts/classify-default-branch-ci-runs.sh", - "sha256": "0ad57f0653c45c12c8df82c1ab4e42c3787d90e656c3f0f497398b58f3dbd856", + "sha256": "b46c68788432b7b9de13e264b33ee7a399fa43a4514ea1ecae1afbc5dcfff217", "executable": true }, { diff --git a/plugins/agentic-engineering/scripts/classify-default-branch-ci-runs.sh b/plugins/agentic-engineering/scripts/classify-default-branch-ci-runs.sh index 3bcc652..0612909 100755 --- a/plugins/agentic-engineering/scripts/classify-default-branch-ci-runs.sh +++ b/plugins/agentic-engineering/scripts/classify-default-branch-ci-runs.sh @@ -11,7 +11,9 @@ # startup-failed scheduled runs of the last SCHEDULE_WINDOW_DAYS days; for each workflow found # there, one first-page read fetches its newest successful scheduled run. Those runs join the # current-head runs, so a scheduled workflow stays red until a later run of it succeeds. -# Cost per repository: the head pages + 3 + one per workflow with a red scheduled run. +# Remote mode then checks each remaining red schedule's lifecycle and omits confirmed deletions. +# Cost per repository: the head pages + 3 + one success read per workflow with a red scheduled +# run + one lifecycle read per scheduled failure that would otherwise be reported. # Blind spots: a scheduled workflow whose latest red run is older than the window, and # non-push events other than schedule (workflow_dispatch, dynamic), which keep current-head # semantics. @@ -167,6 +169,25 @@ retained_read() { printf '%s\n' "$raw" } +# Read IDs from the classified evidence. A different ID, unknown state, or failed read +# cannot establish that the requested workflow was deleted. +collect_deleted_workflows() { + local workflow_id page state + while IFS= read -r workflow_id; do + page=$(retained_read --method GET "repos/${repo}/actions/workflows/${workflow_id}") || return 2 + state=$(printf '%s\n' "$page" | jq -ers --argjson id "$workflow_id" ' + if length != 1 or (.[0] | type != "object" or .id != $id) then + error("workflow lifecycle does not match the requested workflow") + else .[0].state end + | if IN("active", "deleted", "disabled_fork", "disabled_inactivity", "disabled_manually") + then . else error("unknown workflow lifecycle state") end + ') || return 2 + if [ "$state" = deleted ]; then + printf '%s\n' "$workflow_id" + fi + done +} + collect_schedule_evidence() { local since conclusion page found reds='' successes='' workflow_ids workflow_id # Evidence accumulates as one JSON array per line and reaches jq on stdin, never argv, @@ -378,10 +399,6 @@ jq_filter=' ) | map(select(. != null and red)) | sort_by([.workflow_id, (.name // "")]) - | .[] - | [.workflow_id, .conclusion, (.html_url // ""), (.name // ""), - (.event // ""), (.path // ""), .created_at, .id, .run_attempt] - | @tsv ' classification="" @@ -395,7 +412,7 @@ if ! printf '%s\n' "$payload" | json_stream_unique; then echo 'classify-default-branch-ci-runs: ambiguous or incomplete raw observation; health is unknown' >&2 exit 2 fi -if ! classification=$(printf '%s\n' "$payload" | jq -rs \ +if ! classification=$(printf '%s\n' "$payload" | jq -cs \ --arg expected_head_sha "$head_sha" \ --arg expected_branch "$branch" \ --slurpfile schedule_evidence <(printf '%s\n' "$schedule_runs") \ @@ -404,6 +421,21 @@ if ! classification=$(printf '%s\n' "$payload" | jq -rs \ exit 2 fi -if [ -n "$classification" ]; then - printf '%s\n' "$classification" +deleted_workflows="" +if [ -n "$repo" ]; then + if ! deleted_workflows=$(printf '%s\n' "$classification" | + jq -r '.[] | select(.event == "schedule") | .workflow_id' | collect_deleted_workflows); then + echo "classify-default-branch-ci-runs: scheduled workflow lifecycle is unknown; health is unknown" >&2 + exit 2 + fi fi + +printf '%s\n' "$classification" | jq -r \ + --slurpfile deleted_workflows <(printf '%s\n' "$deleted_workflows") ' + .[] + | . as $run + | select($run.event != "schedule" or ($deleted_workflows | index($run.workflow_id)) == null) + | [.workflow_id, .conclusion, (.html_url // ""), (.name // ""), + (.event // ""), (.path // ""), .created_at, .id, .run_attempt] + | @tsv +' || exit 2 diff --git a/plugins/agentic-engineering/scripts/classify-default-branch-ci-runs.test.sh b/plugins/agentic-engineering/scripts/classify-default-branch-ci-runs.test.sh index d34ce63..3492649 100755 --- a/plugins/agentic-engineering/scripts/classify-default-branch-ci-runs.test.sh +++ b/plugins/agentic-engineering/scripts/classify-default-branch-ci-runs.test.sh @@ -326,6 +326,10 @@ case "$*" in *'actions/workflows/'*'/runs'*) args="$*"; id=${args#*actions/workflows/}; id=${id%%/runs*} answer "success-$id.json" '{"total_count":0,"workflow_runs":[]}' ;; + *'actions/workflows/'*) + args="$*"; id=${args##*/} + [ ! -e "$SCHEDULE_CASE/fail-workflow-$id" ] || exit 1 + answer "workflow-$id.json" "{\"id\":$id,\"state\":\"active\"}" ;; *status=failure*) answer failure.json '[{"total_count":0,"workflow_runs":[]}]' ;; *status=timed_out*) answer timed_out.json '[{"total_count":0,"workflow_runs":[]}]' ;; *status=startup_failure*) answer startup_failure.json '[{"total_count":0,"workflow_runs":[]}]' ;; @@ -385,12 +389,13 @@ new_case advanced run_json 600 31 push success "$t_new" "$head_sha" CI | pages > "$SCHEDULE_CASE/head.json" run_json 500 21 schedule failure "$t_old" "$old_sha" | pages > "$SCHEDULE_CASE/failure.json" expect_schedule 'a scheduled failure on an older head stays red after main advances' 0 "$nightly_red" -if [ "$(grep -c . "$SCHEDULE_CASE/calls")" -eq 5 ] && +if [ "$(grep -c . "$SCHEDULE_CASE/calls")" -eq 6 ] && grep -Fq 'repos/devantler-tech/example/actions/workflows/21/runs -f branch=main -f event=schedule -f status=success -F per_page=1' "$SCHEDULE_CASE/calls" && + grep -Fxq 'api --method GET repos/devantler-tech/example/actions/workflows/21' "$SCHEDULE_CASE/calls" && [ "$(grep -c -- '-f event=schedule -f status=[a-z_]* -f created=>=' "$SCHEDULE_CASE/calls")" -eq 3 ]; then pass=$((pass + 1)) else - record_failure 'scheduled evidence costs three window reads plus one read per red workflow' + record_failure 'scheduled evidence uses the branch and window reads, one success read, and one lifecycle read for a classified red' sed 's/^/ call: /' "$SCHEDULE_CASE/calls" >&2 fi @@ -400,6 +405,40 @@ run_json 500 21 schedule failure "$t_old" "$old_sha" | pages > "$SCHEDULE_CASE/f run_json 501 21 schedule success "$t_new" "$old_sha" | page > "$SCHEDULE_CASE/success-21.json" expect_schedule 'a later successful run of the same scheduled workflow clears it' 0 '' +new_case deleted +{ + run_json 500 21 schedule failure "$t_old" "$old_sha" + run_json 502 22 schedule failure "$t_new" "$old_sha" + run_json 503 23 schedule failure "$t_new" "$head_sha" +} | pages > "$SCHEDULE_CASE/failure.json" +run_json 503 23 schedule failure "$t_new" "$head_sha" | pages > "$SCHEDULE_CASE/head.json" +printf '%s\n' '{"id":22,"state":"deleted"}' > "$SCHEDULE_CASE/workflow-22.json" +printf '%s\n' '{"id":23,"state":"deleted"}' > "$SCHEDULE_CASE/workflow-23.json" +expect_schedule 'deleted scheduled failures on and off head drop out while the active failure stays' 0 "$nightly_red" + +new_case disabled +run_json 500 21 schedule failure "$t_old" "$old_sha" | pages > "$SCHEDULE_CASE/failure.json" +printf '%s\n' '{"id":21,"state":"disabled_manually"}' > "$SCHEDULE_CASE/workflow-21.json" +expect_schedule 'a disabled workflow stays red until it recovers or is deleted' 0 "$nightly_red" + +new_case lifecycle-failed +{ + run_json 500 21 schedule failure "$t_old" "$old_sha" + run_json 502 22 schedule failure "$t_new" "$old_sha" +} | pages > "$SCHEDULE_CASE/failure.json" +touch "$SCHEDULE_CASE/fail-workflow-22" +expect_schedule 'an unreadable workflow lifecycle makes health unknown with no partial result' 2 '' + +new_case lifecycle-mismatched +run_json 500 21 schedule failure "$t_old" "$old_sha" | pages > "$SCHEDULE_CASE/failure.json" +printf '%s\n' '{"id":22,"state":"deleted"}' > "$SCHEDULE_CASE/workflow-21.json" +expect_schedule 'deletion evidence for a different workflow makes health unknown' 2 '' + +new_case lifecycle-ambiguous +run_json 500 21 schedule failure "$t_old" "$old_sha" | pages > "$SCHEDULE_CASE/failure.json" +printf '%s\n' '{"id":21,"state":"active","state":"deleted"}' > "$SCHEDULE_CASE/workflow-21.json" +expect_schedule 'ambiguous deletion evidence makes health unknown' 2 '' + new_case older-success run_json 500 21 schedule failure "$t_new" "$old_sha" | pages > "$SCHEDULE_CASE/failure.json" run_json 499 21 schedule success "$t_old" "$old_sha" | page > "$SCHEDULE_CASE/success-21.json"