Skip to content

feat: v1.2 Diagnostics — step-precision, thin-coverage, round-emission, self-cycle wording - #81

Merged
Joncik91 merged 2 commits into
mainfrom
v1.2-diagnostics
May 15, 2026
Merged

feat: v1.2 Diagnostics — step-precision, thin-coverage, round-emission, self-cycle wording#81
Joncik91 merged 2 commits into
mainfrom
v1.2-diagnostics

Conversation

@Joncik91

Copy link
Copy Markdown
Owner

Summary

Four diagnostic-quality fixes for Spectre v1.2:

Fix B — Step action precision concerns (bin/walker.py)

  • New generate_step_precision_concerns() function checks four structural vague-action patterns per step: pip install without version pin, python -m <pkg> with no subcommand, bare URL with no version token, bare model ID alongside LLM vendor SDK.
  • Uses compiled regex patterns (structural, not bare tokens).
  • Emits edge-case concerns with per-step idempotency guard.
  • 17 new tests in tests/test_walker_step_precision.py.

Fix C — Tier-3 thin-coverage finding (bin/llm_judge.py, bin/findings.py)

  • New tier3-negative-paths-thin-coverage warn finding: emitted alongside any negative-path-omission finding when the step's negative-paths: count is < 3 (threshold: ≥ 3 = "documented").
  • Registered in KNOWN_KINDS and TIER3_CONTRADICTION_SEVERITY.
  • Glossary entry added.
  • 8 new tests in tests/test_llm_judge_thin_coverage.py.

Fix D — Walker round-count visibility (bin/walker.py)

  • record_answer emits _status.emit("info", "walker.round", round=N, pending=K) after each round_count increment.
  • Wrapped in try/except to stay safe in test contexts.
  • Glossary entry added.
  • 2 new tests in tests/test_walker_round_emission.py.

Fix M — Self-cycle-produces wording (bin/spec_ast.py)

  • message: now says "references X which it also declares in produces (possible self-cycle)" — removes the incorrect "consumes" framing.
  • suggested_fix: offers two branches — remove from produces if action only names the path; assert idempotency if action reads it.
  • 2 new tests added to tests/test_spec_ast_self_cycle.py.

Test plan

  • pytest tests/ — 1896 passed (+28 over 1868 baseline)
  • pytest tests/test_walker_step_precision.py — 17 tests, all 4 vague shapes + controls
  • pytest tests/test_llm_judge_thin_coverage.py — 8 tests, thin/thick/non-omission cases
  • pytest tests/test_walker_round_emission.py — 2 tests, emit + field format
  • pytest tests/test_spec_ast_self_cycle.py — extends with 2 wording tests

🤖 Generated with Claude Code

Copilot and others added 2 commits May 15, 2026 21:17
…ssion + self-cycle wording

Fix B (walker.py): generate_step_precision_concerns — four structural patterns
per step action: pip install without version pin, python -m <pkg> with no
subcommand, bare URL with no version token, bare model ID alongside LLM vendor SDK.
Each emits an edge-case concern with a per-step idempotency guard.

Fix C (llm_judge.py, findings.py): tier3-negative-paths-thin-coverage — when a
negative-path-omission finding is present and the step's negative-paths count is
< 3, emit an alongside warn finding. Threshold is >= 3 = documented. New kind
registered in KNOWN_KINDS and TIER3_CONTRADICTION_SEVERITY.

Fix D (walker.py): after each round_count increment in record_answer, emit
_status.emit("info", "walker.round", round=N, pending=K) for per-round operator
visibility. Wrapped in try/except so test contexts without _status can't break it.

Fix M (spec_ast.py): rewrite self-cycle-produces message and suggested_fix.
Message now says "references X which it also declares in produces (possible
self-cycle)." Suggested fix offers the two-branch operator choice: remove from
produces if action only names the path, or assert idempotency if it reads it.

Glossary (docs/glossary.md): added tier3-negative-paths-thin-coverage (finding)
and walker.round (status) entries with full dev/pm/triggered_by/user_action.

Tests: 1896 passed (+28 over 1868 baseline).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The 'Tier-3 demotion alongside-finding' framing was inaccurate. negative-path-omission is info-severity and never enters the faithfulness demotion path (_BLOCK_CONTRADICTION_KINDS in llm_judge.py only contains block-severity kinds). The new check fires alongside the original finding when negative-paths count < 3 — co-occurrence, not demotion. Rewriting dev:, pm:, triggered_by:, and dropping the misleading tier3-unfaithful-contradiction related: entry.

Caught in Wave 4 Opus aggregate review.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Joncik91
Joncik91 merged commit ffa6203 into main May 15, 2026
2 checks passed
Joncik91 added a commit that referenced this pull request May 15, 2026
13 fixes across 5 classes surfaced by Vidence's v1.1 dogfooding cycle:
- L: sanitized-input field with per-artifact-version taint tracking (#80)
- E: gated Python-stack walker detection (#78)
- H/I/N: --project flag + wizard placeholders + skill doc fix (#79)
- A: calibrated-for exemplar audit (#77)
- O/P/Q: excessive-post-ship-iteration wiring + tier3 run fingerprint + ADR
  extractor extensions (#82)
- B/C/D/M: step-precision + thin-coverage + walker round + self-cycle
  wording (#81)

No spec contract changes — v1.0/v1.1/v1.1.1 locked specs remain valid.

Tests: 1842 → 1923 (+81). Five new finding kinds / status codes, all
documented in docs/glossary.md.

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant