Skip to content

refactor(autonomy): simplify setup prerequisite-resolution and emission-conformance scripts - #14839

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-14416-42681147574-1
Nov 10, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-14416-42681147574-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14416

Summary

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

Simplified three of the four listed autonomy setup scripts without changing their behavior. In apply-prerequisite-resolution.mjs, argument parsing is now a flat if/else chain, the report builders are flatMap/filter/map expressions over identityRows, and writeRatified merges declarations without the intermediate section object. Its misleading 'Do not overwrite' comment, which sat above code that overwrites, is replaced by one that states the actual reconcile rule. check-prerequisite-resolution.mjs gets the same argument-parsing shape and maps its resolver runs directly. check-emission-conformance.mjs replaces its single-field tally object with a module-level counter and names its per-line location once. canonical-url.mjs was already minimal: it is two small predicates whose comments carry the parse and round-trip rationale, so it is left unchanged.

Not verified

  • Script tests (plugins/autonomy/skills/setup/scripts/check-prerequisite-resolution-slice.test.sh and any node tests over these scripts) were not run: this lane allows no interpreter, so they are left to the PR's CI
  • On malformed proposal or binding JSON (a non-iterable declarations or surface_refs), V8's 'X is not iterable' error text names a different source expression than before; exit code 1, the order the errors are thrown in and file side effects are unchanged. No test asserts on this text
  • Tidy passes 4 and 5 (docs-hygiene writing rules and the ai-slop fix) were skipped: the only markdown is the changelog fragment, whose one line the issue's acceptance criteria require word for word. Code passes 1 to 3 ran
  • ci-status green is a PR CI check, left to the PR's CI

Fix

  • plugins/autonomy/skills/setup/scripts/apply-prerequisite-resolution.mjs: flat parseArgs; collectFindings, proseProposals, orgRungStops and narrowingAdvice rewritten as array expressions (spread iteration kept so any iterable findings value behaves as before); writeRatified merge inlined without the…
  • plugins/autonomy/skills/setup/scripts/check-prerequisite-resolution.mjs: flat parseArgs; surfaceIds ref loop flattened; binding loaded inline and resolver runs mapped over the sorted surfaces
  • plugins/autonomy/skills/setup/scripts/check-emission-conformance.mjs: tally object replaced by a module-level schemaUrlDeclared counter (tally parameter dropped from checkSchemaUrl and checkResourceBlocks); per-line location string built once; a comment that restated the next if-statement deleted…
  • .changes/autonomy/work-resolve-issue-issue-14416-42681147574-1-22743982.md: new patch fragment, '### Changed' with 'Internal simplification, no behavior change.'

Verification

The runner ran each check from the base copy against d59c782:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 6 fragments valid (run before and after tidy and the review fix)
  • check-changed-skills: CHECK-SKILL setup PASS, 0 errors, 4 pre-existing warnings about SKILL.md size and description length, which this change does not touch
  • check-affected: 12 passed, 7 skipped (tools not installed or checks that run code from the checked tree), over 4 changed files
  • change-shape.sh on check-emission-conformance.mjs before and after the comment deletion: COMMENT-ONLY (javascript via tree_sitter_javascript)
  • fresh-context review subagent on the full diff against HEAD: one real parity gap found (a string row.findings was iterated by the old for...of but would throw under .map), fixed with [...(row.findings ?? [])]; it found no other difference in output, exit codes, written files, flags or ordering
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42681147574

Left out: the items under Not verified.

Related

#14416

Merge-Risk: max=MEDIUM demote=false head=2eefd87c642a180d7b11b757754d4cc1d3085bc8 rubric=8.2.0 rater=claude-opus-5-5 checker=claude-opus-5-5

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

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 2eefd87c642a180d7b11b757754d4cc1d3085bc8: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14839 (incremental, b3a410f → 2eefd87)

No security issues found.

Scope. Only one file changed since the last review: plugins/autonomy/skills/setup/scripts/check-emission-conformance.test.sh. The incremental diff has no patch for it ("no patch from the API"), so I read the whole file at the head commit. That means I couldn't isolate the exact lines this push changed, but every line in the file is covered by this review.

What the file does. It is a bash test suite for check-emission-conformance.mjs.

  • It writes its fixtures with printf '%s\n' into a mktemp -d directory (line 25), and a trap on EXIT deletes that directory (line 26).
  • It calls the checker as node "$CHECK" "$@", with the arguments quoted (line 38).
  • It only compares exit codes and checks output text for substrings (lines 40-46).
  • It uses no eval, no network, no credentials or tokens, and no untrusted input. All its values are fixed literals, and it writes nothing outside the temp directory.

Trusted paths, controls and manifests. The file matches no trusted-path glob. It touches no workflow, permissions: block, trust control, merge hold, kill switch, token request, plugin manifest or standing instruction. It deletes no rule, so the instruction-surface lens has nothing to check.

Blocking only. This lane already reviewed an earlier head (blocking only: yes), so only CRITICAL and IMPORTANT findings would be reported. There were none, and no SUGGESTION came up to drop.

Settled thread, prior findings and PR context.

  • The one settled thread asked for test coverage of check-emission-conformance.mjs. Its lines are unchanged, and it raised no security point.
  • The only prior post is the lane's previous summary, which had no findings.
  • The PR context, settled-threads and prior-findings files contain no embedded instructions aimed at this lane.

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 d59c782f292a449d3cc51db0acb3ce0abad51a88; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 2eefd87c642a180d7b11b757754d4cc1d3085bc8: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): PR #14839 at 2eefd87c

This lane already reviewed an earlier head, so this pass reports blocking findings only. It covers the one file changed since b3a410f9: plugins/autonomy/skills/setup/scripts/check-emission-conformance.test.sh.

Result: no blocking findings.

What changed

The incremental diff has no text patch for this file; it reads "no patch from the API". So I read the whole file at head. The full diff now shows it as new file mode 100755. Its contents (128 lines) match the suite this lane traced at b3a410f9: the same fixtures, expected substrings and exit codes. The push is titled "Fix failing CI checks", so it most likely only set the executable bit. With no shell I can't confirm that against the old blob, so this is my inference. Even so, I checked the file as it stands at head:

  • expect captures $? straight after the command substitution. set -e is not on, so a nonzero exit from the checker is recorded rather than aborting the script.
  • The expected finding texts still match what the script prints:
    • is not a normalized canonical item URL (check-emission-conformance.mjs:34)
    • resource entry carries no autonomy.work_item.url attribute (line 72)
    • the usage line (line 91)
  • The script exits 1 when any test fails and 0 otherwise. With no node, it prints SKIP and exits 0.

Settled threads and prior findings

The one settled thread is this lane's earlier test-coverage finding. It is resolved and marked lines changed since resolution: no, and this test suite answered it, so I have not raised it again. Nothing from the prior findings is reposted.

Verification

This lane has no shell, so I ran nothing. Everything above comes from reading the code. Whether the suite passes in CI is unverified.

No plugin.json or marketplace.json changed, so there are no manifest lines.

Spend: none. This is a test-file change only.

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

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 2eefd87c642a180d7b11b757754d4cc1d3085bc8, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 2eefd87

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-14839-2eefd87c642a180d7b11b757754d4cc1d3085bc8, expires on 2026-12-09.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit ead34a9 Nov 10, 2026
59 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14416-42681147574-1 branch November 10, 2026 00:01
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit ead34a97352a09b206606a2fa4a63f817d15a3ca; later checks count it verified from this comment.

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.

Simplify the setup autonomy plugin code (1 of 2)

0 participants