Skip to content

Fold the eval-source workspace into evals (M2) - #118

Closed
barryroodt wants to merge 10 commits into
mcp-submodulefrom
workspace-fold
Closed

Fold the eval-source workspace into evals (M2)#118
barryroodt wants to merge 10 commits into
mcp-submodulefrom
workspace-fold

Conversation

@barryroodt

Copy link
Copy Markdown
Contributor

Stacked on #109 (retarget to main when it merges). Moves the eval-workspace glue into this repo, per the direction agreed in the workspace-layout Slack thread: the sources under test (docs, skills, MCP server) now live beside the harness that tests them.

What's here (commit per step)

  1. contentApiUrl threading (packages/core): SUPABASE_CONTENT_API_URL / a contentApiUrl option adds --content-api-url to the server args, pointing search_docs at an alternative docs index. Requires a server that understands the flag (the SUPABASE_MCP_SERVER_PATH build; upstream PR: mcp#343); inert otherwise. Retires the last evals enabler patch.
  2. Verbatim copy of the glue under workspace/ + the mise task file at the root (Supabase convention) — the reviewable copy boundary, no adaptation.
  3. Re-root: evals is the host now, not a managed clone. evals/ path prefixes drop, cd evals && pnpm eval becomes a root pnpm eval, the evals manifest entry + marker plumbing die, and the mcp clone is replaced by the pinned submodules/mcp working tree (enabler patches apply there as marker commits; submodule."submodules/mcp".ignore=all keeps patch dirt out of host status, so pin bumps are a deliberate git add). The supabase docs monorepo stays an opt-in sparse clone.
  4. Docs + CI: workspace/README.md is the ops doc (bootstrap, the three edit→eval loops, head-to-head A/B, provenance receipts); a free self-test workflow (shell + node stdlib, no keys/docker/model spend) runs on workspace/** PRs.

Verification

  • Self-tests from the repo root: status.test 19/0, hooks.test 8/0 (real pre-push-guard lifecycle against the initialized mcp submodule), ab.test 22/0.
  • Core suite (incl. 2 new contentApiUrl tests): 58 passed; framework typecheck clean.
  • Fresh-consumer smoke: plain git clonestatus prints the exact bootstrap steps → setup.sh reaches Ready in ~16s (install, selective submodule init, patch markers, keychain keys) → all three self-tests pass in the fresh clone.

Not in scope

Archiving the eval-workspace repo (after this merges), the docs-monorepo submodule (M3, planned), and the pin-sync/canary companions.

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evals Ready Ready Preview, Comment Jul 24, 2026 2:09pm

Request Review

SUPABASE_CONTENT_API_URL (or the contentApiUrl option) adds
--content-api-url to the server args, pointing search_docs at an
alternative docs index (e.g. a locally built one). Requires a server
that understands the flag — the SUPABASE_MCP_SERVER_PATH build; inert
otherwise. Retires the eval-workspace enabler patch of the same name.
Verbatim copy of the eval-workspace repo's scripts/, patches/, and
manifest (minus the two evals enabler patches: the local-build override
shipped with the submodule PR, and content-api-url just landed as a real
commit), plus the mise task file at the root and gitignore entries for
the glue's artifacts. Re-rooting the scripts for life inside evals is
the next commits' job — this one is the reviewable copy boundary.
evals is the host now, not a managed clone: every evals/ path prefix
drops, 'cd evals && pnpm eval' becomes a root pnpm eval, and the evals
manifest entry + marker plumbing die. The mcp clone is replaced by the
pinned submodules/mcp working tree (patches apply there as marker
commits; submodule.submodules/mcp.ignore=all keeps that patch dirt out
of host status/commits — pin bumps are a deliberate git add). supabase
stays the opt-in sparse clone. Keychain service name is unchanged so
existing stored keys keep working.

Self-tests from the repo root: status.test 19/0, hooks.test 8/0
(real install/chain/reinstall lifecycle against the initialized mcp
submodule), ab.test 22/0.
…ee self-test workflow

workspace/README.md is the ops doc (bootstrap, the three loops, A/B,
provenance, self-tests); the root README points at it. The self-test
workflow runs the three shell-only suites on workspace/** PRs: no keys,
no model spend, no docker.
- ab.test.sh cleanup could destroy a user's unstaged stdio.ts edit: the
  EXIT trap reverted the mcp fixture file unconditionally while the
  fixture block only runs on a CLEAN file - exactly the state where the
  revert nukes user work. Cleanup now only reverts what the test itself
  wrote (verified: planted user edit survives a skipped-fixture run).
- fold demo/canary-eval (ab-demo died at cp: fixtures were never folded).
- affected.ts emits source-selecting commands: mcp/server-wide paths get
  mise run mcp-eval; docs paths get SUPABASE_CONTENT_API_URL + mcp-eval
  (a bare 'mise run eval' measured production, not the local edit).
- workspace/README.md documents the docs-loop measurement step.
- workspace-selftest.yml: pin setup-node to the repo's SHA convention,
  node-version-file instead of an inline 22.
- dedupe the paid docs-embed preamble (docs-embed-env.sh sourced by
  docs-index/docs-seed) and provenance's untracked-hashing (one
  hashUntracked helper for receipt + stamp).

Self-tests: status 19/0, hooks 8/0, ab 22/0.
- canary EVAL.ts imports @supabase-evals/core (real package; was elided
  at runtime but broke type resolution)
- SUPABASE_CONTENT_API_URL env fallback now applies only alongside the
  SUPABASE_MCP_SERVER_PATH override: a stray env var can no longer feed
  --content-api-url to the published npx server (which rejects unknown
  flags). Explicit contentApiUrl option stays unconditional. Tests
  adjusted, +1 covering the stray-env npx case.
- affected.ts: skips an eval dir missing PROMPT.md instead of aborting;
  the docs command's '# needs:' hint moved to its own line
- content-API URL literals cross-referenced at each site (4-way sync note)
- PUBLISH_REPOS identity alias collapsed into PATCH_REPOS everywhere
- mise.toml pins pnpm 10.24.0 (matches packageManager/lockfile)
- status.sh drops the stale 'incl. in agent-skills' guard comment
- ab.sh fullwidth parens -> ASCII; .gitignore double blank dropped
- status.test.sh anchors on the exact 'Ready. Try:' banner
- hooks.test.sh/ab.test.sh fail actionably on zero checks instead of
  passing vacuously when submodules are missing

Verified: status 19/0, hooks 8/0, ab 22/0, core mcp-server 12/12,
framework typecheck clean, affected smoke on a real docs path.
apply-patches verified 'state matches the canonical patch' two ways:
byte-exact tree-OID reconstruction for an existing marker commit, but a
grep-payload diff for a fresh build - the weaker check, blind to an
identical +/- line reattributed across files within a multi-file patch.
Extract patch_tree() (throwaway index: parent-tree + patch -> tree OID)
and compare tree identity on BOTH paths; the payload-diff mechanism is
deleted and its blind spot closes as a side effect.

Verified live: existing-commit path ('already committed'), fresh path
(marker dropped via rebase --onto, rebuilt through the new check);
hooks 8/0, ab 22/0, status 19/0.
1. mcp-build built the UNPATCHED server and orphaned the marker commit:
   it delegated to the root 'pnpm mcp:build', whose first step is another
   'git submodule update --init' - on an initialized submodule that
   re-checks out the pin, discarding the marker apply-patches created a
   step earlier (and any user commits). The task now runs init ->
   install -> apply-patches -> build directly; the root script remains
   the evals-native unpatched flow. Verified: after mcp-build the marker
   is HEAD and the built stdio.js carries --content-api-url.
2. Arm receipts mislabeled the run: ab.sh passed RUN_ENV to the eval but
   not to the 'provenance --embed' step, so a local-build arm recorded
   mcp_override: null. The embed now runs under the same env; ab.test
   gains a receipt-records-override assertion (23/0).

Found by a real cold-clone demo: GitHub clone -> setup -> unstaged mcp
edit -> live A/B (baseline PASS 5/5 -> treatment FAIL 3/5, REGRESSED).
@barryroodt

Copy link
Copy Markdown
Contributor Author

Parking this alongside #119 while we redo the local-dev story TypeScript-first (cross-platform matters once this repo is open-sourced, and the bash + macOS-specific glue doesn't get us there). The core piece here (SUPABASE_MCP_SERVER_PATH + tests) is exactly what the new PR re-lands, minus the submodule, and the review feedback from this thread carries over. Branch stays for reference.

@raulb
raulb deleted the branch mcp-submodule July 29, 2026 11:10
@raulb raulb closed this Jul 29, 2026
@raulb
raulb deleted the workspace-fold branch July 29, 2026 11:10
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