I3416 — The episode boundary is proven to give one candidate for an observation recorded twice, none for a partial task, and one file per episode when two episodes close at once
Extend the idempotency case so that it proves three behaviours the deriver has by construction and no case asserts. An identical observation recorded twice in one episode derives one file. A task finished partial yields no candidate, while knowledge.derived is still written. Two episodes of one checkout closing concurrently each write their own candidate once, knowledge check passes, and no staging file is left.
BLOKOVÁNO vlna 0 · p2 · profil implementation · bezpečné souběžně
Blocked. This issue cannot start until milestone:knowledge-is-reconciled-before-it-is-reviewed is done. The status is derived from that, not declared.
Cíl
Extend the idempotency case so that it proves three behaviours the deriver has by construction and no case asserts. An identical observation recorded twice in one episode derives one file. A task finished partial yields no candidate, while knowledge.derived is still written. Two episodes of one checkout closing concurrently each write their own candidate once, knowledge check passes, and no staging file is left.
Proč
The owner's 2026-10-19 Cognitive Fabric pack lists the same observation twice, a partial task and a multi-peer race among its verification cases (campaigns/prismatic-way-cognitive-fabric-prompt-pack/prompts/03_KNOWLEDGE.md). verification/ACCEPTANCE.md asks for the same canonical state after a duplicate replay. This is wave 0: a change to tests only.
Aktuální stav
lib/knowledge.sh:1118-1129 digests kind, subject and statement, so a repeated observation maps to one id. :1105-1113 maps no partial outcome, and :1259-1273 stages and renames atomically. Case 564 proves the rerun idempotent and case 981:59-61 proves replay. No case records an observation twice, finishes a partial task or closes two episodes concurrently.
Cílový stav
Case 564 asserts the three behaviours and fails when any of them breaks.
Rozsah
- test/cases/564_knowledge_derivation_is_idempotent.sh
- .ai/repo/project/intents
Mimo rozsah
- Changing the deriver
- A new case number
- Cross-checkout evolve races (I3163)
Závislosti
Žádné. Tento úkol je kořenem grafu.
Co na tom čeká
Kritéria přijetí
- Two identical knowledge observe calls in one episode leave one candidate file and two observation.recorded lines
- A task finished with outcome partial yields no candidate, and the episode's knowledge.derived line is written
- Two episodes closed in parallel in one checkout each leave exactly their own candidate, knowledge check exits 0, and no .tmp. file remains under candidates/
- The case fails when the canonical evidence of an observation is changed to include its timestamp (shown once by a local mutation, then reverted)
Validace
- bash test/run.sh 564_knowledge_derivation_is_idempotent
- majordomus plan validate
Požadované důkazy
- case_the_knowledge_boundary_holds_under_repetition_and_race
Důkazy
Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.
Časová osa
- zahájeno
- —
- ověřeno
- —
- dokončeno
- —
Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.
Canonical record: .ai/repo/project/issues/I3416.yaml. Read it back with majordomus plan show I3416.