You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FixtureDrivenTransport.event_stream() parses and validates the fixture JSON after the orchestrator has already transitioned the session to in_flight
and incremented attempt_count. A malformed fixture (invalid JSON, a missing events array, or an event missing type/event_id/timestamp) therefore
fails mid-stream.
As of PR #1 the failure is clean — event_stream() raises ValueError and run-one converts it to an error: line + exit code 2 — but the SQLite state
store is left with a partially-progressed session row and a consumed
attempt. For recoverable operator input (a typo'd fixture path/JSON) the run
is therefore not idempotent at the workflow level.
Proposed fix
Parse and structurally validate the fixture in FixtureDrivenTransport.place_call()
— before the orchestrator mutates any session state — so a malformed fixture is
rejected with no session row created and no attempt consumed. event_stream()
can then assume a well-formed fixture.
Summary
FixtureDrivenTransport.event_stream()parses and validates the fixture JSONafter the orchestrator has already transitioned the session to
in_flightand incremented
attempt_count. A malformed fixture (invalid JSON, a missingeventsarray, or an event missingtype/event_id/timestamp) thereforefails mid-stream.
As of PR #1 the failure is clean —
event_stream()raisesValueErrorandrun-oneconverts it to anerror:line + exit code 2 — but the SQLite statestore is left with a partially-progressed session row and a consumed
attempt. For recoverable operator input (a typo'd fixture path/JSON) the run
is therefore not idempotent at the workflow level.
Proposed fix
Parse and structurally validate the fixture in
FixtureDrivenTransport.place_call()— before the orchestrator mutates any session state — so a malformed fixture is
rejected with no session row created and no attempt consumed.
event_stream()can then assume a well-formed fixture.
Context
5e15f5b(finding 5); deferred from PR Slice 1 — Mock Call, Mock CRM (feature 001) #1.src/opencloser/transport/mock.py—place_call()/event_stream().