Skip to content

Add frozen provider eval bundles and regression comparisons for S4 - #16

Merged
chrishonson merged 5 commits into
releasefrom
codex/s4-provider-eval
Oct 11, 2026
Merged

chrishonson merged 5 commits into
releasefrom
codex/s4-provider-eval

Conversation

@chrishonson

@chrishonson chrishonson commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds the first slice of the S4 provider evaluation: local tooling that compares current MetaCortex retrieval with a self-hosted open-source provider (Onyx) using frozen eval bundles and regression comparison files. The doc opens with the question this answers and what exists so far.

  • functions/eval/s4/ holds a frozen bundle (nine synthetic sources, eight behavior specs, five retrieval queries) and two scripted example result files. No private corpus and no credentials.
  • functions/src/providerEvaluation.ts and providerResultAdapters.ts define the provider boundary, the runner, result normalizers for MetaCortex and Onyx, and the comparison report. They reuse computeRetrievalEvalMetrics, so there is one ranking metric implementation.
  • functions/scripts/provider-eval.ts is a new entry point for the file commands, run with npm run eval:files. It never loads env files or initializes Firebase. The existing retrieval-eval.ts and its Firestore commands are unchanged from release.
  • docs/s4/provider-evaluation.md describes the design and its limits. All eight labels are still needs_review and no behavior spec has run against a real worker.

No runtime code changes: nothing under the server entry points imports the new modules, so no deploy is needed.

Other changes

  • functions/tsconfig.scripts.json also type-checks the three new S4 test files, so there is no separate S4 typecheck and verification.json is unchanged from release.
  • scripts/check-journey-kit-install.mjs skips eval:files when it asserts that every script in package.json is packaged. The S4 tooling is offline and deliberately not shipped in the Journey kit.
  • functions/src/retrievalEvaluation.ts labels synthetic cases synthetic_definition instead of implicit_fetch.

Test plan

Run from this branch with python3 scripts/run-gate.py <gate>:

  • metacortex_typecheck passes
  • metacortex_test passes: 14 files, 164 tests, 79.37% line coverage
  • metacortex_package passes (Journey kit install check, 70 files)
  • npm --prefix functions run eval:files -- validate-bundle --bundle eval/s4/bundle.json validates the frozen bundle
  • CI on this PR

🤖 Generated with Claude Code

agentnightshift and others added 5 commits September 10, 2026 07:19
…eval

# Conflicts:
#	functions/package.json
#	functions/scripts/retrieval-eval.ts
#	verification.json
… work stands

The doc started with the comparator's mechanics. A reader needs the decision being supported (keep MetaCortex, adopt Onyx, or build a narrow gap), the evidence rule (per-case comparison on frozen inputs) and the fact that only the offline measuring instrument exists so far.
…nce in the S4 doc

The S4 evaluation tooling is offline and not shipped in the Journey kit, so the check that every package script is packaged must not require provider-eval.ts. The doc paragraph rewritten in the previous commit kept the spec's 'and that' wording and no longer parsed.
@chrishonson
chrishonson merged commit 6579e37 into release Oct 11, 2026
3 checks passed
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