Summary
doc-master writes incorrect test counts in CHANGELOG entries. During the spektiv #951 pipeline (commit c196bfd31, 2026-04-10), doc-master wrote "10 new unit tests" but the actual count was 20 (7 connection + 6 broker + 4 engine wiring + 3 injection regression). The count was likely snapshotted before the remediation cycle added 3 tests and before the final tally.
Implementation Approach
Update agents/doc-master.md to add a test count verification step before writing CHANGELOG entries:
-
Before writing any CHANGELOG entry that mentions test counts, the doc-master MUST enumerate actual def test_ methods added in the current commit's diff:
git diff HEAD~1 --unified=0 -- 'tests/**/*.py' | grep -c '^\+.*def test_'
Or for uncommitted changes:
git diff --unified=0 -- 'tests/**/*.py' | grep -c '^\+.*def test_'
-
Cross-check: If the enumerated count differs from the number the doc-master was about to write, use the enumerated count.
-
Remediation awareness: If the pipeline includes a remediation cycle (STEP 11), the doc-master should be re-invoked with the updated file list (this is already in implement.md STEP 12 — but the re-invocation must also refresh the test count).
Test Scenarios
- doc-master writes CHANGELOG for a PR with 5 new tests → CHANGELOG says "5 new tests" (correct)
- doc-master writes CHANGELOG before remediation adds 3 more tests → doc-master is re-invoked → CHANGELOG says "8 new tests" (correct after refresh)
- doc-master writes CHANGELOG for a PR with 0 new tests → CHANGELOG does not mention test count
- doc-master counts
def test_ additions but excludes deleted tests (net count, not gross additions)
Acceptance Criteria
Origin
Observed during spektiv Issue #951 pipeline (2026-04-10). CIA finding F1. CHANGELOG said "10 new unit tests"; actual was 20.
Related
Plugin Version: 3.48.0
Summary
doc-master writes incorrect test counts in CHANGELOG entries. During the spektiv #951 pipeline (commit
c196bfd31, 2026-04-10), doc-master wrote "10 new unit tests" but the actual count was 20 (7 connection + 6 broker + 4 engine wiring + 3 injection regression). The count was likely snapshotted before the remediation cycle added 3 tests and before the final tally.Implementation Approach
Update
agents/doc-master.mdto add a test count verification step before writing CHANGELOG entries:Before writing any CHANGELOG entry that mentions test counts, the doc-master MUST enumerate actual
def test_methods added in the current commit's diff:Or for uncommitted changes:
Cross-check: If the enumerated count differs from the number the doc-master was about to write, use the enumerated count.
Remediation awareness: If the pipeline includes a remediation cycle (STEP 11), the doc-master should be re-invoked with the updated file list (this is already in
implement.mdSTEP 12 — but the re-invocation must also refresh the test count).Test Scenarios
def test_additions but excludes deleted tests (net count, not gross additions)Acceptance Criteria
agents/doc-master.mdincludes a "Test Count Verification" step before writing CHANGELOG entriesdef test_from the actual git diff, not from agent output or planner estimatesdef test_additions in the commitOrigin
Observed during spektiv Issue #951 pipeline (2026-04-10). CIA finding F1. CHANGELOG said "10 new unit tests"; actual was 20.
Related
Plugin Version: 3.48.0