Query tasks and notes by tag (#5) #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/query-tasks-by-tag"
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?
Closes #5.
Filtering is client-side over the full state already fetched — no new endpoint. Matching is on the lowercased display
name, which is also exactly what appears in an item'stagsarray.The
raw_namehazard is real, and now has a testThe issue is right to be emphatic. Live from this account:
nameraw_namep1top_3p7weekly_prioritiesproject_statusstatusA live test asserts that every tag whose
raw_namehas drifted from itsnamefails to resolve byraw_name— so this can't regress quietly as tags get rebuilt.Two findings that changed the design
1.
list_notesneeds the same filter — otherwise the sweep misses everythinglist_tasksexcludes notes. In this estate the status tags are held exclusively by notes:A strip-then-apply rotation sweeping only
list_taskswould report zero carriers and silently leave all 14 tagged — which is precisely the accumulation the strip step exists to prevent. Solist_notestakes the identicaltag/include_child_tagsparams.Consequence for the caller: clearing a tag from everything means sweeping both methods, with
include_completed=trueon both. Called out inTOOLS.md.2. The tag registry lags tagging
A tag applied to an item appears in that item's
tagsarray immediately but only reaches the account tag list ~6 seconds later (measured). My first cut validated against the registry alone and the live test caught it — a tag that demonstrably existed on a task was rejected as unknown.An unknown tag still raises rather than returning
[](so a typo never masquerades as "nothing carries it"), but the known set is now the registry ∪ the names in use on the listed items. A genuine typo matches neither.Nested tags are opt-in
Confirmed live: an item tagged with a child does not carry the parent — all 9
steady_🟢carriers lackproject_status. So an exact parent query returns only items tagged with the parent itself;include_child_tags=truewalks parent links downward, transitively.This answers the issue's open question directly, and gives the rotation the "find every carrier" primitive it needs:
project_status+ children finds all 14.Answering the acceptance list
name✅ — with a regression test against real drifted tagsinclude_completed=truereaches them; the strip step needs it or a tag survives on a closed itemTesting
178 passed, plus 7 live tests. Contract in DESIGN.md §13.🤖 Generated with Claude Code
https://claude.ai/code/session_012VU4wBhFAAosZLQcWqvHsf