Skip to content

feat(harness-ops): split review-lane precision by who answered each finding - #11915

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

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #11841

Summary

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

The precision snapshot now records each answer's author_kind, and compute() adds a by_author split (person, agent, bot, unknown) to each lane's outcomes and precision, beside unchanged combined figures. The markdown report adds a by-author table that marks agent-labeled precision as an upper bound, and context/precision.md documents the split and the upper bound. The issue left open how to detect an agent posting as a person, which is a choice of means, so I decided it from the repository: GraphQL author __typename Bot is bot. A User answer is agent when a line opens with the D5 marker `

Not verified

  • review-precision.test.mjs (node --test via review-precision.test.sh) was not executed: this lane's Bash runs only the named wrappers, so the suite is left to the PR's CI. The reviewer hand-traced the assertions instead.
  • The issue's live-run check (a run over one closed day reports the split and the combined figures match the unsplit run) needs gh access to GitHub data, which this lane cannot use; it is left to a person. The fixture test asserts that the combined figures equal the unsplit computation.
  • Agent detection relies on the D5 marker or the Claude Code attribution line. An agent answer under a person's account that carries neither (for example a reply posted before the marker existed) counts as person. precision.md states this.
  • tidy pass 5 (ai-slop): detect.sh and the fix-run scripts could not run because the lane allows only the named wrappers. I read the listed lines manually against the catalog's tells and found none.
  • Build and lint for the touched .mjs (node syntax check, linters) could not run here; check-affected ran and passed, and the remaining lint is left to the PR's CI.
  • new-changelog-fragment refused to run because HEAD is detached, so I wrote the fragment by hand in the same shape as the sibling fragment. check-changelog-fragments validates it.
  • The untracked runner files in the checkout root (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) are not part of this change and were left untouched.

Fix

  • plugins/harness-ops/skills/morning-brief/scripts/review-precision.mjs: fetch reads author { __typename login } on review-thread and issue comments and records author_kind per comment (snapshot schema 3). Adds the exported authorKind() and AUTHOR_KINDS. computePr/compute carry each answer's kind into
  • plugins/harness-ops/skills/morning-brief/scripts/review-precision.test.mjs: adds authorKind cases and a fixture test with person-, agent- and bot-labeled answers on the same lane. It asserts separate per-kind counts and precision, that the combined figures equal the unsplit run, that per-kind outcom
  • plugins/harness-ops/skills/morning-brief/context/precision.md: documents the by_author split and its classification signals, and marks agent-labeled precision as an upper bound.
  • .changes/harness-ops/feat-11841-precision-by-author-5d2e81c4.md: new minor changelog fragment for harness-ops.

Verification

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

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

The run reports:

  • check-changelog-fragments: all 73 fragments valid (run before and after tidy and the review fixes)
  • check-affected: 11 passed, 7 skipped, over 4 changed files (run before and after tidy and the review fixes)
  • fresh-context review subagent: hand-traced every new and modified test assertion against the fixture and implementation and found that all hold. It found no bugs and three nits; two are fixed (the Claude Code sign is now anchored to a line start and has a test case, and the precision.md definition o
  • read https: //docs.github.com/en/enterprise-server3.5/graphql/reference/interfaces: the Actor interface 'Represents an object which can take actions on GitHub. Typically a User or Bot.', implemented by Bot, EnterpriseUserAccount, Mannequin, Organization, User
  • tidy-diff over the 24 changed hunks: no edits. The simplify, comment and residue passes found nothing to change. The docs-hygiene passes found the markdown lines already in shape. The ai-slop pass was a manual read only (see not_done).
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41293805509

Left out: the items under Not verified.

Related

#11841

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

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 8ae1dc7af76ab8f679001745e7712722d3cf29ea: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Security review: incremental (a447d75 → 8ae1dc7)

No security issues found.

critical-findings: 0

What I reviewed

I read every hunk in .claude-lane/incremental.diff for all four files in scope:

  • .changes/harness-ops/feat-11841-precision-by-author-5d2e81c4.md: a changelog fragment. Prose only.
  • plugins/harness-ops/skills/morning-brief/context/precision.md: documents the new kind names and the marker cutoff. It removes no guardrail or standing instruction. The rule that output holds only counts and PR numbers is unchanged.
  • plugins/harness-ops/skills/morning-brief/scripts/review-precision.mjs: the kinds are now bot / user-marked / user-unmarked / unknown. The snapshot stores the raw author_type (GraphQL __typename, or null). compute() now works out the kind through authorKind(), and the Claude Code attribution regex is gone.
  • plugins/harness-ops/skills/morning-brief/scripts/review-precision.test.mjs: test updates only.

Data-flow checks

  • Indexing by snapshot data. The earlier kindOf() cleaned a stored author_kind string before it was used as a key. That function is gone. In its place, every kind comes from authorKind() (review-precision.mjs#L73-L78). It can only return one of the four fixed AUTHOR_KINDS values, and the raw author_type is only compared for equality with "Bot" and "User". So by_author_kind[outcome.kind] cannot be given an arbitrary key such as __proto__, even from a hand-edited snapshot.
  • Markdown output. The by-author table only writes fixed kind names and numbers. No comment text or login reaches the output.
  • Regex. D5_MARKER (/^\s*<!-- d5 finding=/m) is anchored and has no nested quantifiers, so a long comment body cannot cause catastrophic backtracking.
  • Trust surface. No file in scope matches a trusted-path glob. None touches a trust control, a merge hold, a token, a workflow, or a plugin manifest. This is a local metrics script that reads GitHub data through gh and prints counts.

PR context

The PR context file has no embedded text telling the lane to pass the PR, skip a check, or drop a finding.

Spend

None. The change adds no lane runs, turns or billable resources.

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

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 8ae1dc7af76ab8f679001745e7712722d3cf29ea: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Incremental review (a447d75 → 8ae1dc7): no findings.

This round renames the author kinds and changes where the kind is worked out. The four kinds are now bot, user-marked, user-unmarked and unknown. The snapshot now stores each comment's raw author_type (the GraphQL __typename, or null). compute() works out the kind through authorKind(type, body), using the comment's full body. The output key is now by_author_kind.

Checked against the decision comment on #11841:

  • Kind names: the four kinds and their definitions match the decision. No kind is called "person", and a test asserts this (!AUTHOR_KINDS.includes("person")).
  • Marker: user-marked needs a line that opens with <!-- d5 finding=. The Claude Code attribution line no longer counts, and a test covers that case.
  • Cutoff note: the 2026-11-01 marker cutoff (aae9ecd, fix(source-control): give every D5 finding answer one machine-readable label line #11812) is stated in context/precision.md, in the markdown table heading and in the changelog fragment, as the decision requires.
  • Raw type instead of a stored kind: the decision comment says "the snapshot stores the kind of each comment it fetches", but the snapshot now stores the raw __typename and derives the kind in compute(). The snapshot keeps both the type and the body, so the kind can always be rebuilt from it. I count the criterion as met.
  • Live-run check: the issue's second check, a run over one closed day, is still left to a person. The author says it was not run, and I could not run it either.

Code checks:

  • Removed kindOf: dropping kindOf is safe. authorKind only ever returns a member of AUTHOR_KINDS, so by_author_kind[outcome.kind] cannot be indexed with an unexpected key. A schema-2 snapshot, which has no author_type, falls to unknown as documented.
  • Summary-only rows: the kind for summary-only rows comes from the whole issue comment. A D5 summary table therefore counts as user-marked when its marker is on a separate line below the table.

Tests: I traced the updated fixtureWithTypes test by hand. I did not execute it, because this lane has no shell. In PR 101 the summary comment is rewritten as a D5 #-table. Its row names no lane, so it goes to claude-review, the only lane with summary-only findings open at head A. It is labeled INTENTIONAL and counts as user-marked. That gives these claude-review rows:

  • user-marked: 2 valid-fixed and 1 intentional, so 3 labeled and precision 0.6667, shown as 66.7% (3).
  • user-unmarked: 1 uncertain.
  • bot: 1 incorrect.

For claude-security-review, user-unmarked has 1 valid-follow-up and 2 answered-unlabeled, so precision is 1. The per-kind counts add up to the combined figures, and the combined figures equal those from the run with the author types removed. Every assertion I traced holds.

Note, not counted as a finding: the PR description is out of date. It still describes the earlier design: person/agent/bot kinds, a by_author key, and agent detection through the Claude Code attribution line. Its "Not verified" list also says an unmarked agent answer "counts as person". Update the description before merging so the squash commit describes what actually ships.

Embedded text: I found no instructions in the PR context aimed at the review lane.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head a447d75b8aab0b22f263951872cd4589db2642e4. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:fail)

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6yZEkT
Lane-Thread: PRRT_kwDOTCGFQM6yZHOa
Lane-Thread: PRRT_kwDOTCGFQM6yZHPu
Lane-Thread: PRRT_kwDOTCGFQM6yZHRH
Lane-Thread: PRRT_kwDOTCGFQM6yZHSM
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit ee21b37 Nov 1, 2026
55 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-11841-41293805509-1 branch November 1, 2026 12:05
@github-actions

github-actions Bot commented Nov 1, 2026

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/harness-ops/skills/morning-brief/scripts/review-precision.mjs 6 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/harness-ops/skills/morning-brief/scripts/review-precision.mjs:511 other productive input-gap

The run's summary has the full report.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

feat(harness-ops): split review-lane precision by who answered each finding

1 participant