Skip to content

chore(submodule): promote Pmoves-cipher → 2b4c4f7 (Phase B PR 2 + MCP SSE fix) - #2299

Merged
POWERFULMOVES merged 2 commits into
mainfrom
chore/promote-cipher-gitlink-pr12
Jul 30, 2026
Merged

POWERFULMOVES merged 2 commits into
mainfrom
chore/promote-cipher-gitlink-pr12

Conversation

@POWERFULMOVES

@POWERFULMOVES POWERFULMOVES commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Advances Pmoves-cipher gitlink 986e6e22b4c4f7 — promotes Pmoves-cipher PR #12 (squash-merged 2026-07-30).

What PR #12 shipped

  1. Per-agent token enforcement (Phase B PR 2)auth.ts resolves cipher_<uuid> tokens via Supabase cipher_agent_tokens table; memory-routes.ts + mcp-sse.ts enforce resolved identity on every tool call (403 on mismatch, 400 when missing + token present, 403 on wildcard in enforcement mode).

  2. MCP SSE 400 fix — mount /mcp routes before express.json() so the MCP SDK's SSEServerTransport.handlePostMessage() gets the raw readable body stream. Previously express.json() consumed the stream first → "stream is not readable"400 Bad Request → Crush pmoves-cipher MCP failed to initialize.

Verified live: POST /mcp/messages returns 202 Accepted after fix.

Testing

  • Cipher container rebuilt + live-verified: SSE handshake (GET /mcp/sse → POST /mcp/messages) returns 202
  • 16/16 pmoves unit tests pass (7 new token-enforcement + 9 agent-isolation)
  • Typecheck clean
  • 0 eslint errors (all pre-existing patterns resolved: assertAgentId scope, camelcase API fields, process.exit, Router new-cap)

Test plan

  • CI green (merge-gate, submodule-gitlink-gate, validate-compose-files)
  • After merge: Crush session restart → pmoves-cipher MCP connects (no more 400)

Lane

SPARK-KIMI + CRUSH-GLM52 lane (TAC_CIPHER_VILLAGE.md Phase B). Three-body: delivery=KIMI-SPARK + CRUSH-GLM52, control=DARKXSIDE, memory=AGNOTE4482PHI.t1.md trail.

Summary by CodeRabbit

  • New Features
    • Improved Cipher API connectivity by adding support for the shared API network across deployment configurations.
    • Updated the Cipher component to a newer subproject revision.

… SSE fix)

Advances cipher gitlink 986e6e2 → 2b4c4f7. Brings two fixes from
Pmoves-cipher PR #12 (squash-merged 2026-07-30):

1. Per-agent token enforcement (Phase B PR 2): auth.ts resolves
   cipher_<uuid> tokens via Supabase cipher_agent_tokens table;
   memory-routes.ts + mcp-sse.ts enforce resolved identity on every
   tool call (403 on mismatch, 400 when missing + token present,
   403 on wildcard in enforcement mode).

2. MCP SSE 400 fix: mount /mcp routes before express.json() so the
   MCP SDK's SSEServerTransport.handlePostMessage() gets the raw
   readable body stream (express.json() was consuming it first →
   "stream is not readable" → 400 → Crush pmoves-cipher MCP failed
   to initialize).

Verified live: POST /mcp/messages returns 202 Accepted after fix.
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 933d8482-1557-4ba1-baaa-68301e4d95ad

📥 Commits

Reviewing files that changed from the base of the PR and between fbc4320 and 3db520b.

📒 Files selected for processing (3)
  • Pmoves-cipher
  • pmoves/docker-compose.agents.yml
  • pmoves/docker-compose.yml

📝 Walkthrough

Walkthrough

The PR repoints the Pmoves-cipher subproject and expands cipher-api connectivity by adding the pmoves_api Docker network in both standard and agent Compose configurations.

Changes

Cipher API integration

Layer / File(s) Summary
Update cipher subproject reference
Pmoves-cipher
The Pmoves-cipher gitlink is updated to a different subproject commit.
Expand cipher-api network wiring
pmoves/docker-compose.yml, pmoves/docker-compose.agents.yml
Both Compose configurations attach cipher-api to pmoves_api and include it in PMOVES_NETWORKS.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: hunnibear

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the submodule promotion and the MCP SSE fix in the change set.
Description check ✅ Passed The description includes a clear summary and testing details, though it omits several template sections like review coordination and follow-up tasks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/promote-cipher-gitlink-pr12

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 165a61b91f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Pmoves-cipher
@@ -1 +1 @@
Subproject commit 986e6e2fcf7476741e8f2b30799e45b718023456
Subproject commit 2b4c4f79fe951788fa68f36281b2492f5350cc1c

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Attach Cipher to the Supabase API network

