Repository navigation
feat(mcp-worker): recover production 0.4.0 source + Upsilon identity - #3
Merged
Merged
Conversation
…ntity Recover the deployed mcp.mos2es.org Worker source (v0.4.0, 27 tools, 6 resources, 5 prompts) from the b2bpilot working copy and reconcile it onto moses/mcp-worker. The previous snapshot (v0.2.0, 21 tools, no resources/prompts, pre-computed demo_data.json) is replaced with the production-equivalent source that computes outputs from raw observations at request time. Upsilon product identity applied: - server: "Upsilon MCP Server" - product: Upsilon, governance: MO§ES™, proof_surface: SigRank - serverInfo.name: upsilon-mcp with title + governance + proof_surface - interpretation-limits boundary in health endpoint Contract test (tests/mcp-worker-contract.test.mjs) asserts: - exactly 27 tools, 6 resources, 5 prompts (production parity) - every production tool name, resource URI, prompt name preserved - Upsilon product roles present in health + initialize endpoints - interpretation-limits boundary present - write tools gated by AUTHORIZATION_REQUIRED + isError Source files recovered: - index.js (2338 lines, computes from raw observations) - observations.js, lineages.js (JSONL-derived JS modules) - operators.json, cohort.json, metric_registry.json, reference_field.json, outcomes.json, interventions.json, teams.json, workflows.json Verification: - node --test tests/mcp-worker-contract.test.mjs → 11/11 pass - node --test tests/upsilon-architecture.test.mjs → 4/4 pass - wrangler deploy --dry-run → success (664 KiB upload) No redeployment authorized by this commit. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…import Extract TOOLS, RESOURCES, PROMPTS, WRITE_TOOLS arrays from index.js into catalog.mjs so the contract test can import them directly instead of parsing source text with eval(). The catalog is pure static data with no JSON imports, making it loadable in Node.js without import attributes. Add .github/workflows/mcp-worker-contract.yml to run the contract test and wrangler dry-run on every push/PR touching the Worker source. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
SunrisesIllNeverSee
added a commit
that referenced
this pull request
Aug 28, 2026
…ad arg fix Add tests/enterprise-adapter-conformance.test.mjs — validates the portable portion of enterprise observations against all 13 sigrank-standard fixtures (pinned ref 224505a). Ensures the adapter preserves portable metrics, telemetry, warnings, and namespace isolation across the same fixture pack consumed by sigrank-mcp and sigrank-app. Add .github/workflows/enterprise-adapter.yml — runs enterprise adapter unit tests + standalone conformance gate on every push/PR touching the adapter. Checks out sigrank-standard at the pinned ref. Fix dead 4th argument in validatePilotManifest checkNode call (errors array is captured via closure, not passed as parameter). Rebased onto origin/main so this PR is independently reviewable without PR #3 (worker recovery). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… auth
The serverInfo name field is a protocol identifier used by MCP clients to
identify the server. Production at mcp.mos2es.org uses "moses-mcp" —
changing it to "upsilon-mcp" would break existing clients. Preserve the
production name while carrying the Upsilon product identity via the title
field ("Upsilon — Enterprise Measurement Engine").
Also documents the write-tool authorization gate as intentional pilot-phase
behavior: production rejects all write tools with AUTHORIZATION_REQUIRED
regardless of credentials presented (verified against mcp.mos2es.org
2026-08-28). The pilot is read-only; write tools are declared for protocol
completeness and future expansion.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
SunrisesIllNeverSee
added a commit
that referenced
this pull request
Aug 29, 2026
…ad arg fix Add tests/enterprise-adapter-conformance.test.mjs — validates the portable portion of enterprise observations against all 13 sigrank-standard fixtures (pinned ref 224505a). Ensures the adapter preserves portable metrics, telemetry, warnings, and namespace isolation across the same fixture pack consumed by sigrank-mcp and sigrank-app. Add .github/workflows/enterprise-adapter.yml — runs enterprise adapter unit tests + standalone conformance gate on every push/PR touching the adapter. Checks out sigrank-standard at the pinned ref. Fix dead 4th argument in validatePilotManifest checkNode call (errors array is captured via closure, not passed as parameter). Rebased onto origin/main so this PR is independently reviewable without PR #3 (worker recovery). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
SunrisesIllNeverSee
added a commit
that referenced
this pull request
Aug 30, 2026
#4) * feat(enterprise-adapter): versioned Upsilon lineage adapter + fixtures Add the Upsilon Enterprise Lineage Adapter (upsilon/enterprise-adapter/0.1-draft) that bridges sigrank/0.1-draft portable observations into Upsilon's governed enterprise namespace. Namespace separation: - portable: preserved verbatim (spec, telemetry, metrics, warnings) - enterprise: separate namespace (cohort, window, lineage, derivations) - Construction, composite scores, outcome correlations, and other enterprise derivations never leak into portable metrics The adapter: - Accepts sigrank/0.1-draft portable records - Rejects records that don't declare the correct spec version - Rejects records with enterprise leaks in portable metrics/fields - Validates telemetry primitives (non-negative integers or null) - Preserves null/zero distinction for unavailable cache - Validates pilot manifests against the canonical pilot schema - Enforces governance constraints (no personnel_action, no content_inspection) Fixtures (4): - complete-telemetry: all four pillars, all five metrics - partial-cache: cache_write/cache_read unavailable (null) - zero-values: zero cache distinct from null - invalid-version: rejects non-sigrank/0.1-draft records Schema: - enterprise-adapter/upsilon-enterprise-observation.schema.json defines the enterprise observation structure with portable + enterprise namespaces Tests (15): - Adapter version + namespace contracts - Fixture-driven tests (complete, partial, zero, invalid) - Namespace separation (no enterprise leak into portable) - Adapter rejection (missing fields, negative telemetry, enterprise leak) - Pilot manifest validation (valid, wrong roles, punitive, inspecting) - Enterprise observation schema validation Verification: - node --test tests/enterprise-adapter.test.mjs → 15/15 pass - node --test tests/ (all) → 30/30 pass Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(enterprise-adapter): add standalone fixture conformance + CI + dead arg fix Add tests/enterprise-adapter-conformance.test.mjs — validates the portable portion of enterprise observations against all 13 sigrank-standard fixtures (pinned ref 224505a). Ensures the adapter preserves portable metrics, telemetry, warnings, and namespace isolation across the same fixture pack consumed by sigrank-mcp and sigrank-app. Add .github/workflows/enterprise-adapter.yml — runs enterprise adapter unit tests + standalone conformance gate on every push/PR touching the adapter. Checks out sigrank-standard at the pinned ref. Fix dead 4th argument in validatePilotManifest checkNode call (errors array is captured via closure, not passed as parameter). Rebased onto origin/main so this PR is independently reviewable without PR #3 (worker recovery). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(ci): add fetch-depth: 0 for sigrank-standard SHA checkout actions/checkout cannot resolve a bare commit SHA with the default depth=1 fetch. Adding fetch-depth: 0 allows the pinned ref (224505a) to be resolved correctly. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(ci): checkout main + git reset for SHA pin, update ref to c73f152 actions/checkout cannot resolve a bare commit SHA as a ref. Changed to checkout main with fetch-depth: 0, then git reset --hard to the pinned SHA. Updated pinned ref from 224505a (12 fixtures) to c73f152 (13 fixtures, includes enterprise-adapter-lineage fixture). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(test): skip conformance gracefully when standard repo not found Replace process.exit(2) with test.skip when sigrank-standard is not available. This prevents the build job (which runs all tests via npm run test:coverage) from failing when the cross-repo checkout hasn't been performed. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Summary
mcp.mos2es.orgWorker source (v0.4.0, 27 tools, 6 resources, 5 prompts) from the authoritative b2bpilot working copy and reconciles it ontomoses/mcp-worker.demo_data.json) with the production-equivalent source that computes outputs from raw observations at request time.tests/mcp-worker-contract.test.mjs) asserting exactly 27 tools, 6 resources, 5 prompts, every production name preserved, Upsilon product roles present, and write tools gated by authorization.Source of recovered source
The production 0.4.0 source was tracked in
Moses_Enterprise_B2BPilot_/_workers/mcp-worker(commite460aa6). Livehttps://mcp.mos2es.org/confirms 27 tools / 6 resources / 5 prompts / v0.4.0. Themosesrepo snapshot was v0.2.0 / 21 tools / no resources or prompts — a rollback left the repo behind production.What is NOT in this PR
moses/mcp-worker(awaiting owner approval).Test plan
node --test tests/mcp-worker-contract.test.mjs→ 11/11 passnode --test tests/upsilon-architecture.test.mjs→ 4/4 passwrangler deploy --dry-run→ success (664 KiB upload)https://mcp.mos2es.org/confirms 27 tools / 6 resources / 5 prompts / v0.4.0 (parity verified)Generated with Devin