Skip to content

fix(standard): include OpenRouter embeddings in model preflight - #282

Merged
aitianshi merged 3 commits into
mainfrom
chore/handle-issues-26-28-36-37-77
Nov 23, 2026
Merged

aitianshi merged 3 commits into
mainfrom
chore/handle-issues-26-28-36-37-77

Conversation

@aitianshi

@aitianshi aitianshi commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #28

What

A standard run using an OpenRouter embedding model was refused before execution because model preflight read only the chat catalogue. Runs that need embeddings now also read OpenRouter's embedding catalogue, accepting listed embedding IDs while continuing to reject unknown names. The model picker keeps its existing list. No upstream benchmark or agent code changes.

This follows #94. Live acceptance remains incomplete: representative conversations still need to cover the remaining retrieval methods. Earlier validation passed the two BM25 reranker methods on one task; Qwen quota failures and the cumulative validation budget still limit further coverage.

Touches

Backend provider discovery, standard run preflight and regression tests.

Verified

  • After refactor(standard): sort the package into folders, share the file writer and split the trace reader #290 squash-merged, rebased onto main at dab3ec0f. The final Git tree is identical to the previously tested head; no source changes or paid test runs.
  • Rebase validation: 3,149 backend tests, suite OK. No paid runs were repeated; live evidence below retains its original source versions.
  • 11 provider/discovery tests passed, including embedding-only IDs, deduplication, malformed/unavailable embedding catalogues, unknown-model refusal and unchanged discovery for other providers.
  • Standard runner suite: 67 tests, OK, 1 skipped. Uses a local fake provider; no paid calls. A background ACP thread emitted a closed-file exception during the suite; unittest reported no failing tests.
  • Free GET requests through the changed code against OpenRouter's live catalogues found qwen/qwen3-embedding-8b, openai/text-embedding-3-large and openai/gpt-5.2 without credentials.
  • git diff --check passed.
  • No additional paid inference or whole-method validation claimed for this change.

Risk

Embedding runs make one additional catalogue request. If either requested catalogue is unavailable, preflight follows the existing unavailable-list behavior and leaves validation to actual provider responses rather than rejecting against a partial list. Wrong catalogue handling could miss an early typo refusal; request routing and inference are unchanged. Revert the commit to undo.

