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
{{ message }}
Repository navigation
Feature toggles silently inert under workflow path; capture is time-blind #244
With extraction feature flags ON, Moments and Relevant-now render empty while distillates flow. A first-person intent with an explicit relative deadline ("provide feedback in eighteen minutes") produces no moment, no to-do, and no deadline, even though the merge-window wall-clock is already interpolated into every prompt.
Root causes
Flag tangle. The direct drain path honors distill.moments / distill.index from the flag store. The workflow executor path ADDITIONALLY requires the active workflow document to contain a moments / index drain step; with no such step, extraction is off even when the flag is ON. Turning on workflow.enabled can therefore silently disable a Settings toggle. Audit distill.fields for the same disease.
Extraction misses first-person intent. The typed-moment extraction template defines a commitment as "someone promised to do something"; small models return [] for first-person intent ("I need to…", "I'll…", "I have to…").
Time-blind capture. Prompts receive windowStart / windowEnd but nothing instructs relative-time resolution. TodoItem has no due field, so a stated deadline is dropped even when captured.
Scope
Make the extraction flags authoritative across both drain paths, with a regression proving: workflow path + flag ON + no explicit step yields extraction.
Teach the typed-moment extraction template to include first-person commitments.
Add an optional, validated due (window-anchored absolute time) plus a due-provenance marker to the to-do capture path, surfaced honestly on the row.
Closing evidence — landed via PR #248, merge 605f780, main CI green
Per acceptance criterion (relative paths, file:line + test names):
AC1 — extraction flags authoritative across both drain paths, regression proving workflow path + flag ON + no explicit step yields extraction.
apps/engine/src/workflow/executor.ts — runDrain honors distill.moments / distill.index from the flag store even when the active workflow document declares no explicit moments/index drain step.
Regression reproducing the exact silent-inert scenario: apps/engine/src/workflow/executor.test.ts:138runDrain: FLAG-AUTHORITATIVE — no moments/index step but the flags are ON ⇒ extraction runs (the #244 silent-inert case).
Authority holds both directions: :150 no step + flags OFF ⇒ no extraction; :159 a PRESENT step still re-binds the gate to its when-flag (advanced composition preserved); :123 moments/index gate independently.
distill.fields audited for the same disease — the fast-fields path is unaffected (each family member gates independently; family coalesces into exactly one distill call, :171).
AC2 — teach the typed-moment extraction template to include first-person commitments.
apps/engine/src/distill/defaults.ts — the extract-moments commitment bullet now explicitly names first-person intent ("I need to…", "I'll…", "I have to…") while keeping the four moment kinds.
Test: apps/engine/src/distill/moments.test.ts:13 asserts the commitment definition names first-person intent and retains the four kinds.
AC3 — optional validated due (window-anchored absolute time) + due-provenance marker, surfaced honestly on the row.
Validation + deterministic fallback: apps/engine/src/act/due.ts:25DUE_PAST_SLACK_MS = 60_000, :26DUE_MAX_HORIZON_MS = 60d; RELATIVE_RE (:78) resolves plain "in N minutes/hours/days" incl. whole-number and tens+ones compound words (:28–:49) against the extraction wall-clock; a due that fails validation is dropped (nothing fabricated).
Tests (apps/engine/src/act/due.test.ts, 12): model ISO accepted verbatim :8; garbage ISO dropped :14; past-beyond-slack dropped :20; > 60 days dropped :25; within-slack near-past kept :30; "in eighteen minutes" :35; digits :41; compound "forty-five minutes" :47; "in 3 days" :52; out-of-horizon relative dropped :57; no deadline ⇒ no due :62; model ISO wins over a relative phrase :67.
Honest row: apps/client/src/surfaces/blocks/todos.ts:41dueDecoration renders "due " only for a parseable due, no urgency dressing, user-select:none (copy stays bare task text). Test apps/client/src/surfaces/blocks/todos.test.ts:68.
HTTP wiring covered by apps/engine/src/api/http.test.ts.
Gates at merge head: contracts 114 · client 636 · engine 1142; schema regen zero-drift; main CI green.
Activity
Ambisphaeric commentedon Jul 18, 2026
Closing evidence — landed via PR #248, merge
605f780, main CI greenPer acceptance criterion (relative paths,
file:line+ test names):AC1 — extraction flags authoritative across both drain paths, regression proving workflow path + flag ON + no explicit step yields extraction.
apps/engine/src/workflow/executor.ts—runDrainhonorsdistill.moments/distill.indexfrom the flag store even when the active workflow document declares no explicitmoments/indexdrain step.apps/engine/src/workflow/executor.test.ts:138runDrain: FLAG-AUTHORITATIVE — no moments/index step but the flags are ON ⇒ extraction runs (the #244 silent-inert case).:150no step + flags OFF ⇒ no extraction;:159a PRESENT step still re-binds the gate to its when-flag (advanced composition preserved);:123moments/index gate independently.distill.fieldsaudited for the same disease — the fast-fields path is unaffected (each family member gates independently; family coalesces into exactly one distill call,:171).AC2 — teach the typed-moment extraction template to include first-person commitments.
apps/engine/src/distill/defaults.ts— the extract-moments commitment bullet now explicitly names first-person intent ("I need to…", "I'll…", "I have to…") while keeping the four moment kinds.apps/engine/src/distill/moments.test.ts:13asserts the commitment definition names first-person intent and retains the four kinds.AC3 — optional validated
due(window-anchored absolute time) + due-provenance marker, surfaced honestly on the row.shared/contracts/src/config/todo.ts:58due: Type.Optional(IsoTime)(server-stamped);:34dueSource: 'model' | 'anchored'. Generated schemas committed:shared/contracts/schemas/TodoItem.json,TodoList.json,TodoProvenance.json(zero-drift gate).apps/engine/src/act/due.ts:25DUE_PAST_SLACK_MS = 60_000,:26DUE_MAX_HORIZON_MS = 60d;RELATIVE_RE(:78) resolves plain "in N minutes/hours/days" incl. whole-number and tens+ones compound words (:28–:49) against the extraction wall-clock; aduethat fails validation is dropped (nothing fabricated).apps/engine/src/act/due.test.ts, 12): model ISO accepted verbatim:8; garbage ISO dropped:14; past-beyond-slack dropped:20; > 60 days dropped:25; within-slack near-past kept:30; "in eighteen minutes":35; digits:41; compound "forty-five minutes":47; "in 3 days":52; out-of-horizon relative dropped:57; no deadline ⇒ no due:62; model ISO wins over a relative phrase:67.apps/client/src/surfaces/blocks/todos.ts:41dueDecorationrenders "due " only for a parseable due, no urgency dressing,user-select:none(copy stays bare task text). Testapps/client/src/surfaces/blocks/todos.test.ts:68.apps/engine/src/api/http.test.ts.Gates at merge head: contracts 114 · client 636 · engine 1142; schema regen zero-drift; main CI green.