-
Notifications
You must be signed in to change notification settings - Fork 0
fix(fm-session-start): show in-flight and queued beads instead of ready-only #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -52,16 +52,18 @@ Because bootstrap requires `tasks-axi` on `PATH` on every profile, that delegati | |||||
| Compatible means the shared bootstrap probe accepts `tasks-axi --version` as 0.1.1 or newer, `tasks-axi update --help` exposes `--archive-body`, and `tasks-axi mv --help` exposes `[<id>...]` for the atomic multi-ID move introduced in 0.2.2 and required by handoff delegation. | ||||||
| That sentence is the single owner of the tasks-axi compatibility definition; every other document points here instead of restating the version gates. | ||||||
| Bootstrap requires compatible `tasks-axi` on every profile; see "Toolchain" below for missing-tool reporting and silent default-backend behavior. | ||||||
| Set the local, gitignored `config/backlog-backend` file to `beads` to use the beads federated `task` store as the queue source; session-start's digest will list the store's native ready set (via `task list --ready`, bd's dependency-derived readiness with no manual tagging) instead of `data/backlog.md`. | ||||||
| Set the local, gitignored `config/backlog-backend` file to `beads` to use the beads federated `task` store as the queue source instead of `data/backlog.md`. | ||||||
| Session-start's digest mirrors `data/backlog.md`'s `## In flight`/`## Queued` split with two beads-sourced sections, both scoped by the firstmate-fleet label below: **In flight** is `task list --label <label> --status in_progress,blocked`, and **Queued** is `task list --label <label> --ready` (bd's dependency-derived readiness with no manual tagging). | ||||||
| If either read fails, the whole listing falls back to the title-line rendering of `data/backlog.md` rather than printing a partial digest. | ||||||
| Beads requires the `task` CLI on `PATH` and access to the active beads store. | ||||||
| Bootstrap validates the beads backend and reports a `MISSING:` line if the CLI is absent or the store is unreachable. | ||||||
| Set the local, gitignored `config/backlog-backend` file to `manual` to force manual backlog editing and suppress the verbose `BOOTSTRAP_INFO: tasks-axi available` fact, not missing-tool reporting. | ||||||
| Absent or `tasks-axi` selects the default tasks-axi backend. | ||||||
| The file format is unchanged in tasks-axi and manual modes; both produce the same `## In flight`, `## Queued`, and `## Done` sections in `data/backlog.md`. | ||||||
| The beads backend does not use `data/backlog.md`; all backlog state lives in the beads store and is queried dynamically at session start. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Correct the fallback documentation. Line 63 conflicts with Line 57 and Proposed fix-The beads backend does not use `data/backlog.md`; all backlog state lives in the beads store and is queried dynamically at session start.
+When Beads reads succeed, backlog state is queried dynamically from the beads store. If either read fails, session-start uses `data/backlog.md` for its title-line fallback.As per coding guidelines, “Report failures and outcomes faithfully, with concrete evidence rather than masking or minimizing failures.” 📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Coding guidelines |
||||||
| Under the beads backend, firstmate's own dispatched-work beads are meant to carry a firstmate-fleet label, `fleet:firstmate` by default (overridable only for test fixtures via `FM_BEADS_FLEET_LABEL`), once bead creation is wired to it, so a `task list --label <that label>` call scopes to firstmate's fleet instead of surfacing the shared federated store's full cross-project set; as of Stage 1 no `bin/` code creates a bead with that label yet, only the reads below query by it. | ||||||
| Under the beads backend, firstmate's own dispatched-work beads are meant to carry a firstmate-fleet label, `fleet:firstmate` by default (overridable only for test fixtures via `FM_BEADS_FLEET_LABEL`), once bead creation is wired to it, so a `task list --label <that label>` call scopes to firstmate's fleet instead of surfacing the shared federated store's full cross-project set; as of Stage 2 no `bin/` code creates a bead with that label yet, only the reads below query by it. | ||||||
| `bin/fm-tasks-axi-lib.sh`'s `fm_beads_fleet_label` is the single owner of that label; read it from there rather than hardcoding it. | ||||||
| The structured fleet snapshot (`bin/fm-fleet-snapshot.sh --json`) and Bearings (`bin/fm-bearings-snapshot.sh`) also read this fleet's in-flight/queued beads, scoped by that label, when the beads backend is selected; with any other backend their output is unchanged. | ||||||
| The structured fleet snapshot (`bin/fm-fleet-snapshot.sh --json`), Bearings (`bin/fm-bearings-snapshot.sh`), and session-start's compact digest above all read this fleet's in-flight/queued beads, scoped by that label, when the beads backend is selected; with any other backend their output is unchanged. | ||||||
| That beads-sourced view currently covers only status open/in_progress/blocked beads mapped to `records[]` state `queued`/`in_flight`; per-bead dependency graphs and correlation with local `state/*.meta` are not yet wired through, so `blocked_by_ids` is always empty and `requires_child_metadata`/`captain_actionable` are always false for a beads-sourced record. | ||||||
|
|
||||||
| ## Runtime backend (config/backend / FM_BACKEND) | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Keep the fallback output all-or-nothing.
If the In flight query fails and the Queued query succeeds, Line 283 prints the successful Queued result before the markdown fallback. The output then contains a partial Beads listing and the fallback listing.
bin/fm-session-start.sh#L281-L283: Do not print a successful query capture after either query fails.tests/fm-session-start.test.sh#L1392-L1398: Assert thatready-task-1is absent from fallback output.Proposed fix
else printf 'beads task listing failed; falling back to title-line rendering.\n' - printf '%s\n' "$out_inflight" - printf '%s\n' "$out_queued" if [ -f "$path" ]; then print_backlog_manual_compact "$path" "fallback"assert_contains "$out" "- [ ] blocked-followup - Follow compact startup" \ "beads read failure fallback omitted the Queued backlog title line - a partial digest was printed instead of the full title-line fallback" + assert_not_contains "$out" "ready-task-1" \ + "beads read failure fallback printed successful Queued-query output"📝 Committable suggestion
📍 Affects 2 files
bin/fm-session-start.sh#L281-L283(this comment)tests/fm-session-start.test.sh#L1392-L1398🤖 Prompt for AI Agents