Skip to content

SuperOptiX 2.0 - #27

Draft
Superagentic-AI wants to merge 21 commits into
mainfrom
release/2.0
Draft

Superagentic-AI wants to merge 21 commits into
mainfrom
release/2.0

Conversation

@Superagentic-AI

@Superagentic-AI Superagentic-AI commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

SuperOptiX 2.0 (draft, do not merge)

Umbrella for 2.0: release/2.0 -> main. Nothing is tagged, released or published. All six feature PRs and four live-run bug fixes are squash-merged into release/2.0. This PR stays a draft until the TODOs below are closed.

Merged into release/2.0

Order PR Scope Squash commit
1 #21 A2A keep-alive session per client; interface selection by highest protocolVersion, then binding 541fd1d
2 #22 Seeded GEPA held-out split (gepa.valset_fraction, default 0.2); reported (train) and held-out gains 3cae53f
3 #23 DSPy 3.5 readiness; engine-based MLX LM; dspy>=3.4 9659c87
4 #24 Sealed holdout, deterministic L2 gates, RFC 0005 integrity, SuperGauge checker-v0.1.0 (a5920cc) vendored in tests/fixtures/supergauge d738097
5 #25 super agent test CI gate, optimize --gauge-out, evaluate gate flags 16a9ed2
6 #26 2.0.0 (unreleased), removals, CHANGELOG, migration guide a548736
fix #28 Live Ollama optimize on dspy>=3.4 (keyless Ollama, /v1 base), playbook model honored, CLI GEPA budget and reflection LM honored, fail fast on unreachable LM 604c28a
fix #29 Standalone evaluate/test configures the LM for native DSPy agents; bdd.minimal@1 tokenization and expected_keywords 0dcc9bd
fix #30 One shared helper (superoptix/core/local_lm.py) for every Ollama/local DSPy LM; fail loudly when the model is unreachable 88481b1
fix #31 compile --local keeps the playbook's Ollama model; a missing playbook exits non-zero 9bf0c9a

#24, #25 and #26 were retargeted to release/2.0 and rebased onto the squashed parents. uv.lock conflict between #23 and #24 resolved by re-running uv lock (dspy>=3.4 kept; uv lock --check clean).

Local verification (CI does not run on release/2.0)

Run before every merge and again on the final tip 9bf0c9a: ruff check, ruff format --check, scripts/check_release_metadata.py, full pytest with the CI extras (dev, testing, turboagents).

  • Python 3.11: 462 passed, 77 skipped
  • Python 3.12: 462 passed, 77 skipped

Live end-to-end run (release/2.0 at 0dcc9bd)

  • LLM: local Ollama on the build box, Qwen2.5-1.5B-Instruct Q4_K_M (no cloud keys were available). Same model for task and GEPA reflection.
  • Agent: capqa, a minimal DSPy Predict agent, 12 capital-city scenarios plus 2 canary scenarios.
  • super agent optimize capqa --framework dspy --reflection-lm ollama/qwen2.5:1.5b --max-metric-calls 60 --gauge-out ...: split 10 train / 2 held out (seed 7), GEPA ran the requested 60 metric calls. Reported (train) gain +0.000, held-out gain +0.000. The seed program already scored 10/10 on train, so there was nothing to gain. This shows the plumbing works, not that GEPA improves anything; a harder task is needed to show a real gain.
  • super agent test capqa --actor shashi --checker tests/fixtures/supergauge/conformance/check.py: held-out task.completion 1.0 (n=2), output.parse_rate 1.0, beats echo-input baseline (1.0 vs 0.0), holdout sealed, both canaries failed as expected. Gates: holdout_sealed, parse_rate, beats_trivial_baseline all pass. Verdict ship, level L2 (L3 blocked: no pass_hat_k, evaluator independence not asserted). Exit code 0.
  • Vendored checker run on its own (check.py record --level L2 --require-ship): exit 0. Negative control: a hold record from before the fixes exits 1.

