I3142 — An episode opens through the typed domain and records the task and issue it began on
ADR 0047 step 2 plus the missing attribution: session start delegates to the domain's opener, and session.started carries the task the episode began on as an Option<TaskId> taken from a ledger fact of its own provider session; the closer derives the bound issue from that task's own ledger events and folds both into tasks and issues.
BLOKOVÁNO vlna 2 · p1 · profil implementation · bezpečné paralelně
Blocked. This issue cannot start until I3141, I3320 are done. The status is derived from that, not declared.
Cíl
ADR 0047 step 2 plus the missing attribution: session start delegates to the domain's opener, and session.started carries the task the episode began on as an Option<TaskId> taken from a ledger fact of its own provider session; the closer derives the bound issue from that task's own ledger events and folds both into tasks and issues.
Proč
On 2026-09-11 a record could say task_id: t-... and tasks: [] at once, and a ten-hour session on an active issue reported issues: []: the task had been started in an earlier episode and no task event fell inside the window. Proposed in ADR 0182 (A closed session record is judged by what it can attribute, not only by its schema) (proposed; it carries no authority until the owner accepts it). Sources: chatgpt-majordomus:c116#3.
Aktuální stav
lib/session.sh opens episodes; tasks/issues in the record come only from ledger events inside the episode; Episode carries Option<TaskId> in session/episode.rs but nothing populates it at open; mj_load_current reads the checkout's current.yaml, which two windows of one checkout share.
Cílový stav
session.started names the task the episode began on and nothing else of it; the record's tasks and issues are the union of open, transitions and close.
Rozsah
- lib/session.sh
- lib/start.sh
- apps/majordomus-cli/src/session
- share/events.yaml
- share/allow/session.txt
- share/allow/session-record.txt
- share/schemas/majordomus/session/session.v1.schema.json
- share/schemas/majordomus/session-record/session-record.v1.schema.json
- apps/majordomus-cli/tests/session_domain.rs
- test/cases/60_session_lifecycle.sh
Mimo rozsah
- Binding a task to an intent, which I2001 owns
Závislosti
- I3141BLOCKED majordomus session close writes its record through the typed domain's closer, and the shell closer is deleted
- I3320READY A lifecycle command run against an absent or stale executable fails loudly and never falls back to a shell writer
Co na tom čeká
- I3143BLOCKED Each provider lifecycle event leaves a typed receipt written by the domain before any guard can return early
- I3144BLOCKED Checkpoints and handovers are recorded against the episode, and the shell only parses and renders them
- I3146BLOCKED A closed session record says whether it is complete, and one that changed the tree without saying what it served is not
- I3148BLOCKED An episode records the governance digest and the briefing digest it was handed at start
- I3311BLOCKED Generated sequences of episode events never move an episode in a way its transition table forbids
Kritéria přijetí
- A session opened on a task started in an earlier episode lists it in tasks and its issue in issues
- task_id and tasks can no longer disagree
- Shell output of session start unchanged
Validace
- bash test/run.sh --no-skips 60_session_lifecycle 111_session_per_provider 130_lifecycle_survives_a_stale_task
- cargo test --manifest-path apps/majordomus-cli/Cargo.toml --test session_domain
Požadované důkazy
- test_session_open_records_its_task
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/I3142.yaml. Read it back with majordomus plan show I3142.