@aitianshi
aitianshi force-pushed the chore/handle-issues-26-28-36-37-77 branch from b2a5859 to 68ea8cf Compare November 23, 2026 08:36
aitianshi added a commit that referenced this pull request Nov 23, 2026
…ter and split the trace reader (#290)

Closes #289

## What

Reorganises code without changing what it does; the few differences are
under Risk. Four parts:

- **The standard.** The 36 modules of `app/nullius/standard/` move from
one folder into eight, one per purpose; `cli.py` and `kits/` stay at the
top. No module is renamed. Every import, the wheel's package list, the
docs, the skills and `AGENTS.md` follow. `test_layering.StandardFolders`
keeps a new module out of the top of the package and keeps the folders
importing one way.
- **`nullius/ondisk.py`** (54 lines): a file written whole then renamed
into place, a file lock, a sha256. It replaces the hand-written copies
in 13 modules, four of which used one fixed temporary name that two
writers at once collided on.
- **The trace reader.** `traces/trace.py` (1,447 lines) becomes `spans`,
`fold`, `breakdown`, `waterfall` and `trace`, its code moved whole.
- **Routes.** The loopback-client guard sits beside the form-token guard
(`shared._local_client`), and `execute.begin` checks and starts plans
for the builder's Run, the Agents page's check and the Benchmarks page's
proof.
- **What follows the moves.** OSWorld1's driver asks the package for its
folder, where it counted folders up from a file that moved. The check of
an environment's `network` field moves beside the other field checks in
`definitions`, so no two folders import each other. The field contract
pins the moved classes under their new modules, with the same fields.
`NoFlask` moves from `test_charts.py` to `test_layering.py`, and
`test_trace.py` uses the builders `tracedata.py` already had.

Why now: `main` gained five loose modules in the standard in five days,
and #282, #283, #284 and #286 are built on this layout.

## Touches

backend · routes · the standard · catalogue (drivers' import lines) ·
docs and skills (paths) · CI (one import line in `docker-tests.yml`, the
judge's path floor, the wheel's package list) · templates and static
(four comments that name a moved module)

## Before and after

Nothing visible changes. Of 450 pages fetched from this branch and from
`main` over the same jobs, 442 are identical and 8 differ only by a
moved address: seven kit pages print their driver's source, and one is a
stylesheet comment.

Before: 36 modules, `cli.py` and `kits/` in one folder. After:

```
app/nullius/standard/
  cli.py  kits/
  contract/      ports  names  definitions  match
  requirements/  install  hostreq  network_requirements
  protocols/     acp  jsonl  cancellation  computer_port  computer_pipe
  calls/         relay  ledger
  backends/      container  boat  setup_container  forward  egress  mcp_machine  mcp_bridge  web_services
  runner/        run  job  pace  retries  shard  merge  payload  boat_units
  proofs/        conform  fidelity  prove  pins
  pages/         recipe  howto
```

## Verified

- Backend suite 3,146 tests and route suite 715: pass. The docker tier's
11 modules (388 tests) pass with real containers.
- The wheel builds with the eight folders in it and
`app/packaging/verify.py` passes.
- The tests `main` had when the modules moved are the same cases after:
same ids and outcomes, each function compared by syntax tree, the same
planted faults failing the same tests. Each later merge of `main` was
checked file by file against `main`'s own change.
- The upstream-gated OSWorld1 tests, skipped in CI, run by hand with the
upstream present: 13 of 14, as on `main`.
- Real runs on `meta/muse-spark-1.3-contributor` through OpenRouter,
agents in containers: the reference agent, Goose and OpenCode on GSM8K,
HumanEval and τ³-bench, two shards and their merge, a recipe started
from Review, the conformance kits. 36 trials, all pass. Mem0 on LoCoMo
scores here as on `main`.
- Against `main` on those runs' output: the trace reader gives the same
result on 1,212 views of 42 traces, and 21 commands of the CLI that call
no model print the same.
- Four independent reviews of the diff; each finding is fixed with a
test that fails on the old code.

## Risk

- **Import addresses change, with no aliases**:
`nullius.standard.<module>` is now `nullius.standard.<folder>.<module>`.
A catalogue entry copied into user storage before this (a proof makes
such a copy) keeps the old address and stops loading; *Use bundled
entry* on its page restores it. Release v0.1.1 ships HumanEval's and
τ³-bench's drivers with the old addresses.
- **Open branches.** #282, #283, #284 and #286 already sit on this
branch. Any other branch that touches `app/nullius/standard/` (#288)
follows after whichever lands first.
- **Permissions under an unusual umask.** With a umask that removes the
owner's write bit, the constraints store, a Harbor entry and a judgement
are written `0600` where `main` gave `0400`.
- **Temporary files** are named `.<random>.part`, one per write, and a
failed write removes its own.
- **The Agents page's check and the Benchmarks page's proof** now refuse
a run still going under the same name, as the builder's Run did.
- **A trace's `producer`** reads `app/nullius/standard/runner/job.py`.
Nothing reads the value.
- **The judge** floors merge risk at severe: one import line changes in
a workflow.

Undone by reverting the squash commit; branches built on the layout
would then move their imports back.
@aitianshi
aitianshi force-pushed the chore/handle-issues-26-28-36-37-77 branch from 68ea8cf to ed4f229 Compare November 23, 2026 09:09
@aitianshi
aitianshi marked this pull request as ready for review November 23, 2026 09:41
@github-actions

Copy link
Copy Markdown

🔴 PR judge · 4 of 7 yes · #282 ↔ #28

Merge risk 🔴 MAJOR the judge's reading of the diff; app/nullius/standard/runner/run.py is in the path of every run
Priority 🔴 EXTREME the deepest path is app/nullius/standard/runner/run.py
Question Verdict
Changes do what the issue asks · 0 of 5 criteria ❌ no
Issue and pull request describe the same change ⚠️ partly
Description matches the diff, no more, no less ✅ yes
Diff stays in scope ✅ yes
Tests cover the change, or Verified says how ✅ yes
Docs follow the change ❌ no
Risk named in the description ✅ yes
Before and after shown –
Acceptance criteria, 0 of 5 met
# Criterion Verdict
1 A relay route can pin one model for embeddings requests and another for chat requests, each recorded as the model sent. ❔ undecided
2 The four reranker methods are values of retrieval, each with what it needs said (needs). ❔ undecided
3 The owner has said how the qwen embedder is pointed at the relay. ❌ no evidence
4 The five qwen methods are values of retrieval, or stay recorded as not offered with the reason. ⚠️ partial
5 A run of each offered method on a few tasks makes every model call through the relay (its record shows the reranker's a… ⚠️ partial
Checks the script runs itself, 4 of 4 pass
No machine attribution trailer in the commits or the description ✓
New code under app/, docs/, .github/ or .claude/ ✓
No Flask import under the backend package ✓
No key-shaped string in the diff ✓

@aitianshi
aitianshi merged commit f226eba into main Nov 23, 2026
4 checks passed
@aitianshi
aitianshi deleted the chore/handle-issues-26-28-36-37-77 branch November 23, 2026 10:06
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.

τ³-bench: offer the reranker and qwen search methods through the relay

1 participant