Skip to content

bench.docparse score refuses two parses that share a name - #363

Merged
zlareb1 merged 3 commits into
mainfrom
fix/docparse-score-unique-names
Nov 7, 2026
Merged

zlareb1 merged 3 commits into
mainfrom
fix/docparse-score-unique-names

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Why

python -m bench.docparse score a=old.jsonl a=new.jsonl accepted two parses under one name. score keys its results by name, so the second parse overwrote the first: the table printed the same column twice and the paired difference a - a read 0.000 [+0.000, +0.000], "no change" for any two parses. downstream already refuses the matching case ("two systems share a namespace").

The score branch of bench/docparse/__main__.py now stops with more than one parse is named: <names> before reading any parse.

Scope and risk

The docparse bench CLI only. No server, wire or docs change; the one documented score example uses distinct names.

Compatibility, rollout and rollback

  • Wire: none. Operator steps: none. Rollback: revert.

Tests

  • bench/test_docparse.py::test_score_refuses_two_parses_that_share_a_name: main(["score", "b=x.jsonl", "a=y.jsonl", "b=z.jsonl", "a=w.jsonl", "c=v.jsonl"]) exits with more than one parse is named: a, b. On main it went on to score and failed on the missing file; it passes here.
  • bench/test_docparse.py: 44 passed. ruff format and ruff check: clean.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass; the integration suite passes if server behaviour changed.
  • Generated files are regenerated in this PR, not by hand.
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships bumps both plugin manifests' version.
  • The frontend builds and its tests pass, if frontend/ changed.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

zlareb1 and others added 3 commits November 7, 2026 11:58
`score a=old.jsonl a=new.jsonl` ran: the scores are keyed by name, so the
second parse overwrote the first, the table printed one column twice and
the paired difference a - a read 0.000, "no change" for any two parses.

The score command now stops with "two parses share a name: a" before
scoring, as downstream already does for two systems that share a
namespace. A test in bench/test_docparse.py calls main with a repeated
name and checks the message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit e0203a4 into main Nov 7, 2026
34 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