Repository navigation
feat: deployment frequency floor detection (GitHub #65) - #121
Conversation
…cycle 1) Add releaseTagPattern, stagingTagPattern, and releaseCommitSubjectPattern to META_KEYS in lib/repoConfig.js. All three are validated as string-or-null (the string is used as a RegExp source); they are recorded in sources but never merged into effective CONFIG, matching lifecycle's own shape. Callers read them back from sources to opt into deployment frequency detection. Four new repoConfig tests cover recognition, multi-key coexistence, type rejection, and coexistence with a class A override. Total tests: 750 → 754. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… lib/metrics.js (GitHub #65, cycle 2) detectDeploymentFrequency: given sorted [{name,date}] release events and an asOf timestamp, returns release_count, median_interval_days, mean_interval_days, and days_since_last (all whole days). Returns null when events is empty. Single-event histories report count=1 with null intervals (no pair to compute from). findUnmatchedVersionShapedRefs: given a list of tag/ref names and the configured release/staging patterns, returns names that look version-shaped (contain vN.N) but match neither pattern. Returns [] when releaseTagPattern is null (feature off). A [guard] test asserts staging-prefixed version tags are never returned as unmatched when stagingTagPattern is configured. Both functions are in lib/metrics.js so code-metrics.yml can require() them. Total tests: 754 → 764. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Calls execSync directly so error handling stays inside the function rather than being swallowed by runGitCommand's own catch block. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… (GitHub #65, Cycle 5) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…65, Cycle 6) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Cycle 7) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cle 8) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PR AnalysisSize: large (based on production code) Strengths
Commit AnalysisTotal Commits: 8
Commit Details906fe8f Ken Judy (8/31/2026) ff07699 Ken Judy (8/31/2026) c562658 Ken Judy (8/31/2026) b8f5e10 Ken Judy (8/31/2026) accade4 Ken Judy (8/31/2026) 7b12a91 Ken Judy (8/31/2026) f4e4ce8 Ken Judy (8/31/2026) 041ed57 Ken Judy (8/31/2026) Test CoverageTest-to-Production Ratio: 2.11:1 (no calibrated target for this ratio; reported descriptively) DORA Capability AssessmentArchetype: harmonious-high-achiever
Duplicate CodeFound 1 duplicate block(s) across the changed files:
|
Summary
releaseTagPattern,stagingTagPattern,releaseCommitSubjectPatternas META_KEYS inlib/repoConfig.js(validated string-or-null; not merged into CONFIG)detectDeploymentFrequency()andfindUnmatchedVersionShapedRefs()inlib/metrics.jsfetchReleaseTags()inlib/git.js-- callsexecSyncdirectly (notrunGitCommand) so error handling stays in the functionfindReleaseCommitsFromSubjects()commit-subject fallback inlib/metrics.jslocal-code-metrics.js-- reads patterns from config sources, calls tag/subject detection, addsdeployment_frequency_floorto summary JSON.github/workflows/code-metrics.yml-- reads.codemetrics.json, uses GitHub API tag listing, same detection logictype:'gap'→type:'partial'for deployment frequency entryrenderDeploymentFrequency()tile inlib/report-template.js-- rendered only whendeployment_frequency_flooris presentBoth local and workflow scripts kept in sync. Feature is off by default; opt in via
.codemetrics.json:{ "releaseTagPattern": "^v\\d+" }Test plan
npm test)Closes #65
🤖 Generated with Claude Code