Repository navigation
feat(biomemetics): prove A0 through OpenRouter DeepSeek - #100
Merged
creatifcoding merged 17 commits intoAug 30, 2026
Merged
Conversation
…arness Pin Mastra, CopilotKit, AG-UI, Effect, and TypeScript in a lab-local mantis-assistant package with a committed lockfile. Add Draft 2020-12 contracts, deny/ask/allow policy, assayed read-only tools, and a MantisController adapter that isolates every used beta API. This is a compatibility and deterministic harness slice. It is not a keeper UI, SpecimenDB bridge, shop-release, EVA, or graph claim. Mastra memory is not canonical care or evidence truth. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Wire Observability through the in-memory TestExporter, keep checks.includes/excludes as the proven eval hook, and mark live OM observer/reflector plus hanging runEvals persistence as QUARANTINED_UPSTREAM instead of papering them over. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Expose MastraAgent.getLocalAgents through CopilotRuntime as a fetch handler at /api/copilotkit with no runtimeUrl and no listen(). Transcode EventEncoder string chunks to Uint8Array so Node Response.text() can read the run SSE. Authenticated fixture run emits CareAdvice. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Replace the Codex OAuth lane with Mastra's OpenAI-compatible OpenRouter config for openai/gpt-5.6-luna at reasoning max. npm test calls agent.generate and the in-process CopilotRuntime bind. A missing OPENROUTER_API_KEY fails closed. @mastra/core stays 1.61.0. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Restore createFakeModel as the default harness. Live openai/gpt-5.6-luna uses OPENROUTER_API_KEY only and skips unless MASTRA_LIVE=1 is also set. A missing key fails closed. @mastra/core stays 1.61.0. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Revert the MASTRA_LIVE skip. npm test calls agent.generate and the in-process CopilotRuntime bind against OpenRouter openai/gpt-5.6-luna. A missing OPENROUTER_API_KEY fails closed. createFakeModel is not the passing path. @mastra/core stays 1.61.0. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Reject error-event and quarantine passes on the generate and in-process AG-UI prove. createFakeModel cannot satisfy those assertions. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Use the documented model-router string and OPENROUTER_API_KEY. Pin openrouter/deepseek/deepseek-v4-flash-0731. Drop the custom OpenAI-compatible url object and Luna max reasoning. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Pin openai/gpt-5.6-luna. Keep OPENROUTER_API_KEY fail-closed. @mastra/core 1.61.0 has no openrouter/openai/gpt-5.6-luna router id, so the live lane stays OpenAI-compatible config. Not DeepSeek. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Pin the Mastra model-router id openrouter/deepseek/deepseek-v4-flash-0731. Keep OPENROUTER_API_KEY fail-closed. Drop Luna max reasoning. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Add a GitHub Actions job on feat/mantis-biomemetics-lab that runs npm test against OpenRouter DeepSeek. Missing OPENROUTER_API_KEY fails closed. The fake model is not the passing path. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Unit tests use an explicit fixture lane. MantisController.create still defaults to live DeepSeek. test:live fails closed without OPENROUTER_API_KEY. CI runs unit without a key and prove with the secret. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
CopilotKit forwards inbound Authorization onto agent.stream, which overwrote the OpenRouter Bearer key with the fixture token. Deny that header at the runtime and join TEXT_MESSAGE deltas so the live AG-UI proof can read CareAdvice. Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
creatifcoding
marked this pull request as ready for review
August 30, 2026 02:10
creatifcoding
merged commit Aug 30, 2026
3e16986
into
feat/mantis-biomemetics-lab
1 of 2 checks passed
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.
Draft A0 slice for #50 (parent #49). Pin Mastra + CopilotKit/AG-UI and prove the harness with real Mastra Agent calls through OpenRouter DeepSeek. This is not a keeper UI, SpecimenDB bridge, shop-release, EVA, or graph claim. Mastra memory is not canonical care or evidence truth.
Why
The A0 proof is a live
agent.generateand in-process CopilotRuntime bind against the Mastra OpenRouter gateway stringopenrouter/deepseek/deepseek-v4-flash-0731. A canned fake-model sentence is not the proof.Unit tests that construct
MantisControllermust not requireOPENROUTER_API_KEY. The live prove must fail closed when that key is missing.Scope
createAdapterHarnessandMantisController.createdefault to the live OpenRouter lane. That lane readsOPENROUTER_API_KEYonly and passesopenrouter/deepseek/deepseek-v4-flash-0731.MantisController.createFixture()/createFixtureLane(). Policy guards and the compatibility matrix no longer callcreate().npm run test:unitnever needs a key.npm run test:liveis the only path that requiresOPENROUTER_API_KEY. Empty or missing fails closed withOPENROUTER_CREDENTIAL_REQUIRED.forwardHeadersdeniesauthorization, so the fixture session Bearer token does not overwrite the OpenRouter key onagent.stream..github/workflows/mantis-assistant-ci.ymlruns Unit without a key, then OpenRouter DeepSeek prove withsecrets.OPENROUTER_API_KEY. An unset secret leaves the prove env empty, so that job fails closed.@mastra/corestays1.61.0.Tradeoffs
Live observational-memory observer/reflector cycles on InMemoryStore stay
QUARANTINED_UPSTREAM.The GitHub prove job stays red until the repo has an
OPENROUTER_API_KEYActions secret. That is fail-closed, not a skip.Blast Radius
projects/biomemetics/labs/mantis/tooling/typescript/mantis-assistant/**plus the A0 eval matrix, assistant-run fixtures, and.github/workflows/mantis-assistant-ci.yml. Offassistant/app, golden-care, workflow-lab, andpackages/specimendb.Verification
Local
npm run test:unitwith no key: 32 passed, 0 failed.Local
npm run test:livewith a storeOPENROUTER_API_KEY: 3 passed, 0 failed. That includes generate, in-process CopilotRuntime bind, evals, and AG-UI matrix cases. Text is CareAdvice, notFAKE_MODEL_TEXT. Model id staysopenrouter/deepseek/deepseek-v4-flash-0731.Stay draft. Do not merge until the GitHub prove job is green.
Closes #50.