Skip to content

feat: add minimum-effort Fable 5.2 campaign profile - #46

Merged
khanukov merged 1 commit into
mainfrom
feat/anthropic-52-model-expansion
Nov 10, 2026
Merged

khanukov merged 1 commit into
mainfrom
feat/anthropic-52-model-expansion

Conversation

@khanukov

@khanukov khanukov commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add only the accessible claude-fable-5-2 model through the existing three-flow campaign machinery.

  • Finite anthropic-fable52-same44-v1 profile; same 44 cases, existing admission, accounting and replay.
  • Fresh stateless full-current-Core requests, adaptive thinking at low effort, automatic tool choice with parallel tool use disabled. No thinking replay, prompt trimming or compaction.
  • Published standard/global tariff envelope and 1,000,000-context / 128,000-output bounds. Reported-usage estimates are not invoice guarantees.
  • Reuse existing optional-money execution with fresh source-bound consent and one-shot credential release. Preserve historical profiles and results.
  • No Core, evaluator, task, prompt, dependency or website changes. Mythos 5.2 is not registered because the exact account metadata route is unavailable.

Verification

  • Candidate 1c1cc3b005eaf7928400a0b50a1583826ea381c8.
  • Clean-source focused regressions: JUnit 208 cases, 3 skips, zero failures/errors.
  • Whole-tree Ruff and formatting; mypy tools; contribution isolation and all 14 public-release checks: passed.
  • Independent complete eight-file compatibility review: passed, no findings. Historical registry/refusal and selection parity checked.
  • Pinned SDK over local MockTransport: two observations of the same 44 cases, 88 synthetic records, 820 turns per observation; retained source/runtime and case-matrix identities agree. Synthetic integration evidence is not model quality.
  • A separate small real protocol request returned HTTP 200 with the requested Fable model, supported controls and complete standard/global usage. It is not a benchmark case or public quality result.

Delivery closure

  • Exact-head hosted CI passed on Python 3.11 and 3.14, with successful distribution build, independent secret scan, CodeQL, dependency review and DCO.
  • Current-head Balanced Qodo review completed with no bugs, rule violations or requirement gaps; no unresolved review threads.
  • Both real observations of the same 44 cases completed and passed parent accounting and offline replay audits. They remain separate from the synthetic SDK qualification and standalone diagnostics.
  • Approved aggregates are published by results-site PR fix(commerce): distinguish unfinished refunds from missed deadlines #13, preserving both original observations and all previous model rows. Fable displays its explicitly disclosed best-quality whole observation with the matching run cost. Site CI, Qodo, deployment and live byte/browser verification passed.
  • This source PR is merged. The main commit has the exact reviewed Git tree and DCO trailer; the automatic post-merge CI also passed on the exact main commit (run 42890230268), including Python 3.11, Python 3.14, the independent secret scan and distribution build; all workflows on that main SHA completed successfully. Evaluated-run source identity remains 1c1cc3b005eaf7928400a0b50a1583826ea381c8; no historical grades or raw traces were changed or published.

Signed-off-by: Dmitry Khanukov <dmitry@dwelly.group>
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add a Fable 5.2 profile to the three-flow campaign

✨ Enhancement 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Add only Claude Fable 5.2 to a finite 44-case campaign profile.
• Reuse stateless Anthropic requests and existing admission, accounting, and replay controls.
• Validate published bounds and pricing estimates; add synthetic transport and admission
 regressions.
Diagram

graph TD
  CLI["Campaign CLI"] --> Admission["Source-bound admission"] --> Roster["Fable roster"] --> Transport["HTTP transport"] --> API["Anthropic API"] --> Evidence["Trial evidence"]
  Transport --> Budget["Budget accounting"] --> Evidence
Loading
High-Level Assessment

Extending the existing finite-roster and stateless Anthropic paths is appropriate: it keeps the new model distinct without duplicating admission, transport, or replay machinery. A dedicated transport would add maintenance cost without a different protocol requirement.

Files changed (8) +382 / -24

Enhancement (6) +78 / -24
three_flow_admission.pyAdmit the Fable roster under existing financial controls +9/-3

Admit the Fable roster under existing financial controls

• Recognizes the new roster in proposals, admission validation, historical registry identity, and published-profile validation. Its proposal has no global cap; execution still requires the applicable admission and monetary policy.

tools/three_flow_admission.py

