Skip to content

test: coverage-driven hardening pass — detector matrix, unit tests, node/python parity gate#9

Merged
kunalsuri merged 2 commits into
mainfrom
claude/test-coverage-analysis-g8qozk
Jul 2, 2026
Merged

test: coverage-driven hardening pass — detector matrix, unit tests, node/python parity gate#9
kunalsuri merged 2 commits into
mainfrom
claude/test-coverage-analysis-g8qozk

Conversation

@kunalsuri

Copy link
Copy Markdown
Owner

Grows the smoke suite from 246 to 327 checks and lifts measured Node
installer coverage from 78.6% to 85.8% lines (66.6% to 76.4% branches):

  • table-driven orient detector tests for every supported stack (Gradle,
    Go, Rust, Ruby, PHP, CMake, Makefile fallback + suppression, pip,
    yarn/bun/Pipenv locks, Turborepo, build-script-less and malformed
    package.json, empty repo, multi-stack note), flag overrides, and README
    description-extraction edge cases — orient.mjs is now at 100% lines
  • per-ecosystem indepth dependency-parsing tests (pip, Poetry, Go, Cargo,
    Bundler, Composer) and a real-git-repo fixture for the git-history
    analyzer, both runtimes
  • unit tests for classifyAction pinning the full re-run matrix, including
    the kit-upgrade "update" outcome that end-to-end tests cannot reach,
    and for the intake wizard's detectBranch (exported for testing)
  • verify edge cases (no docs, duplicate basenames) and CLI surface checks
  • a node<->python parity test: both installers must write identical
    orient profiles (minus timestamp) for the same fixture
  • npm run coverage (c8 via npx) plus a CI coverage job enforcing a floor

Fixes the one divergence the parity test caught: lib/orient.py recorded
fork evidence with an ASCII '->' where the Node installer writes '→'.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01483R5qNvQeZ78kE52kGLHy

claude added 2 commits July 2, 2026 20:24
…ode/python parity gate

Grows the smoke suite from 246 to 327 checks and lifts measured Node
installer coverage from 78.6% to 85.8% lines (66.6% to 76.4% branches):

- table-driven orient detector tests for every supported stack (Gradle,
  Go, Rust, Ruby, PHP, CMake, Makefile fallback + suppression, pip,
  yarn/bun/Pipenv locks, Turborepo, build-script-less and malformed
  package.json, empty repo, multi-stack note), flag overrides, and README
  description-extraction edge cases — orient.mjs is now at 100% lines
- per-ecosystem indepth dependency-parsing tests (pip, Poetry, Go, Cargo,
  Bundler, Composer) and a real-git-repo fixture for the git-history
  analyzer, both runtimes
- unit tests for classifyAction pinning the full re-run matrix, including
  the kit-upgrade "update" outcome that end-to-end tests cannot reach,
  and for the intake wizard's detectBranch (exported for testing)
- verify edge cases (no docs, duplicate basenames) and CLI surface checks
- a node<->python parity test: both installers must write identical
  orient profiles (minus timestamp) for the same fixture
- npm run coverage (c8 via npx) plus a CI coverage job enforcing a floor

Fixes the one divergence the parity test caught: lib/orient.py recorded
fork evidence with an ASCII '->' where the Node installer writes '→'.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01483R5qNvQeZ78kE52kGLHy
PRs #5-#7 changed '/', 'templates/', and 'docs/' after the previous
baseline (ba964e9) without re-anchoring, so 'drift --git --strict' — and
with it the ai-check workflow on main — has been failing with 3 stale
findings ever since. Point the baseline at the human-merged main tip
1fd11db; verified locally that the check now runs clean (0 stale). The
per-row human audit dates in MODULE_MAP.md are untouched and remain the
authoritative signatures. Includes the regenerated drift/verification
reports.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01483R5qNvQeZ78kE52kGLHy
Copilot AI review requested due to automatic review settings July 2, 2026 20:27
@kunalsuri kunalsuri merged commit 52350bf into main Jul 2, 2026
7 of 9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens the project’s installer smoke suite and adds coverage/consistency gates, with the goal of making stack detection and cross-runtime behavior (Node vs Python) harder to regress.

Changes:

  • Expands test/run-tests.mjs with table-driven orient detector coverage, per-ecosystem indepth dependency parsing checks, verify edge cases, git-history fixture coverage, and unit-level pinning for classifyAction + detectBranch.
  • Adds a Node coverage entrypoint (npm run coverage) and a CI coverage-floor job using c8.
  • Enforces Node↔Python parity for orient output (minus timestamp) and fixes the one detected divergence in Python fork-evidence formatting.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/run-tests.mjs Adds bare-fixture helper plus extensive new smoke/unit/parity test coverage across orient, indepth, verify, CLI surface, and git-history analysis.
test/README.md Documents the new npm run coverage workflow and what it measures/enforces.
package.json Adds coverage script running run-tests.mjs under c8 instrumentation.
lib/orient.py Aligns fork evidence string formatting with Node () to satisfy parity.
lib/intake.mjs Exports detectBranch (annotated as internal) to enable direct unit testing.
CHANGELOG.md Records the coverage-driven hardening work and the parity-driven fix.
ai/guide/MODULE_MAP.md Updates the “Last verified” baseline metadata text.
ai/analysis/audit-reports/DRIFT_REPORT.md Updates committed drift report content (removes the stale-check note line for this snapshot).
.github/workflows/test.yml Adds a dedicated coverage job enforcing c8 coverage floors for the Node installer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

kunalsuri pushed a commit that referenced this pull request Jul 3, 2026
Resolves the conflicts with main's coverage-hardening and workflow-fix
merges (#9, #11):

- lib/indepth.py, lib/orient.py: modify/delete — deletion stands (their
  parity fix is moot with the Python runtime gone)
- test/run-tests.mjs: adopt main's expanded suite (detector matrix,
  dependency-parsing and git-history fixtures, classifyAction/detectBranch
  unit tests, CLI surface checks) and drop the Python installer pass and
  the Node <-> Python orient-parity gate along with pythonCmd()
- test.yml: keep main's coverage job; reword its stale Python comment
- CHANGELOG [Unreleased]: retire the parity-test bullet and the
  Python-only Fixed entry; note the gate was retired with the runtime
- MODULE_MAP: templates/claude/ row downgraded to [inferred] (files under
  it changed vs the re-anchored 1fd11db baseline) for human re-audit
- CHECKSUMS.txt and ai/repo-indepth.json regenerated

Verified: npm test 190/190; npm run deep-test 5/5; c8 coverage passes the
CI floor (85.8 % lines / 76.5 % branches / 96.4 % functions vs 83/73/90).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WKkjYZLucrVffnG6cDRNmf
@kunalsuri kunalsuri deleted the claude/test-coverage-analysis-g8qozk branch July 3, 2026 15:50
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.

3 participants