Skip to content

feat(work-items): setup writes the binding to the convention home and copies the legacy JSON - #11947

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-11879-41316972179-1
Nov 1, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-11879-41316972179-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #11879

Summary

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

/work-items:setup now writes the tracker binding under the tracker key of <home>/work-items.yaml and the personal overlay under <home>/work-items.local.yaml. It touches only the tracker mapping, so other keys in the file are kept. When only the legacy .work-item-tracker.json binds a repo, apply runs the new skills/setup/scripts/migrate-binding.sh. The script copies the binding and overlay into the YAML files and leaves the JSON files byte-for-byte unchanged, because babysit-prs, resolve-prerequisites and the work, triage, attend-queue and track preflights still read only the JSON. check reports a binding that exists only in JSON. Design choice, based on lib/binding.sh: the script checks both layers before it writes either, because once the YAML binding exists the seam reads only the YAML overlay. It also parses each copy back with the seam's own reader (wit_yaml_binding_json) and compares it with the JSON before writing. It refuses values the YAML subset would read differently: null, an empty object, a list of mappings, an all-digit key. Where no convention home applies (declined, $HOME, not a git work tree), setup writes no binding, since the seam reads only JSON there.

Not verified

  • bash plugins/work-items/skills/setup/scripts/migrate-binding.test.sh (via scripts/run-test-file.sh) was not run: this lane runs no test scripts or interpreters. I traced its assertions by reading, and the reviewer did the same independently. Left to the PR's CI.
  • bash plugins/skill-quality/scripts/check-skill.sh plugins/work-items/skills was not run: check-affected skipped changed-skills because it runs the checked tree's own code. Its 1024-character description cap was met through validate-plugins. Left to the PR's CI.
  • typos was skipped by check-affected (not installed).
  • Tidy skipped: the change is about 590 changed lines (two new scripts of about 200 and 160 lines), over the 300-line tidy cutoff.
  • Known limits left as is. A later setup edit to the binding lands only in the YAML, so readers still on the JSON file see the old values until their migrations land. An overlay holding only {"config":{}} scaffolding is refused rather than treated as inert. A work-items.yaml with an empty 'tracker:' k

Fix

  • plugins/work-items/skills/setup/scripts/migrate-binding.sh: new script. Copies the JSON binding and overlay into the tracker mapping of <home>/work-items.yaml and <home>/work-items.local.yaml. Plans and checks both layers before writing, reads each copy back through the seam, requires a
  • plugins/work-items/skills/setup/scripts/migrate-binding.test.sh: new test, 8 cases. A fixture JSON binding plus overlay is copied to YAML, the seam resolves the YAML and reads the same values with the overlay merged, and both JSON files stay byte-identical. Also covers: re-run is a no-op, appending
  • plugins/work-items/skills/setup/SKILL.md: description, Purpose, path resolution (convention-home resolver, BINDING/OVERLAY/LEGACY/SCHEDULE), and Provider binding steps 1, 4 and 5 (migration, YAML write, ignore line for the YAML overlay). Also the YAML example, apply step 1, the role-label, won't-do
  • plugins/work-items/skills/setup/reference/check.md: probe 2 resolves the home and branches on neither, legacy-only (INFO naming the JSON-only binding and the apply remediation) and both (value drift, plus a legacy overlay the seam stopped reading). It also validates the YAML with the subset parser a
  • plugins/work-items/skills/setup/reference/overlay-ignore-probes.md: the probes target <home>/work-items.local.yaml, and also the legacy JSON overlay while it exists.
  • plugins/work-items/skills/setup/reference/autonomous-apply.md: an unattended apply copies a legacy-only binding, since the copy changes no value.
  • plugins/work-items/skills/setup/reference/capability-tier-axis-migration.md, capability-tier-backfill.md: skip condition reads 'no binding exists' instead of naming the JSON file.
  • plugins/work-items/skills/setup/evals/evals.json: case 7 asserts no YAML binding is written. Case 20 probes docs/conventions/work-items.local.yaml. New case 21 covers the migration.
  • .changes/work-items/work-resolve-issue-issue-11879-c2a8e6f4.md: minor work-items changelog fragment.

Verification

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

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

