Skip to content

Commit c9812b4

Browse files
author
Mateusz
committed
refactor: unify request processing, archive completed specs, and remove legacy pytest compression
- Archive composite-model-routing and compression-layer specs to .kiro/specs/archive/ - Add unification-of-request-processing spec - Refactor connectors (anthropic, hybrid, opencode_go) and orchestrator - Simplify request_processor_service and remove legacy compression compatibility code - Remove deprecated CLI arguments and session applicator features - Update documentation: token-saving guide, config examples, schema cleanup - Add tests for composite failure recovery bridge and routing state - Clean up config schema by removing deprecated compression options
1 parent 9b6c70f commit c9812b4

94 files changed

Lines changed: 10660 additions & 7488 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.kiro/specs/composite-model-routing-failover-weighted-random/design.md renamed to .kiro/specs/archive/composite-model-routing-failover-weighted-random/design.md

File renamed without changes.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Gap Analysis: composite-model-routing-failover-weighted-random
2+
3+
## Current Status
4+
5+
- Requirements, design, and tasks are approved in `spec.json`.
6+
- Implementation status is complete and post-implementation polish has been applied.
7+
- Composite selector parsing, failover, weighted routing, and cross-surface routing are implemented through the shared routing entry point.
8+
9+
## Post-Polish Alignment Update
10+
11+
The following implementation gaps identified during deep code review were closed:
12+
13+
1. **Explicit composite selectors no longer lose runtime failover in request processing**
14+
- `BackendProcessor` now mirrors `BackendService` failover gating:
15+
- explicit **non-composite** selectors disable runtime failover,
16+
- explicit **composite** selectors keep runtime failover enabled.
17+
18+
2. **Quality Verifier routing surface is deterministic**
19+
- Quality verifier calls now stamp `composite_routing_surface=quality_verifier`.
20+
- Surface resolution gives `call_purpose=quality_verifier*` precedence over stale surface hints.
21+
22+
3. **Project directory LLM routing now allows composite runtime failover**
23+
- Project-directory model calls now invoke backend execution with `allow_failover=True`.
24+
- Unit coverage verifies failover-enabled invocation and composite-selector passthrough.
25+
26+
4. **Replacement compatibility bridge now performs safe composite weighted translation**
27+
- Safe legacy replacement selectors are translated into deterministic weighted composite selectors.
28+
- Unsafe/ambiguous mappings still fail with explicit migration errors.
29+
- N+1 deprecation metadata remains published.
30+
31+
5. **Auxiliary routing ownership is consolidated**
32+
- Duplicate auxiliary routing mutation logic in `RequestProcessorService` was removed.
33+
- Canonical auxiliary routing adaptation remains in `BackendRequestPreparer`.
34+
35+
## Requirements Coverage Snapshot
36+
37+
| Requirement | Status | Notes |
38+
|---|---|---|
39+
| R1 Unified entry point | Implemented | Main/auxiliary/quality-verifier/replacement surfaces route through shared composite logic. |
40+
| R2 Failover selectors | Implemented | Ordered failover and deterministic exhaustion behavior are present. |
41+
| R3 Weighted selectors | Implemented | Weighted parsing/selection and default weights are covered. |
42+
| R4 Parsing/validation | Implemented | Deterministic parsing with mixed-operator rejection and validation errors. |
43+
| R5 Retry/failover safety | Implemented | Shared bounded attempt budget and meaningful-output guard enforced. |
44+
| R6 Backward compatibility | Implemented | Existing selector semantics retained for non-composite paths. |
45+
| R7 Replacement migration | Implemented | Deprecation metadata + compatibility bridge + explicit migration errors. |
46+
| R8 Observability/diagnostics | Implemented | Structured composite diagnostics available across supported surfaces. |
47+
48+
## Validation Notes
49+
50+
- Targeted unit/integration/regression test suites covering the touched areas passed after the polish changes.
51+
- Final full-suite and CLI end-to-end verification is executed in the verification phase after this document sync.

.kiro/specs/composite-model-routing-failover-weighted-random/requirements.md renamed to .kiro/specs/archive/composite-model-routing-failover-weighted-random/requirements.md

File renamed without changes.

.kiro/specs/composite-model-routing-failover-weighted-random/research.md renamed to .kiro/specs/archive/composite-model-routing-failover-weighted-random/research.md

File renamed without changes.

.kiro/specs/composite-model-routing-failover-weighted-random/spec.json renamed to .kiro/specs/archive/composite-model-routing-failover-weighted-random/spec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"feature_name": "composite-model-routing-failover-weighted-random",
33
"created_at": "2026-04-09T00:00:00+00:00",
4-
"updated_at": "2026-04-09T19:03:00+00:00",
4+
"updated_at": "2026-04-10T00:00:00+00:00",
55
"language": "en",
66
"phase": "implementation-complete",
77
"approvals": {

.kiro/specs/composite-model-routing-failover-weighted-random/tasks.md renamed to .kiro/specs/archive/composite-model-routing-failover-weighted-random/tasks.md

File renamed without changes.

.kiro/specs/compression-layer-rtk-inspired/design.md renamed to .kiro/specs/archive/compression-layer-rtk-inspired/design.md

File renamed without changes.

.kiro/specs/compression-layer-rtk-inspired/requirements.md renamed to .kiro/specs/archive/compression-layer-rtk-inspired/requirements.md

File renamed without changes.

.kiro/specs/compression-layer-rtk-inspired/research.md renamed to .kiro/specs/archive/compression-layer-rtk-inspired/research.md

File renamed without changes.

.kiro/specs/compression-layer-rtk-inspired/spec.json renamed to .kiro/specs/archive/compression-layer-rtk-inspired/spec.json

File renamed without changes.

0 commit comments

Comments
 (0)