Skip to content

feat(debugging): search for defect siblings, propose an always-on signal, and state the legitimate-state test in - #12164

Closed
melodic-automation-lanes[bot] wants to merge 1 commit into
mainfrom
work-resolve-issue/issue-12146-41358889357-1
Closed

melodic-automation-lanes[bot] wants to merge 1 commit into
mainfrom
work-resolve-issue/issue-12146-41358889357-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #12146

Summary

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

Phase 6 of /debugging:debug now searches for the fixed defect's siblings, fixing each in the change or filing it, before the proof steps so they cover the sibling fixes. Its record step proposes one cheap always-on signal for the deciding fact, gated by the new always_on_signal key in docs/conventions/debugging.yaml (default when-instrumented: propose only when Phase 4 instrumentation ran). The null-check line now states the legitimate-state test. Each added sentence carries its reason and its test. Provenance (cursor/plugins pstack fix-root-causes) goes in the changelog fragment and the upstream record, not the skill body, following docs/upstream/cursor-pstack.md's rule that provenance never goes in skill bodies. A new schema_version 1.1 eval case covers the sibling and the signal.

Not verified

  • No Implementers row (or Root-rule-by-surface row) for the new debugging surface in docs/contracts/config-cascade/README.md: that table feeds a generated block that scripts/sync-config-cascade-semantics.py regenerates, which this lane cannot run, and a hand-added row would fail CI's --check. Follow-u
  • scaffold.sh is created as a regular file; existing scaffolds are mode 100755 and this lane cannot chmod. If the eval runner executes it directly rather than through bash, set the mode on the PR
  • Tidy ran passes 1-5, but pass 5's deterministic ai-slop detector (detect.sh) is not a wrapper this lane may run, so only its rubric layer ran (no findings). Tidy edited only the changelog fragment (pstack introduced with a link; 'Placed from' reworded; an unverified upstream quote dropped)
  • The eval case was not run (no eval runner in this lane); evals-schema, evals-quality, convention-yaml-schema, line-citations and the other CI-only checks are left to the PR's CI
  • The issue's 'The PR's CI is green' item is left to the PR's CI
  • The external pstack principle text and commit e5136d8241 were not read in this run (the commit is not in this checkout); the wording follows the issue's accepted Q175 text and the repo's upstream record, and no upstream quote is written into the change
  • git status shows untracked sandbox files at the checkout root (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) that this run did not create; they are not part of this change

