171: Make reminder() report dynamic install/skip counts; remove dead fj/rg fail() code #180
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!180
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-171/make-reminder-report-dynamic-install-skip-counts-r"
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?
171: Make reminder() report dynamic install/skip counts; remove dead fj/rg fail() code
Implements 171.
Generated in 26m 55s.
Review findings
Now let's add the defensive test for a partial/malformed
toolState.Now let's add the PR description note finding (Medium) — since there's no PR yet in this stage, I'll note it as addressed via a code comment/commit note isn't quite right. Let's check what's feasible — maybe add a comment in the code referencing this verification, since PR doesn't exist yet in this stage.Both pre-existing failures confirmed, unrelated to my change (matches the review's own finding). New reminder tests pass (118 vs previous 117 pass count, +1 new test added, all green except the 2 pre-existing).Now let's add a comment addressing the Medium finding about documenting the verification result in code, since PR doesn't exist yet at this stage.Both Low findings are resolved. The Medium finding is a PR-description/process recommendation that can't be addressed at this stage (no PR exists yet — that's created by a downstream commit/PR skill), so it remains unresolved but I'll note it for the pipeline.Confirmed: 118 passing (up from 117, +1 new test), same 2 pre-existing unrelated failures. Lint gate N/A (no lint script/config). No build step required for this plain Node script project.
Review Findings — 171
Summary
Fixed both Low findings:
reminder()now destructurestoolStatewith per-field defaults (rgOk = true,fjState = "ok") so a partial object like{}falls back to the fully-available behaviour instead of silently misreading missing fields as "rg missing"; added a corresponding unit test (reminder falls back to full counts when given a partial toolState missing both fields) assertingreminder({})behaves like the full-count default. Re-rannpm test: 118/120 pass (one more passing than before, from the new test), with the same 2 pre-existing failures reproduced identically onmain(macOS/privatetmpdir-symlink path mismatch, and a stale mongodb-manifest assertion) — both unrelated to this change and out of scope. No lint script/config exists in the repo (lint gate N/A); no build step applies (plain ESM Node scripts,node --checkpasses on both changed files). The Medium finding (PR description should explicitly note the fj/rg dead-code verification was a no-op) is left unresolved — this remediation stage doesn't open the PR itself, so there is no PR description to amend yet; that note should be added by whichever downstream step creates the PR.Critical
High
Medium
fail()calls reference rg/fj) so reviewers don't have to re-derive that the cleanup half of the issue was a verification-only no-op.Low
reminder(toolState = FULLY_AVAILABLE_TOOL_STATE)silently treats a partial object like{}as "rg missing, fj ok" (sincetoolState.rgOkisundefined→ falsy) rather than falling back to the full default. This isn't currently reachable from any call site (onlymain()calls it, always with a real{ rgOk, fjState }frompreflight()), so it's a latent footgun rather than an active bug. Suggested fix: either destructure with per-field defaults (const { rgOk = true, fjState = "ok" } = toolState;) or add a short comment noting the default only covers the fully-omitted-argument case, not partial objects.remindertests are thorough for the documented scenarios but don't cover a partial/malformedtoolState(e.g.{}or{ rgOk: true }missingfjState), which would help guard against the Low finding above regressing silently. Suggested fix: add one test assertingreminder({})behaviour explicitly (even if only to document current behaviour), or add a defensive default per the fix above and adjust accordingly.