Align _meta envelope key order across Python/TS/Swift helper packages #4
Labels
No labels
bug
devfu
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
svd:skip
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Stallari/mcp-helpers#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Migrated from the vault DEVFU register by the DD-422 sweep (frozen-index entry [242], DEVFU-2026-05-24-stallari-mcp-helpers-cross-lang-key-order).
Context (register entry, verbatim)
DEVFU-2026-05-24-stallari-mcp-helpers-cross-lang-key-order — DD-338 Phase E shipped 3 sister packages (Python v0.1.1, TS v0.1.0, Swift v0.1.0). Architect claim during sister-ships was "cross-language byte parity"; functional smoke during Phase E.swift wrap revealed minor key-order divergence: Python
meta_envelopeemitsmatched_total, returned, latency_ms, filtered_by, redactions, next_cursor[, error_notes]; TSformatMetaLine+ SwiftformatMetaLineboth emitmatched_total, returned, filtered_by, latency_ms, redactions, next_cursor[, error_notes]—latency_msandfiltered_byswapped between Python and TS+Swift. Impact: semantic parity (assembler-side regex\n\n_meta: (\{.*\})$parses to dict, dict equality is order-agnostic) but NOT strict byte parity. Golden-file tests across languages would mismatch. Fix shape: pick a canonical order (Python's is the older; TS+Swift's matches what I wrote in the spec) and align all three. Per feedback_swift_jsonencoder_key_order the Swift impl hand-assembles + the TS impl uses object-literal-order — both can re-order trivially in a minor version bump. Python likewise (dict-literal order viajson.dumps). Recommended canonical: TS+Swift order (matches my spec text + is the majority of consumer surface). Patch Pythonaudit_envelope.pymeta_envelopeto swaplatency_msandfiltered_bypositions, bump v0.1.2 to PyPI. Sister TS + Swift stay v0.1.0 unchanged. Effort: ~15min Python patch + PyPI publish; 7 Python blade-mcps would see test fixture updates if their tests pin byte-level output (likely a few; same cleanup-sweep pattern aspy.typedworkarounds). Related: DD-338 Phase E architectural intent of "byte parity"; sister offeedback_swift_jsonencoder_key_order.Acceptance criteria
audit_envelope.pymeta_envelopeemits the canonical order matching TS+Swift:matched_total, returned, filtered_by, latency_ms, redactions, next_cursor[, error_notes](swaplatency_ms/filtered_by)Blocked by
None - can start immediately
spec-verify-dispatch Half A for gh#4 align-meta-envelope-key-order-across-python-ts-swift-helper: clean after 1 rework round(s).
/Users/piers/master-ai/atlas/utilities/agent-harness/specs/2026-07-09-align-meta-envelope-key-order-across-python-ts-swift-helper.mdcodex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/master-ai/atlas/utilities/agent-harness/specs/2026-07-09-align-meta-envelope-key-order-across-python-ts-swift-helper.mdspec-verify-dispatch Half B for gh#4 align-meta-envelope-key-order-across-python-ts-swift-helper completed integration verify.
uv run mypy src testsreports the three disclosed pre-existing errors in untouched test files. This is non-blocking under the specified local policy.