docs: capture architectural knowledge (design-principles + Architecture-Internals) - #1175
Open
vringar wants to merge 2 commits into
Open
docs: capture architectural knowledge (design-principles + Architecture-Internals)#1175vringar wants to merge 2 commits into
vringar wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds developer documentation for OpenWPM design principles, starting with guidance to treat web content as hostile and prefer privileged communication paths.
Changes:
- Adds
docs/design-principles.rstwith rationale, consequences, and a worked example. - Adds the new page to the developer documentation toctree.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
docs/index.rst |
Adds the design principles page to developer docs navigation. |
docs/design-principles.rst |
Introduces the new design principles documentation page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vringar
force-pushed
the
docs/design-principles
branch
from
May 15, 2026 22:16
d20c2d1 to
3e7fe9e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1175 +/- ##
==========================================
- Coverage 62.36% 62.34% -0.03%
==========================================
Files 40 40
Lines 3930 3930
==========================================
- Hits 2451 2450 -1
- Misses 1479 1480 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vringar
force-pushed
the
docs/design-principles
branch
from
May 16, 2026 00:43
3e7fe9e to
e78ee9c
Compare
vringar
force-pushed
the
docs/design-principles
branch
from
June 19, 2026 23:22
e78ee9c to
df54435
Compare
vringar
added a commit
that referenced
this pull request
Jun 21, 2026
…ture-Internals Add docs/design-principles.rst: trust model, core principles (hostile web content, detection resistance, never drop data, robustness to misbehaving commands, reduce coupling), non-goals (no MV3/non-Firefox, no bit-for-bit reproducible crawls), and working norms (keep known-broken code, preserve functionality across Firefox upgrades). Convert Architecture-Internals.md to RST so it can deep-link into the autogenerated API docs via Sphinx cross-reference roles. Add a Design Rationale section (process split, extension-direct data path, mp.Queue vs socket rule, file-based startup handshake, privileged-socket history) and an Implications for Custom Commands section. Wire both pages into the developer-documentation toctree. Add lean pointers from AGENTS.md to the deep docs, keeping AGENTS.md a thin router per progressive-disclosure.
…OM-marker path The worked example in design-principles.rst presented routing the failure over a privileged extension-to-BrowserManager socket as the preferred, shipped approach. No such channel exists: the extension's only outbound socket is fire-and-forget to StorageController, and startup discovery is one-way file-based. The implemented path is the DOM marker (data-openwpm-instrument-error) that GetCommand reads back. Rewrite the example to describe the actual mechanism, name it as the acknowledged-imperfect current state, and note a privileged path would need new protocol.
vringar
force-pushed
the
docs/design-principles
branch
from
July 20, 2026 22:54
313f54c to
b9f7bc5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Externalizes architectural knowledge that previously lived only in the maintainer's head into reviewable, portable repo documentation. Content was gathered in a structured interview and is organized for progressive disclosure:
AGENTS.mdstays a lean router (loaded on every agent invocation), with depth in linked RST docs (loaded only when followed).docs/design-principles.rst(new)The why behind the codebase, each entry with rule + reasoning + worked example:
docs/Architecture-Internals.rst(converted from Markdown)RST conversion enables Sphinx cross-reference roles (
:py:class:,:py:meth:) that deep-link into the autogenerated API docs. Adds:StorageControlleris a separate process, why the extension talks to it directly, themp.Queue-vs-socket rule, the file-based startup handshake, and the privileged-socket history.BrowserManagersubprocess) and the correct patterns.Also fixes a stale method name and a malformed table.
docs/index.rst,AGENTS.mdBoth new pages wired into the developer-doc toctree (
Architecture-Internalswas previously orphaned).AGENTS.mdgets lean pointers into the deep docs plus short notes on testing philosophy, the SQLAlchemy schema-SSOT direction (#1161), the keep-known-broken-code norm, and project governance.Test plan
python -m sphinx -b html docs docs/_build/html— builds; every:py:/:doc:cross-reference in the new RST docs resolves (noreference target not foundwarnings from them).pre-commit runclean.Notes
design-principles.rstis a living document, intended to grow.ref.anywarnings from other Markdown docs (recommonmark not resolving relative file links) are unrelated to this change.