Skip to content

feat(tier3): make evidence bundle budgets and final response limit configurable - #160

Merged
chrisknvidia merged 10 commits into
NVIDIA:mainfrom
kweinmeister:feat/configurable-behavior-evidence-limits
Oct 1, 2026
Merged

chrisknvidia merged 10 commits into
NVIDIA:mainfrom
kweinmeister:feat/configurable-behavior-evidence-limits

Conversation

@kweinmeister

Copy link
Copy Markdown
Contributor

Summary

Makes Tier 3 LLM judge evidence bundle character budgets and the behavior check final response limit configurable via environment variables while preserving existing default values:

  • SKILL_EVAL_ACCURACY_BUDGET (default: 8000)
  • SKILL_EVAL_GOAL_ACCURACY_BUDGET (default: 12000)
  • SKILL_EVAL_BEHAVIOR_CHECK_BUDGET (default: 8000)
  • SKILL_EVAL_BEHAVIOR_FINAL_RESPONSE_LIMIT (default: 800)

When evaluating complex or multi-step skill runs with detailed final synthesis outputs, the fixed 800-character final response cap and 8,000-character evidence bundle budget in compile_behavior_evidence_bundle can truncate architectural details, tables, or late verification outputs before they reach the Tier 3 LLM judge, leading to false negatives in behavior_check and goal_accuracy evaluations.

This change:

  • Parses positive integer environment variable overrides with fallback to existing defaults across atif_helpers.py, llm_judge.py, and Harbor's eval.py template.
  • Automatically reconciles final response limits with total bundle budgets (max_final_response = max(800, max_chars - 2000)) to reserve at least 2000 characters for tool call history and prevent tool evidence starvation.
  • Dynamically scales the trajectory compactor threshold (max(800, final_response_limit)) in harbor/adapter.py so final responses are not pre-clipped before compile_behavior_evidence_bundle processes them.
  • Forwards SKILL_EVAL_*_BUDGET and SKILL_EVAL_BEHAVIOR_FINAL_RESPONSE_LIMIT into Harbor verifier containers in harbor/runner.py.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

…nfigurable

Allow customizing judge evidence bundle budgets and limits via:
- SKILL_EVAL_ACCURACY_BUDGET (default 8000)
- SKILL_EVAL_BEHAVIOR_CHECK_BUDGET (default 8000)
- SKILL_EVAL_BEHAVIOR_FINAL_RESPONSE_LIMIT (default 800)
- SKILL_EVAL_GOAL_ACCURACY_BUDGET (default 12000)

Features automatic tool history headroom reconciliation between final
response limits and total bundle budgets to prevent tool history starvation,
dynamic compactor threshold alignment to ensure late responses are not
clipped before reaching the LLM judge, alphabetical verifier environment
forwarding in Harbor container runs, and matching Harbor eval template logic.

Signed-off-by: Karl Weinmeister <[email protected]>
Signed-off-by: Karl Weinmeister <[email protected]>

# Conflicts:
#	CHANGELOG.md
Signed-off-by: Karl Weinmeister <[email protected]>

# Conflicts:
#	CHANGELOG.md

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@kweinmeister The configurable limits are useful, but an explicit behavior budget can lose all tool evidence when paired with a large final-response limit. Please address the inline reproduction in both implementations before approval.

Local validation: 581 focused tests passed across evidence compilation, judge behavior, verifier forwarding, adapter safety, and verified facts; Ruff passed. The separate reproduction exposes a case not covered by those tests. CI, Security, and DCO workflows currently report action_required, awaiting workflow approval; there is no failing job to repair yet.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@kweinmeister Thank you for your contribution and the headroom fix. I verified and resolved the original tool-history finding. The two later findings remain reproducible: verified facts can cause the behavior judge to lose final-response content, and small accuracy/goal budgets can drop the final response entirely. Follow-ups are in the existing threads.

Local validation: 94 focused tests passed, plus independent host/verifier reproductions and captured judge requests; changed-production-file Ruff passed. GitHub reports all 17 CI checks passing and no merge conflicts. These evidence-loss cases still need fixes before approval.

@kweinmeister

Copy link
Copy Markdown
Contributor Author

@rng1995 @chrisknvidia Thanks for the detailed reproductions! I've merged in the latest main and pushed fixes for both remaining issues across the host modules and the bundled Harbor template:

  1. Preserving the final response when verified facts are present: Behavior bundle assembly now deducts the verified facts overhead from the budget and reserves space for the final response (keeping omitted.truncated accurate), and the behavior compactor preserves the final response section intact rather than slicing through it.
  2. Retaining a final-response excerpt under small metric budgets: Section assembly for accuracy and goal accuracy now clips an oversized final response to fit within small budgets instead of dropping the section completely.

Added regression tests for both scenarios verifying the actual prompts sent to the judges in both implementations.

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 335ed65. The earlier verified-facts/final-response and small-budget findings are fixed. I added the focused follow-up limiting forced section clipping to final responses in both implementations, plus eight regression cases; tool-only runs now retain recent failed verification results as on main.

Verification: all 21 evidence-compiler tests passed; independent code review found no issue in the focused delta; 20 host and 20 Docker verifier cases passed across OpenAI and Anthropic protocol stubs, with 120 captured HTTP requests and checked reward outputs. This also rechecked the prior fixes and budget combinations. Changed-file Ruff passed. Credentialed real-provider E2E was unavailable.

