Skip to content

Add five opt-in November native profiles on unchanged44 cases - #52

Merged
khanukov merged 8 commits into
mainfrom
feat/november-five-native-profiles-20261120
Nov 21, 2026
Merged

khanukov merged 8 commits into
mainfrom
feat/november-five-native-profiles-20261120

Conversation

@khanukov

Copy link
Copy Markdown
Contributor

Scope

Add opt-in native routes for Gemini4 Hydrogen, Gemini4 Neon, Muse Ember1.0, Ripple65B Preview NVFP4 and explicitly owner-included KimiK3.1 Pro on the existing44 cases. Default/historical rosters remain unchanged. No changes to Core, authored cases, grading, instructions or historical evidence.

Native qualification and narrow follow-up repairs

  • Native Gemini low; Meta Standard/minimal; native Ripple SDK022/provider-default with owner30000 output bound; Kimi off/native reasoning history and owner30000 bound.
  • Preserve raw Ripple token accounting while handling its documented stop boundary before SDK tool decode.
  • Admit canonical linked technical corrections without rewriting original authority, finance or artifacts.
  • Exact Ember valid completed no-tool responses reach the unchanged ModelAgent contract rather than a transport exclusion. Legacy Meta behavior is preserved.
  • Reuse existing process-wide River HTTP pacing only for new Kimi; actual SDK request bytes remain identical, Retry-After applies to later requests and automatic resubmission stays disabled.

Actual parent evidence

  • Final head47 new-model tests PASS, including real SDK paths, full five-route synthetic factory and linked-correction consumer;0 skipped.
    -18 shared safe-error controls PASS in paid SDK022 runtime. One legacy SDK012-specific control refuses that intentional environment; it is not claimed passed and no compatibility guard was weakened.
  • Final-head Ruff lint/format, strict mypy src/tools, REUSE, contribution isolation and public-release checks PASS.
  • Actual saved native Ripple and Meta responses parsed offline; original token counts retained and provider calls0.
  • Real new-model evidence has already been collected on this frozen source lineage. Gemini44+44 original-evaluator replay accepted; static aggregate publication has its own source pins and review, independent of this runner PR.

Remaining integration gates

Current-head independent review, full locked3.11/3.14 CI/build and Qodo must complete before protected-main integration. Full local matrices are not claimed passed. No new model inferences are made by CI. Owner authorized finite5x44 plus necessary linked technical recovery, not quality retries.

@qodo-code-review

qodo-code-review Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Add five opt-in native model routes for the existing 44 cases

✨ Enhancement 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Add five opt-in native model routes without changing historical rosters or authored cases.
• Require source-bound admission, budget controls, and linked evidence for technical corrections.
• Cover native SDK behavior, accounting, replay, and factory integration with offline tests.
Merge Risk 🟡 Medium

Blast radius 🟡 Medium 💥 3 capabilities

  • 3 affected capabilities within one bounded functional scope: late_november_campaign_integration.
  • Admission, slot selection, provider authorization, cached-token settlement, and journal accounting jointly determine whether this late-November campaign may execute and what cost authority is recorded.
  • The Ember settlement branch is a downstream accounting hop of the same campaign-control behavior, not an independent scope.
  • Gemini, Meta, Kimi, and Ripple delivery operations produce the same bounded late-November campaign model-turn outcome.
  • Their factory, wire, continuation, renderer, parser, and settlement interactions are implementation hops within one integration scope, not separate capabilities.
  • Recording, provider-wire capture, pinned-asset validation, retained-evidence reconciliation, and decision replay form one end-to-end evidence capability.
  • Passing assets through campaign reconciliation is a downstream replay hop, not a separate functional scope.
Behavioral complexity 🟡 Medium 🧩 Coordinated invariants, Compatibility cases

  • Before: each existing roster used fixed profile, cap, tariff, and settlement assumptions.
  • After: the late path additionally derives Ember settlement from cached-token usage while retaining exact roster, cap, tariff, and journal bindings.
  • New correctness conditions are that provider-reported cached tokens, measured input/output usage, reservation bounds, tariff, and durable settlement agree across initial, resume, and correction operations.
  • The added branch materially changes the accounting invariant but remains within the prior coordinated admission/settlement complexity.
Potential damage 🔴 High 🩹 Financial error

  • If the cap/profile/tariff invariant or Ember cached-token accounting is wrong while activated, the campaign can reserve or settle an incorrect amount and potentially allow provider usage outside the owner-approved envelope.
  • Reverting code prevents future attempts but does not automatically repair an already-written journal or compensate an external provider charge; recovery requires durable-journal correction and, if applicable, owner/provider reconciliation.
  • Future dispatch can be stopped by disabling the late profile or reverting the code.
  • Existing sent or settled records require supported journal repair or manual reconciliation; no automatic external compensation is shown.
