Skip to content

feat(session-flow): add a correction judge lens to audit-sessions - #10499

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-5928-40544676426-1
Oct 27, 2026
Merged

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #5928

Summary

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

audit-sessions gains a correction action. The session's own model judges the short turns the collector already flags as a correction or not, reading each excerpt as untrusted data. sweep.py --correction-candidates prints those excerpts with a stable turn_id, and sweep.py --judged <file> merges the verdicts into a separate Judged (unranked) section whose findings carry "confidence": "judged" and never touch the measured findings, suggestions or exit code. Per the recorded decision, the skill deletes the verdict file after the merge. --judged also refuses --write-report, so no saved report holds an excerpt.

Not verified

  • python3 -m pytest plugins/session-flow/skills/audit-sessions/scripts/tests -q was not run: this lane's Bash runs only the named wrappers, and check-affected without --tests does not run the suites. The new tests were traced by hand and by the reviewer. Left to the PR's CI test lane
  • bash scripts/affected-tests.sh --run was not run here (same restriction); left to the PR's CI
  • typos and changed-skills checks skipped by check-affected (typos not installed; changed-skills runs the checked tree's own code); left to the PR's CI

Fix

  • plugins/session-flow/skills/audit-sessions/scripts/sweep.py: print_excerpts split into flagged_turns + print_turns (the --excerpts output is unchanged); new --correction-candidates (adds turn_id = <session_id>:<idx> and flags); new --judged FILE, with load_verdicts (J
  • plugins/session-flow/skills/audit-sessions/scripts/tests/test_sweep.py: 8 new tests: candidates with turn_id and flags; no flagged turns gives empty stdout and exit 0; suppressed records give exit 1; judged findings sit apart, with measured findings byte-identical; an injected excerpt stays data in
  • plugins/session-flow/skills/audit-sessions/SKILL.md: new correction action and a 'Correction lens' section (candidates, judge criteria, untrusted-content framing spine, verdict-file write, --judged merge, verdict-file deletion, presenting the Judged (unranked) section). Purpose line (old :16)
  • plugins/session-flow/skills/audit-sessions/reference/store-layout.md: verdict file in the layout tree; data.judged documented under 'Sweep report'
  • plugins/session-flow/README.md: audit-sessions section names the correction action, plus a usage line
  • plugins/session-flow/skills/audit-sessions/evals/evals.json: eval 10 correction-lens-judges-flagged-turns-apart
  • .changes/session-flow/feat-5928-audit-sessions-correction-lens-7c3e91a4.md: minor-bump changelog fragment (written by hand: HEAD is detached, so scripts/new-changelog-fragment.sh cannot name it from a branch)

Verification

The runner ran each check from the base copy against 5ef733a:

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

The run reports:

  • .lane/checks/bin/check-changelog-fragments: All 5 changelog fragment(s) under .changes/ are valid
  • .lane/checks/bin/check-affected: 11 passed, 6 skipped over 7 changed files. The first two runs failed validate-plugins: argument-hint was over the 100-character budget, then the Arguments. line no longer led with the hint. Both are fixed
  • .lane/verify/bin/check-evals-quality plugins/session-flow/skills/audit-sessions/evals/evals.json: PASS, with 1 warning on the existing case 6 (lib/state-key.sh path token), not on the new case
  • .lane/verify/bin/cant-fail-scan --file .../tests/test_sweep.py --lines 562-700 --check: PASS, no gating findings
  • Fresh-context subagent review of the whole diff: traced every new test by hand and found no code bugs. It raised two SKILL.md findings, both fixed: an ambiguous 'Step 2' exit reference, and the framing phrase split across a line break
  • grep 'Judged (unranked)' in SKILL.md: present in the Correction lens step 6 (checked by reading the file)
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40544676426

Left out: the items under Not verified.

Related

#5928

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

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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

Incremental review since 1e08116: the change is a spelling normalization, "labelled" to "labeled", in three files (SKILL.md, reference/store-layout.md, and the JUDGED_NOTE string in scripts/sweep.py). I found no problems.

  • I grepped plugins/session-flow for the old spelling. The only hit is an unrelated comment in scripts/tests/test_save_point.py. No test or fixture asserts the old JUDGED_NOTE text, so nothing is left expecting it.
  • The doc text and the code string match each other after the change.
  • No trusted-path files are in this increment.
  • Nothing in the increment spends money or changes a paid setting.
  • I did not re-review the rest of the PR, which is unchanged since the last review.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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

Incremental review of the change since 1e08116. It touches three files and only changes the spelling "labelled" to "labeled".

  • SKILL.md: one prose line.
  • reference/store-layout.md: one documentation line.
  • scripts/sweep.py: the JUDGED_NOTE display string only.

No logic, trust control, manifest, or instruction-surface rule changed, so I found no security issues. No manifest <field> items were hit.

None of the three files matches a trusted path. All other files are unchanged since the last review.

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 1e0811604901e716a68c1205a9648ffa0a1acdda. 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)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 7baf0c6 Oct 27, 2026
38 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-5928-40544676426-1 branch October 27, 2026 18:55
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 8, survived 0, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 100%; mutation score 100%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/session-flow/skills/audit-sessions/scripts/sweep.py 8 0 0 0 0 0

The run's summary has the full report.

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(session-flow): add a correction judge lens to audit-sessions

0 participants