three_flow_campaign.pyExpose the Fable roster in campaign preflight +7/-1

Expose the Fable roster in campaign preflight

• Reports the new finite roster without a global campaign cap while retaining the existing case assignments.

tools/three_flow_campaign.py

three_flow_http.pyRoute Fable 5.2 through stateless Anthropic transport +20/-11

Route Fable 5.2 through stateless Anthropic transport

• Gives Fable 5.2 a distinct mapping while reusing stateless request settings, timeouts, and Anthropic response checks. Requests use automatic tool choice with parallel use disabled and low-effort adaptive thinking.

tools/three_flow_http.py

three_flow_live.pyOffer the Fable roster in the live campaign CLI +1/-0

Offer the Fable roster in the live campaign CLI

• Adds the profile to the CLI's permitted roster choices without adding a new execution path.

tools/three_flow_live.py

three_flow_profiles.pyDefine the finite Fable 5.2 selection and registry entry +13/-4

Define the finite Fable 5.2 selection and registry entry

• Registers only Claude Fable 5.2 with the existing minimum-effort mode and a distinct stateless mapping. Keeps the historical rosters separate.

tools/three_flow_profiles.py

three_flow_selected.pyValidate Fable 5.2 published bounds and tariff envelope +28/-5

Validate Fable 5.2 published bounds and tariff envelope

• Extends closed-profile validation with the model's 1,000,000-token context, 128,000-token output bound, and standard/global category rates. Accepts existing monetary execution policies without treating reported-usage estimates as billing guarantees.

tools/three_flow_selected.py

Tests (2) +304 / -0
test_openai_reasoning_items.pyInitialize the transport's November flag in a test fixture +1/-0

Initialize the transport's November flag in a test fixture

• Sets the flag on a manually constructed transport so the expanded stateless-model check can run in the existing OpenAI test.

tests/test_openai_reasoning_items.py

test_three_flow_fable52.pyCover the Fable 5.2 roster, SDK behavior, and admission +303/-0

Cover the Fable 5.2 roster, SDK behavior, and admission

• Adds synthetic tests for all 44 assignments, stateless request projection, response failures, accounting, and replay. Also checks published-profile constraints, source-bound consent, policy refusal, and one-shot execution.

tests/test_three_flow_fable52.py

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can move or hide resolved findings to focus on what still needs action

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 1c1cc3b ⚖️ Balanced

Results up to commit 24507d2 ⚖️ Balanced


🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Action required
1. Projected keys silently collide 🐞 Bug ≡ Correctness
Description
_to_json normalizes mapping keys and assigns them into projected without checking whether that
exact string is already present, so a custom Mapping.items() that yields duplicate keys—or
distinct string-subclass keys that normalize identically—silently discards the earlier value.
TrajectoryLedger.append() now uses this projection for admitted payloads, allowing the retained
row and digest to omit caller-supplied data without raising.
Code

src/operatebench/jsonsafe.py[177]

+                projected[normalized_key] = _to_json(
Relevance

●●● Strong

Fail-closed duplicate-key handling is a deterministic correctness fix aligned with this PR's
explicit hostile-input refusal intent.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new helper explicitly collapses string subclasses to built-in strings and then inserts each
normalized key without a duplicate check. The ledger activates this helper on every payload, while
another untrusted projection in the repository demonstrates the established fail-closed behavior by
rejecting duplicate mapping keys before insertion.

src/operatebench/jsonsafe.py[114-120]
src/operatebench/jsonsafe.py[166-184]
src/operatebench/core/ledger.py[107-110]
src/operatebench/cards.py[810-823]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The JSON projection silently overwrites an earlier mapping entry when another key normalizes to the same exact built-in string. Reject such collisions with `NonJsonValueError` before projecting the duplicate value or inserting it.

## Issue Context
The projection intentionally supports custom, one-read `Mapping.items()` implementations and normalizes string subclasses without invoking their hooks. Once normalized, membership checks against `projected` are safe because both existing and candidate keys are exact built-in strings.

## Fix Focus Areas
- src/operatebench/jsonsafe.py[170-177]
- tests/test_freezing.py[252-271]
- tests/test_trajectory_ledger_aliases.py[372-397]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Results up to commit e71d019 ⚖️ Balanced


No changes from previous review

Grey Divider

Qodo Logo

@khanukov
khanukov merged commit 6fd55de into main Nov 10, 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.

1 participant