Assessed commit f7ca41e
Diagram

graph TD
  R["Opt-in roster"] --> A{"Admission valid?"} --> F["Live factory"] --> H["HTTP routes"] --> T["Trial runtime"] --> V["Evidence replay"]
  F --> G["River gRPC"] --> T
  A --> B["Campaign budget"] --> T
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Separate runner for the five-model cohort
  • ➕ Could isolate new provider dependencies and qualification from historical transport code.
  • ➖ Would duplicate admission, budget, trial, and replay controls and increase the risk of divergent evidence semantics.

Recommendation: Keep the opt-in roster within the existing campaign infrastructure, with explicit profile and asset bindings. A separate runner offers isolation but would duplicate the controls that this change needs to preserve.

Files changed (21) +3144 / -89

Enhancement (13) +1099 / -86
three_flow_admission.pyValidate source-bound late-November admission +151/-17

Validate source-bound late-November admission

• Adds exact roster and profile checks, owner-cap requirements, pinned Ripple asset verification, and support for linked historical correction identity.

tools/three_flow_admission.py

three_flow_budget.pyAdd roster-bound caps and Ember settlement +78/-3

Add roster-bound caps and Ember settlement

• Allows an owner-selected cap for the new roster while retaining historical cap rules. Journals cached-token-aware Ember settlement with bounds checks and restartable totals.

tools/three_flow_budget.py

three_flow_campaign.pyExpose non-authorizing preflight for the new roster +10/-0

Expose non-authorizing preflight for the new roster

• Includes late-November assignments in preflight and reports that dispatch still requires external, source-bound admission.

tools/three_flow_campaign.py

three_flow_gemini.pyAdd roster-isolated Hydrogen and Neon profiles +89/-14

Add roster-isolated Hydrogen and Neon profiles

• Defines pricing provenance and native low-thinking profiles, then extends live, offline, and replay paths without replacing historical Gemini models.

tools/three_flow_gemini.py

three_flow_http.pySupport Ember and Kimi native HTTP behavior +105/-11

Support Ember and Kimi native HTTP behavior

• Routes Ember cached usage to tiered settlement and lets valid no-tool responses reach ModelAgent. Adds Kimi reasoning history and an opt-in path for shared River HTTP pacing.

tools/three_flow_http.py

three_flow_late_november.pyDefine immutable candidate contracts +89/-0

Define immutable candidate contracts

• Records the five providers, native routes, context and output bounds, reasoning modes, and pricing; these declarations do not authorize dispatch.

tools/three_flow_late_november.py

three_flow_live.pyAccept the opt-in roster in the live CLI +1/-0

Accept the opt-in roster in the live CLI

• Adds the late-November profile to the CLI's explicit roster choices without changing the default roster.

tools/three_flow_live.py

three_flow_live_factory.pyBind selected slots and corrections before transport construction +117/-17

Bind selected slots and corrections before transport construction

• Checks late-November slots against admission and budget identity, selects the new native profiles, and enables Kimi-only pacing. Adds Ember settlement support to the admitted guard.

tools/three_flow_live_factory.py

three_flow_meta.pyValidate the exact Ember Standard envelope +40/-0

Validate the exact Ember Standard envelope

• Requires Ember's endpoint, context, output bound, diagnostic policy, and conservative pricing while leaving legacy Meta profile validation separate.

tools/three_flow_meta.py

three_flow_profiles.pyRegister five opt-in native selections +93/-0

Register five opt-in native selections

• Adds the roster, dispatch selections, and closed registry mappings, including Kimi pacing metadata; historical registry defaults remain separate.

tools/three_flow_profiles.py

three_flow_ripple.pyPin Ripple assets and validate native replay +233/-0

Pin Ripple assets and validate native replay

• Loads digest-checked tokenizer assets and the official renderer. Reconstructs saved protobuf turns to verify prompt framing, usage, and decisions without provider calls.

tools/three_flow_ripple.py

three_flow_river.pyAdd Ripple's SDK and renderer route +75/-21

Add Ripple's SDK and renderer route

• Scopes River SDK 0.22 to Ripple, uses provider-default reasoning, and handles its documented terminal token without discarding raw usage counts.

tools/three_flow_river.py

three_flow_runtime.pyRequire pinned assets for Ripple evidence replay +18/-3

