Skip to content

Commit 9e285a9

Browse files
committed
fix: skip analyze/tag/extract_links for link-sourced stub items
Add _source=link guard to after-write fragments for analyze, auto_tag, and extract_links. Stub items created by URL-following (extract_links with create_targets=true) now skip expensive background processing. Prevents wasteful work and blocks potential recursive crawling. resolve_stubs already had this guard.
1 parent 9fed307 commit 9e285a9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

keep/builtin_state_docs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,19 +324,19 @@
324324
""",
325325
"analyze": """\
326326
rules:
327-
- when: "!item.is_system_note"
327+
- when: "!item.is_system_note && !(has(item.tags._source) && item.tags._source == 'link')"
328328
id: analyzed
329329
do: analyze
330330
""",
331331
"tag": """\
332332
rules:
333-
- when: "!item.is_system_note && item.has_content"
333+
- when: "!item.is_system_note && item.has_content && !(has(item.tags._source) && item.tags._source == 'link')"
334334
id: tagged
335335
do: auto_tag
336336
""",
337337
"links": """\
338338
rules:
339-
- when: "!item.is_system_note && item.has_content && item.content_type == 'text/markdown'"
339+
- when: "!item.is_system_note && item.has_content && item.content_type == 'text/markdown' && !(has(item.tags._source) && item.tags._source == 'link')"
340340
id: linked
341341
do: extract_links
342342
with:

0 commit comments

Comments
 (0)