Expand description
Decision signals: timestamped supersede / binding-conflict markers recorded
at edda decide time, counted back by session window at postmortem time.
Why: the two natural High-severity postmortem paths (decision reversal,
multi-agent conflict) starved because their inputs were hardcoded to
0/false at the SessionEnd wiring (flywheel drill 1 finding). The CLI
already detects both cases when a decide lands — this module just gives
those detections a durable, windowable trace.
Storage: <project state>/decision_signals.jsonl, append-only, one JSON
object per line: {"ts": "<rfc3339>", "kind": "superseded"|"binding_conflict", "key": "<decision key>"}. Recording is best-effort — a failed append must
never block a decide.
Structs§
- Signal
Counts - Windowed counts consumed by the postmortem wiring.
Enums§
- Signal
Kind - What the decide path observed.
Functions§
- count_
signals_ at - Windowed count against an explicit file path (testable core).
- count_
signals_ between - Count signals for
project_idwhose ts falls inside[first_ts, last_ts].Nonebounds are open-ended. Missing file ⇒ zeros; malformed lines skipped. - record_
conflict_ if_ cross_ actor - Record a
binding_conflictsignal only when the two actors differ. Wrapsrecord_signal_atfor the tested path (病一 治法). - record_
conflict_ signal_ if_ cross_ actor - Same as
record_conflict_if_cross_actorbut resolves the project’s signals file. - record_
decision_ signal - Append one signal for
project_id(creates parent dirs on first use). - record_
signal_ at - Append one signal to an explicit file path (testable core).
- should_
record_ conflict - SELECTOR3 病一:conflict 訊號的自/他區分。
同 actor(session 進版自己的 binding)=不記 conflict;異 actor=真跨 agent 衝突,記。
superseded訊號不經此路——那是判斷含量的正貨,自/他都要記。 - signals_
path - Signals file for a project (lives next to lessons/rules state).