Skip to content

FEAT: add DigBench benchmark integration - #21

Merged
merefield merged 19 commits into
mainfrom
feat/digbench-proof-of-concept
Aug 22, 2026
Merged

merefield merged 19 commits into
mainfrom
feat/digbench-proof-of-concept

Conversation

@merefield

@merefield merefield commented Aug 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add a typed native client for the DigBench Agent REST API with session-scoped access and safe step_index retries
  • add a bounded Codex app-server runner with scoped get_session and step dynamic tools and authoritative win detection
  • call authenticated GET /games at launch and expose every returned game through a conditional DIGBENCH suite
  • organize the built-in catalog into always-available CODEXOMETER CORE and CODEXOMETER EXTENDED suites
  • stream the complete observable game workflow into the clickable detail view: Codexometer policy, sanitized prompt, tool definitions, each redacted request/response, the concise move/state narrative, final model response, tokens, and cost
  • retain the named-game headless CLI proof of concept and support isolated benchmark API-key authentication

TUI behavior

  • the Suite selector always offers Core (the original four Easy/Moderate tasks) and Extended (the later three Hard tasks), then adds DigBench only when a token and discovered games are available
  • Scope exposes independent benchmark checkboxes for Core and Extended, game checkboxes for DigBench, and the shared model/reasoning controls
  • Run Scope executes selected tasks or games across selected compatible model/effort pairs and shows the exact trial count
  • Run All ignores the narrowed scope and executes the active suite's complete catalog across every compatible pair
  • DigBench Run Scope and Run All both require confirmation of the exact persisted remote-session count
  • each run appears in the result table before completion and remains clickable while in progress
  • the DigBench detail view makes each exchange explicit as TOOL REQUEST → TOOL RESPONSE → MOVE → STATE, while preserving the readable move/state representation and showing a workflow legend
  • Stop interrupts the active Codex turn, retains captured progress, and marks the result stopped

Safety and privacy

  • session creation is never retried because the endpoint is not documented as idempotent
  • only the most recently applied step_index is retried according to DigBench replay semantics
  • DIGBENCH_API_TOKEN is removed from the process environment before Codex starts and is retained only in memory by Codexometer
  • Codex receives only session-scoped game access; transcripts redact known identifiers even if echoed in an observation, action, error, tool payload, or final response
  • transcripts omit credentials, request headers, temporary paths, local scratch-work commands, app-server IDs, platform instructions, and Codex reasoning
  • content capture remains restricted to benchmark-created turns and is bounded to 4,096 entries of 64 KiB each and 1 MiB total per run

Validation

  • go test ./...
  • go vet ./...
  • go test -race ./...
  • go test -cover ./...
  • current DigBench OpenAPI lifecycle and session-scoped authentication rechecked against https://api.digbench.ai/api/agent/openapi.json

All DigBench HTTP and app-server integration tests use local fakes. No live remote session is created by the test suite.

@merefield merefield changed the title POC: add a single-game DigBench runner FEAT: add DigBench benchmark integration Aug 22, 2026
@merefield
merefield requested a balanced review from Copilot August 22, 2026 13:51
@merefield
merefield marked this pull request as ready for review August 22, 2026 13:51

Copilot AI 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.

🟡 Changes recommended

Timeout enforcement, secret isolation, transcript sanitization, and DigBench result handling have unresolved issues.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds DigBench as an external benchmark suite with isolated authentication, bounded transcripts, and TUI integration.

Changes:

  • Adds the DigBench REST client and Codex dynamic-tool runner.
  • Splits built-in benchmarks into Core and Extended suites.
  • Expands benchmark controls, details, authentication, documentation, and tests.
File summaries
File Description
README.md Documents suites, DigBench, authentication, and privacy.
main.go Adds DigBench CLI, discovery, and secret handling.
main_test.go Tests CLI and environment handling.
internal/ui/view.go Adds framed footer actions.
internal/ui/model.go Adds suite selection and transcript caching.
internal/ui/benchmark.go Implements suite scope, DigBench results, and details.
internal/ui/benchmark_test.go Tests new benchmark UI behavior.
internal/digbench/client.go Implements the DigBench REST client.
internal/digbench/client_test.go Tests authentication, retries, and validation.
internal/codex/digbench.go Implements the Codex-driven DigBench runner.
internal/codex/digbench_test.go Tests tool bridging, redaction, and execution.
internal/codex/client.go Stores benchmark credentials and catalog data.
internal/codex/client_test.go Extends the fake app-server authentication flow.
internal/codex/benchmark.go Adds isolated API-key login and expanded transcripts.
internal/codex/benchmark_test.go Tests isolation, planning, and environment scrubbing.
internal/codex/benchmark_tasks.go Defines benchmark suites and DigBench metadata.
Review details
  • Files reviewed: 16/16 changed files
  • Comments generated: 8
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/codex/digbench.go Resolved
Comment thread internal/codex/digbench.go Resolved
Comment thread internal/codex/digbench.go Resolved
Comment thread internal/codex/digbench.go Resolved
Comment thread main.go Resolved
Comment thread internal/ui/benchmark.go Resolved
Comment thread main.go Resolved
Comment thread internal/codex/digbench.go Resolved

Copilot AI 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.

🟡 Changes recommended

Remote-session confirmation can become inaccurate, live-detail Stop is inaccessible, and successful session responses may be discarded on body-close errors.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

internal/ui/model.go:415

  • This makes x close an open detail even while that detail is showing the active run. Because the detail overlay has no Stop control, the documented x Stop action can no longer interrupt the Codex turn without first closing the view and pressing x again. Keep x routed to Stop for a live detail (with Escape or the clickable Close action closing it), and update the detail control label/tests accordingly.
				if m.benchmarkDetail != nil {
					return m.pressFooterButton(footerButtonBenchmarkClose)
				}
				return m.pressFooterButton(footerButtonBenchmarkStop)

internal/codex/digbench.go:115

  • The remote-session confirmation is based on the UI's cached benchmarkPlan, but execution performs a fresh model discovery here. If compatibility changes between those calls (for example, a selected model gains another selected effort), selected grows and the loop creates more persisted sessions than the user confirmed. Carry the immutable confirmed choices/count into execution, or reject the run before StartSession when the revalidated trial count differs.
	plan, err := c.BenchmarkPlan(ctx)
  • Files reviewed: 16/16 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread internal/digbench/client.go Resolved
@merefield
merefield merged commit f453f3f into main Aug 22, 2026
6 checks passed
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