feat(supervisor): seed + sync harness todo list from backlog at bootstrap#240
Open
e-jung wants to merge 4 commits into
Open
feat(supervisor): seed + sync harness todo list from backlog at bootstrap#240e-jung wants to merge 4 commits into
e-jung wants to merge 4 commits into
Conversation
…ession-start tests
… and test inventory
4 tasks
Owner
|
Thanks for the PR! It looks like this branch has a merge conflict with the base branch right now. When you get a chance, could you rebase onto (or merge in) the latest base branch, resolve the conflict, and push? Once GitHub shows the PR as mergeable again, it'll be picked back up for review. Noted for firstmate#240 at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Make firstmate seed and refresh its harness-native todo/task sidebar deterministically from data/backlog.md. Add a fast bash helper bin/fm-todos.sh that parses the existing backlog format into stable rows for In flight and Queued work, preserving blocked-by text and excluding Done; document mandatory firstmate refresh steps at bootstrap, dispatch/intake, and teardown; add TAP-style coverage. Keep backlog format unchanged, shellcheck clean, and prepare the PR title 'feat(supervisor): seed + sync harness todo list from backlog at bootstrap' with Human-reviewed AI disclosure. Known caveat from the task: the 'PR must be raised via no-mistakes' check may fail due fork-routing gap #293, while Behavior tests, Lint, and Invariants must pass.
What Changed
bin/fm-todos.sh, a bash helper that deterministically parsesdata/backlog.mdinto stable TSV and JSON rows for In flight and Queued work, preservingblocked-byannotations and excluding Done entriesAGENTS.md,CONTRIBUTING.md,docs/, and the test inventory to reference the new helpertests/fm-todos.test.shand fixed a non-portable session-start test assertion plus shellcheck-flagged locals in orca tests so the suite runs cleanly on Linux and macOSRisk Assessment
✅ Low: Clean, purely additive change: a self-contained deterministic read-only bash parser with graceful fallbacks, bash 3.2 compatibility, valid JSON/TSV output verified manually, and consistent documentation; no existing behavior is mutated, so blast radius is negligible.
Testing
Ran the new fm-todos behavior test and the fixed fm-session-start test (both pass), swept the full test suite file-by-file (all green once slow tests like fm-watch-triage were given adequate timeouts), and manually exercised bin/fm-todos.sh end-to-end against the documented backlog format confirming deterministic TSV/JSON todo rows, Done exclusion, blocked-by preservation, and clean absent-file handling.
Evidence: fm-todos.sh end-to-end behavior transcript
Input backlog has In flight (1 checkbox), Queued (2, one blocked-by), Done (1). Output: in_progress/high fix-login-k3, pending/medium add-tests-q1, pending/medium refactor-pay-q9 (blocked-by preserved). Done (setup-ci-m2) excluded. JSON validated well-formed. Absent backlog exits 0.Evidence: default TSV output (feeds harness todo sidebar)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
🔧 **Test** - 1 issue found → auto-fixed ✅
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"🔧 Fix: fix non-portable node-based MISSING assertion in session-start tests
✅ Re-checked - no issues remain.
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"bash tests/fm-todos.test.sh(new feature test: TAP-style, asserts in-flight checkbox + bold rows, queued rows, Done exclusion, blocked-by preservation)bash tests/fm-session-start.test.sh(the test fixed by commit b2457e9: MISSING: tasks-axi assertion now portable across Linux/macOS)Manual e2e:bin/fm-todos.sh --file <realistic-backlog.md>producing correct TSV rows (in_progress/high + pending/medium, Done excluded, blocked-by preserved)Manual e2e:bin/fm-todos.sh --json --file <realistic-backlog.md>validated as well-formed JSON viapython3 -m json.toolManual e2e: bold in-flight form- **id** - ...parsed correctly (AGENTS.md section 7 format)Manual e2e: absent backlog file exits 0 cleanly underset -euo pipefailFull test-suite sweep of all ~40 tests/*.test.sh (backend e2e, crew-state, daemon, fleet-sync, pr-merge, review-diff, secondmate-sync, teardown, tangle-guard, todos, update, wake-queue, watch-triage [needs >30s timeout], x-mode, etc.) — all PASS✅ **Document** - passed
✅ No issues found.
tests/fm-daemon.test.sh:23- shellcheck SC2034 flags TMP_ROOT as unused, but it is a global consumed cross-file by make_case()/make_supercase() in the sourced tests/wake-helpers.sh (dir="$TMP_ROOT/$name"). Pre-existing line not introduced by this branch; removing it would break tests. Verified false positive.tests/fm-wake-queue.test.sh:17- shellcheck SC2034 flags TMP_ROOT as unused, but it is a global consumed cross-file by make_case() in the sourced tests/wake-helpers.sh. Pre-existing line; removing it would break tests. Verified false positive.tests/fm-watch-triage.test.sh:28- shellcheck SC2034 flags TMP_ROOT as unused, but it is a global consumed cross-file by make_case() in the sourced tests/wake-helpers.sh. Pre-existing line; removing it would break tests. Verified false positive.tests/fm-secondmate-sync.test.sh:251- shellcheck SC2034 flags FM_ROOT/FM_HOME/FF_SEEN_HOMES (lines 251-253) as unused, but they are globals consumed cross-file by the sourced sweep_live_secondmate_metas() and FF helpers in bin/fm-ff-lib.sh and bin/fm-bootstrap.sh. Pre-existing assignments not introduced by this branch (branch only added 'export FM_BACKEND=tmux'); removing them would break tests. Verified false positive.✅ **Push** - passed
✅ No issues found.