Skip to content

chore(scripts): move federation e2e scripts to deferred/ — complete b293040#200

Merged
Dewinator merged 1 commit into
mainfrom
agent/move-deferred-federation-e2e
May 3, 2026
Merged

chore(scripts): move federation e2e scripts to deferred/ — complete b293040#200
Dewinator merged 1 commit into
mainfrom
agent/move-deferred-federation-e2e

Conversation

@Dewinator

Copy link
Copy Markdown
Owner

Summary

  • Move 5 federation-dependent e2e scripts from mcp-server/scripts/ into the existing mcp-server/scripts/deferred/ directory, completing the structural intent of commit b293040 which moved only e2e-push-pom.mjs.
  • Fix the relative ../dist/... imports → ../../dist/... in all 6 scripts now living at depth 2.

Why

These five scripts depend on dist/services/federation.js:

  • e2e-federation.mjs
  • e2e-pom.mjs
  • e2e-revocation.mjs
  • e2e-autosync.mjs
  • e2e-federation-network.mjs

mcp-server/tsconfig.json excludes src/deferred/**, so federation.ts is not compiled and dist/services/federation.js does not exist on the active build. Running any of these scripts today crashes immediately:

$ node scripts/e2e-pom.mjs
Error [ERR_MODULE_NOT_FOUND]: Cannot find module
  '/Users/reed/vectormemory-openclaw/mcp-server/dist/services/federation.js'

Commit b293040 already moved e2e-push-pom.mjs into scripts/deferred/ for exactly this reason but left its siblings behind — they exercise the same deferred service. Putting them next to the deferred source they use (and to the lone deferred sibling) keeps the convention honest: if it lives in scripts/deferred/, it's gated on the federation build.

This is also the same root cause CLAUDE.md flags around the dashboard: "Schwarm + Vererbung + Föderation" is roadmap step 5 (deferred). Wave 2's HTTP path works in the active build; the mTLS path is parked, and these e2e scripts exercise the parked side.

Path correction (collateral fix)

e2e-push-pom.mjs (already in deferred/) had ../dist/... paths, which resolve to mcp-server/scripts/dist/... — that directory has never existed. The first import error today is a path mismatch on identity.js, not a deferred-build error on federation.js. After this PR, all six files use ../../dist/... and only fail on the actual deferred-build cause.

Verified locally:

$ node scripts/deferred/e2e-pom.mjs
Error [ERR_MODULE_NOT_FOUND]: Cannot find module
  '/Users/reed/vectormemory-openclaw/mcp-server/dist/services/federation.js'
  imported from .../scripts/deferred/e2e-pom.mjs

IdentityService and GuardService (both compiled from active code) import-resolve cleanly; only FederationService errors — i.e. exactly the gate Reed wants visible when the deferred build is re-emitted.

Out of scope

  • Re-including src/deferred/** in tsconfig.json. That's the roadmap-step-5 unpark decision, not this PR's concern.
  • Touching active e2e scripts (e2e-pki.mjs, e2e-breeding-sim.mjs, e2e-experience-coupling.mjs, e2e-motivation-coupling.mjs, e2e-neurochemistry.mjs, smoke-cross-spread.mjs, smoke-salience-reactor.mjs, backfill-pki.mjs). They don't import federation and stay where they are.
  • Adding any wrapper / no-op stub. The directory placement and the unmodified ERR_MODULE_NOT_FOUND are the documentation.

Test plan

  • cd mcp-server && npm run build — green.
  • No package.json script or other source/doc references the moved files (grep confirms only self-mentions inside the scripts themselves).
  • Manual run of node scripts/deferred/e2e-pom.mjs confirms first failing import is now dist/services/federation.js, not a path mismatch.
  • Reed reviews and merges.

🤖 Generated with Claude Code

…lative paths

Five e2e scripts (e2e-federation, e2e-pom, e2e-revocation, e2e-autosync,
e2e-federation-network) imported `../dist/services/federation.js`, which
is build-deferred per `mcp-server/tsconfig.json` (`"exclude": ["src/deferred/**"]`).
Running any of them today crashes with `ERR_MODULE_NOT_FOUND` for federation.js.

Commit b293040 ("chore: refocus mycelium on the brain core, decouple openClaw")
moved e2e-push-pom.mjs to mcp-server/scripts/deferred/ to mirror the source
placement, but left the rest behind. Complete the move so the directory
structure tells the truth: federation-dependent e2e scripts live next to the
deferred services they exercise, and stay inert until the deferred build is
unparked (CLAUDE.md roadmap step 5).

Side effect: e2e-push-pom.mjs's `../dist/...` paths were broken after its move
(resolves to mcp-server/scripts/dist instead of mcp-server/dist). Bump every
script in this directory to `../../dist/...` so the imports resolve correctly
once the federation build is re-emitted. Verified locally: e2e-pom now errors
on `dist/services/federation.js` (the deferred-build cause) instead of the
path mismatch — IdentityService and GuardService imports resolve cleanly.

Build green (`npm run build`). No active script or package.json target
references these files; they are manually-invoked diagnostic tools.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Dewinator added a commit that referenced this pull request May 3, 2026
…split)

The Native-App Track section claimed "Alle 9 PRs sind green und
MERGEABLE" and "9-PR-Queue", but the actual open-PR count has been 14
since PR #201 landed (151st tick). The 9-only framing under-stated the
drain workload Reed is sitting on and obscured the orthogonal cohorts —
3 W4.1 anti-echo PRs (#197, #198, #201) and 2 W2 federation PRs (#199,
#200) merge fully independent of the native-app stack (143rd-tick file-
overlap audit, 148th-tick 3-order commute proof on 13 PRs; #201 is
additive on top with no shared files).

Now CLAUDE.md states the 14-PR total with the cohort split and the
empirical commute evidence, so the next agent tick reads the correct
drain workload and the next "queue full → analyse, don't add" decision
is grounded in current state, not in the 2026-05-02 9-PR snapshot.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Dewinator Dewinator merged commit ca5da7c into main May 3, 2026
1 check passed
Dewinator added a commit that referenced this pull request May 3, 2026
…rain)

Reed merged 10 PRs today: all 3 W4.1 anti-echo (#197/#198/#201), both W2
federation (#199/#200), 5 native-app (#190/#191/#192/#193/#194). Only the
linear 4-PR #178-stack remains open (#185 independent + #187#188#189
strictly stacked). Three-cohort split collapsed to one cohort — old order-
independence proofs (143rd/148th tick) now obsolete.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant