Repository navigation
fix(cli): validate, analyze options, report server exposure, NaN bus factor; add roadmap - #20
Merged
Merged
Conversation
Nine proposed Prospective Specs, seven quickfix-sized findings, and the open items from earlier planning records consolidated into one roadmap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd NaN bus factor - validate: import ../utils/git.js; the extensionless import cannot resolve under Node ESM, so the repository check always failed - analyze: merge the parent command's options; --days, --format, --output, --path and the rest were ignored - html --serve: listen on 127.0.0.1 and drop the wildcard CORS headers so the report is not readable from the local network; reject non-GET/HEAD - bus factor: busFactorShare returns 0 for an empty window instead of NaN, used by every CLI summary and the console, HTML, and Markdown reports Adds regression tests, including a scan that every relative import in src carries a .js extension (Jest resolves extensionless imports, so a runtime test would not catch it). Marks roadmap findings F1-F4 fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Two changes from the 2026-11-21 code review:
.devspark.work/roadmap/): nine proposed Prospective Specs, seven small findings, and the open items from earlier planning records, all in one place.Fixes
git-spark validatealways printed "Failed to validate Git repository". A dynamic import had no.jsextension, so Node couldn't load it.../utils/git.js.html --servelistened on every network interface and sentAccess-Control-Allow-Origin: *, so anyone on the local network could read the report, including author emails.127.0.0.1only and remove the CORS headers. Requests other than GET and HEAD get a 405.git-spark analyzeonly read--repo.--days,--format,--output,--pathand the other global options were silently ignored.htmlcommand already does.NaN%when the date range had no commits.busFactorShare()helper returns 0. It replaces the same calculation in 7 places: the CLI summary, health check, HTML command summary, reportkeyMetrics, and the console, HTML and Markdown reports.The CHANGELOG
[Unreleased]section is updated, and the roadmap now marks F1 to F4 as fixed.Verification
test/cli-fixes-regression.test.ts:src/and fails if any relative import lacks.js. This fails on the old code. Jest finds files without the extension, so a test that ran the command would have passed even with the bug.busFactorSharefor an empty window.validatenow reports a valid repository.analyze --format jsonwrites a JSON report.0%in console, Markdown and HTML.src/cli/commands.tsbecause it usesimport.metaand three packages that only ship as ES modules (commander,chalk,ora). No existing test covers that file either.Not in this PR
src/cli/periods-command.ts, were already failing Prettier before this branch. They are not touched here.🤖 Generated with Claude Code