When per-agent authentication is enabled, this revision resolves each cipher_<uuid> token through Supabase, but the checked compose configurations attach cipher-api only to pmoves_app, pmoves_data, pmoves_bus, and pmoves_external (pmoves/docker-compose.yml:3055 and pmoves/docker-compose.agents.yml:756), while supabase-kong is only on pmoves_api and pmoves_public (pmoves/docker-compose.yml:741-743). Consequently the default SUPABASE_REST_URL=http://supabase-kong:8000/rest/v1 cannot resolve from Cipher, so token lookups fail and authenticated REST/MCP requests are rejected; add the shared API network in both canonical and split compose definitions as part of this promotion.

Useful? React with 👍 / 👎.

@POWERFULMOVES POWERFULMOVES left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crush Review (4090 node)

P1: Cipher API network attachment (Codex finding — valid)

Codex flagged that cipher-api is attached only to pmoves_app and pmoves_data networks. When per-agent auth resolves cipher_<uuid> tokens through Supabase, the Cipher service needs network reachability to supabase-kong:8000 (or supabase-db:5432 depending on the query path).

Action needed: Verify the compose network section for cipher-api includes the Supabase network. If this gitlink promotion doesn't change compose networking, the fix belongs in a follow-up compose PR.

Otherwise

Gitlink promotion looks clean — 2b4c4f7 matches the squash-merged PR #12 HEAD. No code changes in the parent repo beyond the submodule pointer.

— Crush (4090, noise-reducer ◉)

…lution

Addresses Codex P1 + Crush 4090 review on PR #2299.

Root cause: cipher-api was on pmoves_app, pmoves_data, pmoves_bus,
pmoves_external — but NOT pmoves_api. The per-agent token enforcement
(P #12) resolves cipher_<uuid> tokens via SUPABASE_REST_URL which
defaults to http://supabase-kong:8000/rest/v1. supabase-kong is on
pmoves_api + pmoves_public. Without pmoves_api, cipher cannot reach
supabase-kong → token lookups fail → authenticated requests rejected.

Fix: add pmoves_api to cipher-api networks in both canonical
(docker-compose.yml) and split overlay (docker-compose.agents.yml).
Also added to PMOVES_NETWORKS env var for consistency.
@github-actions github-actions Bot added the compose Compose files / service Dockerfiles label Jul 30, 2026
@POWERFULMOVES

Copy link
Copy Markdown
Owner Author

Review P1 addressed (Codex + Crush 4090)

Codex P1: cipher-api missing pmoves_api network → cannot reach supabase-kong:8000 for token resolution.

Fixed in commit 3db520b93: Added pmoves_api to cipher-api networks: + PMOVES_NETWORKS env in both docker-compose.yml and docker-compose.agents.yml. Cipher can now resolve cipher_<uuid> tokens through Supabase PostgREST.

All review findings addressed. Ready for merge.

@github-actions

Copy link
Copy Markdown
Contributor

Docker Hardening Validation

Hardening Validation Report

Validated: Thu Jul 30 17:37:20 UTC 2026

Services Checked

PMOVES.AI Docker Hardening Validation

[INFO] Checking: pmoves/docker-compose.hardened.yml

[INFO] Validating: hi-rag-gateway-v2
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: extract-worker
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: langextract
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: presign
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: render-webhook
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: retrieval-eval
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: pdf-ingest
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: jellyfin-bridge
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: invidious-companion-proxy
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: ffmpeg-whisper
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: media-video
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: media-audio
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: hi-rag-gateway-v2-gpu
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: hi-rag-gateway-gpu
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: deepresearch
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: supaserch
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: publisher-discord
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: mesh-agent
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: nats-echo-req
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: nats-echo-res
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: comfy-watcher
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: grayjay-plugin-host
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: agent-zero
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: p7-room-orchestrator
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: archon
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: channel-monitor
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: pmoves-yt
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: notebook-sync
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: supabase_service_role_key
[WARN] No user directive
[WARN] No read_only directive
[WARN] No cap_drop: ["ALL"]
[WARN] No no-new-privileges
[WARN] No resource limits

[INFO] Validating: supabase_jwt_secret
[WARN] No user directive
[WARN] No read_only directive
[WARN] No cap_drop: ["ALL"]
[WARN] No no-new-privileges
[WARN] No resource limits

[INFO] Validating: p7_control_token
[WARN] No user directive
[WARN] No read_only directive
[WARN] No cap_drop: ["ALL"]
[WARN] No no-new-privileges
[WARN] No resource limits

======================================
Summary: 112 passed, 43 warnings, 0 errors

@POWERFULMOVES
POWERFULMOVES merged commit 3efea67 into main Jul 30, 2026
48 of 51 checks passed
@POWERFULMOVES
POWERFULMOVES deleted the chore/promote-cipher-gitlink-pr12 branch July 30, 2026 17:38
POWERFULMOVES pushed a commit that referenced this pull request Jul 30, 2026
… fix)

Fixes the router-per-request bug from #2299 that broke MCP SSE sessions.
Router is now created ONCE; auth → /mcp → express.json() → /api order
preserves both body stream and session Map integrity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compose Compose files / service Dockerfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant