Skip to content

fix(session-flow): split audit-sessions denial findings by kind and route subagent findings to observability - #10960

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-10812-40885791584-1
Oct 29, 2026
Merged

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #10812

Summary

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

The tools.denials finding from /session-flow:audit-sessions now carries by_kind (denials per kind summed over the sessions above the threshold, most first) and dominant_kind, in the JSON envelope and as a line in the markdown report. Its rule basis says how kinds are read (collect.py's per-kind count of toolDenialKind), with an As of date and a recheck trigger. The subagents.count rule now routes to /harness-ops:observability (route retro-codify, the same as tokens.sub) per the owner decision of 2026-10-11, and test_sweep.py ROUTES now equals the routes the rules use.

Not verified

  • pytest suite for plugins/session-flow/skills/audit-sessions/scripts/tests (test_sweep.py and siblings) not executed: this lane runs no interpreter; left to the PR's CI
  • tidy: the ai-slop pass could not run its detector or digest guard (the lane runs only named wrappers), so both markdown hunks were read against the catalog by hand with no edits; the write-for-humans pass on the changelog fragment was not invoked, to stay within the turn budget. Passes 1 and 2 (simp
  • new-changelog-fragment wrapper refused on a detached HEAD, so the fragment was written by hand in the format of the existing fragment and validated by check-changelog-fragments
  • untracked files at the checkout root (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) were not created by this run and are not part of the change

Fix

  • plugins/session-flow/skills/audit-sessions/scripts/sweep.py: new _denial_kinds and FINDING_DETAIL add by_kind and dominant_kind to the tools.denials finding; render_md prints a by-kind line with the dominant kind under the findings' session lists
  • plugins/session-flow/skills/audit-sessions/reference/sweep-rules.json: tools.denials basis records how kinds are read, As of 2026-10-29 and a recheck trigger (a drift run reports a denial_kind key as new or vanished); subagents.count route retro-codify, suggested_skill /harness-ops:observability, ba
  • plugins/session-flow/skills/audit-sessions/scripts/tests/test_sweep.py: ROUTES narrowed to {retro-codify, config-change} and asserted equal to the routes in use; new tests for the subagents.count route and for by_kind/dominant_kind in JSON and markdown
  • plugins/session-flow/skills/audit-sessions/reference/store-layout.md: documents the by_kind and dominant_kind finding fields (wording tightened by the tidy pass)
  • .changes/session-flow/work-resolve-issue-issue-10812-c3a9f051.md: new minor changelog fragment

Verification

The runner ran each check from the base copy against 8dac01a:

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

The run reports:

  • read https: //github.com/melodic-software/claude-code-plugins/issues /6078: owner decision 2026-10-11 routes the subagent-count finding to /harness-ops:observability; the issue body proposes routing it the same as tokens.sub; the 2026-10-18 owner answer routes denials to /session-flow:audit-friction
  • check-changelog-fragments: all 35 fragments valid (run before and after tidy and review fixes)
  • check-affected: 12 passed, 6 skipped (tooling absent or runs checked-tree code), the rest CI only, over 5 changed files (run before and after tidy and review fixes)
  • fresh-context review subagent: no correctness bugs; hand-traced the new and changed tests as passing; two low findings (recheck trigger named a drift class that does not exist; _denial_kinds filtered values differently from _denials), both fixed
  • census.py CLASSES read: new, vanished, canary-lost, unknown-record-type, which confirms the recheck trigger wording
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40885791584

Left out: the items under Not verified.

Related

#10812

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

Copy link
Copy Markdown
Contributor

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

No security issues found in PR #10960 (head 8dac01a).

What I read: the whole diff (5 files) and the PR context. All of it is in plugins/session-flow/skills/audit-sessions/ plus a changelog fragment. None of it touches a trust control, workflow, token broker, kill switch, merge hold or plugin manifest, so there are no manifest <field> lines and no trust-control widening.

Checks on the new code:

  • _denial_kinds in sweep.py only reads values already in the local session store, sums integers and sorts them. It does no I/O, shell, path or template work.
  • The kind strings come from transcripts, which are untrusted data. render_md passes each one through markdown_code (defined at sweep.py:307), which flattens line breaks and fences backticks. A hostile toolDenialKind value therefore cannot break out of the code span or inject markdown into the report.
  • The subagents.count route change from /harness-config:unhobble to /harness-ops:observability only changes a suggested skill label in the report. It grants no tool, scope or allowlist entry.
  • The sweep-rules.json basis text and the store-layout.md addition are documentation. The test changes are the only other edits.

critical-findings: 0

Spend: none beyond ordinary CI runs.

@github-actions

Copy link
Copy Markdown
Contributor

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

No findings. I read the full diff and the PR context, and checked the change against collect.py, census.py and the helpers in sweep.py. I did not run the test suite, so the new tests are unverified by me.

Closing issue #10812

  • tools.denials shows the count per kind and the dominant kind in both JSON and markdown. collect.py:445 and collect.py:758 store tools.denials as a {kind: count} dict, and _denial_kinds sums the same values as the existing _denials. The basis text carries an As of date and a recheck trigger. The new test asserts the JSON, the markdown line and the basis wording.
  • subagents.count now has route retro-codify, skill /harness-ops:observability, and a basis naming the 2026-10-11 decision. In sweep-rules.json the routes in use are retro-codify, config-change and null, so the narrowed ROUTES set matches. The new equality assertion also guards against drift.
  • The changelog fragment is present, with bump: minor for a new finding field and a route change.

Checks

  • Counter is imported, and markdown_code is defined at sweep.py:307. The test helpers record, write_store, sweep and findings_by_metric exist in test_sweep.py.
  • Sorting by count descending then kind name gives a stable order and tie-break.
  • FINDING_DETAIL is only consulted for tools.denials, so other findings are unchanged. The spread into the finding dict adds nothing for other metrics.
  • The --session path leaves by_kind as a computation over the single session's records, which is fine.

Manifests: no plugin.json or marketplace.json change.

Cost: no billing impact and no hold.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 8dac01ab0513a1f8a7f10590a2fcd33fb96154f1.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit d9ae536 Oct 29, 2026
43 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-10812-40885791584-1 branch October 29, 2026 14:44
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 86%; mutation score 86%.

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

Surviving mutants

Location Operator Disposition Cause
plugins/session-flow/skills/audit-sessions/scripts/sweep.py:171 SBR productive input-gap

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.

fix(session-flow): split audit-sessions denial findings by kind and route subagent findings to observability

0 participants