Repository navigation
feat(embed): add the Python router (FastAPI) - #16
Open
mattj-monad wants to merge 14 commits into
Open
mattj-monad wants to merge 14 commits into
mattj-monad wants to merge 14 commits into
Conversation
mattj-monad
requested review from
Credgate,
alastaird-monad,
andrewc-monad,
brenth-monad,
mon-aneesh and
saikapuluru99
as code owners
July 30, 2026 21:36
mattj-monad
force-pushed
the
feature/pro-404
branch
from
July 30, 2026 22:50
7939d74 to
6c0e01c
Compare
mattj-monad
force-pushed
the
feature/pro-403
branch
from
July 30, 2026 22:50
09e02ec to
b06e491
Compare
Contributor
Author
|
Force-pushed review fixes (Python router):
|
mattj-monad
force-pushed
the
feature/pro-403
branch
from
July 30, 2026 23:46
b06e491 to
b760aa8
Compare
mattj-monad
force-pushed
the
feature/pro-404
branch
from
July 30, 2026 23:46
6c0e01c to
0c284da
Compare
Contributor
Author
|
Force-pushed: 404/409 handling for the Python router — the |
mattj-monad
force-pushed
the
feature/pro-404
branch
from
July 31, 2026 00:25
0c284da to
aac3d9b
Compare
mattj-monad
force-pushed
the
feature/pro-403
branch
2 times, most recently
from
July 31, 2026 20:30
e287e68 to
a0dd428
Compare
mattj-monad
force-pushed
the
feature/pro-404
branch
2 times, most recently
from
July 31, 2026 20:42
78a0e3e to
8508962
Compare
mattj-monad
force-pushed
the
feature/pro-403
branch
from
July 31, 2026 20:42
a0dd428 to
25d2e86
Compare
Contributor
Author
|
Force-pushed: fixed a null-handling bug found running the demo against live staging. When a tenant has no connectors of a kind, Monad returns |
mattj-monad
force-pushed
the
feature/pro-403
branch
from
July 31, 2026 21:12
25d2e86 to
3315bdb
Compare
mattj-monad
force-pushed
the
feature/pro-404
branch
from
July 31, 2026 21:12
8508962 to
228db62
Compare
Adds the Python port of the /embed router — embed_router(EmbedConfig(...)) as a mountable FastAPI/Starlette APIRouter (package monad-embed, httpx-based). Same contract, idiomatic Python. Adds the python leg to the conformance matrix: the harness venv also installs fastapi/uvicorn and the router (editable), boots servers/py_server.py, and runs ROUTER=python. Restores py_server.py (deferred from the TS-router layer). This completes the router set — ts, go, and python all proven against one contract. Local: python router unit tests pass; conformance green for ROUTER=python, ts, and go. Layer 5 (PRO-404), stacked on the Go router (PRO-403). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n
Parameterizes the Python conformance server from env, matching TS/Go. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n
mattj-monad
force-pushed
the
feature/pro-403
branch
from
July 31, 2026 22:58
3315bdb to
0e66ed7
Compare
mattj-monad
force-pushed
the
feature/pro-404
branch
from
July 31, 2026 22:58
228db62 to
decd7e4
Compare
…-457]
Ports the fixes from the Go and TypeScript routers so all three stay
contract-identical on the wire.
- resolve a connector's pipeline via `component_of` instead of scanning every
pipeline; the scan sent no `limit` and Monad defaults it to 10
- `set_enabled` PATCHes `{enabled}` alone now that PATCH is a true partial
update, instead of rebuilding and replacing the node/edge graph
- drain the connector list rather than one `limit=1000` request
- send `type` on output create; `output_type` is deprecated
- drop the speculative `data` / `config` response-shape fallbacks
- map `kind` to its path segment explicitly rather than appending "s"
# Conflicts: # routers/typescript/src/monad.ts
fix(embed): Python router vs the real Monad API [PRO-457]
Completes the main-sync cascade across the router stack. Verified on the tip: lint (0 errors)/format/typecheck/build pass; conformance mock 35/35 and LIVE (real Monad staging) 21 passed/0 failed for ts+go+python. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n
Carries up the TS + Go pagination/body fixes and the Node-24 conformance CI fix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n
listConnectors: drain until a short page; drop the pagination.total early-break (truncates when Monad under-reports total); add _MAX_PAGES cap so an upstream that never returns a short page bounds the loop instead of spinning / OOMing. (Body-size limits are handled at the ASGI/proxy layer for FastAPI.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n
Carries up the TS + Go orphan-safety/redaction fixes, the doc, and the conformance changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n
- wire_pipeline: a transient status-poll failure no longer fails the request — the pipeline exists, so return it as built (last-known status) rather than orphaning it and inviting a retry duplicate. (D) - build_dev_null: best-effort delete the created sink if wiring fails. (E) - pipeline_for: document the one-pipeline-per-connector invariant behind component_of[0]. (F) (Router error redaction (H) was already clean in the Python router.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n
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.
Layer 5 of the Monad Embed SDK staged rollout (PRO-404) — the last router. Stacked on #15 (PRO-403) — targets
feature/pro-403; review/merge the stack bottom-up.What this adds
routers/python— the Python port:embed_router(EmbedConfig(…))as a mountable FastAPI/StarletteAPIRouter(packagemonad-embed, httpx-based). Idiomatic Python; same contract.pythonleg to the conformance matrix: the harness venv also installsfastapi/uvicorn+ the router (editable), bootsservers/py_server.py, and runsROUTER=python. Restorespy_server.py(deferred from PRO-402).With this, all three routers — ts, go, python — are proven against one contract.
Verification (local)
ROUTER=python14/14,ROUTER=go14/14,ROUTER=ts14/14Stack
400 → 401 → 402 → 403 → 404 → 405 (docs/CI). Last router; 405 is the optional docs + CI-hardening finish.
🤖 Generated with Claude Code
https://claude.ai/code/session_011ASKA2VrufrNLGGrcFjY7n