Skip to content

docs(tuning): fix env contract, rewrite stale README, document precedence; honest auto-mode message#1178

Open
joeharris76 wants to merge 1 commit into
developfrom
docs/tuning-env-contract
Open

docs(tuning): fix env contract, rewrite stale README, document precedence; honest auto-mode message#1178
joeharris76 wants to merge 1 commit into
developfrom
docs/tuning-env-contract

Conversation

@joeharris76

Copy link
Copy Markdown
Owner

Pull Request

Description

Implements TODO tuning-docs-env-contract-fixes-20260712 (review finding R5 — the broken docs/env contract):

  • BENCHBOX_TUNING_ENABLED deleted — it set a config key nothing at runtime reads, while docs claimed it "activates tuned runs in CI". Both override mechanisms removed, doc claims fixed, CHANGELOG entry added.
  • examples/tunings/README.md rewritten against reality — the documented --tuning-config flag and example scripts never existed; now documents --tuning, the real template layout, auto-discovery as the primary UX, BENCHBOX_TUNING_PATH, and drops the unqualified "2-10x" claim.
  • Precedence finally documented (docs/reference/cli/tuning.md) — the full resolution order (default notuning → keywords → explicit path → default_config_file/BENCHBOX_TUNING_CONFIGBENCHBOX_TUNING_PATH → cwd-relative discovery → fallback), every rule re-verified against current code; the cwd-relative discovery caveat for installed-package users; tuning list/show/platforms documented (including that tuning list does not honor BENCHBOX_TUNING_PATH); corrected --output default.
  • --tuning auto honesty — SQL runs now get an explicit warning that smart defaults are DataFrame-only and the run proceeds with a basic config (message-only; behavior change stays gated on the vocab TODO).

Moves the TODO to DONE.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor / chore

Testing

  • Targeted suites 174 passed (resolution, config coverage, run-command branches/interactive); post-review re-run 50 passed; make lint and make docs-validate passing; repo-wide grep for the deleted env var returns empty
  • Opus review: NO FINDINGS — every precedence rule, README reference, and the warning gate verified against current code (one cosmetic vestigial-branch nit noted, intentionally left)

Public Contract Check

  • Env-var removal is a user-facing contract change — documented in CHANGELOG and both config docs; the variable never functioned, so no behavior regresses.
  • Contract-map impact checked — none beyond the documented removal.
  • No count claims added.

Documentation

  • Four docs files updated; all claims code-anchored.
  • Regression note in CHANGELOG for the env-var removal.
  • API wording accurate.

Code Quality

  • Lint/docs-validate clean; suites green.
  • BENCHBOX_TUNING_CONFIG/BENCHBOX_TUNING_PATH behavior untouched (verified).
  • Tests updated where they pinned the dead plumbing.
  • Contracts valid.

Artifact Hygiene

  • No raw artifacts.
  • No binary evidence files.

Notes

Scope note: CHANGELOG.md is one file beyond the TODO's only_modify — the TODO's w1 explicitly calls for a release note.

Part of the tuning remediation batch (#1161).

🤖 Generated with Claude Code

https://claude.ai/code/session_01QTnjb2i44JUL71kmu9sk1t


Generated by Claude Code

…ence; honest auto-mode message

Re-verified the 2026-07-12 tuning review findings (R5) against HEAD
(post-#1172 resolver hints/keyword-first fixes) before implementing:

- w1: BENCHBOX_TUNING_ENABLED set config key tuning.enabled, which nothing
  at runtime read except a unit test. Removed both env-var mapping
  mechanisms (module-level env_mappings dict and the ConfigManager
  default's environment_overrides entry) from benchbox/cli/config.py, the
  dead "enabled" default key, and the false "activates tuned runs in CI"
  doc claims in docs/usage/configuration.md and
  docs/reference/cli/configuration.md. BENCHBOX_TUNING_CONFIG and
  BENCHBOX_TUNING_PATH behavior is unchanged. Added a CHANGELOG entry.
- w2: rewrote examples/tunings/README.md - the real flag is --tuning (not
  --tuning-config), the named example scripts don't exist (pointed at the
  real examples/unified_runner.py and
  examples/features/tuning_comparison.py instead), file layout matches
  examples/tunings/<platform>/<benchmark>_tuned.yaml, auto-discovery via
  --tuning tuned is the primary UX, and dropped the unqualified "2-10x"
  performance claim.
- w3: documented the actual --tuning resolution order in
  docs/reference/cli/tuning.md (default notuning -> keyword check before
  path check -> tuned's default_config_file/BENCHBOX_TUNING_CONFIG beats
  discovery -> BENCHBOX_TUNING_PATH -> cwd-relative examples/ -> cwd ->
  fallback with warning), the cwd-relative caveat for installed-package
  users, the tuning list/show/platforms subcommands, and the correct
  --output default (<platform>_tuning.yaml / DataFrame's
  <platform>_<profile>_tuning.yaml, not tuning_config.yaml).
- w4: --tuning auto now warns explicitly on SQL platforms that smart
  defaults are DataFrame-only today and the run proceeds with a basic
  config, instead of silently building an untuned config while claiming
  smart defaults were applied. Message change only, no behavior change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QTnjb2i44JUL71kmu9sk1t
@joeharris76 joeharris76 enabled auto-merge (squash) July 16, 2026 03:27

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

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

Comment on lines +1029 to +1030
"[yellow]Warning: --tuning auto smart defaults are DataFrame-only today; "
"this SQL run proceeds with a basic (untuned) configuration.[/yellow]"

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 Don't call SQL auto runs untuned

When --tuning auto is used on SQL platforms, this branch sets s.loaded_unified_config = UnifiedTuningConfiguration() while s.tuning_enabled remains true; that default enables PK/FK/unique/check constraints and is passed to adapters as tuning. The new warning says the run is “untuned”, so users comparing against --tuning notuning can unknowingly run a constraints-enabled configuration. Please either disable all constraints here or describe this as a constraints-only/basic configuration rather than untuned.

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