Skip to content

fix(setup): inject statusline footer last so it can't silently miss - #20

Merged
pacphi merged 1 commit into
mainfrom
fix/statusline-footer-injection-ordering
Jul 14, 2026
Merged

pacphi merged 1 commit into
mainfrom
fix/statusline-footer-injection-ordering

Conversation

@pacphi

@pacphi pacphi commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Problem

ak setup (project scope) ran fixStatusline at step 2, right after ruflo init. But fixStatusline early-returns applied:false when .claude/helpers/statusline.cjs isn't settled yet (statusline.mjs:23), and setup logged that outcome as info, not a warning (setup.mjs:104).

Result: on a real repo, the footer injection silently no-op'd, so the statusline rendered without the Agentic QE / SONA segments — and nobody was told. Only the reactive net (ak sync detecting "footer missing") healed it later; setup itself never converged.

Root cause (verified, not assumed)

  • Reproduced that aqe init --auto (step 9) preserves an already-injected footer — so nothing was clobbering it. Step 2 simply missed a not-yet-settled helper file.
  • Confirmed fixStatusline is idempotent and injects cleanly once the helper exists.

Fix

  • Move the statusline heal to the final project step (step 10), after both ruflo init and aqe init have written the helper.
  • A still-missing footer is now a warn pointing at ak sync, never silent info.

Verification

  • node --check src/commands/setup.mjs passes
  • node tests/statusline-segments.test.cjs → 20 passed, 0 failed
  • Applied the equivalent heal to a live repo via ak sync; the 🎓 Agentic QE segment now renders

`ak setup` ran fixStatusline at project step 2, right after `ruflo init`.
If .claude/helpers/statusline.cjs wasn't settled yet, fixStatusline
early-returns applied:false — and setup logged that as `info`, not a
warning, so a missing footer (no AQE/SONA segments) went unnoticed. The
reactive net (`ak sync` detecting "footer missing") caught it later, but
setup itself never converged.

Move the statusline heal to the final project step, after both `ruflo
init` and `aqe init` have written the helper (verified: aqe init
preserves an already-injected footer). fixStatusline is idempotent, so
running it last guarantees convergence. A still-missing footer is now a
`warn` pointing at `ak sync`, never silent `info`.
@pacphi
pacphi merged commit e54df1f into main Jul 14, 2026
9 checks passed
@pacphi
pacphi deleted the fix/statusline-footer-injection-ordering branch July 14, 2026 21:49
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.

1 participant