Skip to content

fix(sync): rename misleading field, add network/sync tests, enable coverage#63

Open
VelarisW58 wants to merge 4 commits into
AZERDSQ131:mainfrom
VelarisW58:fix/sync-field-naming-and-coverage
Open

fix(sync): rename misleading field, add network/sync tests, enable coverage#63
VelarisW58 wants to merge 4 commits into
AZERDSQ131:mainfrom
VelarisW58:fix/sync-field-naming-and-coverage

Conversation

@VelarisW58

Copy link
Copy Markdown
Contributor

Fixes issue #51 and improves test infrastructure:

  • Renames TargetReceipt.rollback_snapshot to rollback_baseline_hash — the old name implied an actual rollback snapshot id/dir, but the value was always just the current config's content hash (issue sync.ts: dry-run receipt's rollback_snapshot field is mislabeled #51)
  • Adds explicit network-failure tests for registry.ts: fetch rejection, non-ok HTTP response, both fallback URLs failing, and MCPM_DEBUG warning logging (5 new tests, using vi.resetModules/vi.doMock to isolate each scenario from the real on-disk cache)
  • Adds sync.test.ts covering readRC/writeRC/addToRC (10 tests) — previously untested
  • Enables @vitest/coverage-v8, wired into vitest.config.ts and a new npm run test:coverage script

Verified: tsc --noEmit, vitest run (70/70), eslint, npm run test:coverage (produces a real v8 report).

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.

2 participants