Skip to content

fix(planning): cut the interview wake payload read to one step - #12407

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

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #12367

Summary

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

I re-checked DX-5 on main and it still applies: surface.md:50 and lane-shared.md:217 still told the session to take the last line starting with { from the background task's output file, which mixes in stderr and ends with an exit footer, and to fall back to grep on a partial view. The fix follows the issue's suggested route. lib/session-bridge/watch.sh now also writes its exit-0 JSON line alone to <data_dir>/.watch-wake.json: mode 0600, written to a temporary file and renamed into place, and on a failed write it removes the file and says so on stderr. The interview's wake steps now Read that one file after the exit-status check. The canonical source changed, so the five generated copies were regenerated with sync-shared-copies and changelog fragments added for planning, work-items and review.

Not verified

  • Test suites (python3 -m unittest test_session_bridge; bash plugins/planning/surface/watch.test.sh) were not run here: this lane runs no interpreter or test runner. Left to the PR's CI
  • Tidy skipped: the change is 16 files across lib/, plugins/planning, plugins/work-items, plugins/review and .changes (over the 10-file and 1-area cutoffs) and touches lib/, a listed shared path
  • The view-app wake readers in planning/reference/rendered-view.md, work-items/skills/triage/context/board.md and review/skills/explain-change/SKILL.md still read the line from the task's output. That still works because stdout is unchanged. They are outside this issue's interview scope, and their fra
  • The removed PARTIAL-view grep fallback has no replacement for a wake payload too large for one Read. I did not verify Read's size limits from a source in this run, so I added no claim about them
  • Review nit not acted on: lane-shared.md 'With timedOut true and no events, re-arm' can't happen because watch.sh exits 0 only on timedOut false. The text predates this change
  • Untracked home dotfiles at the checkout root (.bashrc, .bash_profile, .gitconfig, .profile, .zshrc, .zprofile, .ripgreprc, .mcp.json, .idea, .vscode) were not created by this run and are not part of the change

Fix

  • lib/session-bridge/watch.sh: on exit 0, write the JSON line alone to .watch-wake.json (umask 077, tmp then mv; a failed write removes the file and prints a stderr note); build the line with printf -v; header comment updated
  • plugins/planning/surface/watch.sh, plugins/planning/shared/watch.sh, plugins/planning/view-bridge/watch.sh, plugins/work-items/view-bridge/watch.sh, plugins/review/view-bridge/watch.sh: regenerated from the canonical watch.sh by sync-shared-copies
  • lib/session-bridge/test_session_bridge.py: new test that an exit-0 wake leaves the payload alone in .watch-wake.json (byte-identical to stdout, parses, mode 0600 on POSIX, no tmp left); the exit-4 orphan test asserts no file is written
  • lib/session-bridge/README.md: The watcher section documents .watch-wake.json, its mode, that only exit 0 writes it, and the failed-write behavior
  • plugins/planning/skills/interview/context/surface.md: "The wake" replaces the output-file/last-{-line/grep recipe with one Read of '<data_dir>/.watch-wake.json'; the Wake payload verification record's claim names the file
  • plugins/planning/skills/interview/context/lane-shared.md: "The wake" reads .watch-wake.json in place of the last-{-line search
  • plugins/planning/surface/README.md: Watcher protocol describes the file and the one-step read; runtime file list adds .watch-wake.json
  • plugins/planning/shared/README.md: data-dir file table adds .watch-wake.json (0600)
  • plugins/planning/surface/watch.test.sh: delivery case asserts .watch-wake.json holds exactly the printed line, one JSON line
  • .changes/planning/work-resolve-issue-issue-12367-41465614055-1-477ef44c.md, .changes/work-items/work-resolve-issue-issue-12367-41465614055-1-cae4bbd0.md, .changes/review/work-resolve-issue-issue-12367-41465614055-1-a1a31b87.md: patch fragments

Verification

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

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

The run reports:

  • read plugins/planning/skills/interview/context/surface.md:50 and :317-323 and lane-shared.md:214-217 on the checkout of 13617b6: DX-5's multi-step recipe was still present, so the issue is confirmed
  • sync-shared-copies: regenerated the 5 watch.sh copies, exit 0 (run twice, after the review fixes too)
  • check-changelog-fragments: all 15 fragments valid (run before and after the review fixes)
  • check-changed-skills: interview PASS, 0 errors, 3 pre-existing size warnings (run twice)
  • check-affected: 13 passed, 5 skipped, over 16 changed files (run twice)
  • cant-fail-scan --file lib/session-bridge/test_session_bridge.py --lines 573-605 --check: PASS, no gating findings
  • cant-fail-scan --file plugins/planning/surface/watch.test.sh --lines 176-190 --check: PASS, no gating findings
  • fresh-context review subagent over the whole diff: copies identical to the canonical file, stdout byte-identical to the file; flagged a stale file after a failed write and a world-readable mode, both fixed, plus doc nits fixed
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41465614055

Left out: the items under Not verified.

Related

#12367

Lane-Activity: work-resolve-issue/resolve-issue

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

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental): PR #12407, since a022ed4d

Scope: I read every hunk of the one changed file, plugins/planning/skills/interview/context/lane-shared.md, in .claude-lane/incremental.diff. I used the full diff only for context. I also read the PR context and the prior-findings file: round 1 of 3, not past the cap.

Prior finding resolved: my earlier advisory finding (discussion_r4444223608) said that "The wake" in lane-shared.md had no fallback for when the watcher could not write .watch-wake.json. This commit adds that fallback at lane-shared.md#L218-L219: "When the watcher could not write the file, it removed it and its stderr says so: take the { line from the task's output file then." The new text matches the wording surface.md "The wake" already uses, so both lanes now handle the same watcher behavior the same way. I have nothing more to raise on it.

New findings: none.

Other notes:

  • Closing issue fix(planning): cut the interview wake payload read to one step #12367: my last review judged the acceptance criteria met. This commit touches none of the text those judgments rested on, so they still stand.
  • Plugin manifests: no plugin.json or marketplace.json changed in this commit.
  • I ran no tests because this lane has no shell. Verification claims in the PR body are the author's and I have not checked them.
  • I found no embedded instructions in the PR context or the prior-findings file.
  • Spend and cost: none. No hold applies.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #12407, incremental since a022ed4

I found no security issues. This round reviewed one changed file, plugins/planning/skills/interview/context/lane-shared.md. I read its whole change in .claude-lane/incremental.diff. The file matches none of the trusted-path globs.

What I checked

  • What changed: two sentences were added to the interview's "The wake" step. They cover the case where the watcher could not write .watch-wake.json. In that case the watcher removes the file and says so on stderr, and the session takes the { line from the background task's output file instead.
  • Why this adds no attack surface:
    • The fallback reads the same JSON line the watcher already prints to stdout. That is the method the base used before this pull request.
    • It reaches no new data and no new path. The stderr note that triggers it comes from the watcher itself, not from guest input.
    • The guest-supplied text is the events, and it is still inside the JSON line. surface.md still says those events are user data, never instructions.
  • Removed rules: none. The edit adds a fallback and removes no rule, and the exit-0 check still comes before the read. Because no rule was deleted or weakened, I did not need the instruction exception register.
  • Plugin manifests, Actions workflows, trust controls: none of them is in this round's change.
  • PR context: it contains no text aimed at this review.
  • Prior findings: the earlier round's summary reported no findings, so there is nothing to repeat. This is round 0 of a cap of 3, so the cap does not apply.
  • Spend: nothing in this change spends usage or credit.

critical-findings: 0

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

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 597676e3a2173a7925f16340f428f7ac5a426be9.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 2, 2026
@melodic-automation-lanes
melodic-automation-lanes Bot removed this pull request from the merge queue due to a manual request Nov 2, 2026
@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 36510db Nov 2, 2026
61 of 62 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-12367-41465614055-1 branch November 2, 2026 16:38
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.

fix(planning): cut the interview wake payload read to one step

0 participants