Bugs the live run found (all fixed in #28 and #29). The unit suite could not catch any of them:

  1. With dspy>=3.4, every Ollama call failed (empty credential under 'ollama') and optimize still printed success with +0.000 gains.
  2. Compiled pipelines baked qwen3.5:9b as the GEPA task model, ignoring the playbook model.
  3. --reflection-lm, --auto, --max-metric-calls and --max-full-evals were ignored on the DSPy path. GEPA budgets also went to compile() rather than __init__, so every run used auto: light.
  4. super agent test/evaluate ran native DSPy agents with no LM configured, so every scenario errored.
  5. bdd.minimal@1 failed correct answers (JSON punctuation in tokens, expected_keywords folded into the expected text).

Ollama empty-credential fix everywhere (#30, #31)

  • superoptix/core/local_lm.py is now the only place Ollama/local LM kwargs are built. Ollama: no key, <root>/v1 base, playbook api_base honored. custom_openai/ (MLX server, LM Studio, HF) becomes openai/ with a /v1 base, since custom_openai/ fails to import on DSPy 3.4. max_retries is mapped to num_retries, because DSPy 3.4 drops off the lm15 route when it sees max_retries. A /api/tags preflight raises LocalModelUnreachableError.
  • Routed through it: the DSPy runner (run, evaluate, optimize, test, and A2A via the runner), pipeline_utils, base_pipeline, the optimizer factory and UniversalGEPA reflection LMs, the DSPy and observability adapters, chat_agent, the Ollama/MLX/LM Studio/HF backends, and all generated DSPy templates (explicit, genies, oracles, protocol, minimal, optimas). A test fails if a hand-rolled empty api_key or a raw custom_openai/ comes back.
  • Fail loudly: super agent run used to exit 0 after a traceback; it now prints Model unreachable: ... (or Run 'ollama pull X') and exits 1. pipeline_utils no longer prints "connection successful" without checking. A2A serve startup failures exit 1. The optimas template no longer silently swaps models. compile with a missing playbook exits 1.
  • compile --local no longer bakes qwen3.5:9b over the playbook's Ollama model.
  • Live smoke (qwen2.5:1.5b): agent run capqa answers correctly with rc 0. A bad api_base or a missing model gives a clear error with rc 1. The Ollama backend create_dspy_client, the pipeline_utils setup, quick setup and reflection LMs, the UniversalGEPA-style reflection LM, and the custom_openai route all returned live completions.

GEPA sanity run on a harder task (budgeted, not tuned)

  • Agent arithqa: 20 two-step arithmetic questions ("Compute a times b, then subtract c squared", integer only) plus 2 canaries; qwen2.5:1.5b for both task and reflection.
  • super agent optimize arithqa --local --fresh --max-metric-calls 60 --reflection-lm ollama:qwen2.5:1.5b --gauge-out ...: split 16 train / 4 held out (seed 7). It took 68 s. Seed train score: 0.30 blended, which is the 0.3 assertion weight on top of 0/16 correct. GEPA proposed candidates but none beat the seed. Reported (train) gain +0.000, held-out gain +0.000.
  • super agent test arithqa --actor shashi: held-out task.completion 0.0 (n=4), parse_rate 1.0, does not beat the echo-input baseline (0.0 vs 0.0). Verdict hold, exit 1, which is correct.
  • Reading: the plumbing works and the gate correctly refuses to ship. A 1.5B model reflecting on itself could not lift a task it gets 0% on within 60 metric calls. No GEPA tuning was attempted.

Breaking changes (full text in docs/guides/migrating-to-2.0.md)

  • GEPA optimizes on 80% by default. Results now report a reported (train) gain and a held-out gain. valset_fraction: 0 restores train-only.
  • dspy>=3.4; MLXDSPyClient returns an engine-based dspy.LM.
  • --gauge-sealed is derived from the GEPA split.
  • Record metadata moves to the <stem>.superoptix.json sidecar. Records gain authority.grant_digest and a ledger reference.
  • super agent test exits 0 only when checker-v0.1.0 --require-ship would allow release. A named actor is required.
  • A2A prefers 1.0 interfaces over 0.3; disconnect() closes the session.
  • Removed compile --local-models and PipelineUtilities.get_optimizer.

Remaining TODOs before merging to main

  • Add release/** to the CI workflow triggers (ci.yml, ruff.yml) and mark rc/a/b GitHub Releases as prerelease, not latest. Ready-to-apply patch prepared locally (not pushed); Shashi to apply.
  • tool.correctness and trajectory.valid only come from DSPy ReAct trajectory outputs. The tool-trace emitter is never called, so most agents report neither.
  • L2 is the ceiling: assurance.evaluator_independent is not asserted and pass_hat_k is opt-in (--k).
  • 2.1: Jev judge calibration (assurance.judge.calibration) and Agent Card freshness (interop.agent_card_fresh).
  • Remove docs/release-2.0-tracking.md before this PR merges.
  • Other legacy Ollama paths still pass api_key="". Fixed in fix(lm): one shared helper for Ollama/local DSPy LMs; fail loudly when unreachable #30 via one shared helper.
  • Non-zero held-out gain not yet shown. On the harder arithqa task (see above) the 1.5B model gained +0.000 on both train and held-out. A stronger reflection or task model (or a cloud provider) is needed. Not chased per guidance.
  • output.parse_rate cannot see DSPy adapter-internal parse retries.
  • Non-DSPy runners do not run the shared reachability preflight. Done in fix: fail loudly on unreachable local models for non-DSPy frameworks #36 (run, serve, universal GEPA optimize).

CLI refresh (#32, squash 8f70447)

  • super --help, super agent --help, version panel, banner, super init, conversational welcome and super docs now use the locked messaging and lead with the three pillars: optimize (super agent optimize, GEPA train vs held-out gain), connect over A2A (super a2a adapt, super agent serve), ship with quality (super agent evaluate, super agent test). Commands listed pillar-first; parsing and aliases unchanged.
  • Removed super agent tier-status (ts): old tier/upgrade messaging, and it crashed. Bare super agent prints help.
  • Fixed help/next-step references to things that do not exist (run --interactive, spec generate genie, README super a2a serve), BootstrapFewShot -> GEPA, super agent test blocker labels.
  • Migration guide section 6 and CHANGELOG 2.0.0 updated. pytest 464 passed / 77 skipped on 3.11 and 3.12.

2.0.0rc1 pre-release status (2026-10-11)

  • Version bumped to 2.0.0rc1 on release/2.0 via chore: SuperOptiX 2.0.0rc1 (pre-release) #33 (squash d99a4fe), CHANGELOG section 2.0.0rc1 (pre-release).
  • SuperGauge: checker-v0.1.0 (a5920cc) is the newest SuperGauge release; release/2.0 already vendors it byte-identical, no re-pin needed.
  • Tag v2.0.0rc1 NOT pushed yet: .github/workflows/release.yml creates the GitHub Release with softprops/action-gh-release@v2 without prerelease or make_latest, so it would publish as a stable, latest GitHub Release. Needs a workflow fix (prerelease/make_latest for rc tags), which requires a token with workflow scope.
  • Install once published: pip install --pre superoptix==2.0.0rc1 / uv tool install --prerelease allow superoptix==2.0.0rc1.
  • This PR stays a draft; release/2.0 is not merged into main.

Hardening after rc1 (2026-10-11)

  • test: fix order-dependent tests #34 (squash acf2166) Test isolation: test_pipeline_integration.py replaced sys.modules['dspy'] with a MagicMock at import time, which leaked into every later test and hid a missing-key failure in test_agent_test_cli.py. Every test file now passes when run alone.
  • fix: plain compile supports the full evaluate/optimize/test flow #35 (squash 81f99b5) Plain super agent compile runs the whole flow (evaluate, optimize --gauge-out, test). Verified on a fresh project against Ollama; it generates the same DSPy pipeline as --optimize. Next-steps text, init, README and docs no longer tell users to recompile with --optimize.
  • fix: fail loudly on unreachable local models for non-DSPy frameworks #36 (squash d7dc6a6) Non-DSPy frameworks: local-model preflight with clear error and exit 1; run/serve failures exit 1. Fixed Ollama runs that were broken: Microsoft (agent-framework 1.19 removed AzureOpenAIChatClient; qwen2.5:1.5b parsed as provider qwen2.5), Google ADK (Ollama via LiteLlm), DeepAgents (langchain-ollama in the extra, larger num_ctx).
  • fix: align leftover CLI text with 2.0 messaging #37 (squash 7347600) Leftover old-style text: evaluate recommendations, orchestra feature table (BootstrapFewShot), model/spec/orchestra/marketplace help.
  • fix: super agent serve answers requests for plain-compiled DSPy agents #38 (squash 5458aff) super agent serve on a plain-compiled DSPy agent failed every request (A2A query not mapped to playbook input; no LM configured). Now completes.
  • Fresh-install smoke from the wheel in a clean venv (superoptix[a2a], Ollama qwen2.5:1.5b): version, help, init, pull, compile, run, evaluate, optimize --gauge-out, test --actor (exit 1, verdict hold, expected on a 1.5B model), serve + Agent Card 200 + SendMessage COMPLETED, Ollama down gives exit 1.
  • Tests: 473 passed / 76 skipped on 3.11 and 3.12 (CI extras); 547 passed / 2 skipped with frameworks + a2a installed.

Superagentic-AI and others added 18 commits October 11, 2026 09:19
…selection (#21)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
* feat(gepa): held-out split with train and held-out gain reporting

* feat(gepa): hash held-out ids from raw playbook scenarios

---------

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…23)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…tegrity, pinned conformance (#24)

* feat(gauge): sealed GEPA holdout, deterministic L2 gates, RFC 0005 integrity, pinned conformance

* chore(gauge): pin SuperGauge checker-v0.1.0 (a5920cc), stricter --require-ship semantics

---------

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…ate flags (#25)

Rebased onto release/2.0 after #24 squash. Includes: super agent test follows checker-v0.1.0 --require-ship (exit 1 when blocked), --actor.

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…ation guide (#26)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…nd reflection LM (#28)

- Ollama is keyless under DSPy 3.4 lm15 routing: omit empty api_key and
  normalize api_base to the /v1 OpenAI-compatible base.
- Compiled minimal pipelines no longer bake qwen3.5:9b as GEPA task/teacher
  model; the playbook model is used.
- super agent optimize --framework dspy now passes --auto, --max-metric-calls,
  --max-full-evals, --reflection-lm and --reflection-minibatch-size to GEPA;
  budgets go to GEPA.__init__ (they were silently dropped).
- Fail fast when the task LM is unreachable instead of reporting success.
- Strategy panel says GEPA, not BootstrapFewShot.

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
- super agent evaluate/test on build_program() modules ran with no LM
  configured (every scenario errored: No LM is loaded). Configure the task
  LM from the playbook via DSPyRunner.configure_native_lm.
- superoptix.bdd.minimal@1 scored correct answers as failures: whitespace
  tokenization kept JSON quotes and punctuation, expected_keywords was
  folded into the expected text, and single-field predictions were
  JSON-wrapped. Tokenize on word characters, treat expected_keywords as a
  required-keyword check, unwrap single-field predictions.

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…n unreachable (#30)

* fix(lm): route every Ollama/local DSPy LM through one shared helper, fail loudly when unreachable

- New superoptix.core.local_lm: keyless Ollama with /v1 base for DSPy>=3.4,
  custom_openai rewritten to openai/ (+/v1, placeholder key), max_retries
  mapped to num_retries, and an /api/tags preflight that raises
  LocalModelUnreachableError.
- Routed: DSPy runner (run/evaluate/optimize/test/A2A via runner), pipeline
  utils, base pipeline, optimizer factory and UniversalGEPA reflection LMs,
  DSPy + observability adapters, chat agent, Ollama/MLX/LM Studio/HF backends,
  and all generated DSPy pipeline templates.
- super agent run exits 1 with a clear message instead of exit 0; A2A serve
  startup failures exit 1; optimas template no longer silently falls back to
  a different model.
- Tests incl. a guard that no hand-rolled empty api_key remains.

* chore: revert incidental formatting of unrelated tests

---------

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…book exits non-zero (#31)

- compile --local baked MODEL_OVERRIDE=qwen3.5:9b even when the playbook names
  an Ollama model, so run/optimize then hit a model that is not pulled. The
  default now only applies when the playbook has no local model.
- A missing playbook printed an error and then 'pipeline ready' with exit 0;
  it now exits 1.

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
* feat(cli): refresh super CLI for 2.0 positioning (pillar-first help, remove broken tier-status)

* test(cli): help text leads with the 2.0 pillars

---------

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
Version 2.0.0rc1 in pyproject, __init__ fallback and uv.lock. CHANGELOG
section 2.0.0rc1 (pre-release) dated 2026-10-11; CLI refresh entry moved
from 0.3.16 into the 2.0 section where it belongs.

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…d key) (#34)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…test (#35)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…n ADK, Microsoft, DeepAgents (#36)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
… 2.0 messaging (#37)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…ery to playbook inputs (#38)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
Superagentic-AI and others added 3 commits October 11, 2026 17:34
…(CI has none) (#39)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…nProposer default) (#40)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>
…zero gain (#41)

Co-authored-by: Superagentic AI <190614718+Superagentic-AI@users.noreply.github.com>

This branch has not been deployed

No deployments
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