Skip to content

Prevent persisted run history for unknown commands#1691

Merged
codeforester merged 1 commit into
mainfrom
bug/1690-20260719-no-invalid-run-history
Jul 19, 2026
Merged

Prevent persisted run history for unknown commands#1691
codeforester merged 1 commit into
mainfrom
bug/1690-20260719-no-invalid-run-history

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Fixes #1690

What changed

  • Validate the top-level basectl command before initializing persistent run bundles.
  • Keep the existing usage error and exit code for unknown commands without writing run.json, primary.log, or history.
  • Preserve run bundles for recognized commands that fail during leaf validation, environment checks, or execution.
  • Document the accepted-invocation boundary in the observability guide.

Root cause

The dispatcher initialized the run bundle before its final command case rejected unknown commands, so invalid invocations were recorded as failed runs.

Validation

  • Focused runtime-dispatch.bats: 27 passed.
  • Full Python suite: 1,019 passed, 1 skipped.
  • Real CLI smoke check confirms basectl invalid exits 2 and creates no cache state.
  • ShellCheck and git diff --check pass.

@codeforester
codeforester marked this pull request as ready for review July 19, 2026 21:38
@codeforester
codeforester requested a review from a team as a code owner July 19, 2026 21:38
@codeforester
codeforester merged commit 7d89ada into main Jul 19, 2026
28 checks passed
@codeforester
codeforester deleted the bug/1690-20260719-no-invalid-run-history branch July 19, 2026 21:38
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.

Avoid persisted run history for unknown basectl commands

1 participant