Skip to content
edgesync Check-in [b53032d01f]
Login

Check-in [b53032d01f]

Overview
Comment:notify: extract shared natshdr.Carrier to kill duplicate header-carrier

Two copies of natsHeaderCarrier existed (leaf/agent/nats.go and leaf/agent/notify/pubsub.go), both carrying the same latent case-sensitive Get bug that was fixed in Task 6. Extract the type to leaf/agent/internal/natshdr so the next bug can be fixed once.

While consolidating, drop the 4-tier fallback in Get in favor of a single EqualFold scan. Header maps are tiny (typically 3 entries) and tiers 1-3 were subsumed by tier 4 anyway. The new implementation is demonstrably correct and easier to read.

Timelines: family | trunk | leaf/v0.0.2
Files: files | file ages | folders
SHA3-256: b53032d01f9b8f9d1b7a3df40a75e4aa7dcec153ff0b619222cf0715e5139bc4
User & Date: [email protected] on 2026-04-24 16:02:07.000
Other Links: manifest | tags
Context
2026-04-24
16:02
notify: extract shared natshdr.Carrier to kill duplicate header-carrier

Two copies of natsHeaderCarrier existed (leaf/agent/nats.go and leaf/agent/notify/pubsub.go), both carrying the same latent case-sensitive Get bug that was fixed in Task 6. Extract the type to leaf/agent/internal/natshdr so the next bug can be fixed once.

While consolidating, drop the 4-tier fallback in Get in favor of a single EqualFold scan. Header maps are tiny (typically 3 entries) and tiers 1-3 were subsumed by tier 4 anyway. The new implementation is demonstrably correct and easier to read. check-in: b53032d01f user: [email protected] tags: trunk, leaf/v0.0.2

Changes
Added .dockerignore version [3bc5ddec7f].
Added .envrc version [da1fd2003a].
Added .gitignore version [824a6b8ae3].
Added .mcp.json version [ed27c0fcf6].
Added CLAUDE.md version [6f7e0ac818].
Added MEMORY.md version [ebbdd53404].
Added Makefile version [6dca0e55a5].
Added README.md version [bdac26335c].
Added bridge/go.mod version [01a7d3f25c].
Added bridge/go.sum version [daead7f01c].
Added docs/bridge.md version [5109328636].
Added go.mod version [58c6eb94bd].
Added go.sum version [20f4bb0617].
Added go.work.example version [76e72e0164].
Added leaf/go.mod version [4e4774a4ef].
Added leaf/go.sum version [bd709d4c07].
Added sim/buggify.go version [da268bc023].
Added sim/config.go version [93ed2e3b21].
Added sim/harness.go version [6d200abc17].
Added sim/proxy.go version [3f9fc38d15].
Added sim/schedule.go version [1d9f957c99].
Added sim/seed.go version [eae4002753].
Added sim/sim_test.go version [9251839482].
Added sim/uv_test.go version [9251839482].