Skip to content

feat(routing): preserve response metadata fidelity - #55

Merged
MichalCz merged 3 commits into
mainfrom
feat/response-metadata-fidelity
Jul 28, 2026
Merged

feat(routing): preserve response metadata fidelity#55
MichalCz merged 3 commits into
mainfrom
feat/response-metadata-fidelity

Conversation

@MichalCz

@MichalCz MichalCz commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Preserve status text, ordered headers, and Latin-1 response metadata across Host and Guest runtimes.
  • Reject invalid local HTTP ByteString headers and status text at Broker and Guest boundaries; malformed remote metadata remains a protocol error.
  • Correlate response and error envelopes with request IDs and harden terminal error handling.
  • Document consumer-visible HTTP and Fetch compatibility boundaries separately.

Small breaking change

  • Invalid local header input that previously surfaced later as protocol-error now rejects at the API boundary (TypeError in Node/Bun, ValueError in Python). Unhandled Guest response validation becomes local-handler-failure.
  • Valid Latin-1 values and malformed remote-metadata handling are unchanged. The compatibility impact is small: update error handling rather than retrying invalid input.

Validation

  • npm test
  • npm run lint
  • npm --workspace=@signicode/verser2-guest-bun run test
  • npm --workspace=@signicode/verser2-guest-python run test
  • npm --workspace=@signicode/verser2-guest-python run lint

Comment thread packages/verser-common/src/lib/header-serialization.ts
Comment thread packages/verser-common/src/lib/header-serialization.ts
Comment thread packages/verser-common/src/lib/header-serialization.ts
Michal added 2 commits July 28, 2026 09:16
Reject invalid local Broker and Guest header input at runtime boundaries while retaining protocol errors for malformed remote metadata. Document HTTP and Fetch compatibility limits.
Classify the local header-validation behavior change as a small breaking change and document its migration path.
@MichalCz

Copy link
Copy Markdown
Member Author

Review disposition: retain the strict shared decoder. Replacing it with Fetch Headers would lose repeated-value/strict-shape fidelity and Python parity; the native-validator wrapper refactor is not justified for this PR.

@MichalCz
MichalCz merged commit fdbac69 into main Jul 28, 2026
9 checks passed
@MichalCz
MichalCz deleted the feat/response-metadata-fidelity branch July 28, 2026 10:14
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