Skip to main content

Module signals

Module signals 

Source
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§

SignalCounts
Windowed counts consumed by the postmortem wiring.

Enums§

SignalKind
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_id whose ts falls inside [first_ts, last_ts]. None bounds are open-ended. Missing file ⇒ zeros; malformed lines skipped.
record_conflict_if_cross_actor
Record a binding_conflict signal only when the two actors differ. Wraps record_signal_at for the tested path (病一 治法).
record_conflict_signal_if_cross_actor
Same as record_conflict_if_cross_actor but 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).