-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goldenrules-rule17-allowlist
More file actions
44 lines (43 loc) · 1.92 KB
/
Copy path.goldenrules-rule17-allowlist
File metadata and controls
44 lines (43 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Rule 17 — expected SCAN entries from `EXPLAIN QUERY PLAN`.
# See docs/golden-rules.md Rule 17 for context.
#
# Format: <file>:<line> SCAN <table_or_alias>
# Lines starting with "#" and blank lines are ignored.
#
# A new SCAN finding not listed here fails CI. A listed entry that is no
# longer reported (e.g., an index was added or the query was rewritten) also
# fails CI — remove the stale line when that happens.
#
# Categories represented:
# - Full-table list (SELECT ... no WHERE)
# - Migration / one-shot maintenance queries (run once, small data)
# - Bulk-write operations (UPDATE/DELETE without filter)
# - FK-cascade or sub-DELETE that scans a referenced table without an index
# - FTS5 MATCH: reported as `SCAN <fts> VIRTUAL TABLE INDEX` — this IS the
# index-backed path (replaces the old leading-wildcard LIKE full scans).
# - LIMIT-bounded primary-key scan (ORDER BY id DESC LIMIT N — actually
# O(N), shows as SCAN in EXPLAIN but not actionable via index)
db/action.go:399 SCAN actions
db/db.go:173 SCAN tasks
db/db.go:190 SCAN actions
db/db.go:348 SCAN actions
db/db.go:364 SCAN schedules
# db/db.go:408 — dropStaleCountUpdateTrigger: sqlite_master lookup, no index possible
db/db.go:408 SCAN sqlite_master
# db/db.go:429-432 — rebuildTaskActionCounts: one-shot full rebuild on trigger migration
db/db.go:429 SCAN task_action_counts
db/db.go:432 SCAN actions
db/db.go:446 SCAN CONSTANT
db/db.go:446 SCAN task_action_counts
db/db.go:452 SCAN actions
# db/event.go:76 — ListRecentEvents: LIMIT-bounded PK-order scan
# (ORDER BY id DESC LIMIT ?), not a real full scan; no index will help.
db/event.go:76 SCAN events
db/project.go:37 SCAN projects
db/schedule.go:58 SCAN schedules
# db/settings.go — ListSettings: full-table list of a tiny KV table, no WHERE
db/settings.go:29 SCAN settings
db/search.go:152 SCAN actions_fts
db/search.go:152 SCAN events_fts
db/search.go:152 SCAN tasks_fts
db/task.go:422 SCAN tasks