docs: ADR-0019/0020/0022 + promote ADR-0018 (routing evolution drafts)#310
Merged
Destynova2 merged 1 commit intomainfrom Apr 28, 2026
Merged
docs: ADR-0019/0020/0022 + promote ADR-0018 (routing evolution drafts)#310Destynova2 merged 1 commit intomainfrom
Destynova2 merged 1 commit intomainfrom
Conversation
a88adf2 to
3dab9e2
Compare
Drafts three proposed ADRs covering routing primitives in ADR-0018's "nature-inspired routing" parent, AND promotes ADR-0018 from status:proposed → status:accepted to ratify the parent direction before its child ADRs land. None ship code in this PR; each child ADR is status:proposed and gated behind a separate accepted-status promotion PR before any implementation. Re-evaluation against two concrete user audiences drove this: - Time-sensitive trading bots: fast failover and tail-latency reduction are operational requirements, not nice-to-haves. - Security-prevails customers (defense, banks, OIV): declarative auditable policies replace implicit priority-chain semantics. Ratified parent (ADR-0018): - Promoted to status:accepted with a 2026-04-28 promotion note. Three child ADRs landed as status:proposed: ADR-0019 EMA stigmergy - Opt-in via [router] adaptive_scoring = "ema". Default off. - Transparent to clients (response shape unchanged). - Recovery via decay half-life back to declared priorities. - Full Prometheus telemetry + Grafana dashboard template. - Audience defaults: trading (alpha=0.4, decay=15m, skip<0.5); security-prevails (skip<0.6, X-Grob-Routing header mandatory). ADR-0020 Hedged requests - Opt-in per slot ([models.<slot>.hedge] enabled). Default off. - Hard threshold + safety guards (only_at_temperature_zero, skip_if_tools_present, max_concurrent_hedges_per_session). - New trust_zone_isolation flag for security audiences (hedge target must share trust zone with primary). - Trading defaults: enabled on default+search slots, hedge_after_ms=1000, target=least_loaded. ADR-0022 [[endpoints]] + [[policies]] schema rebuild - Hard cut-over (no backward compat) per founder's "no production users" decision, BUT migration tool ships one minor release ahead AND the tool runs --verify mode for byte-identical routing decisions on a deterministic test corpus. - trust_zone becomes a first-class endpoint field. - Compliance lint mode (grob policy validate --strict) rejects policies lacking explicit trust_zone filters. - Audit-trail continuity guaranteed via routing_signal_mapping.toml artifact emitted by the migration tool. ADR-0021 (Thompson sampling) explicitly rejected before drafting: probabilistic exploration is incompatible with both audience demands for predictable, auditable routing. Documented in CHANGELOG + ADR-0018 promotion note. CHANGELOG entry under [Unreleased] §"Routing roadmap" lists the 3 proposed ADRs + 1 promoted parent. None shipping in 0.36.x.
3dab9e2 to
cd61627
Compare
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.
Summary
Drafts 3 proposed ADRs (0019, 0020, 0022) covering routing primitives in ADR-0018's "nature-inspired routing" parent, AND promotes ADR-0018 from
proposed→acceptedto ratify the parent direction before its child ADRs land. No code ships; each child ADR isstatus: proposedand gated behind a separate accepted-status promotion PR before any implementation.Why now (re-evaluation drove this)
Two concrete user audiences emerged that change the cost/benefit math vs the original solo-dev framing:
For these audiences, the original "skip everything" assessment is wrong. The three landed ADRs are now operationally valuable.
What lands
ADR-0018 promotion (proposed → accepted)
A 2026-04-28 promotion note documents the trigger (the two audiences above). This unblocks 0019/0020/0022 from being "child ADRs of a zombie parent."
ADR-0019 EMA stigmergy (proposed)
[router] adaptive_scoring = "ema". Default off.alpha=0.4,decay=15m,skip<0.5.skip<0.6,X-Grob-Routingresponse header mandatory.ADR-0020 Hedged requests (proposed)
[models.<slot>.hedge] enabled). Default off.only_at_temperature_zero,skip_if_tools_present,max_concurrent_hedges_per_session.trust_zone_isolationflag: for security audiences, hedge target must share the sametrust_zonetag as the primary endpoint (zones declared per-endpoint in 0022).default-model+search-model,hedge_after_ms=1000,target=least_loaded.ADR-0022
[[endpoints]]+[[policies]]schema rebuild (proposed)--verifymode that runs both schemas against a deterministic test corpus and blocks the migration if any routing decision differs byte-for-byte.trust_zonebecomes a first-class endpoint field.grob policy validate --strict) rejects policies lacking explicittrust_zonefilters.routing_signal_mapping.tomlartifact emitted by the migration tool (allows audit-log post-processors to reconcile pre-cut and post-cut traffic).What did NOT land
ADR-0021 Thompson sampling — explicitly rejected before drafting. Probabilistic 5%-exploration is incompatible with both:
The rejection is documented in CHANGELOG and in the ADR-0018 promotion note.
Honest critique baked into the drafts
Each ADR has explicit "Negative Consequences" and "Open Questions" sections that flag known operational risks (hedge cancellation token-burn on some upstreams, Thompson cold-start, schema rebuild cost-without-users-yet). The drafts are deliberate about what they DON'T solve.
Test plan
[Unreleased]§"Routing roadmap" matches the landed files.Auto-merge
Auto-merge intentionally NOT enabled. These are design docs; the founder reviews each before merge.
🤖 Generated with Claude Code