Skip to content

benchmarks: add triplewise-empty extremal proof audit - #413

Open
yuelgrace1810-ops wants to merge 3 commits into
mainfrom
agent/harbor-triplewise-empty-extremal
Open

benchmarks: add triplewise-empty extremal proof audit#413
yuelgrace1810-ops wants to merge 3 commits into
mainfrom
agent/harbor-triplewise-empty-extremal

Conversation

@yuelgrace1810-ops

Copy link
Copy Markdown
Collaborator

Summary

Adds one independent Hard-provisional Regression benchmark, triplewise-empty-extremal-audit, from Xerv-AI/GRAD train row 59 at immutable revision 71595210590450202b7b69225bc07e9e01b13c5c (MIT).

The source answer claims an extremal size of 2n. The task requires repairing that argument by:

  • constructing optimal families for odd and even ground-set sizes;
  • verifying the triplewise-empty condition;
  • binding a general incidence-budget upper bound; and
  • matching it with 1+n+floor(n/2).

Curation

  • Family: Regression
  • Primary objective: proof repair via extremal construction plus incidence upper bound
  • Quality score: 88/100
  • Difficulty: Hard (provisional)
  • Shortcut audit: the frozen public answer is incorrect; copying it fails. Tiny witnesses are prevented by the three required probes n=7,8,11, and alternative maximum matchings are accepted.
  • Portfolio contribution: adds extremal-set-system proof repair; it does not duplicate the existing optimization, symbolic identity, proof-state, counterexample, or finite-search workflows.

Verification boundary

The verifier independently reconstructs every submitted family, checks distinctness and exact triple intersections, checks element frequencies and the incidence budget, and validates the general typed certificate. Assurance is capped at COMPUTED; no proof-assistant theorem is claimed.

Validation

  • Harbor sync and selected-task contracts: pass
  • Focused tests: 2 passed
  • Ruff lint and format: pass
  • git diff --check: pass
  • Broad Harbor validation: 1,612 passed; one unrelated jcb-postdoc-019 host-contention failure passed immediately in isolated rerun
  • Docker Desktop: Client/Server healthy (29.6.2; Desktop 4.84.0)
  • Native Harbor 0.20 exact Oracle: blocked before container creation by the known macOS network_mode='no-network' provider-detection rejection
  • Direct offline task and verifier image execution with --network none: full applicable reward 1.0

The required GitHub Linux exact-task Oracle must pass before this draft is considered complete.

@morluto
morluto marked this pull request as ready for review August 4, 2026 06:31

@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: a3034f51b8

ℹ️ 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".

for item in family
):
return False
if any(value < 0 or value >= n for item in family for value in item):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject non-integer and non-finite set elements

When a submission replaces the empty set in each otherwise valid construction with [NaN], Python's json.loads accepts the token and both range comparisons here evaluate false, so valid_family returns true even though NaN is not an element of any submitted ground set; the verifier can consequently award full reward to invalid mathematical witnesses. Require type(value) is int before applying the range check, which also prevents integral floats from bypassing the schema's integer requirement.

AGENTS.md reference: AGENTS.md:L111-L112

Useful? React with 👍 / 👎.

Comment on lines +74 to +75
contract
and "distinct subsets" in folded

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 scope text that negates the required scope

When an otherwise valid submission uses a scope such as does not cover distinct subsets with triplewise empty intersection, both substring tests pass, so scope_accuracy is reported as 1 and the submission receives full reward despite explicitly disclaiming the task's scope. Compare against a canonical scope or use structured, clause-aware scope fields instead of rewarding keyword presence.

Useful? React with 👍 / 👎.

Comment on lines +132 to +133
and isinstance(submission.get("limitations"), list)
and all(type(item) is str for item in submission.get("limitations", []))

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 Require at least one disclosed limitation

When limitations is an empty list, all(...) is vacuously true and the contract still passes, allowing full reward even though the agent-visible schema requires minItems: 1. Enforce nonempty cardinality here so submissions cannot omit the limitation that communicates the finite-check and general-proof boundary.

Useful? React with 👍 / 👎.

math_correct = False
try:
certificate = result["upper_bound_certificate"]
constructions = {item["n"]: item["family"] for item in result["constructions"]}

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 extra or duplicate construction probes

