Skip to content

Ruinan - #150

Merged
evalvitals merged 82 commits into
mainfrom
ruinan
Nov 20, 2026
Merged

Ruinan#150
evalvitals merged 82 commits into
mainfrom
ruinan

Conversation

@Nanboy-Ronan

@Nanboy-Ronan Nanboy-Ronan commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Type of change

  • New analyzer
  • New model / model spec
  • Bug fix
  • Infrastructure / CI
  • Documentation

Checklist

  • ruff check . passes
  • mypy evalrx passes
  • pytest -m "not gpu" passes (all fast unit tests green)
  • New analyzer / model has a unit test using FakeModel
  • CHANGELOG.md updated under [Unreleased]
  • Paper citations included (if method from literature)

build_report_data reused the name repairs for M5's per-case outcomes, so
ReportData.repairs carried a case-id dict instead of the repair list and
the loop figure never showed the repair. The outcomes get their own name;
the smoke-test fixture is regenerated with the corrected field.
Analyzer.__init__ stores each hyper-parameter with setattr, so mypy saw
none of them on the subclasses; each analyzer now declares the ones it
reads, typed from its own __init__. The HF decoding and specialist
mixins declare, under TYPE_CHECKING, the HFLocalModel attributes and
methods they rely on. Annotations only; removes 412 mypy errors.
The echarts tooltip and hover callbacks use echarts' own types, the
archive reader and the trajectory panel narrow from unknown, uploaded
runs carry ReportData / LayoutEnvelope, and the two copies of the
POST-and-read-JSON helper are one (api.postJson). With no any left,
no-explicit-any is now a lint error.
A test imports every name the docs' Python examples import from evalrx,
so a rename or removal that the docs miss fails the suite. It found
four: extending.md still imported from the pre-stages diagnosis module,
and intervention.md used the removed V1 RunLogger (and left out the
required protocol).
The in-container runner passed label=None for a case without a usable
label, which FailureCase does not expect: to_dict() then raised on
None.value. Start from Label.UNKNOWN, the field's default.
mypy evalrx is clean under mypy 1.19 and 2.4 (it reported 260 errors
after the earlier declarations). Mostly annotations: read-only list
parameters become Sequence/Mapping, empty defaults and lazily loaded
handles get types, optionals are narrowed where the path already
guarantees them, and the handful of casts and targeted ignores each say
why. Stages now type their judge as a new evalrx.core.model.Judge
protocol (capabilities + generate) that every Model and the CLI judges
satisfy; InstrumentedModel is typed as the Model it stands in for.

CI runs mypy (pinned) on the 3.11 job. Report, loop and run_fix
behaviour snapshots are unchanged.
nl_runner is documented (quickstart, deco_pope) and was only reachable
through the CLI, so nothing would notice its generated run.py importing
a removed name. A test scaffolds the template, compiles run.py and
checks every evalrx name it imports exists.
The loop figure reads repairs[0], which counted fixed and broken cases from
the fix event's confirmation alone. When no candidate cleared the
certification bar that confirmation is empty, so the figure said "0 fixed"
while the header tile, reading the strongest scored candidate, said 3. Both
now read one M5 result.
An explore output (evalrx explore, run-codebase, a fused run) has no run
log, so the React report showed all five stages as not run and these
commands kept a second, older renderer for it. The output is now read as
its own report: M2 and M3 completed, the question and data from its
report file, and a header that counts patterns, charts and proposed causes.
The report.html they write is the React report's portable export, and
html_report.py is removed. A rerun into the same directory invalidates
the cached layout, since there is no event log to show it.
…their own report

The legacy page showed the analysis code the explore agent ran, its
output, audit and trajectory; the M2 record now carries them, so dropping
that page loses nothing. A directory holding its own explore report and no
run log is read as an explore output even beside another run's explore/
directory, and a loop run whose log sits next to an explore report stays a
loop run. A fused run's report, which has no takeaways or hypotheses,
renders with M2 only.
web_dist/ is gitignored, so an image built from a fresh clone had no
renderer and its explore step wrote no report.html. A Node stage builds it
from source. The images also stop asking for the removed dashboard extra,
and the explore READMEs point at the report instead of a dashboard.
dynamic.py had grown to 2,100 lines holding the run readers, every stage
view, the figure and example builders and the summary beside the public
report API. Each moved verbatim into its own module: report_inputs,
stage_views (with stage_figures and stage_examples), report_summary and
plain_labels. dynamic.py keeps the API, the layout spec and its checks.
No module imports dynamic back, and the compiled report is byte-identical.
Pulling files out of a reply, summarising a file for the next prompt, and
the static checks before a run (syntax, main guard, cross-file imports, no
model load on an artifacts-only run) never touched the writer's state.
They become plain functions in their own module; hard_validate takes the
artifacts-only flag as an argument. The unused _build_cli_prompt wrapper
is dropped.
_confirm_from_explore selected the EXPLORE lead, built the audit rows and
held a recommendation closure inline. Selection, the audit and the tier
recommendation are now functions of their own, the last taking what the
closure captured as arguments. A test covers the support floor and the
fallback to the run's ceiling, which no test reached.
Compare in the top bar puts the run on screen beside another the server
lists: their metrics and stage outcomes in one table, and the cases both
evaluated that passed in one and failed in the other, linked into the case
studio. The join is a pure function over the two reports, joined by id,
and the page says when the runs used different datasets or kinds. An
export holds one run and shows no Compare.
Nothing in a run's log said it was over. loop_end ends M1-M4, but M5 and
the fix step log after it, so a reader could not tell a finished run from
one still writing. RunLoggerV2.close() now writes run_end, after
everything else the run logged. A new event type bumps the schema to 7.
The top bar said "report complete" for every run. It now reads the run's
state off the report: complete once the log has run_end (loop_end on an
older log), in progress while it keeps logging, and unfinished with how
long it has been quiet otherwise. While a run is unfinished the page
follows it over server-sent events and swaps the new report in on the
view that is open. Such a run is compiled in memory and published into its
directory only once it ends; a compile that fails on a half-written
document keeps the last good report.
A second logger in a run's directory restarts event_seq below what the
first run left in the stage logs it did not rewrite, so new events never
raised the maximum and the page was not told. The stream now watches each
log document's mtime and size, which is also a stat rather than a re-read
on every poll. Tests cover that case, run_end coming last after the fix
step under RunContext.finalize(), and a run rebuilt from Langfuse.
deco_hallu/run.py never closed its logger, so the run wrote no Langfuse
bundle and now would never log its end. The natural-language runner's
prompt asks generated scripts to finalize their RunContext for the same
reason.
An earlier changelog entry in this release still said html_report keeps
the static page; it is gone. The explore READMEs install only the viz
extra and then run evalrx serve, which needs ui.
Its Dockerfile copies examples/m1_m5/deco_hallu/data/cases, which the
examples/**/data rule kept out of the build context, so the image did not
build. Those 276 KB of manifests are re-included.
The 531-line function becomes an orchestrator over per-stage readers.
The analyzer glossary and M1 results move to run_probes, the manifest and
case rows to run_cases. The two copies of the case-row builder are one.
Output is byte-identical on eleven run directories.
…gentic decision

