Repository navigation
docs: rewrite AGENTS.md to the agents-md spec, with verified command table - #34
Merged
Merged
Conversation
…table The file restated the toolchain and the 500 LOC limit, both already owned by .agents/rules/, and pointed at none of CONTRIBUTING, SECURITY, or CODE_OF_CONDUCT despite all three existing. Adds a command table scoped to a single package and file, an external-reference table, and skill discovery. The file-scoped test command is verified: @memofs/core includes only tests/**/*.test.ts, so a src/ path silently matches nothing.
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.
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.
The file restated the toolchain (Biome, tsdown, Vitest) and the 500 LOC limit — all already owned by
.agents/rules/— and pointed at none ofCONTRIBUTING.md,SECURITY.md, orCODE_OF_CONDUCT.mddespite all three existing.Adds a command table scoped to a single package and a single test file, an external-reference table, and the find-before-improvising skill-discovery rule now present in all four repos.
The file-scoped test command is verified rather than assumed:
@memofs/coreincludes onlytests/**/*.test.ts, so asrc/path silently matches zero tests.tests/agentfs/contract.test.tspasses.Also keeps the 50/50 users-vs-builders framing rule and the
@memofs/*vs@repo/*boundary, which are not in the README.Refs
README.md,CONTRIBUTING.md,SECURITY.md,CODE_OF_CONDUCT.md,apps/docs, and.github/workflows/ci.yml— all verified present.