refactor(examples): coding-benchmark consumes the agent-eval hidden-criteria grader port#381
Merged
Merged
Conversation
…riteria grader port Bump the agent-eval devDependency to >=0.100.0 and rewire the coding-benchmark example off its hand-rolled firewall + blend onto the published domain-agnostic hidden-criteria grading port: - scenarios.ts: declare each field's destination (agent-visible / develop-against / grading-only / judge-only) and project a scenario into the substrate's RoutedField[] via routeFields (routeCodingFields). - dispatch.ts: the firewall is now ENFORCED, not a comment — assertNoHiddenLeak runs each round against the assembled agent context (a grading-only/judge-only value in-context throws), and grading goes through gradeOnHidden, which re-asserts the firewall on the real run context before seeding + running the held-out suite. - eval.ts: the node --test executor is the domain HiddenCriteriaGrader (nodeTestGrader); composeScore delegates to blendHeldout; the JudgeConfig blend wrapper delegates to withHeldoutBlend; hiddenGrade normalizes the honest-zero no-run. The local HeldoutResult is the substrate HiddenGradeResult. The anti-cheat still holds by execution: the hardcode-the-visible cheat scores held-out 2/4 -> composite 0.59; the real token-bucket scores 4/4 -> composite 0.94 (judge held at 0.80). A new regression test proves the firewall throws when the held-out suite or rubric note leaks into the agent context. product-eval shares nothing with this bench beyond runProfileMatrix (no firewall, no held-out, no blend), so a defineBenchmark skeleton is deferred — documented in the README with the second-benchmark trigger that should unlock it.
tangletools
approved these changes
Jun 24, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved PR — e947344d
Blanket team auto-approval is enabled for this reviewer service.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-06-24T18:31:35Z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bumps the
@tangle-network/agent-evaldevDependency to>=0.100.0and rewiresexamples/coding-benchmarkoff its hand-rolled firewall + blend onto the newly published domain-agnostic hidden-criteria grading port (hidden-criteria-grading.ts). This both dedups the example and proves the port on a real benchmark.The port, consumed (PART A)
dispatch.ts(zero enforcement)routeFields(field routing by destination) +assertNoHiddenLeak(throws on a leak), re-asserted at grading viagradeOnHiddenrunHeldoutinline pass-rate + notesnode --testexecutor is the domainHiddenCriteriaGrader(nodeTestGrader), normalized byhiddenGrade(honest-zero on no-run)composeScorearithmeticblendHeldout(renormalized weights, clamped inputs)blendHeldoutJudgeConfigwrapperwithHeldoutBlendHeldoutResultinterfaceHiddenGradeResultThe
node --testexecution stays coding-local — it's plugged in as the domain grader.scenarios.ts(the corpus + visible/held-out tests),offline-box.ts, andstats.tsare unchanged.Anti-cheat still holds — by execution
Verified through the port path:
A hardcode-the-visible cheat passes the visible tests but fails the held-out suite it never saw; the real token-bucket passes. A new regression test proves the firewall throws when the held-out suite or rubric note leaks into the agent context (clean context passes).
defineBenchmarkskeleton — deferred (PART B)A thin
defineBenchmarkskeleton was considered and deliberately not built. The only other benchmark (examples/product-eval) shares nothing with this one beyondrunProfileMatrixitself (already a one-line substrate call) — no held-out split, no firewall, no blend (it scores a transcript with a trivial count). A shared skeleton would have zero common logic to dedup and force two unrelated shapes under a premature abstraction. The deferral, its right home (@tangle-network/agent-runtime, not an example), and the second-benchmark trigger that should unlock it are documented in the README.Verify (offline, no creds)
pnpm install --frozen-lockfile(CI gate) — green; lockfile pinsagent-eval@0.100.0pnpm run build— greenpnpm run typecheck(src + examples) — 0 errorspnpm run lint— 0 errorspnpm run docs:check— green (catalog version-pin regenerated to 0.100.0)pnpm test— 117 files / 1131 passed / 2 skipped / 0 failed