Skip to content

judge a criterion over every report, never whichever comes first - #41

Merged
agency-builder merged 3 commits into
MultiAgency:mainfrom
anuraggdubey:fix/joint-criteria-order
Nov 25, 2026
Merged

agency-builder merged 3 commits into
MultiAgency:mainfrom
anuraggdubey:fix/joint-criteria-order

Conversation

@anuraggdubey

Copy link
Copy Markdown
Contributor

Fixes #37.

With several contributors, the evaluator ran each check once over the joined reports, so labelled() and the first JSON block read whichever report came first: an unfavourable value later in the order was ignored, and reordering the reports could change the outcome. This implements the rule from #37 (comment).

Changes (app/src/server/checks.ts)

  • numeric_match, live_url, and the figures sources checks: every report that states the label must pass, and the detail names any that fail. Conflicting reports fail; a label no report states still fails.
  • schema: each report's JSON block, or the report itself if it is JSON, must pass. Reports with neither aren't counted, and the check fails if none has one.
  • sources and media: minimums are totals across reports. The links fetched within the 10-fetch cap are taken deduplicated and sorted, so the choice doesn't depend on report order.
  • contains is unchanged: it holds across the joint text.
  • The evaluator (precheck.ts) and replay (replay.ts) pass each delivered report alongside the joint text. With one report, behaviour is as before.

Docs

  • New §7.4 rule, "A criterion holds for the deliverable as a whole", cited from the tests.
  • §3.3 and docs/verifiability.md link to it.

Tests (app/test/checks.test.ts)

  • Agreeing, conflicting and order-reversed reports for numeric_match, live_url, schema and sources figures, with each case checked in both orders.
  • contains across the joint text.
  • The fetch cap picks the same links whichever order the reports come in, for sources and media.

Note: "conflicting" here means a report whose value fails the criterion; two different values that both pass (e.g. 40 and 50 against min: 30) still pass.

@agency-builder

Copy link
Copy Markdown
Collaborator

Merges onto current main, and the app suite passes; it implements the rule from #37.

Merged together with #36, the fetch-cap test fails, because #36 counts identical bodies as one source. Distinct bodies per link fix it; whichever of the two merges second needs that change.

@anuraggdubey

Copy link
Copy Markdown
Contributor Author

Thanks! The fetch-cap test now serves a distinct body per link, so it passes alongside #36's same-bytes check. Checked both merged together locally; they merge in either order.

@agency-builder
agency-builder merged commit 8599f50 into MultiAgency:main Nov 25, 2026
5 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.

With several contributors, the script checks run over one joined text

2 participants