The upload CLI never passed ?replay=true, so the server's 7-day in-memory
idempotency cache silently dropped session:start events on re-upload,
leaving Session nodes without started_at. Default replay=true bypasses that
cache (Neo4j idempotency still holds via MERGE + SET n += row.props);
--no-replay restores the old dedup behaviour for live in-progress sessions.
- uploader.py: run_upload() gains replay: bool = True; POSTs with
params={"replay":"true"} when set (None when --no-replay).
- cli.py: --no-replay flag (default off); usage + IDEMPOTENCY help rewritten.
- tests: red-green coverage for the query param and the flag.
Re-applied on current main (auth-aware cli.py/uploader.py) — supersedes the
stale, conflicting #22. Unit-proven: 182 passed, ruff + pyright clean.
🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)
Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
What & why
The upload CLI never passed
?replay=true, so the server's 7-day in-memory idempotency cache silently droppedsession:startevents on re-upload — leaving Session nodes withoutstarted_at. This makesreplay=truethe default (bypassing that cache; Neo4j idempotency still holds viaMERGE + SET n += row.props) and adds--no-replayto restore the old dedup behaviour for live, in-progress sessions.Supersedes #22 (do not merge #22)
#22 carried this exact fix but is
CONFLICTING / DIRTYand ~5 weeks stale:mainhas since rewritten bothcli.pyanduploader.pywith the dual-auth feature. Rather than merge a conflicting stale branch over the auth work, the fix is re-applied cleanly on currentmain(the auth-awarerun_upload(auth_strategy=...)/build_auth_strategy(...)code). Verified the fix is still absent frommainbefore porting.Changes
uploader.py—run_upload()gainsreplay: bool = True; POSTs withparams={"replay": "true"}when set (Nonewhen--no-replay).cli.py—--no-replayflag (default off); usage + IDEMPOTENCY help rewritten.?replay=true,--no-replaysends no params, and the flag wiring.Proof (unit-only — the fix is "client sends
?replay=true")uv run pytest -q→ 182 passed; 8 replay tests green (red-green confirmed:assert None == {'replay': 'true'}before the change).ruff check+ruff format --checkclean;pyright0 errors.