Skip to content

fix(benchmark): preserve unknown costs and reject invalid passes - #204

Merged
lg2m merged 3 commits into
mainfrom
fix/eng-950-harbor-summary
Sep 26, 2026
Merged

lg2m merged 3 commits into
mainfrom
fix/eng-950-harbor-summary

Conversation

@integrate-your-mind

Copy link
Copy Markdown
Collaborator

What changes for users

Harbor cross-harness summaries now keep missing/null pricing unknown instead of reporting it as zero. Derived cost-per-attempt/pass is withheld when any trial has unknown cost; explicit zero remains known. Exception-bearing trials cannot count as passes, and malformed rewards/costs and overflowing totals reject instead of producing misleading results. Empty job directories produce a zero-trial row.

Why / design

Linear: ENG-950, ENG-957 (bounded reporting prerequisite under ENG-809).
Slice: supervised-delegation D6a.1, instrument correction under D6.

Changed files: benchmarks/harbor/compare/summarize.sh, test-summarize.sh, its README.md, and docs/plans/progress/supervised-delegation.md.

These are synthetic parser controls, not competitor results, model trials, evaluator-isolation evidence, or proof of complete supplier costs. Paid D6b measurements remain outside this change.

How verified

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo build --workspace
  • cargo test --workspace --no-fail-fast -- --test-threads=1: 1,908 passed, 0 failed, 5 intentionally ignored, exit 0 (2026-09-26 07:30:16–07:33:55 UTC).
  • Bash 3 and Bash 5 parser regressions; bash -n; ShellCheck; Git whitespace checks.
  • Minimal-provider profile not applicable: no provider source, features or manifests changed.

Full-suite run used pinned Rust 1.97.1, canonical TMPDIR, stripped inherited credentials, NO_COLOR unset, TERM=xterm-256color and COLORTERM=truecolor. Prior ambient-environment failures are retained in the delivery receipts; no Rust code or tests were weakened. The suite ran at d365a01; final head f764023 only records the outcome in the ledger. All executable source/config/tests are identical. Earlier fmt/Clippy/build passes apply to that unchanged source.

Independent non-author review approved the benchmark source and final head/tree 879e9b93d288cec90dd1589f5021e233b3c36e77, verified unchanged source blobs, and independently aggregated the raw full-suite counts. Review receipt SHA-256: 780f9914004eb5d8e5e590619871eedab12cb581dea58a54a9a678014494aa86. Raw logs, reviews and verified Git bundle are retained in the Manager delivery handoff for this unit. Hosted checks are separate and pending at creation.

Impact

  • Performance: offline summary only; no runtime hot path changed.
  • Compatibility: protocol, descriptor and store schema unchanged. Invalid report inputs now fail explicitly; output adds known-cost/unknown-count accounting.
  • Docs: comparison README documents accounting and comparison limits; required plan ledger records evidence.
  • Draft for Manager integration. No merge, deployment or paid benchmark execution requested.

@lg2m
lg2m marked this pull request as ready for review September 26, 2026 19:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T19:08:15.916783Z f764023 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lg2m
lg2m merged commit 07cc902 into main Sep 26, 2026
4 checks passed
@lg2m
lg2m deleted the fix/eng-950-harbor-summary branch September 26, 2026 19:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f764023190

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

.verifier_result.rewards.reward as $reward
| if $reward == null then false
elif (($reward | type) != "number") then error("reward must be a finite number or null")
elif ($reward | isfinite | not) then error("reward must be a finite number or null")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject NaN verifier rewards

When a result contains Python-style NaN, jq 1.7 parses it as a number and NaN | [isfinite, isnan] evaluates to [true,true]. This branch therefore falls through to $reward >= 1, reports the trial as an ordinary failure, and exits successfully, contrary to the new contract that non-finite rewards reject the input. Check isnan explicitly and add a corresponding regression fixture.

Useful? React with 👍 / 👎.

Comment on lines +20 to +21
if (( ${#files[@]} == 0 )); then
files=(/dev/null)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject inaccessible job directories

When the caller can stat a populated job directory but lacks permission to enumerate or search it, nullglob expands this pattern to zero files and the fallback reads /dev/null; the command then exits successfully with a zero-trial row. This silently turns an access failure into apparently valid benchmark data and can omit every attempted trial, whereas the previous literal unmatched glob caused jq to report an error. Distinguish an inaccessible directory from a genuinely empty one before applying the fallback.

Useful? React with 👍 / 👎.

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