Skip to content

ADR-240 D1+D2: BackendRaceChain + CostAwareRouter (dual-provider autonomy) v0.78.0#224

Merged
harishquantamix merged 1 commit into
masterfrom
adr240-delta-public
Jul 8, 2026
Merged

ADR-240 D1+D2: BackendRaceChain + CostAwareRouter (dual-provider autonomy) v0.78.0#224
harishquantamix merged 1 commit into
masterfrom
adr240-delta-public

Conversation

@quantamixsol

Copy link
Copy Markdown
Owner

Public release of the 2 new multi-provider primitives (merged private #266)

The SDK already ships fallback, parallel BackendPool, and debate for multi-provider use. These are the only 2 gaps — both generic, IP-clean (the patented debate/clearance machinery stays private).

  • graqle/backends/race.py BackendRaceChain — first-to-finish (asyncio.wait FIRST_COMPLETED, cancel losers) or best-of-N. Drop-in ModelBackend, mirrors BackendFallbackChain.
  • graqle/routing.py CostAwareRouter + Difficulty — auto-select cheapest backend meeting task difficulty. TaskRouter untouched (advisory).

IP: generic asyncio/cost patterns — NO debate/clearance imports. Sentinel confirmed clean.

Tests: 13 new + 156 backends+routing pass, 0 regression. Version 0.77.0 → 0.78.0.

Merge → publish: on merge, tag v0.78.0 on public master → PyPI trusted publishing (same as v0.77.0). Note: the 'Release Gate (PyPI)' required check is the known false-failing CI-RELEASE-GATE-001 — admin-override as before.

🤖 Generated with Claude Code

…nomy) v0.78.0

Public release of the two new multi-provider primitives (merged private #266).
Everything else for dual-provider use already ships in the SDK (fallback,
parallel BackendPool, debate); these are the only 2 gaps.

- graqle/backends/race.py BackendRaceChain(BaseBackend): first-to-finish
  (asyncio.wait FIRST_COMPLETED, cancel losers) or best-of-N (scorer,
  deterministic). Drop-in ModelBackend, mirrors BackendFallbackChain.
- graqle/routing.py CostAwareRouter + Difficulty: auto-select cheapest backend
  meeting task difficulty (SIMPLE→cheapest, HARD→strongest); provider-agnostic
  (relative cost); TaskRouter untouched (stays advisory).

Generic asyncio/cost primitives — NO patented debate/clearance machinery
(those stay private, D4). Additive, backward-compatible. 13 new + 156
backends+routing tests pass. Version 0.77.0 → 0.78.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🛡️ GraQle PR Guardian

💥 Blast Radius: 6 modules affected

Module Files Changed Risk Level Impact Radius
graqle 4 🟡 T2 4
pyproject.toml 1 🟡 T2 1
tests 1 🟢 T1 1

Total blast radius: 6


🏛️ Governance Verdict

⚠️ WARN

  • T2: Advisory warnings detected. Review recommended.

🔍 SHACL Violations

No SHACL violations detected.


🔐 Approval Requirements

This PR requires approval from: T2

  • A Senior Engineer or above must approve.

Approval requirement NOT yet satisfied.


Metric Value
Blast Radius 6
Files Analyzed 6
Blocked 0
SHACL Violations 0
Verdict WARN

🔬 Powered by GraQle PR Guardian v0.1.0 · Scan completed 2026-07-08T13:43:08.200420+00:00

@harishquantamix harishquantamix merged commit 72177f5 into master Jul 8, 2026
19 of 20 checks passed
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.

2 participants