The run reports:

  • .lane/checks/bin/check-changelog-fragments: All 128 changelog fragments valid.
  • .lane/checks/bin/check-affected: 12 passed, 6 skipped over 10 changed files. Earlier runs found and I fixed: an MD038 code-span space in SKILL.md, two SC2016 infos (directives added with reasons), a \b portability flag in the test, an angle bracket in the skill description and a 1026-character descr
  • check-evals-quality plugins/work-items/skills/setup/evals/evals.json: PASS, 16 Q4 path-token warnings, the same kind the existing cases already carry.
  • cant-fail-scan --file plugins/work-items/skills/setup/scripts/migrate-binding.test.sh --check: PASS, no gating findings.
  • Fresh-context review subagent over the whole diff: no test-breaking or wrong-copy bug found. Fixed what it confirmed: writes are now ordered so the overlay is never dropped, empty objects and all-digit keys are refused, the overlay must not be tracked, check reports an unread legacy overlay, walk wa
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41316972179

Left out: the items under Not verified.

Related

#11879

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head dcf03e52f35cb19397c005feff67f707eebe4cd6. 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)

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 6ef1a1ce248275d9272805d1c53b948645712472: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, dcf03e5 → 6ef1a1c)

I found no security issues in this increment.

The change covers three files:

  • plugins/work-items/skills/setup/scripts/migrate-binding.sh (gitignored()) and reference/overlay-ignore-probes.md: both add a /*) branch ahead of the .gitignore | */.gitignore name test. Git prints a repository .gitignore source relative to the work tree. It prints an excludes file such as core.excludesFile = ~/.gitignore as an absolute path. With the new branch, a global excludes file whose name ends in .gitignore no longer counts as a repository ignore rule. That would have let the personal overlay appear protected for one person while teammates could still commit it. The branch is ordered before the name test, so it takes effect. The change only tightens the check and fails closed: the overlay is reported not-ignored and the migration stops before any write.
  • migrate-binding.test.sh: sets GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 so the developer's own git config can't change fixture results. It adds Case 5b, which points GIT_CONFIG_GLOBAL at a temporary config whose core.excludesFile is a temporary .gitignore. Every path stays under $TEST_TMPDIR. Nothing reads or writes outside the test's temporary directory, and no untrusted input reaches a shell.

This increment changes no trust control, plugin manifest, workflow, token scope or standing instruction. The PR context holds no embedded directives 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 dcf03e52f35cb19397c005feff67f707eebe4cd6; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 6ef1a1ce248275d9272805d1c53b948645712472: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: incremental (dcf03e5 → 6ef1a1c)

No findings in the three files this push changed.

What changed and why it holds

  • migrate-binding.sh gitignored() and the matching probe in overlay-ignore-probes.md now refuse an ignore source that starts with / before the .gitignore / */.gitignore name test. Git prints a per-directory .gitignore source relative to the work tree. It prints core.excludesFile with ~ expanded, so the path is absolute. Before this change, a global ~/.gitignore matched */.gitignore and counted as a repository rule that protects teammates. .git/info/exclude still falls through to * and is refused. A Windows C:/... source is cut to C by ${match%%:*}, so it is also refused. The script and the reference doc use the same rule.
  • migrate-binding.test.sh now exports GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1, so a developer's own excludes file can't change the fixtures. The fixtures only run git init -q, never git commit, so having no user identity breaks nothing. The new Case 5b sets GIT_CONFIG_GLOBAL to a config whose core.excludesFile is a file named .gitignore that ignores *.local.yaml, with the repo's .gitignore empty. The script checks gitignored only for the YAML overlay path (OVERLAY_REL, migrate-binding.sh:196). Without the /* arm, that path would pass the name test and the overlay would be copied. So Case 5b would fail if the fix were reverted: it is a real regression test.

Not verified: I did not run the test file (no shell in this lane). I checked the assertions by reading the code. That CI passes is the author's claim and I haven't checked it.

Closing issue #11879: these changes don't touch the issue's "Done when" criteria. The whole PR was checked against them in the earlier review.

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

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 6ef1a1ce248275d9272805d1c53b948645712472.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit 94928a1 Nov 1, 2026
44 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-11879-41316972179-1 branch November 1, 2026 15:22
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 94928a1b35f5444f26446e48371098216a171aba; 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.

feat(work-items): setup writes the binding to the convention home and migrates the JSON file

0 participants