Files
HackBrowserData/rfcs/002-browsers.md
T
Roger c86f54a010 docs: rewrite the RFCs as an outline of the decisions (#681)
21 RFCs repeated the code's names, steps, lists, and version history, so one rename touched eleven of them;
eight short ones now keep only what was decided and why, and change only when a decision does.
2026-11-02 11:48:13 +08:00

1.6 KiB

RFC-002: Browsers

Decision

The supported browsers are a data table, not code. A row says what a browser is called, what it is built on — its base: Chromium, Firefox, or Safari — and where it keeps its data on each OS; the base decides how that data is read. A plain fork is a new row and nothing else.

Why

Facts spread across several lists drift apart, and fork checks scattered across files are easy to miss. One table is auditable at a glance, and base behavior is written three times in total, not once per browser.

Rules

  • The name is the identity. The base is the only classification. A release channel that keeps its own data, such as a beta, is its own row.
  • Exceptions stay inside their base. A fork that stores data its own way gets an override inside its base, keyed by name, never a new classification.
  • One table serves every OS. The browsers supported here are the rows with data on this OS, while restore may look up any row, so data taken on one OS restores on another.
  • Discovery reports; it never guesses. Every matching data directory counts. One that exists but cannot be read is an error, not absence, and a profile counts only when it holds data some category reads.
  • Tests keep facts in step. Facts that must agree across languages, such as the Windows payload's own browser table, are checked by tests, not by review.

Rejected

  • One type per browser: the same logic implemented again and again.
  • An enum of products: every fork would become a code change.
  • Self-registering browsers: hidden coupling at init time.