Skip to content

fix: compact the session-start backlog digest - #31

Merged
Keigyoku merged 2 commits into
mainfrom
fm/fm-636-digest-k2
Jul 23, 2026
Merged

Keigyoku merged 2 commits into
mainfrom
fm/fm-636-digest-k2

Conversation

@Keigyoku

Copy link
Copy Markdown
Owner

Intent

Port upstream firstmate PR kunchenguid#636 (commit 815f7af) into the Keigyoku fork: replace the session-start full dump of data/backlog.md (~56KB) with a bounded compact backlog listing.

Deliberate decisions and tradeoffs:

  • Cherry-picked 815f7af with -x; kept all fork-private fm-session-start behavior (secondmate liveness, Pi diagnostics, resident-related ordering, 7-step digest order) while adopting compact backlog print helpers, FM_SESSION_START_BACKLOG_LIMIT (default 80), tasks-axi list path, and manual/unavailable awk title-line fallback.
  • TDD: RED commit added the three compact-backlog tests first; GREEN is the cherry-picked implementation plus AGENTS contract wording.
  • Did NOT apply incidental upstream edits from that commit to tests/fm-backend.test.sh or tests/wake-helpers.sh (sibling-lane ownership / unrelated to fix(bin): compact session-start backlog digest kunchenguid/firstmate#636).
  • AGENTS.md: only digest-contract truthfulness for the compact listing (section 3 fleet-state + read-once; recovery one-liner cross-ref); print behavior owned by bin/fm-session-start.sh per one-owner rule. Did not touch sibling-owned skill surfaces.
  • PR must target Keigyoku/firstmate base main (fork), never kunchenguid.

What Changed

Captain, the full branch delta:

  • Replaces the full session-start backlog dump with a bounded compact listing, configurable through FM_SESSION_START_BACKLOG_LIMIT and defaulting to 80 items.
  • Uses structured tasks-axi output when compatible, with title-line fallbacks for manual or unavailable backends while preserving blocker and hold metadata.
  • Updates the session-start contract and adds regression coverage for compact rendering, body omission, metadata retention, and fallback behavior.

Risk Assessment

✅ Low: Captain, the bounded backlog rendering is well-scoped, preserves fork-private session-start behavior, and conforms to the stated intent without material source risks.

Testing

The supplied full-suite baseline passed, and focused automation plus end-user CLI scenarios demonstrated the default 80-item bound, configurable override, omitted task bodies, tasks-axi metadata, manual fallback, and preserved fork-specific digest behavior; all checks passed and reviewer-visible transcripts were captured.

Evidence: Default 80-item manual backlog transcript
data/backlog.md
--------------------------------------------------------------------------------
compact backlog listing (manual backend; max 80 item(s); indented task bodies omitted)
## In flight
- [ ] task-1 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-1) (hold-kind: captain)
- [ ] task-2 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-2) (hold-kind: captain)
- [ ] task-3 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-3) (hold-kind: captain)
- [ ] task-4 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-4) (hold-kind: captain)
- [ ] task-5 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-5) (hold-kind: captain)
- [ ] task-6 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-6) (hold-kind: captain)
- [ ] task-7 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-7) (hold-kind: captain)
- [ ] task-8 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-8) (hold-kind: captain)
- [ ] task-9 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-9) (hold-kind: captain)
- [ ] task-10 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-10) (hold-kind: captain)
- [ ] task-11 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-11) (hold-kind: captain)
- [ ] task-12 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-12) (hold-kind: captain)
- [ ] task-13 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-13) (hold-kind: captain)
- [ ] task-14 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-14) (hold-kind: captain)
- [ ] task-15 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-15) (hold-kind: captain)
- [ ] task-16 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-16) (hold-kind: captain)
- [ ] task-17 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-17) (hold-kind: captain)
- [ ] task-18 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-18) (hold-kind: captain)
- [ ] task-19 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-19) (hold-kind: captain)
- [ ] task-20 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-20) (hold-kind: captain)
- [ ] task-21 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-21) (hold-kind: captain)
- [ ] task-22 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-22) (hold-kind: captain)
- [ ] task-23 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-23) (hold-kind: captain)
- [ ] task-24 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-24) (hold-kind: captain)
- [ ] task-25 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-25) (hold-kind: captain)
- [ ] task-26 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-26) (hold-kind: captain)
- [ ] task-27 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-27) (hold-kind: captain)
- [ ] task-28 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-28) (hold-kind: captain)
- [ ] task-29 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-29) (hold-kind: captain)
- [ ] task-30 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-30) (hold-kind: captain)
- [ ] task-31 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-31) (hold-kind: captain)
- [ ] task-32 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-32) (hold-kind: captain)
- [ ] task-33 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-33) (hold-kind: captain)
- [ ] task-34 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-34) (hold-kind: captain)
- [ ] task-35 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-35) (hold-kind: captain)
- [ ] task-36 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-36) (hold-kind: captain)
- [ ] task-37 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-37) (hold-kind: captain)
- [ ] task-38 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-38) (hold-kind: captain)
- [ ] task-39 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-39) (hold-kind: captain)
- [ ] task-40 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-40) (hold-kind: captain)
- [ ] task-41 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-41) (hold-kind: captain)
- [ ] task-42 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-42) (hold-kind: captain)
- [ ] task-43 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-43) (hold-kind: captain)
- [ ] task-44 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-44) (hold-kind: captain)
- [ ] task-45 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-45) (hold-kind: captain)
- [ ] task-46 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-46) (hold-kind: captain)
- [ ] task-47 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-47) (hold-kind: captain)
- [ ] task-48 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-48) (hold-kind: captain)
- [ ] task-49 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-49) (hold-kind: captain)
- [ ] task-50 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-50) (hold-kind: captain)
- [ ] task-51 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-51) (hold-kind: captain)
- [ ] task-52 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-52) (hold-kind: captain)
- [ ] task-53 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-53) (hold-kind: captain)
- [ ] task-54 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-54) (hold-kind: captain)
- [ ] task-55 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-55) (hold-kind: captain)
- [ ] task-56 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-56) (hold-kind: captain)
- [ ] task-57 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-57) (hold-kind: captain)
- [ ] task-58 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-58) (hold-kind: captain)
- [ ] task-59 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-59) (hold-kind: captain)
- [ ] task-60 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-60) (hold-kind: captain)
- [ ] task-61 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-61) (hold-kind: captain)
- [ ] task-62 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-62) (hold-kind: captain)
- [ ] task-63 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-63) (hold-kind: captain)
- [ ] task-64 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-64) (hold-kind: captain)
- [ ] task-65 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-65) (hold-kind: captain)
- [ ] task-66 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-66) (hold-kind: captain)
- [ ] task-67 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-67) (hold-kind: captain)
- [ ] task-68 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-68) (hold-kind: captain)
- [ ] task-69 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-69) (hold-kind: captain)
- [ ] task-70 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-70) (hold-kind: captain)
- [ ] task-71 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-71) (hold-kind: captain)
- [ ] task-72 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-72) (hold-kind: captain)
- [ ] task-73 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-73) (hold-kind: captain)
- [ ] task-74 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-74) (hold-kind: captain)
- [ ] task-75 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-75) (hold-kind: captain)
- [ ] task-76 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-76) (hold-kind: captain)
- [ ] task-77 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-77) (hold-kind: captain)
- [ ] task-78 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-78) (hold-kind: captain)
- [ ] task-79 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-79) (hold-kind: captain)
- [ ] task-80 - Demonstrate bounded digest (repo: firstmate) (kind: scout) (hold: review-80) (hold-kind: captain)
## Queued
## Done
(shown 80 of 85 backlog item title line(s))
(truncated 5 item(s); increase FM_SESSION_START_BACKLOG_LIMIT for a larger startup listing)
Full task bodies remain available on demand: tasks-axi show <id> --full when compatible tasks-axi is available, or data/backlog.md.
Evidence: Configurable limit override transcript
data/backlog.md
--------------------------------------------------------------------------------
compact backlog listing (manual backend; max 3 item(s); indented task bodies omitted)
## In flight
- [ ] override-1 - Limit override item 1 (repo: firstmate) (kind: scout)
- [ ] override-2 - Limit override item 2 (repo: firstmate) (kind: scout)
- [ ] override-3 - Limit override item 3 (repo: firstmate) (kind: scout)
## Queued
## Done
(shown 3 of 5 backlog item title line(s))
(truncated 2 item(s); increase FM_SESSION_START_BACKLOG_LIMIT for a larger startup listing)
Full task bodies remain available on demand: tasks-axi show <id> --full when compatible tasks-axi is available, or data/backlog.md.
Evidence: tasks-axi session-start transcript
data/backlog.md
--------------------------------------------------------------------------------
compact backlog listing (tasks-axi; max 80 item(s); task bodies omitted)
count: 2
tasks[2]{id,state,kind,repo,title,blocked_by,hold_kind,hold_reason}:
  compact-startup,in_flight,ship,firstmate,Compact startup digest,none,captain,captain choice pending
  blocked-followup,queued,scout,firstmate,Follow compact startup,compact-startup,"-","-"