When a submission appends a fourth construction whose n duplicates one of the three canonical probes, this dictionary comprehension silently overwrites that entry; the resulting key set and families still pass, so the verifier awards full reward despite the public schema's maxItems: 3 contract. Validate that the raw construction list has exactly three entries with unique n values before converting it to a dictionary.

Useful? React with 👍 / 👎.

Comment on lines +68 to +70
and evidence_list_is_bound(
data.get("evidence"), expected_path="evidence/answer.txt"
)

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 Verify the mathematical content of the evidence file

When an agent writes an empty or unrelated evidence/answer.txt and updates its descriptor digest, this call still marks evidence_validity true because it checks only the path and hash; with a valid typed result, the submission receives full reward without supplying any inspectable proof-repair evidence. Either document and validate semantic obligations for this file or remove it from the reward-bearing evidence contract.

AGENTS.md reference: AGENTS.md:L18-L20

Useful? React with 👍 / 👎.

Comment on lines +170 to +173
if not target.is_relative_to(root) or not target.is_file():
return None
try:
if descriptor["sha256"] != sha256_uri(target):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Bound evidence files before hashing them

When evidence/answer.txt is an enormous sparse regular file, even a deliberately wrong digest makes the verifier stream the entire file before rejecting it because this path has no size check. An agent can therefore exceed the 120-second verifier budget and prevent reward.json from being emitted without consuming equivalent physical storage; apply a bounded regular-file check before calling sha256_uri.

Useful? React with 👍 / 👎.

@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: aea673230b

ℹ️ 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".

@@ -0,0 +1,4 @@
FROM python:3.12-slim@sha256:57cd7c3a7a273101a6485ba99423ee568157882804b1124b4dd04266317710de
WORKDIR /app
COPY input.json /app/input.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Copy the submission schema into the agent image

The environment Dockerfile copies only input.json, so the evaluated agent cannot access submission_schema.json; the instruction also omits the required /app/submission.json path and envelope names such as SOURCE_BOUND_REPAIRED and upper_bound_certificate. Outside the Oracle, an agent therefore has no visible way to discover the verifier's required output contract. Copy the schema into /app and state the output and evidence paths in the instruction.

AGENTS.md reference: AGENTS.md:L141-L144

Useful? React with 👍 / 👎.

TESTS = Path("/tests")
MAX_SUBMISSION_BYTES = 16 * 1024 * 1024
MAX_INPUT_BYTES = 16 * 1024 * 1024
MAX_EVIDENCE_BYTES = 16 * 1024 * 1024

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Synchronize the canonical verifier support change

Adding MAX_EVIDENCE_BYTES changes the canonical helper, but this commit updates only the new task's vendored copy. Running python tools/sync_harbor_verifier_support.py --check on the reviewed tree reports drift for all 133 pre-existing task bundles, so the benchmark contract gate fails and those verifier images retain the old unbounded evidence handling. Run the repository sync and include every generated copy.

AGENTS.md reference: AGENTS.md:L141-L144

Useful? React with 👍 / 👎.

Comment on lines +53 to +54
contract
and result["maximum_formula"] == "1+n+floor(n/2)"

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 Decouple mathematical correctness from envelope validity

When the submitted construction is mathematically correct but an unrelated envelope field is malformed—for example, evidence is missing or limitations has the wrong shape—strict_submission_contract makes contract false and this condition reports correctness: 0. The resulting diagnostics cannot distinguish a protocol failure from wrong mathematics, even though aggregate reward may still fail closed; validate the result's mathematical structure independently and apply the full envelope contract only at the aggregate boundary.

AGENTS.md reference: AGENTS.md:L111-L112

Useful? React with 👍 / 👎.

Comment on lines +50 to +51
certificate = result["upper_bound_certificate"]
constructions = {item["n"]: item["family"] for item in result["constructions"]}

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 undeclared fields inside the result

An otherwise canonical submission can add arbitrary properties to result or to each construction object and still receive reward 1, because the verifier reads only the named fields and never checks either object's key set. This contradicts both additionalProperties: false declarations in the submission schema and allows contradictory or malformed claim data to accompany an accepted witness; validate the exact nested object shapes before constructing the lookup.

AGENTS.md reference: AGENTS.md:L141-L144

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.

2 participants