Skip to content

fix(upstream-apply-changelog): file one issue per handoff row - #17953

Merged
kyle-sexton merged 5 commits into
mainfrom
fix/17876-changelog-per-row-issues
Nov 21, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
fix/17876-changelog-per-row-issues

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Closes #17876

Summary

The changelog lane's publish job filed all of a release's handoffs as one issue. Intake does not split a lanes App filing, and admission takes one only at Size small or medium, so every release issue parked and nobody worked it. With this change the job files one issue per handoff row, each carrying the row's key marker and exactly one source: upstream-apply-changelog label, so intake and admission judge each row on its own.

Fix

  • .github/scripts/upstream-apply-changelog/upstream-apply-changelog.mjs: fileHandoffs replaces fileReleaseHandoffs. Each row is routed by its key's lens or its kind:
    • an ordinary row is filed as its own issue. The body opens with its upstream-apply-changelog key= marker, then gives its lens and its handoff reason (the kind plus the plan's reason, joined onto one line). No label holds a row for its lens alone; intake and review decide any hold.
    • a replace row (kind nomination) is filed as a nomination for /harness-ops:audit-native-overlap. Its body has a Hold: line, so it has no agent-ready path. It still carries the one source label.
    • a docs-lag row is written to the run summary and the log, and nothing is filed.
    • a row whose key, or whose Drift key: line, is already on an open lanes App issue files nothing, and the log says it is already open. Keys carry the release, so one paged search per release finds them all. That search also finds the keys inside the older one-issue-per-release checklists, and the key lookup also reads the lanes App comments on those open checklist issues, where the old filer put rows that overflowed the issue body.
  • A stopped plan (cap-exceeded, hold-path) also files one stop notice. The notice is keyed by the release marker and deduplicated as before, and carries no handoff rows and no source label. Because it holds no handoff rows, it is not "one issue per release" of handoffs: every row still gets its own issue.
  • validatePlan bounds each handoff body to the shape ci-mode.md states: item ids and the row's required_sentence, never changelog text. A native-drift body also keeps its script-built lines (the > quote, the Drift key: line and the Filed by line). Every other line is dropped, so model text outside that shape is never posted or scanned as posted. required_sentence must be one line of at most 500 characters, or the plan is refused. ci-mode.md says so.
  • harness-ops gets a patch fragment, and the upstream-drift contract goes to 6.8.0 (changed guidance).
  • publishText now holds every string publish can post: each row issue, the stop notice and each docs-lag summary line, so the scan job reads all of it.
  • The workflow header comments, the publish job comment, ci-mode.md and the upstream-drift contract now describe filing per row.

Design choices

  • One stop-notice issue per deterministic stop (owner decision, 2026-11-21, his selection: "One stop-notice issue (Recommended)"). It is keyed by the release marker, deduplicated as before, and carries no handoff rows and no source label. It is the one exception to done-when 1's "no longer files one issue per release". Basis: a hold-path stop drops the plan's branches (stoppedPlanText), so those rows never become handoffs, and a record kept only in the run summary is one nobody acts on.
  • Nominations are held by a Hold: line (orchestrator decision D186, under upstream-apply-changelog: file one issue per handoff row, not one per release #17876's contract). A native-overlap verdict needs a person, or a session acting on the owner's recorded direction ("Never auto-verdict", plugins/harness-ops/skills/audit-native-overlap/SKILL.md:149). The row keeps exactly one source label (done-when 1) and has no agent-ready path (done-when 3). The hold line names the lane and that rule. Basis: .github/scripts/intake-triage/admit.mjs:253 and :1601-1603: any body line opening with Hold: refuses to the intent hold, whoever wrote it.
  • A body outside the stated shape is stripped, not refused. Refusing would stop the whole release for one model line, including a legitimate docs-conformance recommend line or a not-applied reason; the row's reason still carries that text, one line, capped at 500 characters. Basis: judgment.

Verification

  • node --test --test-concurrency=4 .github/scripts/upstream-apply-changelog/upstream-apply-changelog.test.mjs .github/scripts/upstream-apply-changelog/credential-legs.test.mjs: 72 tests, 72 pass.
  • scripts/check-affected.sh: 18 passed, 2 skipped. The comment-lint hook is clean.
  • The key search's phrase works on real GitHub search. The query repo:melodic-software/claude-code-plugins is:issue author:app/melodic-automation-lanes in:body "upstream-apply-changelog key=changelog:2.1.330..2.1.330" (without is:open) returned exactly Claude Code v2.1.330 changelog: 13 handoffs #17713, the v2.1.330 checklist issue.
  • One test plans a release with rows of every lens and runs it through a stateful fake tracker. It checks the expected issues, labels and nomination hold, and that docs-lag reaches only the summary. A second run over the same release files nothing.
  • A legacy checklist issue whose body lacks a key but whose lanes App comment holds it files nothing for that key; an outsider's comment does not count; a comment list past the page cap or not a list throws.
  • A conforming handoff body passes through unchanged; a body with extra free text, a forged key marker, or (outside the native-drift lens) a > or Drift key: line is cut down to its item ids and required sentence.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 21, 2026 11:43
The publish job filed a release's handoffs as one checklist issue, which
intake never split and admission never took, so every release issue
parked. It now files each row as its own issue: the row's key marker,
its lens and handoff reason, and exactly one
`source: upstream-apply-changelog` label.

- A replace row is a nomination for /harness-ops:audit-native-overlap,
  held by a Hold: line, since a native-overlap verdict needs a person or
  a session on the owner's direction.
- A docs-lag row goes to the run summary only.
- A row whose key or Drift key line an open lanes App issue holds is
  logged and not filed; one paged search per release finds the keys.
- A cap-exceeded or hold-path plan also files one stop notice with no
  row and no label.

Closes #17876

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 21, 2026 17:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T17:14:09.496002Z 496a893 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 496a893695

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs

Run 44928804588, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44928804588

Failed GitHub API calls

No failed call recorded by the run job's scripts.

Lane-Activity: pr-refine/fix-docs
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/apply-patch

Run 44928804588, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 8a76034
Run 44928804588

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #17953, incremental (08dc881 → 533c612)

Blocking only. This lane has already reviewed an earlier head of this PR, so this review reports blocking findings only. I read every hunk of both files in .claude-lane/incremental.diff: upstream-apply-changelog.mjs and its test file.

What changed

  • validatePlan (upstream-apply-changelog.mjs:437): the required_sentence guard was sentence !== undefined. It is now sentence != null, so the check treats null the same as a missing field. This fixes my previous finding (discussion_r4654534723), and the owner has resolved that thread.
  • Test (upstream-apply-changelog.test.mjs:1149-1150): new case for a row with required_sentence: null. Validation no longer throws, and the body keeps its item-id line and drops the free text.

Checks

  • boundBody (upstream-apply-changelog.mjs:382) already turns any sentence that is not a string into "". The keep rule (sentence && t === sentence) (:386) then matches no line through the sentence branch, so a null sentence cannot keep any extra line. The new assertion that the body is exactly 2.1.300-003 pins this.
  • The rejection cases (7, a two-line string, a 501-character string) still throw. A wrong type that is not null is still refused.
  • I ran no tests (no shell). The PR body reports 72 of 72 tests passing; that is the author's claim and I did not verify it.

No blocking findings.

The PR context, the settled threads and the prior findings contain no embedded instructions to the lane.

Verifier dropped 0 of 0 candidates.

@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-security-review: 1 inline finding(s) on 8a760347934ce7ef254997997437db18dddbdf81; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: #17953, incremental (08dc881..533c612)

No security issues in this push. This lane has reviewed an earlier head, so this review reports only CRITICAL and IMPORTANT findings. I read every hunk of both files in scope: upstream-apply-changelog.mjs and its test file.

What changed

  • validatePlan. The required_sentence check now uses sentence != null instead of sentence !== undefined (upstream-apply-changelog.mjs:437). A handoff with "required_sentence": null is now treated like one with no sentence, so the release is no longer refused. This loosens nothing:
    • boundBody maps any non-string required_sentence to "" (upstream-apply-changelog.mjs:382). A null sentence therefore keeps no extra line.
    • The body is still cut down to its item-id lines (plus a native-drift row's script-built lines).
    • Any non-null value that is not a string, or a string with more than one line or over the length cap, is still refused.
  • Test. A new case shows that a row with required_sentence: null and extra free text keeps only its item-id line.

Settled thread. This push applies the fix for the settled thread on upstream-apply-changelog.mjs:436-439 (resolved, with an owner reply that states the fix). I am not raising it again.

Trust controls. No trust control, merge hold, token request or kill switch changes in this push. Neither file in scope matches a trusted-path glob.

Spend. None.

Embedded text. The PR context and settled threads contain no instructions to this lane.

critical-findings: 0

… keys and bound handoff bodies

The per-row dedupe read only issue bodies, so replaying a release whose
legacy checklist issue had overflowed rows into lanes App comments would
file those rows again. The key lookup now also reads App comments on open
legacy release issues.

validatePlan checked a handoff body only for type and length. It now keeps
item ids and the row's required sentence (plus a native-drift row's quoted,
Drift key and Filed by lines) and drops every other line, matching
ci-mode.md's rule that bodies never carry changelog text.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

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

claude-lane: claude-review

The plan schema writes an absent value as null, and only correct,
replace and adopt rows carry a required sentence, so a plan with
"required_sentence": null on another row would have stopped the whole
release on every run. A null sentence now reads as none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit bb99586 Nov 21, 2026
59 checks passed
@kyle-sexton
kyle-sexton deleted the fix/17876-changelog-per-row-issues branch November 21, 2026 20:15
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upstream-apply-changelog: file one issue per handoff row, not one per release

1 participant