AI SOURCE WATCH / 03 / FINALISTS DEEP DIVE / 2026-09-07

changedetection.io, urlwatch и direct adapters.

Детальный разбор двух основных watcher-кандидатов и трёх специализированных путей: GitHub events, RSS/Atom/RSSHub и Docling-based document diff. Здесь важно не выбрать один универсальный инструмент, а собрать правильные адаптеры под разные источники.

Предварительная архитектурная гипотеза: Source Watch Core остаётся нашим. changedetection.io или urlwatch закрывает generic web fetch/diff; GitHub events идут напрямую; feeds нормализуются отдельно; PDF/документы сравниваются после structured parse через Docling.

1. Разделение ролей

GENERIC HTML / JSON
→ changedetection.io OR urlwatch

GITHUB
→ webhook/API directly

RSS / ATOM
→ native feed consumer
→ RSSHub only when feed must be synthesized

PDF / MANUAL / DOCUMENT
→ fetch
→ Docling
→ structured diff

ALL PATHS
→ our SourceSnapshot
→ our ChangeEvent
→ our significance/freshness policy
→ Dossier / Researcher / Curator
Не строить Source Watch вокруг одного vendor-specific event model.

2. changedetection.io — deep dive

Strong fit

Mapping to our domain

changedetection watch UUID
= external_watch_id

our watch_id
= canonical

history item
→ candidate SourceSnapshot

detected difference
→ raw diff only

our ChangeClassifier
→ semantic type + severity

What NOT to delegate

freshness policy
version scope
change severity
Researcher routing
Curator stale-check
Dossier event semantics
canonical SourceRef identity

Integration risks

Likely role: REUSE/ADAPT as generic web watcher service.

3. urlwatch — deep dive

Architecture advantage

urlwatch ближе к библиотеке/CLI-подобному engine: fetch → filter → compare → report. Для нашей системы это может быть преимуществом, потому что scheduler, domain state и routing у нас всё равно свои.

Ideal flow

our WatchTarget
→ urlwatch job config
→ fetch
→ filters
→ normalized content
→ diff
→ our snapshot storage
→ our classifier

Where it wins

Where it loses

Likely role: REUSE as lightweight engine/baseline.

4. GitHub event adapter

Why direct

GitHub already emits structured events. Official webhooks include globally unique delivery IDs, event headers and SHA-256 HMAC signatures when a secret is configured. Release events require at least read access to repository Contents for a GitHub App; repository security advisory events require the relevant advisory permission.

Canonical event mapping

X-GitHub-Delivery
→ external_event_id / dedup key

release.published
→ VERSION_RELEASE

repository_advisory.published
→ SECURITY_CHANGE

push
→ inspect changed paths
→ docs/changelog change candidate

repository.archived
→ SOURCE_STATE_CHANGE

Security contract

verify X-Hub-Signature-256
verify expected event type
verify repository identity
deduplicate delivery GUID
store raw payload hash
never execute payload text

Fallback for repos we do not control

public REST polling
release feeds where available
page watcher
RSS adapter

5. RSS / Atom / RSSHub adapter

Native feeds first

if site has RSS/Atom:
use it directly

if no feed:
RSSHub may synthesize one

do not use RSSHub
when native structured API exists

Snapshot model for feeds

FeedSnapshot:
feed URL
ETag
Last-Modified
item GUIDs
published/updated
content hash

Change mapping

new GUID
→ NEW_ITEM

same GUID + content changed
→ ITEM_UPDATED

item disappears
→ usually NOT deletion event
unless source semantics guarantee it

RSSHub risk

Маршруты, основанные на scraping, могут ломаться при изменениях сайта. Поэтому RSSHub adapter должен иметь health/failure state и не скрывать источник происхождения feed.

6. Docling document diff

Why raw hash is insufficient

old.pdf hash != new.pdf hash
can mean:
metadata changed
compression changed
producer changed
layout changed

but text can be identical.

Canonical document pipeline

fetch file
→ binary hash
→ Docling parse
→ canonical blocks
→ block IDs / page anchors
→ normalized structured representation
→ section/table diff
→ semantic classifier

Diff classes