No remaining code finding from this review. The required GitHub checks must finish successfully before merge.

@chrisknvidia

Copy link
Copy Markdown
Collaborator

@kweinmeister : Thanks for the contribution. Appreciate the interest towards this project.
Looks good to me now, Approving this PR.

@chrisknvidia
chrisknvidia dismissed stale reviews from rng1995 and rng1995 October 1, 2026 10:41

Dismissed with maintainer authorization: the requested changes are addressed at 335ed65, all associated review threads are resolved, the current head is approved, and all 17 GitHub checks pass. Preparing the authorized squash merge.

@chrisknvidia
chrisknvidia merged commit a045b13 into NVIDIA:main Oct 1, 2026
17 checks passed
chrisknvidia added a commit that referenced this pull request Oct 1, 2026
Bring in #160 (configurable evidence bundle budgets and final response
limit).

Conflict in CHANGELOG.md: both sides added to Unreleased > Added. Keep
every plugin evaluation entry and add the #160 entry at the end of the
Added list. The code changes in llm_judge.py, atif_helpers.py,
adapter.py, runner.py and templates/eval.py merged without conflicts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
chrisknvidia added a commit that referenced this pull request Oct 1, 2026
The accuracy, goal accuracy and behavior judges now see write-tool
content under every harness's argument names (for example OpenCode
patchText), instead of a silent 200-character cut. Long text keeps its
start and end around a visible truncation marker, budgets are filled by
priority so the final answer, the skill call, test results and the latest
write to each path survive, and judge text is redacted. The configurable
evidence budgets from #160 drive this logic. Host and verifier copies stay
identical, and the verifier runs on Python 3.9 and 3.11 (CI smoke added).

Also update the docs, the changelog and the Gitleaks allowlist for
synthetic test fixtures.

Co-authored-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
chrisknvidia added a commit that referenced this pull request Oct 1, 2026
The accuracy, goal accuracy and behavior judges now see write-tool
content under every harness's argument names (for example OpenCode
patchText), instead of a silent 200-character cut. Long text keeps its
start and end around a visible truncation marker, budgets are filled by
priority so the final answer, the skill call, test results and the latest
write to each path survive, and judge text is redacted. The configurable
evidence budgets from #160 drive this logic. Host and verifier copies stay
identical, and the verifier runs on Python 3.9 and 3.11 (CI smoke added).

Also update the docs, the changelog and the Gitleaks allowlist for
synthetic test fixtures.

Co-authored-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
rng1995 added a commit that referenced this pull request Oct 5, 2026
…ue-79-harbor-upgrade

Bring the Harbor upgrade up to date with main (v0.4.0 and later).

Conflict resolutions:
- Case identity: the runner's trusted selector map stays authoritative.
  Main's staged-task resolver (#161) applies only to callers without a map,
  where task_id.path now outranks task_name. Grader-authored rewards can no
  longer set collector-owned identity flags.
- Agent import paths: only the OpenAI-compatible gateway Codex wrapper
  (#152) may run on Harbor-native cloud backends. It is passed through
  Harbor's unified --agent selector, not the deprecated --agent-import-path.
- Verifier env: under standard grading, native tasks still may not author
  judge retry or evidence-budget values (#145, #160). Operators stage them as
  ${NAME} placeholders, which are forwarded with the other provider controls.
- Native task TOML edits stay structural and Harbor-validated; main's
  line-based helpers are removed.
- Redaction keeps main's linear-time private-key handling and terminal-control
  stripping plus the PR's URI userinfo masking. Whole environment values
  shorter than four characters are no longer exact secrets, so flags such as
  "1" cannot erase counts in result summaries; short URI userinfo fragments
  are still redacted.
- The tier3 workflow (#152) forwards --environment-kwarg to preflight and
  defers remote ack and openshift checks. Parallel catalog children forward
  --environment-kwarg.
- CHANGELOG: the PR's entries move back under Unreleased.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
chrisknvidia added a commit that referenced this pull request Oct 30, 2026
…nfigurable (#160)

* feat(tier3): make evidence bundle budgets and final response limit configurable

Allow customizing judge evidence bundle budgets and limits via:
- SKILL_EVAL_ACCURACY_BUDGET (default 8000)
- SKILL_EVAL_BEHAVIOR_CHECK_BUDGET (default 8000)
- SKILL_EVAL_BEHAVIOR_FINAL_RESPONSE_LIMIT (default 800)
- SKILL_EVAL_GOAL_ACCURACY_BUDGET (default 12000)

Features automatic tool history headroom reconciliation between final
response limits and total bundle budgets to prevent tool history starvation,
dynamic compactor threshold alignment to ensure late responses are not
clipped before reaching the LLM judge, alphabetical verifier environment
forwarding in Harbor container runs, and matching Harbor eval template logic.

Signed-off-by: Karl Weinmeister <[email protected]>

* fix(tier3): preserve tool-history headroom for explicit behavior budgets

Signed-off-by: Karl Weinmeister <[email protected]>

* fix(tier3): preserve final response across verified facts and small metric budgets

Signed-off-by: Karl Weinmeister <[email protected]>

* fix(tier3): retain verification evidence in tool-only trajectories

Signed-off-by: Christopher Kevin <[email protected]>

---------

Signed-off-by: Karl Weinmeister <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Co-authored-by: Narendran Raghavan <[email protected]>
Co-authored-by: Christopher Kevin <[email protected]>
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