Skip to content

Introduce CheckRunOptionBundle and centralize check run / delta-bundle option handling#404

Open
mikemol wants to merge 2 commits intostagefrom
codex/create-checkrunoptionbundle-dataclass
Open

Introduce CheckRunOptionBundle and centralize check run / delta-bundle option handling#404
mikemol wants to merge 2 commits intostagefrom
codex/create-checkrunoptionbundle-dataclass

Conversation

@mikemol
Copy link
Copy Markdown
Owner

@mikemol mikemol commented Mar 6, 2026

Motivation

  • Reduce duplicated ad-hoc argument validation/assembly across check run and check delta-bundle command handlers by reifying the recurring option bundle as a typed dataclass and a small Decision Protocol.

Description

  • Add CheckRunOptionBundle dataclass to capture shared analysis/ASPF/lint/gate/baseline/status-watch inputs in src/gabion/cli_support/check/check_commands.py.
  • Add CheckRunDecisionProtocol and CheckRunDecisionResolution to centralize baseline-mode validation and status-watch option assembly.
  • Add _check_run_runtime_kwargs_from_bundle(...) to convert the shared bundle into the single runtime kwargs surface consumed by the runtime run_check_command_fn.
  • Refactor register_check_run_command and register_check_delta_bundle_command to build one shared CheckRunOptionBundle, then map through the converter, with the delta-bundle path applying small explicit overrides (baseline disabled, gate=none, lint_mode=none).
  • Add a CLI contract test test_check_run_and_delta_bundle_shared_option_parity_and_overrides in tests/gabion/cli/cli_check_surface_edges_cases.py asserting parity of shared flags and expected delta-bundle overrides.
  • Refresh out/test_evidence.json to record the updated test-evidence mapping after the new test surface.

Testing

  • Ran the policy checks with PYTHONPATH=src:. python scripts/policy/policy_check.py --workflows which completed successfully after environment fallback (note: an initial mise exec attempt failed due to local mise.toml trust/toolchain resolution and was not used).
  • Ran the ambiguity policy check with PYTHONPATH=src:. python scripts/policy/policy_check.py --ambiguity-contract which succeeded.
  • Executed the focused CLI tests with PYTHONPATH=src:. python -m pytest -o addopts='' tests/gabion/cli/cli_check_surface_edges_cases.py -q and observed 32 passed.
  • Extracted test evidence with PYTHONPATH=src:. python -m scripts.misc.extract_test_evidence --root . --tests tests --out out/test_evidence.json and committed the refreshed out/test_evidence.json artifact.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant