Skip to content

ci: drop the stale validate-changesets step - #33

Merged
christophersesugh merged 1 commit into
mainfrom
fix/drop-stale-changeset-ci-step
Oct 18, 2026
Merged

christophersesugh merged 1 commit into
mainfrom
fix/drop-stale-changeset-ci-step

Conversation

@christophersesugh

Copy link
Copy Markdown
Contributor

Problem

scripts/validate-changesets.mjs was deleted in 6233085 ("chore: add
comment-hygiene rule and clean planning IDs from comments"), which introduced a
hand-maintained CHANGELOG convention in place of changesets. ci.yml was never
updated, so the step has failed with MODULE_NOT_FOUND on every run since
2026-09-26.

Fix

Remove the step. No script is restored, because the deletion looks intentional:
the commit that removed it was retiring changesets.

Verification

Ran locally on Node 22.23.3 / pnpm 9.15.4:

  • pnpm check — 742 files, clean
  • pnpm typecheck — 24/24 tasks
  • pnpm lint:package — 35/35 tasks
  • pnpm build:specs + schema diff — clean
  • YAML parses; job still has 11 steps

Known-failing, NOT addressed here

This PR does not make CI green. Two pre-existing failures remain, both
independent of this change:

  1. tests/connectors-schema.test.ts — the hosted schema files still carry
    $id: https://memofs.dev/... while the tests and
    packages/cli/src/config/runtime.ts expect https://docs.memofs.dev/...
    (incomplete domain swap in d25daa8).
  2. tests/doctor-validate.test.ts — 5 tests. After a fresh init, .memofs/trials/*
    and .memofs/warrants/history.jsonl are not created, but doctor and
    validate treat them as fatal (trials ledger added in f0193fb).

Also note the repo ruleset requires a status check named Quality Checks,
which no workflow emits. ci.yml names its job Validate.

scripts/validate-changesets.mjs was removed in 6233085, when the repo moved
to a hand-maintained CHANGELOG convention, but ci.yml kept calling it. The
step now fails with MODULE_NOT_FOUND, which is why every Validate run has
been red since 2026-09-26.
christophersesugh added a commit that referenced this pull request Oct 18, 2026
…pass the seam (#35)

## Why main has been red since 2026-09-25

Two tests in `packages/mcp-server/tests/factory.test.ts` failed on
**every** CI run:

```
FAIL factory.test.ts > ... > lazy wiring > initializes on the first vector operation and recalls semantically
  AssertionError: expected "vi.fn()" to be called 1 times, but got 0 times
FAIL factory.test.ts > ... > local mode with zero API keys > recall falls back to the lexical path when the adapter is absent
  AssertionError: expected "vi.fn()" to be called at least once
```

## Root cause — not timing

The lexical assertions inside those same tests **passed**. Recall
worked; only the mock call count was wrong. That ruled out a race.

`createMemoFSMcpRuntimeFromConfig` delegates the lazy adapter load into
`@memofs/core`. Core is consumed as a **built `dist`** (`exports` →
`./dist/index.mjs`) and therefore sits outside vitest's module graph —
so `vi.mock("@memofs/adapter-transformers")` never intercepts the
`import(adapterModule)` inside it. CI builds core before testing
(`test:run` dependsOn `^build`), so the **real adapter** was constructed
while the mock recorded zero calls. Local runs only passed because
resolution happened to differ, which is why this was not reproducible
off-CI.

Three further tests asserted the mock was **not** called — in CI those
passed trivially and asserted nothing at all.

## Fix

`local-embedder.ts` already documented a seam for exactly this
("Injected factory for tests so the dynamic import is not exercised")
but it was never plumbed through.

- Threaded the optional `adapterFactory` through
`RuntimeFactoryOptions`. Production callers omit it, so the adapter
stays an **optional peer dependency** and behaviour is unchanged.
- Converted all five embedder-wiring tests to inject it, so assertions
hold regardless of externalisation, bundling, or install state.
- Removed the dead module mock, `vi.hoisted`, and the `beforeEach`
reset.

## Verified

Typecheck clean, Biome clean, 48/48 in the mcp-server suite, changeset
added per CONTRIBUTING.

**Not reproducible locally, so this CI run is the real confirmation.**

## Note

The ruleset required a status check named `Quality Checks`, which no
workflow produces — only `Validate` exists. That has been corrected to
`Validate`, and admins can now bypass on PR merge, so this is mergeable.

This is also unblocking #32, #33, and #34.
@christophersesugh
christophersesugh merged commit a7470a8 into main Oct 18, 2026
1 check failed
@christophersesugh
christophersesugh deleted the fix/drop-stale-changeset-ci-step branch October 18, 2026 22:25
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