Repository navigation
fix(cli,minimize): validate --mode upfront and reject invalid modes (exit 2) - #19
Conversation
7a017c1 to
1d3b0db
Compare
1d3b0db to
ffb31ac
Compare
|
Read through the fix on What I want to flag is that the mode check sits in front of a wider opening, and two arms still walk through it on that same commit. Measured with the repo's own
The last row is the interesting one: the refusal path already exists and works. The first two rows are not failures being minimized — they are the attempt failing to get off the ground, and they still produce a report and a written bundle. The mechanism is one line in try:
with ReplaySession.from_trace(trace, mode=mode) as replay:
actual_output = entrypoint_fn()
divergence_error = replay.divergence
...
except Exception as exc:
# Application exception during replay
exception = exc
The second half is the agent-side one and it needs a decision, not a patch: a missing dependency genuinely can be the recorded bug, so the exception type alone cannot separate "this is what we are minimizing" from "this check never ran". The trace does record its own failure ( Same distinction I tried to draw in #20, applied one layer earlier: |
|
Hoisted ReplaySession construction out of the try-block in signature.py (a5806f1). Harness errors now raise FailureDetectionError and cannot become a minimizable signature, including via the Python API path. Lint and mypy failures also fixed, CI is green. Your second point (refusal when a signature is produced before any recorded call is consumed) is tracked in #22. Needs a design decision as you said. |
|
Following up on #17. I ran my triage and crash agents against
Happy to contribute the two agents (~80 lines with the fake LLM) as end-to-end fixtures for the |
|
Thanks, all five points are handled now.
The two agents as fixtures sound good, please send them as a separate PR. |
Fix minimize --mode validation to reject invalid modes (hybrid/bogus) before minimization with exit 2. Add mode validation tests and replay contract tests; document frozen-replay contract and update 0.2.0 docs. All tests pass.