Conversation
'dmcheck run session.jsonl' with the packaged default charter (which names no GM) crashed with KeyError: 'rule' — core.check() returned an error pseudo-finding lacking the 'rule' key, and cli's counts summary assumed every finding has one. Same defect class as the 0.5.x 'init --dm' bug: worked in tests because tests always pass the fixture charter. Fix the class: check() now raises ValueError so a finding without 'rule' can never exist; cli routes it through the existing exit-2 error lane (JSON on stderr); watch validates GM up front; mcp already converts the raise to a clean error response. Regression tests cover cli and watch via subprocess (no-traceback asserted). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
Superseded: the #7–#9 validation-module rewrite fixes this class properly (structured invalid-envelope, exit 2, no traceback — verified on main: |
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.
Bug
dmcheck run session.jsonl(no--gm, packaged default charter) crashed withKeyError: 'rule'instead of the intended honest exit 2. The README's headline invocation shape was affected for any user whose charter names no GM.Mechanism
core.check()returned[{"error": ...}], 2— a pseudo-finding without therulekey that every consumer (cli counts summary, watch dedup key, R8 in core) assumes exists. Found while writing srdcheck-style SKILL.md worked examples for the family tune-up; no test covered the default-charter path, which is how it shipped (same class as the 0.5.xinit --dmpackaging bug — works in a prepared checkout/fixture, breaks for installed users).Fix (class, not instance)
check()raisesValueError— a finding withoutrulecan no longer exist in the contractTests
3 new regression tests (check-raises, cli-no-traceback via subprocess, watch-exit-2); suite 20/20 green; preflight clean.
🤖 Generated with Claude Code