ask_judge validates a judge's reply against a pydantic model, sends an
invalid reply back with the errors, and raises a typed error when the
retry budget runs out. The agentic loop's decide uses it with a tool field
limited to registered names; parse_action and its repair prompt are gone.
pydantic-ai needs Python 3.11, so the package and CI move to 3.11.
DiagnosisAgent asks for a Proposal and the critic for a Review through
ask_judge. The Markdown label parser, the format re-ask and the separate
plain-language repair call are gone: an invalid answer or a jargon-y plain
statement goes back to the judge once with the reason. An unreadable
proposal now raises JudgeOutputError, which the loop logs exchange by
exchange, instead of being replaced by template hypotheses.
…judge

A reply in prose or code fences is read, an invalid one is sent back with
the errors instead of being repeated blind or dropped, and every fix-judge
attempt is logged. A held-out judge with no valid answer records not_judged,
not not_testable. Removes create_sandbox, whose docker mode silently ran the
subprocess sandbox, and validate_json_shape, now unused.
A timeout now kills the CLI's whole process group (its worker processes
outlived subprocess.run's timeout), Claude runs in a throwaway directory
instead of the caller's, and a limit notice printed as an answer raises for
Codex and agy too, not only Claude.
AgenticDiagnoseLoop subclassed VLDiagnoseLoop to replace run(). Its run is
now JudgePolicy.run(loop, data), passed as VLDiagnoseLoop(policy=...); the
decision judge travels in the run state instead of on the loop.
The Colab bootstrap syncs the lock and installs evalrx with --no-deps, so
the new core dependency must be in the lock or every Colab run fails on
import; existing pins are unchanged. Playwright's chromium does not install
on ubuntu-latest (26.04), which failed the last CI run.
A reply citing "[2]" before its answer, or wrapping a list in an object,
used to be read as the wrong value and cost a retry.
The M2 analysis and its tool selection, and the case-discovery label, go
through ask_judge. The section parser, the free-text tool-name scan and the
PASS/FAIL keyword scan are gone; a judge with no valid answer keeps the
deterministic result and the report says why.
Conflicts: CHANGELOG (both sides kept), ci.yml (main's comment on the
ubuntu-24.04 pin), fix validation (weight_edit runner added to the runner
table). main's agentic probe-tools test and doc now use
VLDiagnoseLoop(policy=JudgePolicy(...)).
Declare the weight analyzers' parameters on the class, narrow the
optional arrays in WeightEdit, and name the probe-call kwargs; ruinan's
CI runs mypy on the package and main's CI does not.
…n a file

HypothesisAgent goes through ask_judge with a hypotheses model, and the
jargon repair becomes its check. A CLI coding agent used as a judge
(CliAgentJudge) writes its answer to answer.json in a fresh directory,
so a draft in its trajectory is never read as the answer.
FixedOrderPolicy holds what run() and _run_cycle did; JudgePolicy and it
share one RunState and the stop-reason constants, and VLDiagnoseLoop.run
only resets the token count, calls the policy and logs loop_end. The
stage bodies (_do_m1.._do_m4) are unchanged.
A CLI coding agent that ends on a limit notice with no files now says so
in CliAgentResult.error; the notice pattern moves to cli_runtime, shared
with the judges.
The run data carries the last M3 error when stopped_by is
diagnosis_error; the stage status becomes 'failed' and the M3 page and
brief say why (stage_detail.m3.error).
Both attempts of a real run timed out at 300 s while the agent was still
using its skills; at 900 s it finished in one attempt.
A run whose later M3 failed still shows the earlier cycle's hypotheses;
the M3 page and brief now say the cards come from an earlier cycle
instead of claiming none were proposed. Also test the limit notice
through the claude_code stream renderer.
jiaq-liu
jiaq-liu previously approved these changes Nov 20, 2026
@evalvitals
evalvitals merged commit 67f5a84 into main Nov 20, 2026
10 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.

3 participants