Repository navigation
chore(protocol): route header keys through constants, not string literals - #1259
Merged
Merged
Conversation
…rals headers_keys.rs's own doc says "reference these by constant, not stringly- typed lookup" — but several production sites bypassed it with raw "airc.*" / "forge.*" literals, and airc.media had no constant at all. - add HEADER_AIRC_MEDIA (the Envelope.media header projection, mirroring HEADER_AIRC_REPLY_TO) + re-export it at the crate root - transcript_conv.rs: use HEADER_AIRC_REPLY_TO / HEADER_AIRC_MEDIA instead of "airc.reply_to" / "airc.media" (incl. the round-trip test lookup) - route_proof_commands.rs: use HEADER_FORGE_BODY_HINT / HEADER_AIRC_COMMAND_KIND instead of "forge.body_hint" / "airc.command_kind" Tidiness toward the substrate's "headers route, body forwarded opaque" model: the routing keys are now a single typed source so a rename is a compile error, not a silent wire break. No behavior change. airc-protocol 66 tests green. Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
What
headers_keys.rs's own doc says "reference these by constant, not stringly-typed lookup" — but several production sites bypassed it with raw"airc.*"/"forge.*"literals, andairc.mediahad no constant at all.HEADER_AIRC_MEDIA(theEnvelope.mediaheader projection, mirroringHEADER_AIRC_REPLY_TO) + re-export at the crate roottranscript_conv.rs: useHEADER_AIRC_REPLY_TO/HEADER_AIRC_MEDIAinstead of"airc.reply_to"/"airc.media"(incl. the round-trip test lookup)route_proof_commands.rs: useHEADER_FORGE_BODY_HINT/HEADER_AIRC_COMMAND_KINDinstead of"forge.body_hint"/"airc.command_kind"Why
Tidiness toward the substrate's "headers route, body forwarded opaque" model: the routing keys are now a single typed source, so a rename is a compile error, not a silent wire break. No behavior change.
airc-protocol66 tests green;airc-clicompiles.🤖 Generated with Claude Code