Skip to content

Reject ambiguous transcript source options - #18

Open
vsolano9 wants to merge 1 commit into
AgentPostmortem:mainfrom
vsolano9:fix-8-exclusive-input-source
Open

Reject ambiguous transcript source options#18
vsolano9 wants to merge 1 commit into
AgentPostmortem:mainfrom
vsolano9:fix-8-exclusive-input-source

Conversation

@vsolano9

Copy link
Copy Markdown

What & why

Passing both --file and --dir silently analyzes only the file, while empty and missing-file paths report misleading sources. This makes the input selection unambiguous at argparse’s boundary and keeps errors honest.

Closes #8

Changes

  • put --file and --dir in one mutually exclusive argparse group
  • reject a missing --file with a clean exit-2 parser error and no traceback
  • name the selected file, directory, or default root when no runs are found
  • escape source paths before Rich markup and prevent soft wrapping from splitting them
  • add four real CLI subprocess regressions and update the documented test count

Validation

  • RED: all four new CLI cases failed against the original implementation
  • pytest -q — 22/22 pass; repeated successfully 20 consecutive times
  • official fixture list and stats --json smoke commands — pass
  • focused Ruff lint for both changed code files — pass
  • Ruff format for the new test file — pass
  • wheel build and pip check — pass
  • git diff --check — pass
  • current full-repository Ruff check/format remains red only on pre-existing untouched style drift under Ruff 0.16.4; the repository CI does not run Ruff

Checklist

  • Focused change with a clear description
  • Ran the repository test and CLI smoke steps
  • Added regression tests for changed behavior
  • Updated documentation where relevant
  • Linked the related issue

Reject simultaneous --file and --dir options, fail cleanly for a missing file, and name the selected source when no runs are found. Add real CLI regression coverage and update the documented test count.
@github-actions

Copy link
Copy Markdown

Welcome, @vsolano9, and thanks for your first pull request to Agentrace.

A quick look at CONTRIBUTING.md covers how things are set up and run here.

I'll review this shortly. Ask anything in the thread if something is unclear.

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.

--file and --dir are not mutually exclusive, so --dir is silently ignored

1 participant