167: Add fj/rg tool-detection helpers (rgAvailable, detectFjState) with unit tests #176
No reviewers
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills!176
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-167/add-fj-rg-tool-detection-helpers-rgavailable-detec"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
167: Add fj/rg tool-detection helpers (rgAvailable, detectFjState) with unit tests
Implements 167.
Generated in 8m 44s.
Review findings
Confirms the same 2 pre-existing failures noted in the review (unrelated to this change). All new tests pass, and no regressions introduced by my edits.
Review Findings — 167
Summary
Fixed the Medium finding by adding an explanatory comment at the
preflight()duplication site noting it's temporary pending a follow-up refactor, and fixed the Low finding by rewrapping themakeShimDir()doc comment line that ran long after thewithFjaddition. Left the second Low finding (no lint/format tooling configured in the repo) unresolved as it's explicitly out of scope — it recommends a separatechoreissue, not an in-place fix. Re-rannpm test: 90/92 pass; the same 2 pre-existing failures noted in the original review (macOS tmpdir symlink mismatch, stale mongodb manifest assertion) persist unchanged and are unrelated to this diff — no regressions introduced.Critical
(none)
High
(none)
Medium
detectFjState()duplicates thefjAuth/ok/trim-check logic that still lives inline inpreflight()(scripts/local-install.mjs:377-382). This is expected for this step per the issue's explicit scoping, but leaves two copies of the same "is fj usable" logic in the file until the follow-up step lands. Suggested fix: add a short inline comment at scripts/local-install.mjs:377 noting the duplication is temporary and will be removed whenpreflight()is refactored to calldetectFjState()(tracked in a follow-up issue), so future readers don't mistake it for an oversight.Low
makeShimDir()doc comment line ("...to the shim dir so the availability check actually fails. WithnotAGitRepothe") runs past the file's otherwise-consistent ~80-col wrap used elsewhere in the same comment block. Suggested fix: rewrap the sentence so thewithFjaddition doesn't push this line long.lintscript), so future stylistic drift on new exports like these two functions won't be caught automatically. Suggested fix: out of scope for this change, but worth a separatechoreissue to add a minimal formatter/linter config.