Skip to content

feat(upstream-drift): label and guard drift issues for sources with no git pin - #14323

Merged
kyle-sexton merged 2 commits into
mainfrom
work-resolve-issue/issue-14209-42565243883-1
Nov 9, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
work-resolve-issue/issue-14209-42565243883-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Refs: #14209

Summary

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

The drift issue filer now accepts pin=unknown head=unknown pages. It words such a page by skill name (&lt;plugin&gt;:&lt;skill&gt; from a plugins/<plugin>/skills/<skill>/ path, else the id) with the D7 run/restore/re-vendor line, and writes the re-audit footer only when a hex-pin page drifted. A report with no unknown token keeps the old body byte for byte. Created issues get --label needs-human. A reopen adds the label first, then reopens, then edits the body (D18); a failed label add skips that reopen, and the other upstreams still run. An in-place edit adds no label. An id with any untracked page never gets action=close (D17). The upstream-drift contract's drift-issues section and a 4.3.0 CHANGELOG entry (D13) cover all of this. Two choices of means: the vendored-only issue header reads "Upstream &lt;id&gt; no longer matches the copy vendored here." with the closing line "A clean run closes this issue.", and the clean-close comment drops "against its pin" so it also reads right for an id with no pin. The workflow file needed no change: its token already has issues: write. AC13 is met by this issue's own body (its Decisions list holds "CRITICAL security finding"). Post-merge steps (D9 backfill, then one workflow_dispatch) are left in remaining. Backfill as a person: gh api --paginate 'repos/melodic-software/claude-code-plugins/issues?creator=github-actions\[bot\]&amp;state=open&amp;per_page=100' --jq '.\[\] | select(.pull_request == null and (.title | startswith("Upstream drift: ")) and (\[.labels\[\].name\] | index("needs-human") | not)) | .number', then gh issue edit &lt;n&gt; --add-label needs-human for each, then gh workflow run maintenance-file-upstream-drift-issues.yml.

Remaining work

  • After merge (D9): add needs-human once to every open bot-opened Upstream drift: issue missing it
  • After the backfill: dispatch maintenance-file-upstream-drift-issues.yml once (it stays on its monthly schedule) and confirm any issue it creates or reopens carries needs-human

Not verified

  • bash scripts/upstream-drift-issues.test.sh was not executed: this lane runs only named wrappers, and none runs the suite. It is left to the PR's CI; the cases were hand-traced by the review subagent instead
  • tidy skipped: the change touches scripts/, a listed shared path
  • AC12's live half (a workflow_dispatch run's new issues carry needs-human) and the D9 backfill can only run after merge; listed in remaining
  • shellcheck and the CI-only scanners (silent-skips, discriminating-test-skips, test-tmp-cleanup and others check-affected listed) were not run here; left to the PR's CI

Fix

  • scripts/upstream-drift-issues.sh: page regex accepts pin/head unknown; adds PINNED/UNTRACKED per id and a skill_name helper; per-page wording by pin token, with the footer only for a drifted hex pin; --label needs-human on create; label add before reopen with its own failure path; untracked…
  • scripts/upstream-drift-issues.test.sh: body_file_of helper; new cases: byte-identical hex-pin body, needs-human on create, no label on in-place edit, label then reopen then body-edit order, failed reopen keeps the label and skips only the body edit, failed label add skips the reopen while the next…
  • docs/contracts/upstream-drift/README.md: Monthly drift issues section covers sources with no git pin, needs-human on create and reopen (and that removing it does not admit a bot-authored issue), untracked blocking close, the accepted cases, and nonzero exit after a failed write
  • docs/contracts/upstream-drift/CHANGELOG.md: 4.3.0 entry

Verification

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

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

