A snapshot: read at commit 707a04c7ce8 on 2026-10-18T00:06:01Z by majordomus 0.29.0. Nothing on this page is read again. See it live
I0805
Read sessions back with a divergence label
Where it stands
devtask.issueMoves
plan.transitionWhat it is
- Objective
- Implement `session list`, `session show <id>` and `session latest`, each resolving with the established rule — same repository, same worktree, same branch, then same branch — and each printing the existing divergence label of the record against current git.
- Why
- A closed session from a rewritten branch that is presented as current knowledge is the failure the divergence vocabulary already exists to prevent. Reusing that vocabulary rather than inventing a second one is the whole point of having it.
- Now
- mj_resolve_latest implements the two-tier rule for checkpoints and handovers, and mj_git_label produces exact, advanced, diverged and different_context. No command reads a session.
- Wanted
- list prints sessions newest first with their labels; show prints one record whole; latest prints the newest session that resolves for this worktree and branch, and reports absence as absence. A diverged or different_context record is labelled as such on every one of them.
- Done when
- unknown: the record declares no `completion`
- Risk
- Reusing mj_resolve_latest requires the session record to have the same front-matter shape as a checkpoint. If the record is pure YAML instead, a second resolver appears, and two resolution rules is exactly the thing the resolution section of the documentation refuses.
Acceptance
- Sessions list in chronological order, and the order is not taken from file modification time
- Two sessions written inside the same second order deterministically
- A record whose recorded head is not an ancestor of HEAD is labelled diverged wherever it is printed
- A session from another branch is never offered as latest
- Every one of these commands leaves git status byte-identical
- Validation
bash test/run.sh 62_session_divergence- Evidence required
divergence_labelled- Evidence present
divergence_labelled
Scope
- Touches
lib/session.shbin/majordomustest/cases/62_session_divergence.sh- Not
KnowledgeAny repository-wide resolution across worktrees- Depends on
- Priority
- p1
- Profile
- implementation
- Parallel safe
- false
- Owner
- unknown: the record declares no `owner`
The work so far
- Branches
- none
- Merged
- none
- Commits
0- Trunk
- master
- Sessions
- none
- Created
- 2026-09-04
- Updated
- 2026-09-04T18:10:47Z
- Started
- 2026-09-04T18:01:49Z
- Verified
- unknown: the record declares no `verified_at`
- Completed
- 2026-09-04T18:10:47Z
Synchronisation
- Adapter
scripts/github-sync- Repository
- unknown: the derived plan's header carries no repository
- External issue
- unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it
- State there
- unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it
Findings
Nothing is wrong with these records.