Skip to content

fix: Simplify the scripts session-flow plugin code (2 of 2) - #15220

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-14735-42716231518-1
Nov 11, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-14735-42716231518-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14735

Summary

Opened by the work-resolve-issue lane from work-resolve-issue/issue-14735-42716231518-1, which an earlier run left with commits and no report. The model did not run again, and the earlier run's outcome could not be read, so this body carries none of its text.

Fix

The diff shows the changes.

Files the branch changes, from the compare listing; a denied path, which the merge lane refuses, is marked and listed first:

  • .changes/session-flow/work-resolve-issue-issue-14735-42716231518-1-d310923d.md
  • plugins/session-flow/scripts/tidy_work.py
  • plugins/session-flow/scripts/transcript_dirs.sh

Verification

The earlier run reported no checks here.

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

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

The runner's leak scan read everything the branch changes since its merge base with the default branch and found nothing credential-shaped.

Left out: every check; ci-status, pr-verify and the security review lane check the head before it merges.

Related

#14735

Merge-Risk: max=MEDIUM demote=false head=84ad485dfe8b18ee7a7712ea560506e802750c23 rubric=8.4.1 rater=claude-opus-5-5 checker=claude-opus-5-5

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

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #15220 (full diff, head 84ad485)

I found no security issues. I read every hunk of all 3 changed files. None of them matches a trusted-path glob, and none is a trust control, a manifest or an instruction file.

  • resolve_roots (L519-L525): the declared / memory pair is folded into one variable plus an if. It behaves the same in every case:

    • None stays None.
    • An absolute path stays as it is.
    • A relative path is joined to top only when there is a work tree.

    The guards on the repo-controlled memory_dir still run on the resolved path, unchanged: the refusal when the memory root is the repository root, and the self-ignore check for a root outside the repository (L529-L544).

  • _survey (L639-L644): it now calls resolve_roots inside the same try that catches ValueError. A refused memory root still prints an error and returns None, so the walk still fails closed. The link table still loads first.

  • transcript_dirs.sh (L129-L141): norm "$root" moves out of confirm into scan_root. That happens after encode "$root", so the encoded name is unchanged. The only caller of confirm is L141, which now passes the normalized root, so the prefix match on the cwd stays the same.

  • The Guard.tracked change and the changelog fragment only change formatting and text.

This was a blocking-only review, because the lane already reviewed an earlier head; no SUGGESTION findings came up anyway. The one prior finding is the earlier clean summary. It has no line anchor and raised no issue, so nothing carries over. The settled thread (on tidy_work.py, lines changed since resolution: no) covers this same equivalence, and I raise nothing new on those lines. The PR context has no embedded directives.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review of #15220 at 84ad485: no findings. This lane already reviewed an earlier head, so this pass looked for blocking issues only.

plugins/session-flow/scripts/tidy_work.py

  • resolve_roots (L519-L531): the new code drops the declared temporary and builds the path with an if instead. It gives the same result in all three cases:
    • no declared root: None;
    • an absolute path, or no work tree: the path as given;
    • otherwise: top / path.
  • _survey (L639-L644): resolve_roots now runs inside the same try as _load_link_table. Its ValueError handling matches the _roots helper it replaces: it prints error: {exc} to stderr and returns None. The link table still loads first, so the order of error messages is unchanged. _roots stays, because cmd_normalize still calls it at L788.
  • Guard.tracked: only the formatting and comment placement changed.

plugins/session-flow/scripts/transcript_dirs.sh

  • norm "$root" moved out of confirm and into scan_root (L135).
    • It runs after encode "$root" and the exact-name check, so those still see the unnormalized root, as before.
    • confirm's only caller is scan_root (L141), so confirm now always gets a normalized root.
    • root is local in scan_root, so the reassignment stays inside that function.
  • The change also means norm runs once per root, not once per candidate directory.

Closing issue #14735

  • Behavior unchanged: met, from reading the code. I found no change to output, exit codes, flags or exported names.
  • Only the listed files plus a changelog fragment are edited: met.
  • Size limit: met (about 20 changed lines).
  • Fragment: met. bump: patch, with ### Changed and the line "Internal simplification, no behavior change."
  • ci-status green: I can't check this from here.

Settled threads and prior findings

  • The one settled thread on tidy_work.py is marked lines changed since resolution: no. It concluded that the all(...) check and the _survey error handling don't change behavior, and the code it relied on is unchanged. Nothing to raise again.
  • The earlier reviews from this lane had no findings, so nothing carries over.

I ran no checks myself. The PR body says check-changelog-fragments.sh and check-changed-skills.sh passed; that is the runner's claim, and I haven't verified it. The PR context, settled-threads and prior-findings files contain no embedded instructions.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the merge gate refuses this head verify:earlier-fail, and the lane found every note of that earlier pr-verify FAIL already addressed by the diff, so it pushed nothing; only a session can move the head for the verifier to judge again. 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/address-feedback 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=15220 -f activity=address-feedback

@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 11, 2026
@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head b52320924a5da923380ed089c1a0f2791a8792b0. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/address-feedback is failure), which clears when the
  lane runs again

pr-verify read the `home_work != memory` rewrite as a narrowed condition.
roots holds at most the memory root at that line, so both forms behave the
same; restoring the all(...) form drops the disputed hunk and leaves the rest
of the simplification as reviewed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on b523209.

@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 11, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 3 of max 4 on 84ad485.

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

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 84ad485

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-15220-84ad485dfe8b18ee7a7712ea560506e802750c23, expires on 2026-12-11.

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

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit ffb68ec Nov 11, 2026
100 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14735-42716231518-1 branch November 11, 2026 03:32
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

Simplify the scripts session-flow plugin code (2 of 2)

1 participant