Require pinned assets for Ripple evidence replay

• Passes transport assets into trial replay and validates saved Ripple protobuf evidence before replaying decisions.

tools/three_flow_runtime.py

Tests (8) +2045 / -3
test_three_flow_late_november_census.pyVerify the five-model roster and admission prerequisites +115/-0

Verify the five-model roster and admission prerequisites

• Checks all 220 assignments, closed registry dispatch, budget-cap persistence, optional-limit consent, and candidate contracts.

tests/test_three_flow_late_november_census.py

test_three_flow_late_november_factory.pyExercise the production factory with synthetic five-route admission +503/-0

Exercise the production factory with synthetic five-route admission

• Runs selected slots through mocked native routes and validates rejected admission mutations. Tests linked correction consumption, preserved original artifacts, and rejection of forged or repeated slots.

tests/test_three_flow_late_november_factory.py

test_three_flow_late_november_gemini.pyTest native Gemini recording and replay +172/-0

Test native Gemini recording and replay

• Checks low-thinking requests, thought-signature continuation, usage, replay, invalid-wire forfeiture, and isolation from the historical Gemini roster.

tests/test_three_flow_late_november_gemini.py

test_three_flow_late_november_kimi.pyTest Kimi history, output bounds, and shared pacing +597/-0

Test Kimi history, output bounds, and shared pacing

• Verifies reasoning continuation, the owner output ceiling, unchanged request bytes under pacing, Retry-After handling without resubmission, and historical registry parity.

tests/test_three_flow_late_november_kimi.py

test_three_flow_late_november_meta.pyTest Ember SDK responses and tiered settlement +290/-0

Test Ember SDK responses and tiered settlement

• Covers strict response validation, minimal reasoning, cached-token pricing across tiers, and completed no-tool responses reaching the model contract.

tests/test_three_flow_late_november_meta.py

test_three_flow_late_november_ripple.pyTest Ripple protobuf, stop boundaries, and replay +232/-0

Test Ripple protobuf, stop boundaries, and replay

• Exercises the pinned native renderer, raw token accounting, malformed usage and token boundaries, saved-wire replay, and the shared offline operator.

tests/test_three_flow_late_november_ripple.py

three_flow_late_november_offline.pyProvide a non-authorizing synthetic transport factory +124/-0

Provide a non-authorizing synthetic transport factory

• Builds mocked Gemini, Ember, and Ripple transports for roster-bound offline campaign tests using a caller-owned budget.

tools/three_flow_late_november_offline.py

three_flow_river_mock.pyMock Ripple's native gRPC responses +12/-3

Mock Ripple's native gRPC responses

• Selects Ripple's protobuf version, frames synthetic tool calls for its renderer, and accepts its no-timeout RPC configuration.

tools/three_flow_river_mock.py

Comment thread tools/three_flow_admission.py Fixed
Comment thread tools/three_flow_admission.py Fixed
Comment thread tools/three_flow_admission.py Fixed
Comment thread tools/three_flow_admission.py Fixed
Comment thread tools/three_flow_admission.py Fixed
Comment thread tools/three_flow_ripple.py Fixed
Comment thread tools/three_flow_ripple.py Fixed
@qodo-code-review

qodo-code-review Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Resuming a campaign aborts every scored Ripple trial ✓ Resolved

Resolving commit: 49d909a

Resolution reason
Adds a keyword-only ripple_assets parameter to reconcile_closure and forwards it to replay_trial
(tools/three_flow_campaign.py). run_campaign passes river_assets into reconcile_closure, and
three_flow_live.consume supplies river_assets from the admitted assets root. This threads the
verified Ripple asset path through the reconciliation path that previously omitted it, so
replay_trial no longer fails for Ripple records on resume. Also adds a retained-scored resume test.
Differs from the suggested fix in naming (river_assets vs assets_root) and does not change the
runtime's explicit-assets requirement.
Description
replay_trial requires ripple_assets for Ripple records, but reconcile_closure calls it without
that argument. When resume or correction reconciles a retained scored Ripple closure, the missing
asset path raises an error that the broad exception handler treats as invalid evidence, replacing
the scored row with an aborted row marked retained_evidence_invalid and
eligible_for_live_results: False.

Grey Divider

Context sources
Review mode: Auto: 🧠 Deep: Dense cross-cutting changes span routing, accounting, SDKs, concurrency, and replay.

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread tools/three_flow_runtime.py Resolved
@khanukov
khanukov merged commit 6c8efdd into main Nov 21, 2026
9 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