feat(capture): make realtime observe opt-in (default off) - #645
Conversation
|
@kurosawareiji7007-hub Check the CI failing issues |
CI lint failed on vouchdev#645 after the realtime opt-in test edits.
fb9b2f6 to
48f6f8d
Compare
CI lint failed on vouchdev#645 after the realtime opt-in test edits.
Exercise observations_from_transcript parse/error/skip branches and capture observe CLI paths for realtime-disabled, capture-disabled, and no-store so the vouchdev#645 diff-coverage gate hits 100%.
48f6f8d to
6a26e16
Compare
|
thanks — this lands all four items of #602's suggested shape: the one change is needed before merge. two smaller updates worth making in the same pass. in two optional notes, no change required: the rebuild inherits the parser's happy to re-review once the host-neutral rebuild is in — everything else here is in good shape. |
Fixes vouchdev#602: capture.realtime defaults false; observe no-ops; Claude adapter drops PostToolUse/Stop; finalize rebuilds observations from transcript so min_observations still works.
CI lint failed on vouchdev#645 after the realtime opt-in test edits.
Exercise observations_from_transcript parse/error/skip branches and capture observe CLI paths for realtime-disabled, capture-disabled, and no-store so the vouchdev#645 diff-coverage gate hits 100%.
6a26e16 to
4858d0a
Compare
Reuse Claude-then-Codex transcript detection for observations_from_transcript, check enabled before realtime skip JSON, and prune retired PostToolUse/Stop hooks on adapter reinstall so upgrades drop per-tool spawns.
|
Addressed the review items on
Also noted the |
Hit the remaining diff-coverage gaps on non-dict parse results, Codex failed-command rewrite, and prune_retired malformed/untouched groups.
|
CI is green on |
a6c6862 (vouchdev#686) fixed capture.load_config's min_observations and dedup_window_seconds to fall back to their defaults on a malformed config value via the new coerce_numeric() helper, instead of raising ValueError straight out of load_config. 47eaf56 (vouchdev#645, realtime opt-in) branched off the pre-fix capture.py and reintroduced the bare int()/float() calls when it merged into test - the coerce_numeric import survived (nothing else referenced it), but the two call sites it fed didn't, silently reverting the fix and leaving test_load_config_malformed_numeric_falls_back red on `test` HEAD itself, currently failing this PR's CI via ruff's unused-import gate. restore the coerce_numeric() calls, matching recall.load_config's still-intact equivalent. unrelated to this PR's own change (fsck delete-proposal handling); needed only to get CI green on top of a currently-broken `test`.
a6c6862 (vouchdev#686) fixed capture.load_config's min_observations and dedup_window_seconds to fall back to their defaults on a malformed config value via the coerce_numeric() helper, instead of raising ValueError straight out of load_config. 47eaf56 (vouchdev#645, realtime opt-in) branched off the pre-fix capture.py and reintroduced the bare int()/float() calls when it merged into test - the coerce_numeric import survived (nothing else referenced it), but the two call sites it fed didn't, silently reverting the fix and breaking ruff's unused-import gate for every PR built on top of `test`. restore the coerce_numeric() calls, matching recall.load_config's still-intact equivalent. unrelated to this PR's own change (extract.py segmentation); needed only to get CI green on top of a currently-broken `test`.
a6c6862 (vouchdev#686) fixed capture.load_config's min_observations and dedup_window_seconds to fall back to their defaults on a malformed config value via the coerce_numeric() helper, instead of raising ValueError straight out of load_config. 47eaf56 (vouchdev#645, realtime opt-in) branched off the pre-fix capture.py and reintroduced the bare int()/float() calls when it merged into test - the coerce_numeric import survived (nothing else referenced it), but the two call sites it fed didn't, silently reverting the fix and breaking ruff's unused-import gate for every PR built on top of `test`. restore the coerce_numeric() calls, matching recall.load_config's still-intact equivalent. unrelated to this PR's own change (graph.py edge leak); needed only to get CI green on top of a currently-broken `test`.
a6c6862 (vouchdev#686) fixed capture.load_config's min_observations and dedup_window_seconds to fall back to their defaults on a malformed config value via the coerce_numeric() helper, instead of raising ValueError straight out of load_config. 47eaf56 (vouchdev#645, realtime opt-in) branched off the pre-fix capture.py and reintroduced the bare int()/float() calls when it merged into test - the coerce_numeric import survived (nothing else referenced it), but the two call sites it fed didn't, silently reverting the fix and breaking ruff's unused-import gate for every PR built on top of `test`. restore the coerce_numeric() calls, matching recall.load_config's still-intact equivalent. unrelated to this PR's own change (experts.py viewer scoping); needed only to get CI green on top of a currently-broken `test`.
Summary
capture.realtime(defaultfalse):capture observeno-ops with{skipped: realtime-disabled}instead of spawning a store write on every tool call.PostToolUse/Stophooks; SessionStart/UserPromptSubmit/SessionEnd remain.min_observationsstill works without the realtime buffer;realtime: truerestores the old buffer path.load_transcript), including Codex tool mapping via_observation_from_call.enabled: falsebefore realtime so a fully-disabled kb stays silent.max_messages=2000; very long sessions may lose oldest tool calls vs uncapped realtime buffer.Fixes #602
Test plan
pytest tests/test_capture.py tests/test_session_split.py tests/test_adopt.py tests/test_capture_answer.py tests/test_session_transcript.py tests/test_install_adapter.pytest_observations_from_transcript_rebuilds_codex_tool_activityenabled: falseeven withrealtime: falserealtime: falsevouch capture observeemits skip JSON and does not write a buffermin_observationscapture.realtime: truerestores PostToolUse-style buffer observe