Fix

  • plugins/debugging/skills/debug/SKILL.md: Phase 6 'Prove the fix' gains the sibling search (reason, sibling test, fix-or-file scope test, record line); 'Leave a record' gains the always-on signal proposal gated by always_on_signal in docs/conventions/debugging.yaml (root rule, values, default, invali
  • plugins/debugging/schemas/debugging.schema.json: new schema for docs/conventions/debugging.yaml with the always_on_signal enum (when-instrumented, always, never; default when-instrumented)
  • plugins/debugging/README.md: Configuration section documents docs/conventions/debugging.yaml and the always_on_signal key
  • plugins/debugging/skills/debug/templates/checklist.md: Phase 6 line names the sibling search and the signal proposal
  • plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/case.yaml: new case, schema_version 1.1
  • plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/prompt.md: Phase 6 prompt and expected outcome
  • plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/scaffold.sh: repo with the lower-cased key lookup in pricing.py (fixed, tagged [DEBUG-c71e] Phase 4 probe) and shipping.py (unfixed), loop script, regression test and session notes recording the Phase 4 step
  • plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/graders/names-second-instance.md: llm grader, reply names shipping.py/shipping_rate as a sibling and fixes or files it
  • plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/graders/proposes-always-on-signal.md: llm grader, reply proposes a cheap always-on signal showing the mismatched key
  • plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/samples/names-second-instance.json: 2 pass, 3 fail samples
  • plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/samples/proposes-always-on-signal.json: 2 pass, 3 fail samples
  • .changes/debugging/work-resolve-issue-issue-12146-41358889357-1-9f297cce.md: bump minor fragment describing the additions, the key and the schema, with provenance
  • docs/upstream/cursor-pstack.md: fix-root-causes row now records the legitimate-state test and the always-on signal as taken in debugging:debug (was 'not taken', with a stale :320 line citation)

Verification

The runner ran each check from the base copy against 66894e6:

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

The run reports:

  • check-changelog-fragments: all 6 fragments valid (run after the change, after tidy, and after review fixes)
  • check-changed-skills: CHECK-SKILL debug PASS, 0 errors, 6 warnings (pre-existing size/Next/Gotchas warnings plus body growth 358 -> 381 lines)
  • check-affected: 12 passed, 6 skipped over 13 changed files
  • fresh-context review subagent over the whole diff: 11 findings (no high); fixed 1-5, 7-11 and the root-rule, report-line and parse-failure parts of 6; regex grader verified against its samples before being replaced by an llm grader; scaffold arithmetic checked (fixed pricing gives 29.0, shipping.py
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41358889357

Left out: the items under Not verified.

Related

#12146

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 66894e62f72c5dc0f7ca5da94713bf379db35f0c: read 13 of 13 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #12164 (head 66894e6)

I read every hunk of all 13 changed files in .claude-lane/pr.diff. I found no security issues.

Scope. No changed file matches a TRUSTED PATHS: glob. No trust control changes: the trusted-actor list, trusted-trigger, lane token, kill switch, resolve-config/broker, merge holds and .github/actions/* are all untouched. No .claude-plugin/plugin.json or marketplace.json changes, so there are no manifest lines to report.

What I checked:

  • plugins/debugging/skills/debug/SKILL.md, instruction-surface lens. Three standing instructions change:

    • The Phase 5 diff rule now lets the fix commit also carry sibling fixes of the same confirmed cause. Refuted-hypothesis edits must still come out.
    • The "Does not fix the symptom" line is narrowed. A guard is now acceptable when the state is legitimate.
    • Phase 6 gains two steps: a sibling search, and an always-on signal proposal that is left out of the fix commit.

    I tested each removed or softened rule by consequence: what breaks when it is absent at the moment it was written for. These are debugging-quality rules. None guards a security-protected action: no secrets, credentials, destructive operations, outward posting, permission or trust decisions. No request now reaches a protected action unchecked. docs/contracts/instruction-exception-register/README.md was not readable in this run, so I did not consult the protected-class list and fell back to recognition by consequence.

  • New config read (docs/conventions/debugging.yaml, key always_on_signal). The key only decides whether the skill proposes a signal. It gates no tool use, cost or mutation. Values are limited to an enum (plugins/debugging/schemas/debugging.schema.json, "enum": ["when-instrumented", "always", "never"]). A file that does not parse or holds another value is reported and the default applies. The read is confined to the git toplevel and is skipped outside a work tree or at or above the home directory. A hostile value in a checked-out repository gets nothing beyond a proposal in the reply.

  • Eval case (scaffold.sh, prompt, graders, samples). The scaffold writes fixed heredoc Python files into the eval's own temp repository and makes a local commit. It does no network access, takes no outside input, and has no expansion of untrusted values. Graders and samples are static text.

  • README, checklist, changelog fragment, docs/upstream/cursor-pstack.md. These are documentation only.

PR context. It contains no embedded directives aimed at this lane.

Spend: the new eval case runs 3 runs, each up to 40 turns / 900 s, when the eval suite runs. This uses prepaid API credit only and is not a hold.

critical-findings: 0

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

claude-lane: claude-review

Comment on lines +312 to +319
Whether to propose is the `always_on_signal` key of `docs/conventions/debugging.yaml` at the
repository root (the git toplevel; outside a git work tree, or with the root at or above your
home directory, skip the file). `when-instrumented` (the default, used when the file or the key
is absent) proposes one when Phase 4 instrumentation ran, since needing a probe is what shows
the fact was hidden; `always` proposes one on every run; `never` skips it. A file that does not
parse, or any other value, is reported in the reply as invalid with the file, key and value, and
the default applies. Report the value in use in one line, such as
`always_on_signal: when-instrumented (default)`.

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.

Advisory: only the default path of the always_on_signal gate is tested.

#12146 asks that the signal be proposed "only when the gating key says to", and that the skill "reads that key from the repository's docs/conventions/debugging.yaml". The new eval case covers exactly one path: no config file, Phase 4 ran, so a proposal is expected.

No test in this PR or the repo would fail if any of these broke:

  • The skill ignores the file. A scaffold with always_on_signal: never still gets a proposal, and every current grader still passes.
  • when-instrumented stops checking whether Phase 4 ran, and a session with no probe gets a proposal anyway.
  • An invalid value (say always_on_signal: sometimes) is applied silently instead of being reported in the reply as invalid.

Fix: add one small sibling case whose scaffold commits docs/conventions/debugging.yaml with always_on_signal: never. Give it a grader that fails when the reply proposes an always-on signal and passes when it reports always_on_signal: never. That catches both a skill that ignores the key and one that misreads the file.

claude-lane: claude-review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pr-unblock / address-feedback: UNCERTAIN, left open

Evidence: plugins/debugging/skills/debug/SKILL.md:312, plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/case.yaml:4, plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/scaffold.sh:7, plugins/evals/skills/plugin-eval/reference/case-authoring.md:51

The gap is real. The only eval for the gate, phase6-finds-sibling-and-proposes-signal, has a scaffold that never writes docs/conventions/debugging.yaml. So nothing fails if the skill ignores always_on_signal: never, skips the Phase 4 check in when-instrumented mode, or silently applies an invalid value (SKILL.md:312-319). The fix is a sibling case whose workspace commits that file. Per case-authoring.md:51-52, a case can only get a writable file into its workspace through its own context.scaffold_script; add_dirs is read-only and outside the repository root. The runner documents no argument or environment variable that would let one scaffold serve two cases, and changing the existing scaffold to write never would break the current case, which expects a proposal. So the fix needs a new .sh scaffold, for example plugins/debugging/evals/phase6-signal-gate-never/scaffold.sh. The lane's path check refuses that file because new shell scripts are out of scope for this mode. I made no edit. A person should add the case: a copy of the existing scaffold that also commits docs/conventions/debugging.yaml with always_on_signal: never, a prompt.md like the existing one, and a grader with samples. The grader should FAIL a reply that proposes an always-on signal and PASS one that reports always_on_signal: never. A second case with an invalid value would cover the invalid-value branch.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pr-fix lane: please fix this finding.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pr-unblock / address-feedback: UNCERTAIN, left open

Evidence: plugins/debugging/skills/debug/SKILL.md:312, plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/case.yaml:4, plugins/debugging/evals/phase6-finds-sibling-and-proposes-signal/scaffold.sh:7, plugins/debugging/evals/capture-request-routes-to-drive/scaffold.sh:5, plugins/evals/skills/plugin-eval/reference/case-authoring.md:51

I followed the request to fix this, but this lane cannot make the fix, so it needs a person. The gap is still there: SKILL.md:312-319 gates the signal on always_on_signal, and the only eval for it, phase6-finds-sibling-and-proposes-signal, has a scaffold that never writes docs/conventions/debugging.yaml. A never case needs a workspace whose git root commits that file. Per case-authoring.md:51-52, only the case's own context.scaffold_script can write a file into the workspace. Every debugging case has its own scaffold.sh, and the shared ones call fixtures/seed.sh through their own directory (capture-request-routes-to-drive/scaffold.sh:5). So the fix needs a new scaffold.sh in a new case directory. The path check refuses that file (phase6-signal-gate-never/scaffold.sh) because this lane may not add shell scripts. The existing scaffold is in scope but cannot do the job. Making it write never would break the current case, which expects a proposal. The repository documents no argument or environment variable that would let the script tell which case runs it, so it cannot serve both. Adding only the case's data files would leave a case.yaml pointing at a missing script, so I made no edit. Fix for a person: add phase6-signal-gate-never/ with a scaffold.sh that copies the existing one and also commits docs/conventions/debugging.yaml with always_on_signal: never, a prompt.md like the existing one, and an llm grader with samples. The grader should FAIL a reply that proposes an always-on signal and PASS one that reports always_on_signal: never. A second case with an invalid value such as sometimes would cover the invalid-value branch, and a never-instrumented session under the default would cover the when-instrumented check.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The replacement PR #12200 carries the fix: new eval case plugins/debugging/evals/phase6-signal-gate-never/ commits docs/conventions/debugging.yaml with always_on_signal: never and grades that the reply reports that value (regex grader, samples checked by validate-cases.py) and proposes no signal (llm grader). Pushed; head 52954d1 on feat/debugging-12146-signal-gate.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 66894e62f72c5dc0f7ca5da94713bf379db35f0c: read 13 of 13 changed file(s); 2 finding(s), 1 as inline comments.

Code review: #12164 (head 66894e6)

I read all 13 changed files in full. The change does what #12146 asks. The Phase 6 sibling search, the gated always-on signal proposal, the legitimate-state test on the null-check line, the schema 1.1 eval case and the bump: minor fragment are all there. Each added sentence states its reason and its test. The scaffold's numbers check out: the fixed unit_price gives 2×12.5 + 4.0 = 29.0, shipping.py still has the unfixed RATES[code.lower()], and no docs/conventions/debugging.yaml exists, so the default when-instrumented path applies with Phase 4 recorded in NOTES.md. The diff shows scaffold.sh as mode 100755, so the PR body's note that the file is "a regular file" is out of date.

Findings

  1. Advisory, inline: only the default path of the always_on_signal gate is tested. See the comment on plugins/debugging/skills/debug/SKILL.md.
  2. Advisory, cross-file: the new docs/conventions/debugging.yaml team-layer surface has no row in the config-cascade Implementers table (docs/contracts/config-cascade/README.md#L621-L629).
    • The rule: the table is the conformance record, and it says "A surface is listed here whether or not it conforms, so the gap stays visible."
    • The PR's reason for leaving it out: it says the lane couldn't run scripts/sync-config-cascade-semantics.py, and that a hand-added row would fail --check.
    • Why that doesn't hold: the generated block is a plain projection of the row's Who wins and Merge form cells. Adding the Implementers row by hand plus the matching glance line (for example | `debugging` | team only | per-key | between the knowledge line and the END marker at L612-L614) keeps the check green.
    • Risk if left: the surface ships unlisted. Nothing in scripts/ enforces the table, so a follow-up is the only thing that would catch it.

Closing issue #12146: acceptance criteria

Criterion Result
Sibling search with its reason Met; the names-second-instance grader covers it
Signal proposal only when the key says to Met in the text; only the default path is tested (finding 1)
Key read from docs/conventions/debugging.yaml, default when absent, key and file named Met; only the absent-file default is tested (finding 1)
Null-check line states the legitimate-state test Met at SKILL.md:366. No test covers the wording, but the issue's eval scope didn't ask for one, so I'm not counting it
Each added sentence states its reason and test Met
Schema 1.1 eval case: scaffold has two copies of the defect and a Phase 4 step, two graders, samples with pass and fail entries Met
.changes/debugging/*.md fragment, bump: minor Met
PR's CI is green Not verified; I had no CI access

Other notes

  • Checks: the verification commands in the PR body are author-claimed and unverified. I ran nothing.
  • Old citations: the :183, :323 and :337 citations in the rewritten docs/upstream/cursor-pstack.md row were already stale at the base. scripts/check-line-citations.py treats docs/upstream/ as a point-in-time record, so I'm not flagging them.
  • Manifests: no plugin.json or marketplace.json changes, so there are no manifest lines.
  • Spend: the new eval case runs 3 times with up to 40 turns each (900 s timeout) on prepaid or subscription usage. This isn't a hold.
  • Embedded instructions: none found in the PR context or rule files.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

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

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

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the lane left a review finding open and no adjudicator verdict settled it: none was recorded, it found the finding does not hold where the lane had not disputed it (an UNCERTAIN or VALID-defer reply), which only an INCORRECT reply lets a verdict resolve, it found the finding asks only for tests whose covering check runs had not all passed when the round began, or it raised a security question on a finding the security-review lane rated below CRITICAL; so a session builder takes it. 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=12164 -f activity=address-feedback

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Nov 2, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped on this pull request and needs a person: a disputed review finding is one only a person decides (a CRITICAL finding, a security-review finding with no rating the lane reads, or a thread a person opened or directed).

  • Reason: feedback-disputed
  • Resume key: 66894e62f72c5dc0f7ca5da94713bf379db35f0c (the head the lane stopped on)

To resume, deal with the reason above, remove the needs-human label (and do-not-merge, if set), then dispatch the pr-unblock workflow with pr-number=12164 and activity=address-feedback:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=12164 -f activity=address-feedback

@kyle-sexton

Copy link
Copy Markdown
Member

Hold: superseded by #12200. Releases when: never; closed once #12200 merges.

@kyle-sexton

Copy link
Copy Markdown
Member

Superseded by #12200, merged 2026-11-02T03:54:38Z.

@kyle-sexton kyle-sexton closed this Nov 2, 2026
@github-actions
github-actions Bot deleted the work-resolve-issue/issue-12146-41358889357-1 branch November 4, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Hard merge gate: do not merge while applied. needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(debugging): place the sibling-search, always-on-signal and legitimate-state principle parts in /debugging:debug

1 participant