Repository navigation
refactor(filters): remove unused getFilter helper - #213
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR deletes the unused getFilter helper and adds an Unreleased changelog entry. Example: Render name " bob " and tags ["a", "b"] using trim, upper, length and join filters.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it removes a verified unused internal helper that remains on current main, with no actionable correctness or security findings. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe template command receives pipeline items, resolves template fields, applies named filters from an internal table, and emits rendered strings. flowchart LR
A[Pipeline items] --> B[Template command]
B --> C[Field resolution]
C --> D[applyFilters]
D --> E[Internal filter table]
E --> F[Rendered strings]
Technical reviewBest possible solution: Land the focused deletion while preserving the existing filter table and template execution path. Do we have a high-confidence way to reproduce the issue? There is no reported runtime bug; source inspection confirms that getFilter is unused and remains present on current main. Is this the best way to solve the issue? Deleting the unused helper is the smallest complete cleanup because existing callers already use applyFilters directly. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bfad09a49747. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 30, 2026, 12:45 PM ET / 16:45 UTC. |
What Problem This Solves
src/core/filters.tsexports agetFilter(name)helper that nothing uses.applyFiltersreads the filter table directly, thetemplatecommand imports onlyapplyFilters, and the package entry points (.,./sdk,./core,./recipes/github) do not re-export anything fromcore/filters. So the helper is not part of the public API, and no caller can reach it.getFilterare removed, plus a CHANGELOG line. The filter table,parseFilterExpression,applyFiltersand thetemplatecommand are unchanged.User Impact
User impact: there is no user-visible change. Template filters (
upper,trim,length,join, …) render exactly as before; the module just has one less dead export to maintain.Why This Change Was Made
It removes dead code from the template filters module.
git grep getFilteronupstream/mainbfad09a finds only the definition, and the helper has had no caller since commit60c9765added the filters. Before deleting it, I checked the published entry points inpackage.jsonexportsandsrc/core/index.ts, and neither exposescore/filters. The full suite (pnpm test) passes 742/742 on the branch, andpnpm lintandpnpm typecheckare clean.Evidence
getFilterremoved.tsc) onupstream/mainbfad09a and on this branch.node bin/lobster.js "exec --json 'printf …' | template --text '{{name | trim | upper}} has {{tags | length}} tags: {{tags | join \"/\"}}'", run on both builds, plusgrep -c getFilter dist/src/core/filters.js.node bin/lobster.jswith a chainedtrim | upper,lengthandjointemplate prints the same output before and after, and the built module no longer containsgetFilter.dist/src/core/filters.jspath directly; it is not a published entry point.