The run reports:

  • check-changelog-fragments: all 2 fragments valid
  • check-changed-skills: no changed skills, nothing to gate
  • check-affected: 11 passed, 5 skipped over 4 changed files
  • cant-fail-scan --file scripts/upstream-drift-issues.test.sh --check: PASS, no gating findings
  • fresh-context subagent review of the full diff: hand-traced every new and changed test case against the script, found no failing assertion and no script bug; its doc and comment findings (README overstated a producer, 'against its pin' close wording, stale header comments, a midnight-rollover flake…
  • grep: scripts/upstream-drift-issues.sh holds needs-human on more than 2 lines (header, create, reopen comment, reopen label add)
  • read https: //github.com/melodic-software/claude-code-plugins/issues /14208: the dependency is closed, completed in PR #14319 on 2026-11-09
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42565243883

Left out: the items under Not verified.

Related

#14209

Merge-Risk: max=HIGH demote=true head=53b566937126707742e7d958dfeff9e7bc11718a rubric=8.1.2 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 needs no new review of 53b566937126707742e7d958dfeff9e7bc11718a: no file of this pull request changed since the review of a80fcdd.

Security review: PR #14323 (head a80fcdd)

I found no security issues.

I read all four changed files in full. None of them matches a TRUSTED PATHS: glob, and no plugin manifest is changed.

What I checked in scripts/upstream-drift-issues.sh:

  • Wider input regex. The page regex now also accepts pin=unknown and head=unknown. That is one fixed literal and adds no new characters. The repo= id keeps its old [A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+ charset. The tests show that any other token still exits 2 before any gh call.
  • New skill_name helper. Its output comes from the page path, which the report already carries. It goes through span(), which wraps it in a code span and replaces backticks, and then into a body file passed with --body-file. Nothing reaches eval or an unquoted shell string. Because the helper runs inside $(...), its BASH_REMATCH cannot overwrite the parent's capture groups.
  • needs-human label. It is now added when an issue is created and before an issue is reopened, and the reopen is skipped if adding the label fails. This adds a person-gate to bot-filed issues; it takes none away. No trusted actor, token scope or lane admission is widened. The README's claim that removing the label "does not admit a bot-authored issue" is documentation only, and the diff touches no admission code.
  • Untracked pages. An upstream with an untracked page is no longer closed. This only stops a close action, and it stops it in the conservative direction.

Other lenses:

  • Instruction-surface lens: not triggered. The diff deletes, narrows or softens no standing instruction.
  • Hold-removal exemption: not used. The diff removes no friction hold.
  • Embedded text: the PR context has no directive aimed at the review lane.

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head a80fcdddb05ff6d2f967b3dfc053926b227ad74d. 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 9, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of 53b566937126707742e7d958dfeff9e7bc11718a: no file of this pull request changed since the review of a80fcdd.

Code review: no findings

I read every hunk of all 4 changed files, plus the surrounding code of scripts/upstream-drift-issues.sh and the test harness and stub in scripts/upstream-drift-issues.test.sh.

What I checked by reading the code (none of it was run):

  • Report parsing: pin and head can each be a hex SHA or the literal unknown. The regex is anchored, so UNKNOWN, none, zz12 and an empty token all fail the parse before any gh call. The new bad-token loop tests exactly these.
  • Per-id state: PINNED and UNTRACKED are set up in find_repo, next to REPOS, STATE and DETAIL. write_body picks the vendored header and leaves out the re-audit footer only when no hex-pin page drifted. A hex-pin report gives the same body as before; I traced the new byte-identical test against write_body and its expected string matches.
  • Close guard: ((!UNTRACKED[i])) stops a clean-plus-untracked id from being closed. An id with only untracked pages still has STATE=none, so nothing happens to it. The sweep skips any id the report names, <plugin>/<skill> ids included.
  • Reopen order: the label is added first, then the issue is reopened, then the body is replaced. Each step has its own failure branch, sets failed=1, and lets the loop go on to the next upstream. The two failure tests check this order against the stub's GH_STUB_FAIL handling.
  • The label: needs-human is already the label the repository's workflows use (for example .github/workflows/pr-merge.yml), so --label needs-human on create names a label that exists.
  • Docs: the README and the 4.3.0 CHANGELOG entry match the script's behavior. Additive guidance as a minor bump fits the contract's own versioning rule.

Not verified: I did not run the test suite or shellcheck. The PR description's verification is the author's claim and is unconfirmed here.

Closing issue: the PR only says "Refs: #14209" and the PR context has no closing-issue section, so there were no acceptance criteria to check against.

No text in the PR context tried to steer this review. The repository and .claude/rules matching were not checked, since the change touches no plugin manifest.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 9, 2026
@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped fix-ci on this pull request: the lane could not fix every failing check, after one retry a model rung up, so a session builder takes it; its run log names each one and why. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/fix-ci status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=14323 -f activity=fix-ci

@kyle-sexton kyle-sexton removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 9, 2026
@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 9, 2026
@kyle-sexton kyle-sexton removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 9, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 9, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 53b5669

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-14323-53b566937126707742e7d958dfeff9e7bc11718a, expires on 2026-12-09.

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

Merged via the queue into main with commit 8de52d6 Nov 9, 2026
76 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-14209-42565243883-1 branch November 9, 2026 06:49
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