LAYOUT_ONLY
TEXT_MINOR
TEXT_MAJOR
TABLE_VALUE_CHANGED
WARNING_ADDED
WARNING_REMOVED
SECTION_ADDED
SECTION_REMOVED
VERSION_METADATA_CHANGED

Reuse benefit

Docling уже является сильным reuse-кандидатом в общей экосистеме ИИшки, поэтому Source Watch не должен строить второй PDF parser.

7. Adapter contracts

WatchAdapter

create_watch()
update_watch()
delete_watch()
fetch_now()
get_health()
export_state()

FetchResult

{
  "watch_id": "...",
  "retrieved_at": "...",
  "status": "OK|NOT_MODIFIED|FAILED",

  "http": {...},
  "raw_hash": "...",
  "normalized_hash": "...",

  "content_ref": "...",
  "structured_state": {...}
}

DiffResult

{
  "old_snapshot_id": "...",
  "new_snapshot_id": "...",

  "changed": true,
  "raw_diff": "...",
  "structured_diff": {...},

  "engine": "changedetection|urlwatch|docling|github|rss"
}

Boundary

Adapter сообщает «что изменилось технически». Source Watch Policy решает «насколько это важно».

8. Security & fetch policy

allowlisted protocols:
https
optionally http for explicit targets

deny by default:
file://
localhost
169.254.169.254
private network ranges
unless explicitly approved internal source

protect against:
SSRF
redirect to private IP
credential leakage
unbounded downloads
zip bombs
huge HTML
infinite browser waits

Secrets

cookies
basic auth
API tokens
GitHub secrets

stored in secret store
referenced by secret_id
never stored in snapshot/diff text

GitHub

Webhook secret must be validated using the SHA-256 signature header before processing the payload.

9. server2 architecture/resource implications

PathExpected costRecommendation
plain HTTP/urlwatchLOWdefault
changedetection plain fetchLOW/MEDIUMgood general service
browser renderingHIGHERonly where needed
GitHub webhookVERY LOWpreferred event path
RSSLOWpreferred for feeds
Docling PDF parseBURSTYqueue + concurrency limits
Qwen semantic classificationEXPENSIVEonly after deterministic diff

Qwen use

hash same
→ STOP

normalized content same
→ STOP

small deterministic known change
→ classify without Qwen

ambiguous meaningful diff
→ Qwen semantic classifier

10. Exact practical spike

changedetection.io vs urlwatch

100 WatchTarget:
40 static HTML
20 dynamic HTML
10 JSON
10 release/changelog pages
20 synthetic controlled pages

Run:
24h accelerated schedule

Inject:
cosmetic
metadata
minor content
major warning
version
removal
404
timeout
redirect
rate limit

Measure

HIGH change recall
false meaningful alerts
fetch reliability
diff quality
selector effort
browser success
state export
restart recovery
idle RAM
peak RAM
CPU
disk growth
API integration effort

GitHub adapter

verify:
signature
duplicate X-GitHub-Delivery
release published
release edited
repository advisory
push docs path
malformed payload
replayed delivery

RSS adapter

ETag/304
new item
changed item
duplicate GUID
broken feed
RSSHub route failure

Docling adapter

binary-only PDF change
paragraph changed
table value changed
warning removed
page order changed
large manual

11. Preliminary decision before benchmark

LIKELY REUSE:
GitHub webhooks/API
native RSS/Atom
Docling structured parse

PRIMARY COMPETITION:
changedetection.io
vs
urlwatch

OUR BUILD:
WatchTarget model
SourceSnapshot canonical store
ChangeEvent taxonomy
freshness
significance
routing
security policy
idempotency
audit
Qwen semantic classifier

Decision logic

IF changedetection.io
gives materially better dynamic-page reliability
and manageable footprint/API:
→ ADAPT it as general watcher

ELSE IF urlwatch
covers target set with much lower complexity:
→ REUSE urlwatch engine

HYBRID is valid:
urlwatch default
changedetection/browser only for difficult pages
Следующий документ: `AI_source_watch_4_benchmark_и_golden_set.html` — formal benchmark dataset, golden changes, false-alert metrics, HIGH-change recall, resource tests и hard gates для выбора watcher path.

12. Sources