You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WCXB metric binding hashes source text instead of behaviour #116
src/harness/web_fetch/wcxb_scoring.py:62 binds the WCXB metric by hashing the inspect.getsource() text of word_f1 and snippet_check. That fails in both directions:
Changes that do not affect scores break the binding. Running ruff format (planned in Extend lint coverage to the whole repository and enforce a formatter #89), editing a docstring or a comment, or adding a decorator changes the hash. Scoring, latency collection and certification then fail with WCXB metric implementation binding mismatch.
Changes that do affect scores can pass unnoticed. Edits to helpers called by those functions, but not inspected, change scores without changing the binding.
Fix
Move the metric and every helper it uses into a dedicated module (e.g. wcxb_metrics.py).
Bind the file bytes of that module, or its normalized AST, in wcxb-metric-bindings.json.
Add golden-case behaviour tests: fixed inputs with their expected scores, kept identical to the upstream evaluator.
Found while reviewing #81. Blocks the formatter stage of #89.
Activity