fix(workspace/deps): pin python-multipart>=0.0.27 for chat-upload Starlette parser #1578
Reference in New Issue
Block a user
Delete Branch "fix/pin-python-multipart-for-chat-uploads"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add
python-multipart>=0.0.27to thePYPROJECT_TEMPLATE.dependencieslist inscripts/build_runtime_package.py— the actual SSOT formolecule-ai-workspace-runtime's PyPI dist.7 LoC, single file.
Why
Hermes workspace PDF (44KB) upload returns opaque
400 "failed to parse multipart form". Forensica78762a0(2026-05-19):python-multipartis absent from the published runtime wheel (0.1.17), so Starlette'sRequest.form()raisesAssertionErrorwhen parsing multipart bodies. Every template that pip-installsmolecule-ai-workspace-runtimeis affected (Hermes confirmed; openclaw + future templates latent).Chloe (Hermes user) is currently blocked — P0.
Why THIS file (SSOT trace)
workspace/requirements.txtalready has the canonical pin from Dependabot PR#2526months ago:But that file is excluded from the PyPI build path. Per
scripts/build_runtime_package.py:125:The published wheel's deps come from the hardcoded
PYPROJECT_TEMPLATEon line 253. Two manifests, zero enforced parity = silent drift. That's the bug.Why not edit the mirror repo directly
molecule-ai-workspace-runtimePR #18 made the analogous edit to the mirror'spyproject.tomland was correctly rejected by mirror-guard — the file is regenerated fromPYPROJECT_TEMPLATEon everyruntime-v*tag push. Direct edits get clobbered.Closing
molecule-ai-workspace-runtime#18in favor of this PR.Class drift (out-of-scope follow-up)
workspace/requirements.txt(monorepo Docker image deps) andPYPROJECT_TEMPLATE(PyPI wheel deps) are two separate manifests with no enforced parity. A follow-up RFC should consider:build_runtime_package.pyderives deps fromworkspace/requirements.txt(single source), OROut of scope for this P0 fix — would expand the diff and delay Chloe's unblock.
Verification path for CTO (post-merge)
runtime-v0.1.18on main (orpublish-runtime-autobumpwill do it).publish-runtime.ymlruns:build_runtime_package.py—pyproject.tomlnow containspython-multipart>=0.0.27.twine uploadto PyPI (with the SHA256 self-verification round-trip)..runtime-version=0.1.18across the 8 templates incl. Hermes.200with{"files":[{"uri":"workspace:/...",...}]}.Reviewers
Per
feedback_molecule_core_qa_review_team_required— 3-reviewer relay required (core-devops+core-security+core-qa). Orchestrator will queue the relay next cycle — do not auto-request from this PR body.Refs
a78762a0molecule-ai/molecule-ai-workspace-runtime#18workspace/requirements.txt: Dependabot PR #2526feedback_check_vendor_docs_and_actual_source_before_guess_api_shapecore-qa APPROVE — mc#1578 review-relay
QA review:
940bae15.GO.
core-qa APPROVE — mc#1578 review-relay
QA review:
940bae15.GO.
core-qa APPROVE — mc#1578 review-relay
QA review:
940bae15.GO.
/qa-recheck
/qa-recheck
/security-recheck