Skip to content

fix: exclude test files from CFP data movement counting - #129

Merged
kenjudy merged 1 commit into
mainfrom
feat/cfp-prompt-fix
Aug 31, 2026
Merged

kenjudy merged 1 commit into
mainfrom
feat/cfp-prompt-fix

Conversation

@kenjudy

@kenjudy kenjudy commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Live validation (run with --history squashed against this repo) showed that a test-only commit (bbc4f0ec, 26 lines of test assertions) received CFP 3 (E:2, X:1) because expect() and assertion calls look like data movements to the model
  • Adds an explicit paragraph to CFP_SYSTEM_PROMPT instructing Claude to ignore test files and their contents when counting E/X/R/W movements
  • Adds a covering test: instructs Claude to ignore test files when counting data movements

Test plan

  • __tests__/claudeAnalysis.test.js -- new test verifies prompt contains test-file exclusion instruction
  • 823/823 tests pass

Generated with Claude Code

Live validation showed that test assertions (expect() calls, assertions)
were being counted as E/X data movements. Added explicit instruction to
CFP_SYSTEM_PROMPT to skip test files and their contents.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

PR Analysis

Size: small (based on production code)
Production Code: 2 lines (1 files)
Test Code: 8 lines (1 files)
Total: 10 lines (2 files)
Test-to-Production Ratio: 4.00:1
No size or quality concerns.

Commit Analysis

Total Commits: 1
Average Commit Size: 2 production lines
Average Files per Commit: 2.0

Metric Value
Large commits (>100 prod lines) 0/1 (0%)
Sprawling commits (>5 files) 0/1 (0%)
Test/prod co-change rate 1/1 (100%)
Message quality 1/1 (100%)
Median net additions ratio 0.80
Test-only commits 0
Production-only commits 0

Commit Details

7fea03f Ken Judy (8/31/2026)
fix: exclude test files from CFP data movement counting
2 prod lines, 2 files [test+prod]

Test Coverage

Test-to-Production Ratio: 4.00:1 (no calibrated target for this ratio; reported descriptively)

DORA Capability Assessment

Archetype: harmonious-high-achiever
Strong batch discipline, test coverage, and message quality. AI tools likely amplifying positive outcomes.

Capability Metric Value Target
Small Batches Large commit % 0% <18% (no critical band established)
Small Batches Sprawling commit % 0% <18% (no critical band established)
Version Control Test/prod co-change rate 100% >23% (no critical band established)
Version Control Message quality 100% no band, see spec
AI Risk Signal Net additions ratio (median) 0.80 no band, see spec
Sample size (1 commit) is below the 5-commit convention for a rate verdict (code-quality-metrics-w9f): large-commit %, sprawling-commit % and test/prod co-change rate are reported below without a pass/fail judgement.
Automated by Code Metrics Workflow

@kenjudy
kenjudy merged commit 3dae5da into main Aug 31, 2026
1 check passed
@kenjudy
kenjudy deleted the feat/cfp-prompt-fix branch August 31, 2026 21:47
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