feat(doctor): surface solution-acceptance deadlock checks (parity with validate)#308
Merged
Merged
Conversation
…h validate) `harness validate` already flags the two solution-acceptance misconfigurations that turn the completion-gate into a permanent deny (grounding-mcp absent from tools.mcp; a relative SOLUTION_VERDICT_DIR), but `harness doctor` surfaced none of them, so an operator who enables the pack and forgets grounding-mcp got a silent deadlock with no doctor signal. doctor now reports the same findings in its Policy Packs section, reusing the (now exported) checkSolutionAcceptanceProducer as the single source of truth: condition #1 as an error, condition #2 as a warning, tallied truthfully into errorCount/warningCount. No check logic is duplicated and `harness validate` is unchanged. Also corrects docs/policy-packs/solution-acceptance.md, which still described condition #1 as warning-tier and claimed harness does not project the tools.mcp env into the hook (fixed by apply.ts buildExpectedFiles). Adds doctor tests for the error/warning/silent paths and a CHANGELOG [Unreleased] entry. Tightens two pre-existing versionProbe test annotations to `readonly string[]` (the probe param is readonly; CI tsc excludes tests so the LSP-only mismatch was latent). Review-driven hardening: the warning-path test now asserts a +1 warningCount delta against an absolute-dir baseline (a bare `>= 1` was inert because the fixture independently emits a memory-router warning; mutation-verified red when the warning tally is dropped), and all five new doctor() calls pass homeOverride so the memory / rogue-ledger probes never read the operator's real ~/.harness. Refs: discovery-2026-06-24/harness-doctor-solution-acceptance (08ccfe87) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
harness doctornow surfaces the same two solution-acceptance deadlock misconfigurations thatharness validatealready flags, in its Policy Packs section:tools.mcp) as an errorSOLUTION_VERDICT_DIRin grounding-mcp env) as a warningWhy
solution-acceptance is a pure consumer of the verdict marker the grounding-mcp producer writes. If grounding-mcp is not wired, no verdict can ever be written and every completion verb deadlocks on a permanent deny that looks protective.
harness validatealready caught this, butharness doctorwas blind to it, so an operator who enabled the pack and forgot grounding-mcp got a silent deadlock with no doctor signal pointing at the root cause.How
src/cli/validate/checks.ts: exportcheckSolutionAcceptanceProducer(was module-local). Export-only, no logic change.src/cli/doctor/{types,index,format}.ts: add asolutionAcceptance: Diagnostic[]field to the Policy Packs section, populate it from the exported check inbuildPolicyPacks, tally it truthfully incountDiagnostics(error to errorCount, warning to warningCount), and render it (✗ / ⚠) consistent with the section's existing style. The check is the single source of truth; no logic is duplicated andharness validateis unchanged.docs/policy-packs/solution-acceptance.md: correct the stale text that still described condition docs: initial README + docs/VISION.md #1 as warning-tier and claimed harness does not project thetools.mcpenv into the hook (that is now done at apply time bybuildExpectedFiles). The docs now match the code: condition docs: initial README + docs/VISION.md #1 is an error in both validate and doctor, condition docs: ARCHITECTURE.md — YAML manifest schema + CLI surface #2 a warning, an absolute override is handled silently.Tests / verification
warningCountdelta against an absolute-dir baseline (a bare>= 1was inert because the minimal fixture independently emits a memory-router warning). Mutation-verified: no-op'ing the warning tally turns the test red. All five newdoctor()calls passhomeOverrideso the memory and rogue-ledger probes never read the operator's real~/.harness.versionProbetest annotations toreadonly string[](the probe param is readonly; CI tsc excludes tests so the LSP-only mismatch was latent).Review
Independent reviewer subagent (with a real mutation pass): APPROVE, no high or critical findings. The medium finding (warning-tally not mutation-killed) and the low finding (non-hermetic home) are both addressed in this branch.
Refs: discovery-2026-06-24/harness-doctor-solution-acceptance (08ccfe87)