Skip to content

feat(source-control): fall back to the linked item's Problem and Intent for the PR Summary line - #10324

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-8711-40372468919-1
Oct 26, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-8711-40372468919-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #8711

Summary

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

/source-control:pull-request create now builds the Summary's Problem and intent line from the linked item's Problem: and - Intent (why, in the user's words): lines (decompose's ## Outcome shape) when no local PLAN.md is found. A found plan still wins outright, and item text carries the untrusted-content framing plus the plan line's scrub. The GitHub provider's issue read now returns the body beside the state on both the gh issue view route and the REST route. With a tracker bound, the body comes from the existing /work-items:track view action, so no new verb or seam operation was added.

Not verified

  • check-affected skipped changed-skills, typos (not installed) and three validate-plugins sub-checks in this lane; they run in the PR's CI along with the CI-only scanners it lists (line-citations, purged-em-dashes, portability-lint, etc.)
  • verify step: the change is to markdown reference docs only, so there is nothing to build and no test exercises these files; per the recorded decision no eval was added
  • Review finding not applied: the REST issues endpoint also returns pull requests, so a branch number naming a PR could supply a PR body to the fallback. This predates the change for the state check, and fixing it needs a REST fact this run did not read
  • Pre-existing, not touched: docs/upstream/cursor-pstack.md:74 cites plugins/source-control/skills/pull-request/reference/create.md:288 for the briefing-preset 'no lane-by-lane history' rule, which was already at line 261 before this change (now 263)

Fix

  • plugins/source-control/reference/providers/github/pull-request/create.md: the closing-line issue read fetches state,body in one call and sets ISSUE_BODY (cleared when the issue is not open); the REST fallback reads the whole issue for .state and .body, with a pointer, as-of date and recheck
  • plugins/source-control/skills/pull-request/reference/create.md: §2.4.0 says the issue read returns ISSUE_BODY, and the tracker-bound path reads it with /work-items:track view <item_id>; the sandbox note mentions the body; the 'Problem and intent' rule falls back to the item's Problem: /
  • .changes/source-control/feat-8711-pr-summary-item-intent-7d2e4b91.md: minor changelog fragment for source-control

Verification

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

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

The run reports:

  • read https: //cli.github.com/manual/gh_issue_view: the --json field list for gh issue view includes both body and state
  • read https: //docs.github.com/en/rest/issues /issues#get-an-issue: 'Get an issue' uses the same response schema as 'Create an issue', where state is a required string and body is a string or null; the documented state values are open/closed
  • .lane/checks/bin/check-changelog-fragments: All 19 changelog fragment(s) under .changes/ are valid (run before and after the review fixes)
  • .lane/checks/bin/check-affected: 9 passed, 7 skipped over 3 changed files, no failures (run before and after the review fixes)
  • fresh-context review subagent over the whole diff: no bash regressions or ADR 0060 violations. Applied: tracker-bound body read via /work-items:track view, untrusted-content spine plus closing-keyword/-mention drop, ## Outcome scoping, 'plan wins outright' wording, sandbox note, As-of/Recheck l
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40372468919

Left out: the items under Not verified.

Related

#8711

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

Copy link
Copy Markdown
Contributor

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

No security findings.

critical-findings: 0

Scope: docs and skill text only (a changelog fragment, the GitHub provider reference, and the pull-request skill's create.md). No changed file is a trust control or a plugin manifest, so no manifest <field> lines apply. The instruction-exception register was not consulted. The diff does not delete or soften any standing rule; it adds one.

What I checked:

  • New untrusted input. The linked item's body now feeds the PR Summary line. Issue bodies can be written by outside parties, and no code path was added. The skill text frames the body as data, never instructions. It also tells the model to name any embedded imperative in the §2.6 report and to drop closing keywords and @ mentions from the item-sourced text.
  • Closing-keyword path. This is the main exploit path. An issue line such as Intent: ... Fixes #123 could close an unrelated issue on merge. It could also satisfy the §2.4.2 gate, which only greps the body for any closing keyword. The new drop rule covers it, and the Problem: / Intent: shape limits what gets quoted. I did not raise it because the rule is stated plainly and I found no concrete bypass.
  • Plan priority. A found plan wins outright, so an issue body cannot override plan-sourced text.
  • Shell changes. The gh issue view --json state,body and REST reads pipe the output through jq -r using printf '%s', with the issue number validated as ^[0-9]+$ first. ISSUE_BODY is never evaluated or interpolated into a command in the shown code. It is cleared when the issue is not open, so a body from an item the PR does not close is not used.
  • Known gap, already disclosed. The REST issues endpoint also returns pull requests, so a branch number naming a PR could supply a PR body to the fallback. The PR description states this predates the change for the state check. I judged it low-risk: the number comes from the user's own branch name, the same drop and framing rules apply, and the text only reaches a PR the user is creating.

Spend: none. This is a docs-only change with no runs, schedules or billing setting.

@github-actions

Copy link
Copy Markdown
Contributor

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

No blocking or advisory findings. I read the whole diff (3 files) and the PR context. I only read files and ran nothing. The verification in the PR description is author-claimed and I did not confirm it.

Closing issue #8711 criteria

  • Provider read returns the body with the state, on both routes: met. The gh issue view route now reads --json state,body. The REST route reads the whole issue for .state and .body.
  • With no plan, the Summary line is built from the item's Problem: and - Intent (why, in the user's words): lines with the plan line's shape, scrub and missing-half rule: met. The wording is in plugins/source-control/skills/pull-request/reference/create.md, §2.4.1.
  • A found plan still wins and item text is data: met. The text says "A found plan wins outright", frames the body as DATA, and drops closing keywords and @ mentions.
  • The decision comment says no eval is required, so the lack of a test is not a finding.

Checks against other files

  • The Problem: / - Intent (why, in the user's words): lines under ## Outcome match what plugins/work-items/skills/decompose/SKILL.md writes into each item.
  • The tracker-bound path reads /work-items:track view <item_id>. link prints item_id and view prints body, so the hand-off holds.
  • ISSUE_BODY is cleared when the issue is not open, so a body is never taken from an item the PR does not close.
  • The §2.6 report section the new text points to exists.
  • The jq -r '… // empty' || true pipeline is safe on empty or non-JSON input.

Noted, not counted

  • The REST issues endpoint also returns pull requests, so a branch number that names a PR could supply that PR's body. The state check already had this before the PR, the author disclosed it, and the text is framed as data and scrubbed, so I left it out.
  • Cost: none. This is reference documentation only, and a changelog fragment with bump: minor.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 26, 2026
@melodic-automation-lanes
melodic-automation-lanes Bot removed this pull request from the merge queue due to a manual request Oct 26, 2026
@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 43daa29 Oct 26, 2026
42 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-8711-40372468919-1 branch October 26, 2026 19:13
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(source-control): fall back to the linked item's Problem and Intent for the PR Summary line

0 participants