pig.py/neopig
russell@unturf.com ced92de67c
feat: optional arborist provenance sink (opt-in, default off)
Adds neopig/arborist_sink.py: when enabled, every crawled page neopig
stores is also committed to an arborist content-addressed store — a
Merkle document_root + append-only audit chain — alongside neopig's
existing md5/FileVault storage. Verifiable dedup + FTS5 + tamper-evident
provenance; replaces nothing.

Strictly opt-in: a hard no-op unless NEOPIG_ARBORIST_ENABLED is set AND
arborist is importable. neopig behaves byte-identically without it. This
keeps neopig public-domain by default — arborist is AGPL, pulled only
when an operator opts in. neopig never touches arborist's tables; all
writes go through arborist.embed (no-raw-SQL rule preserved). Sync
SQLite writes run off the event loop via to_thread, lock-serialized,
and failures are swallowed so the mirror can never break a crawl.

Wired into NeoPig.__init__ (self.arborist_sink) and the store_page hook
in the crawl path. Phase-0 scope: page text only; media-manifest edges
are a follow-on. Tests cover disabled-by-default, flag-without-arborist,
the page->Document mapping, and enabled end-to-end + content-idempotence.
2026-05-22 13:06:59 -04:00
..
backfill add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
__init__.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
arborist_sink.py feat: optional arborist provenance sink (opt-in, default off) 2026-05-22 13:06:59 -04:00
async_filevault.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
async_web_fetcher.py fix: fast_mode must ignore crawl-delay on robots-less sites 2026-05-22 09:15:22 -04:00
database.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
domain_vault.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
filevault.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
html2md.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
html_utils.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
live.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
logging.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
repo.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
screenshot.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00
state.py add canonical permacomputer preamble to all source files 2026-02-25 17:40:12 -05:00