Skip to content

fix(cli): make spec and dataset file errors actionable - #206

Merged
Birfy merged 1 commit into
mainfrom
fix/first-run-diagnostics
Oct 10, 2026
Merged

Birfy merged 1 commit into
mainfrom
fix/first-run-diagnostics

Conversation

@Birfy

@Birfy Birfy commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Closes #205.

Reproduction

Using a freshly built wheel installed into a separate Python 3.12 virtual environment, outside the checkout, agentdescent plan missing.json and a spec with a trailing comma exited 1 with raw tracebacks. Dataset JSONL decoded each physical line separately and could only report decoder line 1.

Changes

  • Translate file read/UTF-8/JSON decode failures into SpecError at the spec/dataset input boundary only.
  • Include path, decoder message, line and column; JSONL counts physical lines, including blanks.
  • Reject non-object JSON specs with a clear input error.
  • Preserve existing CLI output contracts (spec read errors on stderr, plan validation errors in the response), valid inputs, and engine behavior.
  • Add 27 regressions and recovery documentation.

Verification

  • 90 focused tests pass: tests/test_spec_file_errors.py, tests/test_evolvespec.py, tests/test_runstore_cli.py.
  • Independent review: no blockers; separately checked permissions, CRLF/CR JSONL line numbers, and unrelated RuntimeError propagation.
  • Rebuilt installed wheel: malformed/missing spec exit 2 without traceback; broken JSONL reports physical line 4; offline demo exit 0.
  • Full local suite: 3022 passed, 56 skipped, 19 known environment failures (18 nested sandbox/NETLINK_ROUTE and one Chromium PDF); no new failures or tests weakened.
  • Exact head 2931d628492847942fb32887aa6a03a6b7fe2c15: all four Python 3.9/3.10/3.11/3.12 jobs passed full tests, wheel build and wheel smoke; strict docs CI passed. Local docs build did not complete (execution approval review cancelled); the same strict build succeeded in CI.

No provider calls, engine changes, release, or merge.

@Birfy
Birfy marked this pull request as ready for review October 10, 2026 03:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T03:10:04.951975Z 2931d62 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Birfy
Birfy merged commit 0cf6604 into main Oct 10, 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.

CLI input-file errors leak tracebacks and JSONL diagnostics lose physical line numbers

1 participant