From e7e46104dc34dc853dcc5d80705f68d680d2ebdd Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Thu, 3 Sep 2026 09:13:15 -0700 Subject: [PATCH] core: doc comments drop the open/closed split The rule crate and the foundation crate are both Apache-2.0 in one workspace now, so "open", "closed" and "crosses the boundary" no longer describe anything. Comments only. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Vau2X53xGTjjTCXWMVBoNY --- crates/core/src/browser/driver.rs | 2 +- crates/core/src/browser/mod.rs | 14 +++++++------- crates/core/src/browser/page_checks.rs | 2 +- crates/core/src/browser/snapshot.rs | 7 +++---- crates/core/src/browser/visual.rs | 2 +- crates/core/src/checks/css_scan.rs | 2 +- crates/core/src/checks/html_patterns.rs | 2 +- crates/core/src/checks/measures.rs | 2 +- crates/core/src/checks/mod.rs | 14 +++++++------- crates/core/src/checks/rules.rs | 2 +- crates/core/src/checks/vectors_a.rs | 2 +- crates/core/src/checks/vectors_b.rs | 4 ++-- 12 files changed, 27 insertions(+), 28 deletions(-) diff --git a/crates/core/src/browser/driver.rs b/crates/core/src/browser/driver.rs index 203b12e28..e6a0c657f 100644 --- a/crates/core/src/browser/driver.rs +++ b/crates/core/src/browser/driver.rs @@ -10,7 +10,7 @@ use super::{BrowserConfig, BrowserFinding, FindingGroup}; use crate::js_ext_a::JsMap; use serde::Serialize; -/// The collect result is open (it crosses the boundary). +/// The collect result type is shared. pub use impeccable_foundation::browser::CollectResult; /// JS: checks.mjs#scopedIgnoreActive(el, ruleId) diff --git a/crates/core/src/browser/mod.rs b/crates/core/src/browser/mod.rs index c696b6126..b9c2151d8 100644 --- a/crates/core/src/browser/mod.rs +++ b/crates/core/src/browser/mod.rs @@ -6,18 +6,18 @@ //! the overlay UI. //! //! The probe trait itself, its snapshot implementation, the selector engine, -//! the test fake and the boundary types are open and live in +//! the test fake and the plain-data types live in //! `impeccable_foundation::browser`; they are re-exported here under the //! paths callers already use. //! //! Module map (one JS region each, so parallel work does not collide): //! -//! - `dom`: the [`dom::Dom`] trait, `ElId`, `Rect`, shared helpers (open). +//! - `dom`: the [`dom::Dom`] trait, `ElId`, `Rect`, shared helpers. //! - `snapshot`: [`snapshot::SnapshotDom`], the trait over a serialized page -//! (the extension's CSP-proof path, open), plus the one-shot findings run -//! that drives the checks below; `selector`: the Chrome-flavored selector -//! engine it matches with (open). -//! - `fake_dom`: a table-driven fake for unit tests (test builds only, open). +//! (the extension's CSP-proof path), plus the one-shot findings run that +//! drives the checks below; `selector`: the Chrome-flavored selector +//! engine it matches with. +//! - `fake_dom`: a table-driven fake for unit tests (test builds only). //! - `background`: Section 4 in browser mode — `readOwnBackgroundColor`, //! `readCascadeBackgroundColor`, `resolveBackgroundInfo`, //! `resolveBackground`, `resolveGradientStops`, `compositeGradientStops`. @@ -62,7 +62,7 @@ //! `parsePositionToken/Pair`, `resolvePaintedImageRect`, //! `resolveObjectImageRect`, `pointToImageSource`, `firstCssUrl`, //! `getLayerValue`, the candidate-analysis finalization. Its plain-data -//! plans and rects are open. The async pixel sampling (Image loading, +//! plans and rects are shared. The async pixel sampling (Image loading, //! canvas draws) stays JS and feeds these. //! //! Porting rules are the crate's usual ones (see docs/PORTING-GUIDE.md): diff --git a/crates/core/src/browser/page_checks.rs b/crates/core/src/browser/page_checks.rs index 116838af2..c738be1f0 100644 --- a/crates/core/src/browser/page_checks.rs +++ b/crates/core/src/browser/page_checks.rs @@ -25,7 +25,7 @@ use crate::js_ext_b::{slice_utf16_prefix, utf16_len}; use once_cell::sync::Lazy; use regex::Regex; -/// The hidden-text measurement result is open (it crosses the boundary). +/// The hidden-text measurement result type is shared. pub use impeccable_foundation::browser::HiddenTextMeasure; macro_rules! re { diff --git a/crates/core/src/browser/snapshot.rs b/crates/core/src/browser/snapshot.rs index 64ce966c3..c271f99c0 100644 --- a/crates/core/src/browser/snapshot.rs +++ b/crates/core/src/browser/snapshot.rs @@ -1,8 +1,7 @@ //! The snapshot DOM and its one-shot findings run. Everything except the -//! run itself is open and lives in `impeccable_foundation::browser::snapshot`; -//! this module re-exports it under the path callers already use and adds -//! [`collect_findings_from_snapshot`], which drives the closed browser -//! driver. +//! run itself lives in `impeccable_foundation::browser::snapshot`; this +//! module re-exports it under the path callers already use and adds +//! [`collect_findings_from_snapshot`], which drives the browser driver. pub use impeccable_foundation::browser::snapshot::*; diff --git a/crates/core/src/browser/visual.rs b/crates/core/src/browser/visual.rs index 38cc67f22..64eb15545 100644 --- a/crates/core/src/browser/visual.rs +++ b/crates/core/src/browser/visual.rs @@ -20,7 +20,7 @@ use regex::Regex; use serde::{Deserialize, Serialize}; use serde_json::{json, Map, Value}; -/// The plans and rects this subsystem passes around are open; re-exported +/// The plans and rects this subsystem passes around are shared; re-exported /// so `browser::visual` stays one path. pub use impeccable_foundation::browser::visual::*; diff --git a/crates/core/src/checks/css_scan.rs b/crates/core/src/checks/css_scan.rs index 50b68e26d..10cf9241a 100644 --- a/crates/core/src/checks/css_scan.rs +++ b/crates/core/src/checks/css_scan.rs @@ -18,7 +18,7 @@ use once_cell::sync::Lazy; use regex::Regex; /// The stylesheet-text utilities and finding shapes these scanners are built -/// on are open; re-exported so `checks::css_scan` stays one path. +/// on are shared; re-exported so `checks::css_scan` stays one path. pub use impeccable_foundation::css::scan::*; macro_rules! re { diff --git a/crates/core/src/checks/html_patterns.rs b/crates/core/src/checks/html_patterns.rs index af1c86c85..fa5163ee0 100644 --- a/crates/core/src/checks/html_patterns.rs +++ b/crates/core/src/checks/html_patterns.rs @@ -14,7 +14,7 @@ use crate::js_ext_a::{advance_utf16, is_word_byte, retreat_utf16}; use once_cell::sync::Lazy; use regex::Regex; -/// The corpora type is open; re-exported so `checks::html_patterns` stays +/// The corpora type is shared; re-exported so `checks::html_patterns` stays /// one path. pub use impeccable_foundation::rules::html_patterns::*; diff --git a/crates/core/src/checks/measures.rs b/crates/core/src/checks/measures.rs index 8331ad964..d6e58bc0e 100644 --- a/crates/core/src/checks/measures.rs +++ b/crates/core/src/checks/measures.rs @@ -17,7 +17,7 @@ use once_cell::sync::Lazy; use regex::Regex; /// The CSS value helpers, style traits and plain-data types these checks are -/// written against are open; re-exported so `checks::measures` stays one path. +/// written against are shared; re-exported so `checks::measures` stays one path. pub use impeccable_foundation::css::measures::*; /// JS `\d` is ASCII only. diff --git a/crates/core/src/checks/mod.rs b/crates/core/src/checks/mod.rs index f872e4c27..760af4962 100644 --- a/crates/core/src/checks/mod.rs +++ b/crates/core/src/checks/mod.rs @@ -1,9 +1,9 @@ //! Port of `cli/engine/rules/checks.mjs`, split by concern so parallel work -//! does not collide. Each module holds the closed part of its concern: the -//! `check_*` and `scan_*` functions and the heuristics behind them. The open -//! part (the plain-data inputs and outputs, the CSS and text utilities, the -//! selector and tag lists) lives in `impeccable_foundation` and is -//! re-exported at the top of each module, so `checks::rules::RuleHit`, +//! does not collide. Each module holds the rule half of its concern: the +//! `check_*` and `scan_*` functions and the heuristics behind them. The +//! shared half (the plain-data inputs and outputs, the CSS and text +//! utilities, the selector and tag lists) lives in `impeccable_foundation` +//! and is re-exported at the top of each module, so `checks::rules::RuleHit`, //! `checks::measures::StyleMap` and friends keep resolving here. //! //! - `rules`: Section 3 pure element checks (checkBorders, checkColors, @@ -35,8 +35,8 @@ //! browser ones live in `crate::browser` against the probe trait. //! //! `vectors_a` (rules, css_scan, html_patterns) and `vectors_b` (measures, -//! text_rules) hold the vector-replay dispatch arms for the closed functions -//! of `crate::vectors`; the open arms are dispatched by +//! text_rules) hold this crate's vector-replay dispatch arms for +//! `crate::vectors`; foundation's own arms are dispatched by //! `impeccable_foundation::vectors`. pub mod css_scan; diff --git a/crates/core/src/checks/rules.rs b/crates/core/src/checks/rules.rs index fd991265a..39d25784c 100644 --- a/crates/core/src/checks/rules.rs +++ b/crates/core/src/checks/rules.rs @@ -18,7 +18,7 @@ use crate::js_ext_a::{num_truthy, slice_utf16_start, split_commas_outside_parens use once_cell::sync::Lazy; use regex::Regex; -/// The hit and option structs these checks are written against are open; +/// The hit and option structs these checks are written against are shared; /// re-exported so `checks::rules` stays one path. pub use impeccable_foundation::rules::types::*; diff --git a/crates/core/src/checks/vectors_a.rs b/crates/core/src/checks/vectors_a.rs index 332dc807f..a49fafb78 100644 --- a/crates/core/src/checks/vectors_a.rs +++ b/crates/core/src/checks/vectors_a.rs @@ -1,4 +1,4 @@ -//! Vector-replay dispatch for the closed checks of group a (`rules`, +//! Vector-replay dispatch for the checks of group a (`rules`, //! `css_scan`, `html_patterns`). `crate::vectors::call` tries the open //! foundation arms first, then this; returns None for functions this group //! does not own. diff --git a/crates/core/src/checks/vectors_b.rs b/crates/core/src/checks/vectors_b.rs index 35dac74d2..13bc825af 100644 --- a/crates/core/src/checks/vectors_b.rs +++ b/crates/core/src/checks/vectors_b.rs @@ -1,5 +1,5 @@ -//! Vector-replay dispatch for the closed checks of group b (`measures`, -//! `text_rules`). `crate::vectors::call` tries the open foundation arms +//! Vector-replay dispatch for the checks of group b (`measures`, +//! `text_rules`). `crate::vectors::call` tries the foundation arms //! first, then this; returns None for functions this group does not own. use crate::checks::measures::{self, Finding};