Skip to content

test(evals): add offline verified-score contract audit - #432

Open
ericmacdougall wants to merge 5 commits into
ServiceNow:mainfrom
ericmacdougall:oss/verified-score-audit
Open

ericmacdougall wants to merge 5 commits into
ServiceNow:mainfrom
ericmacdougall:oss/verified-score-audit

Conversation

@ericmacdougall

Copy link
Copy Markdown

Why:
BrowserGym's current WebArena-Verified wrapper averages individual evaluator scores, while the official package supplies an authoritative task-level score. This adds offline evidence tooling supporting the existing fix in PR #413, without duplicating its evaluator implementation.

What:

  • Add a standalone JSON-result auditor comparing the aggregation contracts, with pinned task/version/checksum/evaluator inventories.
  • Preserve task errors and invalid-input denominators, isolate run/provenance groups, and suppress means when inputs are incomplete or invalid.
  • Include two unchanged, attributed historical upstream demo records and reproducible real-package conformance checks.

No production evaluator, dependencies or benchmark results are changed. The historical demos show zero aggregation differences. Mixed pass/fail and pass/error controls demonstrate old reward 0.5 versus official task score 0.0; these are synthetic contract checks, not a measured benchmark-wide effect or model-ranking result.

Testing:

  • python -m unittest discover -s tests/experiments -p 'test_verified_score_audit*.py' -v — 14 passed, including actual webarena-verified==1.2.3 contract tests.
  • python -m pytest tests/experiments/test_verified_score_audit.py tests/experiments/test_verified_score_audit_contract.py -q — the same 14 tests passed under normal package collection, without a custom PYTHONPATH.
  • black --config pyproject.toml --check dev/audit_verified_scores.py tests/experiments/test_verified_score_audit.py tests/experiments/test_verified_score_audit_contract.py — three files unchanged.
  • python dev/audit_verified_scores.py dev/verified_score_audit_demo/manifest.json — two valid historical records, zero changed scores, separate provenance groups.
  • Independent CLI verification checked the demo and malformed/huge-integer inputs, including exit codes, reconciled counts, suppressed means and no traceback.

Normal pytest reproduced a sibling-import collection failure before repair. The new test uses a fixed sibling path supporting both runners. Overflow, duplicate-key, incomplete-record and provenance mismatch controls are covered. No inference or live-site replay is needed for this utility.

Refs: GoodQA goodqa#16645

Eric MacDougall added 5 commits November 22, 2026 16:46
Why: Support independent validation of the existing PR413 without duplicating its evaluator fix.

What: Add bounded JSON audit tooling, pinned historical demo records, strict controls, documentation and real-package conformance checks.

Testing: python3 tests/experiments/test_verified_score_audit.py — 11 passed. python3 dev/audit_verified_scores.py dev/verified_score_audit_demo/manifest.json — exit0, 2 valid historical records in separate provenance groups, zero changes. Actual webarena-verified1.2.3 conformance remains pending the fleet broker.

Refs: GoodQA #16645
Why: Avoid pooling different model configurations or silently applying a pinned contract to future schemas.

What: Group by explicit run identity and admit only current conformance and historical demo versions. Add focused controls.

Testing: python3 tests/experiments/test_verified_score_audit.py — 11 passed; real-package conformance remains pending independent code inspection and fleet validation.

Refs: GoodQA #16645
Why: A valid JSON integer must be classified as an invalid score instead of crashing the audit.

What: Check binary membership without float conversion and cover mixed valid/huge-integer manifests including CLI exit status and suppressed means.

Testing: python3 tests/experiments/test_verified_score_audit.py — 12 passed, including 1 valid plus 1 invalid oversized-score record and CLI exit2 without traceback. Real-package validation pending.

Refs: GoodQA #16645
Why: Match repository Python formatting before final validation.
What: Format three new Python files with Black24.2.0, preserving their ASTs.
Testing: `/home/eric/.agent-harness/work/oss-contributions-01a20562/browser/venv/bin/python -m unittest discover -s tests/experiments -p test_verified_score_audit*.py -v` -> 14 tests passed at4e9817c on t2-dev with actual webarena-verified1.2.3. Black24.2.0 formatting command exit0; source-mutating broker run correctly marked unstable; ast.dump comparisons unchanged for all3files. Final frozen-source check pending.
Refs: GoodQA #16645
Why: The repository pytest package layout cannot resolve a bare sibling import that unittest directory discovery happens to allow.
What: Load the shared control module by its fixed sibling path and document focused normal pytest execution.
Testing: `/home/eric/.agent-harness/work/oss-contributions-01a20562/browser/venv/bin/python -m pytest tests/experiments/test_verified_score_audit.py tests/experiments/test_verified_score_audit_contract.py -q` -> reproduced ModuleNotFoundError at496718a with real repository dependencies, broker key1a81179a9decf259effffc861a68b4fc158831f0c16a05ccb35af01ea309b0cf. `python3 tests/experiments/test_verified_score_audit.py` -> 12 passed after repair; full focused real-package checks pending.
Refs: GoodQA #16645

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