fix(setup): inject statusline footer last so it can't silently miss - #20
Merged
Merged
Conversation
`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`.
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.
Problem
ak setup(project scope) ranfixStatuslineat step 2, right afterruflo init. ButfixStatuslineearly-returnsapplied:falsewhen.claude/helpers/statusline.cjsisn't settled yet (statusline.mjs:23), and setup logged that outcome asinfo, 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 syncdetecting "footer missing") healed it later; setup itself never converged.Root cause (verified, not assumed)
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.fixStatuslineis idempotent and injects cleanly once the helper exists.Fix
ruflo initandaqe inithave written the helper.warnpointing atak sync, never silentinfo.Verification
node --check src/commands/setup.mjspassesnode tests/statusline-segments.test.cjs→ 20 passed, 0 failedak sync; the🎓 Agentic QEsegment now renders