Implement filter-list ingestion, subscriptions, and Star-Lang rule compilation #3

Open
opened 2026-09-11 05:16:30 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-09-11 05:16:30 +00:00 (Migrated from github.com)

Parent: #1
Depends on: #2

Goal

Make Nyxt Guard able to consume ad-block/filter lists, including user-added lists, and compile them into the Star-Lang blocking engine.

Scope

  • Accept local files and remote subscription URLs.
  • Support built-in/default lists plus arbitrary user-added lists.
  • Parse supported uBlock/ABP-style network and cosmetic filter syntax into a normalized intermediate representation.
  • Compile normalized filters into Star-Lang facts/rules or another Star-Lang-native executable representation.
  • Track list metadata: source URL/path, enabled state, title, last update, checksum/version, parse errors, rule counts, provenance.
  • Refresh remote subscriptions safely and atomically.
  • Deduplicate rules while retaining provenance back to source lists.
  • Allow enable/disable/remove/update of individual lists without rebuilding unrelated state where avoidable.
  • Support user-authored local/custom rules in addition to subscribed lists.

Required behavior

  • A user can paste a filter-list URL and have it become an enabled source after validation.
  • Bad or partially unsupported rules do not crash the engine; errors are surfaced with source/line context.
  • Existing good compiled state remains active if a list refresh fails.
  • Rule decisions can identify the source list and original rule.

Acceptance criteria

  • Fixture tests cover representative network filters, exceptions, domains, resource options, cosmetic filters, comments/metadata, malformed rules, and duplicate rules.
  • Custom local lists and remote subscription lists both work.
  • List state persists across Nyxt restarts.
  • The compiler output is consumed by the Star-Lang engine contract from #2, not evaluated by a separate JavaScript blocker.
Parent: #1 Depends on: #2 ## Goal Make Nyxt Guard able to consume ad-block/filter lists, including user-added lists, and compile them into the Star-Lang blocking engine. ## Scope - Accept local files and remote subscription URLs. - Support built-in/default lists plus arbitrary user-added lists. - Parse supported uBlock/ABP-style network and cosmetic filter syntax into a normalized intermediate representation. - Compile normalized filters into Star-Lang facts/rules or another Star-Lang-native executable representation. - Track list metadata: source URL/path, enabled state, title, last update, checksum/version, parse errors, rule counts, provenance. - Refresh remote subscriptions safely and atomically. - Deduplicate rules while retaining provenance back to source lists. - Allow enable/disable/remove/update of individual lists without rebuilding unrelated state where avoidable. - Support user-authored local/custom rules in addition to subscribed lists. ## Required behavior - A user can paste a filter-list URL and have it become an enabled source after validation. - Bad or partially unsupported rules do not crash the engine; errors are surfaced with source/line context. - Existing good compiled state remains active if a list refresh fails. - Rule decisions can identify the source list and original rule. ## Acceptance criteria - Fixture tests cover representative network filters, exceptions, domains, resource options, cosmetic filters, comments/metadata, malformed rules, and duplicate rules. - Custom local lists and remote subscription lists both work. - List state persists across Nyxt restarts. - The compiler output is consumed by the Star-Lang engine contract from #2, not evaluated by a separate JavaScript blocker.
Sign in to join this conversation.
No description provided.