help[2]:
  - Run `tasks-axi show <id> --full` for full notes on a task
  - Run `tasks-axi ready` to see unblocked queued work
Full task bodies remain available on demand: tasks-axi show <id> --full when compatible tasks-axi is available, or data/backlog.md.
Evidence: Exact tasks-axi invocation
--version
update --help
mv --help
--version
update --help
mv --help
--version
update --help
mv --help
list --file /tmp/no-mistakes-evidence/01KY661SKDAKD9QVFQ7P5J9AQ1/test-tmp/fm-session-start-tests.VHqcCw/evidence-tasks-axi-3/home/data/backlog.md --limit 80 --fields blocked_by,hold_kind,hold_reason

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"
  • Configured baseline: command -v tmux &gt;/dev/null || { echo &#34;tmux is required for e2e tests&#34; &gt;&amp;2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo &#34;== $t ==&#34;; bash &#34;$t&#34; || rc=1; done; exit &#34;$rc&#34;
  • Focused automation: TMPDIR=/tmp/no-mistakes-evidence/01KY661SKDAKD9QVFQ7P5J9AQ1/test-tmp bash tests/fm-session-start.test.sh
  • Ran bin/fm-session-start.sh in an isolated manual-backend home with 85 multiline tasks; verified 80 shown, five truncated, titles retained, and bodies omitted.
  • Ran bin/fm-session-start.sh with FM_SESSION_START_BACKLOG_LIMIT=3 against five multiline tasks; verified three shown, two truncated, and bodies omitted.
  • Ran bin/fm-session-start.sh through a compatible tasks-axi fixture; verified structured blocker/hold metadata and the bounded tasks-axi list invocation.
  • Inspected 0707fc52a140e336aa81ebebc3417e40eb6014dd..9c4bb475fa1a80db83b87ec66e2b8e6d084a359c; verified scoped files, RED/GREEN history, cherry-pick attribution, ancestry, target HEAD, and Keigyoku origin.
  • Ran git status --short after testing; no testing artifacts remained in the worktree.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Keigyoku and others added 2 commits July 22, 2026 19:25
Add upstream kunchenguid#636 compact backlog tests before the implementation.
Current session-start still dumps full data/backlog.md including
indented task bodies; these cases fail until the bounded listing lands.
* fix: compact session-start backlog digest

* no-mistakes(test): Fix legacy backend fixture helper

* no-mistakes(test): Fix watcher exit wait helper

* no-mistakes(document): Document compact backlog digest

(cherry picked from commit 815f7af)
Copilot AI review requested due to automatic review settings July 23, 2026 00:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Keigyoku
Keigyoku merged commit be677a5 into main Jul 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants