Skip to content

fix(app-control): require a Ready command that fails when the instance is unfit - #10905

Merged
melodic-automation-lanes[bot] merged 4 commits into
mainfrom
work-resolve-issue/issue-10145-40837988928-1
Oct 29, 2026
Merged

melodic-automation-lanes[bot] merged 4 commits into
mainfrom
work-resolve-issue/issue-10145-40837988928-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #10145

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The control-skill contract and map's Generate step now require each check in a control skill's Ready command to exit non-zero when it fails, so a listing such as docker ps ends in grep -q on the expected row. Map's proof runs Ready once more with the app stopped and reads its exit status from a new ready.exit field in drive's report. /app-control:map check reports a new ready-listing finding for a Ready command whose last stage is a bare listing, and create fixes each one before its proof.

Not verified

  • check-map.test.sh was not executed here (this lane's Bash runs only the named wrappers, and check-affected's output does not show whether it ran this suite); left to the PR's CI
  • tidy: the ai-slop deterministic detector (detect.sh) could not run in this lane, so pass 4 applied the rubric by reading only
  • review finding not acted on: the ready-listing heuristic has known limits (a backslash-continued fenced command is checked line by line; a listing behind a sudo/$ prefix or not in last position is not flagged); accepted as the issue asks only for a last-stage bare-listing check
  • untracked runner files in the checkout (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) are not part of this change and were left alone and excluded from the tidy measurement

Fix

  • plugins/app-control/reference/control-skill.md: Hub table's Ready row points to a new "The Ready command" section, which states the exit-status rule, the grep -q form for listings and how to meet it when a url placeholder makes Ready run without a shell; Contents entry added
  • plugins/app-control/skills/map/SKILL.md: Generate step's Hub bullet states the rule and requires fixing each ready-listing line before step 5; Prove step names the Ready-when-stopped check; Report lists Ready's exit status with the app up and stopped
  • plugins/app-control/skills/map/reference/prove.md: drive calls item 2 adds a ready call after cleanup; "Checks after the proof" adds "Ready when stopped", which requires a non-zero ready.exit with the app stopped
  • plugins/app-control/skills/drive/reference/evidence.md: report.json ready gains exit (the Ready command's exit status, or null) and report.md lists that exit status
  • plugins/app-control/skills/map/scripts/check-map.sh: new ready-listing rule: under the hub's ## Ready, each fenced line, code span or plain line whose last stage (with quoted text dropped) is a docker/podman/nerdctl ps, container ls, compose ps, docker-compose ps, kubectl get or systemctl list-u
  • plugins/app-control/skills/map/scripts/check-map.test.sh: four cases: plain-line listing flagged, listing piped to grep -q clean, fenced listing with a quoted pipe flagged, code-span listing in prose flagged while one in another section is not
  • .changes/app-control/work-resolve-issue-issue-10145-3b8d6e14.md: patch changelog fragment

Verification

The runner ran each check from the base copy against 85636dd:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • .lane/checks/bin/check-changelog-fragments: all 13 fragments valid (run after the final edits)
  • .lane/checks/bin/check-affected: 12 passed, 6 skipped over 7 changed files (run after the final edits); an earlier run failed on shellcheck SC2016 in check-map.test.sh, fixed with a scoped disable directive
  • fresh-context review subagent: traced the four new test cases through check-map.sh by hand and found each expected output exact; its six confirmed prose findings (no-shell Ready, create not surfacing ready-listing, no exit field in drive's report, a weak scoping test, a duplicated ready call, rerun
  • code-tidying:tidy-diff over the change's hunks: no simplify, comment, write-for-agents or ai-slop rubric edits needed
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40837988928

Left out: the items under Not verified.

Related

#10145

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed f427911fa69ce1486f1cffb5821299ead9d5acbd: 0 finding(s), 0 as inline comments.

No security issues found in the incremental change to plugins/app-control/skills/map/scripts/check-map.sh.

The change turns kubectl_names_object from a function whose return status answered the question into one that sets a global named (1 or 0). The caller reads it with if ((named)); then continue; fi. This is a refactor so errexit is not suspended inside the function. The logic is the same. named=$((types > 1)) always returns status 0, so set -e can't abort the loop.

  • Reachability: the script is a local lint helper. It reads a skill's SKILL.md Ready commands and only matches them against a regex, with printf and sed. It never executes or evals them. The only output is a finding line.
  • Injection: $1 goes through read -r -a and is not expanded as a command or glob. The quoted "${words[@]:2}" loop has no unquoted expansion.
  • Trust controls: none are touched. The file isn't in the trusted paths. It changes no workflow, token scope, kill switch, merge hold or manifest.

Spend: none.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 85636dd0fab114320691179cc1c1f655a7662e6d; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed f427911fa69ce1486f1cffb5821299ead9d5acbd: 0 finding(s), 0 as inline comments.

Incremental review of plugins/app-control/skills/map/scripts/check-map.sh since 25ad10b. I found nothing to flag.

The change replaces the return-status contract of kubectl_names_object with a named variable, so the caller no longer uses the function as an if condition. I read the head file and traced the paths:

  • named=1 is set up front, so the early return 0 paths (-f, -k, --filename, --raw, or a */* word) leave it at 1, meaning an object is named. That matches the old behaviour, where those paths returned 0 for "names an object".
  • The final named=$((types > 1)) sets 1 for a type plus a name (pod shop-db-0) and 0 for resource types alone (kubectl get pods). That also matches the old behaviour.
  • The caller reads if ((named)); then continue; fi after a plain call. A plain call is exempt from errexit only if it succeeds, and every path through the function now returns 0, so set -e cannot abort the script. The [[ … ]] && skip=1 line inside the function sits in a non-final position of an && list, so errexit ignores it.
  • named is a global rather than a local, which is intended and documented in the updated comment.

I did not run the script or its tests. This review is from reading the code only.

Spend: this change adds no paid-plan, billing or prepaid-credit spend.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 85636dd0fab114320691179cc1c1f655a7662e6d.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6xeTCI
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 2b7b119.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 2b7b11912c5edf225358d335e03476e6e13199f4; the summary is in this lane's pull request comment.

claude-lane: claude-review

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6xefwg
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on 25ad10b.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head f427911fa69ce1486f1cffb5821299ead9d5acbd. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head f427911fa69ce1486f1cffb5821299ead9d5acbd.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit f768cfb Oct 29, 2026
38 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-10145-40837988928-1 branch October 29, 2026 10:10
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 7, survived 0, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 100%; mutation score 100%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/app-control/skills/map/scripts/check-map.sh 7 0 0 0 0 0

The run's summary has the full report.

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.

fix(app-control): require a Ready command that fails when the instance is unfit

0 participants