- ci.yml: the Firefox package is built and checked beside the Chrome one.
- release.yml: three release files — the Chromium package (Chrome Web Store
and Edge Add-ons), the Firefox package and AMO's sources archive — each
staged by exact name so a missing one fails the run, both manifests checked
against the tag, SHA256SUMS over all three.
- One store job per store (docs/12 §3), each off until its repo variable is
true, each in its own GitHub Environment holding only its own secrets, each
checking the downloaded file against SHA256SUMS before uploading. They
install tools/publish — publish-browser-extension 6.2.0 and its three
dependencies, from their own lockfile, scripts off — instead of the ~320
packages of the dev toolchain, which the single old job installed next to
four Chrome secrets.
- The old job could not have worked: it sent CWS API v1.1 credentials, and
v1.1 was shut down on 2026-10-15. store-chrome uses v2 (publisher id and a
service account) and sets CHROME_API_VERSION explicitly. store-firefox is
listed and desktop-only; store-edge sends the Chromium package.
- Dependabot watches tools/publish; the licence gate reads its lockfile too.
- qodana.yaml: clean since the first run's findings were handled, so any new
one now fails that (non-required) workflow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wxt.config.ts now builds for the target browser (docs/08 §1, §9):
- `manifestVersion: 3` for every target — WXT built Firefox as MV2;
- Firefox gets browser_specific_settings.gecko — the permanent id
bookmarkmagic@poli0981.dev, strict_min_version 140.0 (the first that
accepts data_collection_permissions, which AMO requires of new add-ons),
and data_collection_permissions { required: ["none"] } — and no
minimum_chrome_version; Chrome keeps its floor of 136;
- Vite targets firefox140 for that package;
- the sources archive AMO reviews leaves out coverage, captures, store copy,
docs, tests and tools.
Permissions, CSP, pages and icons are identical in both packages.
check-manifest.mjs takes --browser chrome|firefox, mapped through a fixed
table to .output/<target>-mv3 (still no path from the command line), and
pins each package's exact key set and floor; the gecko block is compared key
order aside. New npm scripts: build:firefox, zip:firefox; verify:full builds
and checks both packages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first scan found 27 issues and no defect:
- two regular expressions that could be simpler, fixed: the sanitizer's
[\p{Extended_Pictographic}] class and wxt.config.ts's split(/[/]/). A third
is in src/ and waits for the 1.3.0 change, so this branch still builds
byte-for-byte what v1.2.1 shipped;
- 24 that contradict a rule of this repository, switched off in
qodana.yaml with the reason beside each: JSDoc completeness (doc comments
here are prose, docs/10 §6), bitwise operators in the PNG CRC-32 of
gen-icons.mjs, and the deliberately doubled dark palette in tokens.css.
`publish` failed: the qodana-report artifact holds a zip whose entries have
absolute names, so a glob for the SARIF found nothing. It now extracts the
one entry /qodana.sarif.json by name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
qodana.yml runs qodana-js (Ultimate, QODANA_TOKEN) on pushes to main, pull
requests, a weekly schedule and by hand, in two jobs (docs/12 §2.7):
- `scan` installs the dev dependencies with scripts off — qodana-js resolves
types through them — and holds only a read-only GITHUB_TOKEN; PR comments
and annotations are off, the SARIF report is kept as an artifact;
- `publish` installs nothing and uploads that SARIF to code scanning
(category qodana), so the findings sit beside CodeQL's.
The action is pinned to the commit of v2026.2.2 (the newest tag is younger
than the 7-day cooldown). Sharing a runner with dependency code is recorded
as an exception to the Sonar rule: the token can only upload reports.
triage.yml, from review of the first draft:
- comment and close first, label last — the label is what a re-run reads as
done, so it must not exist before the work;
- an `enhancement` issue with no answer to the form is closed only when the
owner added the label; otherwise it goes to needs-triage;
- checkout and setup-node pinned to commits, no cache: this workflow runs
them with a write token on events anyone can trigger.
README gains the Qodana badge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MAINTENANCE.md is the policy: dependency updates on a schedule, high and
critical advisories fixed as soon as a fix exists, major platform upgrades,
bug/UI/UX/accessibility/translation fixes, and features only when they are
on docs/15's roadmap or genuinely needed.
- The feature form asks one required question — on the roadmap, needed for
a fix, or something new — and links the policy and Discussions › Ideas.
- scripts/triage.mjs decides what happens, as a pure, unit-tested function;
.github/workflows/triage.yml carries it out with `gh` alone. Something new
is labelled maintenance-mode, commented and closed as not planned; the two
in-policy answers get needs-triage; an outside `feat…` pull request is
closed the same way. Owner, members, collaborators, bots and `roadmap` are
exempt.
- pull_request_target checks out the base branch only, runs nothing from the
pull request, and never interpolates a title or body into the shell.
- README gains a status badge and a "Project status" section; CONTRIBUTING,
the PR template and the issue chooser say what is accepted.
- docs: 00 status, 11 inventory, 12 §2.6 and §5 (labels), 13 §6, 15 (a
pointer to the policy, not a copy, and the decision-log rows); CLAUDE.md
Phase 10.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/check-licenses.mjs reads package-lock.json, where npm records each
package's own `license` field, and fails on anything outside two lists
(docs/09 §3.2):
- what the build compiles into the extension (svelte, clsx, wxt,
@wxt-dev/browser) must be permissive and GPL-3.0-compatible;
- everything else is build tooling that never ships, so file-level copyleft
(MPL-2.0, lightningcss) is also accepted; AGPL, source-available terms and
missing or custom licences are not.
SPDX expressions are evaluated, nothing is installed or fetched, and the
tests call the functions directly rather than spawning the script. It runs
in `verify`, CI's quality job and the release build.
The shipped list moves out of wxt.config.ts into
scripts/credited-packages.mjs, so the build gate, the notices test and the
licence gate read one list instead of two copies and a regex.
legal/THIRD_PARTY_NOTICES.md said the tooling was all MIT/Apache-2.0/ISC; the
lockfile also has BSD, 0BSD, MIT-0, BlueOak, CC0 and MPL-2.0. Corrected — a
description of tooling that never ships, so no LEGAL_VERSION bump (14 §3.1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Svelte's a11y_* checks are compiler warnings, and a warning never failed
anything: `npm run check` now runs svelte-check with --fail-on-warnings. It is
the only lint that reads the markup (Biome skips .svelte). The suite is at
zero warnings; the two deliberate exceptions carry a svelte-ignore.
scripts/screenshots.mjs built its sample tree without parentId, which Chrome
gives every node but the root. In the harness nothing could be placed beside
a sibling and the toolbar's Sort stayed disabled on a bookmark — found while
driving Alt+Up/Down through it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Translations (an independent native-style review of every key):
- ro export.csvNote said the bookmarks-bar folder itself is lost on CSV
export; only *which* folder is the bar is lost.
- ro: counts that are plain numbers use a label form ("Omise — deja în
acest browser: {n}") so 1 never reads as a plural; "din Chrome" for
the brand; mode names quoted exactly; the tagline, appDesc and listing
summary as a noun phrase instead of an informal imperative; the
backup promise in replaceWarning made explicit; GPL wording.
- zh-CN: quoted mode names match the real labels (全部替换); 一半 no
longer claims 50%; one name for Chrome's Bookmarks file; 您 only where
it earns its place; the English-only note no longer implies
translations exist.
- Uncertain strings carry TODO(review-zh/ro) for the native pass.
Code:
- Each language option carries its own `lang`, so endonyms are voiced
and drawn in their language (WCAG 3.1.2; Chinese vs Japanese glyphs).
- resolveLocale ignores -u-/-x- subtags; the docs/07 table states that
an explicit script wins and other zh regions get zh-CN.
- The listings' LANGUAGES line is built from LOCALES, and format tests
derive their locale lists, so a new locale cannot slip past them.
- screenshots.mjs back under 300 lines: one job list for --shoot.
- Unneeded casts removed from dictionaries.test.ts; docs/11 describes
the popup shots and what the sweep cannot cover.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- store/listing.zh_CN.md and store/listing.ro.md (best-effort, marked
TODO(review-zh) / TODO(review-ro)); every listing and the README now
name all five languages.
- The translation issue form offers 简体中文 and Română; CONTRIBUTING
explains the plural forms and the comma-below rule, and points at
docs/07 §6.
- scripts/screenshots.mjs photographs every locale, and the popup per
theme and language.
- tests/unit/i18n/touch-points.test.ts holds the files that cannot import
LOCALES (harness, check-manifest, the form, the listings) to the list;
the cedilla scan covers the Romanian listing too.
- Comments that said "three locales" or "VI/JA" now say what they mean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ro.ts, ro-notices.ts and ro-import.ts, written from Chrome's own ro
terminology (marcaj, Bara de marcaje, dosar) in the polite plural, and
marked TODO(review-ro) until a native pass (docs/07 §4).
- The first locale with three plural forms: every plural key carries
one / few / other ("1 marcaj", "5 marcaje", "20 de marcaje"); count-less
labels repeat the bare noun (docs/07 §5).
- Tests: comma-below ș ț only (a cedilla anywhere in the Romanian files
fails, comments included), "de" only in `other`, selectPluralForm at
the CLDR boundaries (0, 1, 2, 19, 20, 101, 120), tPlural end to end,
and ro-RO collation for Sort A→Z.
- _locales/ro/messages.json; check-manifest requires it.
- Română joins every dictionary's endonym list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- zh-CN.ts, zh-CN-notices.ts and zh-CN-import.ts, written from Chrome's
own zh-CN terminology (书签, 书签栏, 文件夹, 导入, 导出) and marked
TODO(review-zh) until a native pass (docs/07 §4).
- _locales/zh_CN/messages.json; check-manifest requires it.
- resolveLocale maps zh, zh-CN, zh-SG and zh-Hans* to zh-CN. zh-TW,
zh-HK, zh-MO and zh-Hant* get English, matching Chrome's own manifest
fallback (docs/07 §1-2).
- <html lang="zh-CN"> makes Chrome draw Simplified glyphs rather than
Japanese ones; Sort A→Z collates by pinyin.
- 简体中文 joins every dictionary's endonym list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A second adversarial review, of the review-fix commits themselves, found
six problems. All are fixed here.
- Focus after a delete: a delete from the duplicate panel, or from the trash
button of a row that did not have focus, left keyboard focus on <body>.
The dialog cannot hand focus back to a button that went with what it
deleted. `confirmDelete` now says where the delete was asked for: the
tree gets focus back, and the panel moves it to the next copy's button,
else to its close button. Checking for <body> was not enough: after a
dialog closes, focus sits on its button until the browser's next
rendering update, so a control in a closed dialog, or a detached one,
now counts as lost too. Confirmed in the harness for all three paths.
- Import step 04: confirming the safety backup removed both of its buttons
and dropped focus. A phase change now hands focus back to the heading.
- WebRTC: both gates matched `\bRTCPeerConnection\b`, which no word
boundary lets match `webkitRTCPeerConnection`, an alias Chrome still
ships. Prefixed aliases now count. The evasion comment in guard.mjs no
longer claims to cover every way of hiding a member name.
- New folder: Chrome fires onCreated before create() resolves, so the live
event could insert the folder first and newFolder then inserted a second
row with the same id. It now inserts only when the folder is not already
there, with a test that loses the race on purpose.
- Screenshot harness: `wxt build` empties .output first, and re-listing it
threw inside the request handler, which ended the process. It now answers
404 or 503 and recovers once the build is back.
- The duplicate summary uses one wrapper key instead of two fragments glued
together in markup (docs/07 §2); Japanese gets its own separator again.
- Docs: the popup's tabId and `tabs.getCurrent` (docs/02 §6, 08 §2), the
new-folder race (03 §3), focus after deletes and import phases (06 §5).
SonarCloud's scan job now also receives the generated .wxt/, so
tsconfig.json's `extends` and the `@/` alias resolve (12 §2.5).
- Tests for edit/tree-keys.ts, which had none, and for the focus helpers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SonarCloud's quality gate failed PR #27 on two findings in new code.
- S2083 (blocker): the screenshot harness built the file path from the
request and then checked it stayed inside the build. The check held, but
taint analysis cannot see a prefix test, so the harness now lists the
build once and serves only files from that index; a request can name a
file only by looking it up. It re-lists once on a miss, so a rebuild
while it runs still works. Probed: valid files 200; `..`, `%2e%2e`,
`%2F` and `%5C` traversals 404; a malformed escape 400.
- S8786: `^\s*\d*\s*$` in the CSV sanitizer let two `\s*` compete for the
same blanks. `^\d*$` on the trimmed value means the same and is linear.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Findings 5–9 of the security review of 1.1.0. None broke the zero-network
or permission promises of the shipped build; each made a claim stronger
than the code behind it.
- Diagnostics: every DiagEvent string field is now a union of fixed values
(import phases, FileFormat, the ErrorKeys describeError returns, the two
edit actions, the three storage issues), and error names pass an
allowlist, logged as 'other' otherwise. `@ts-expect-error` cases keep a
title from compiling instead of trusting review.
- guard.mjs: optional-chained computed access on globals, `Reflect`, and
member names assembled from strings or templates (`el['inner' + 'HTML']`)
all got past it.
- check-manifest.mjs: the bundle is scanned for the same identifiers as the
source, as bare words — `fetch.call`, aliases, RTCPeerConnection and
importScripts shipped unseen — and every src/href in the built pages must
exist inside the package.
- CSP: `default-src 'none'` closes everything unlisted. Every directive the
pages use is listed, so nothing changes for them; the harness pages load
with no violation.
- screenshots.mjs: listens on 127.0.0.1 only, checks `OUT + sep` rather than
a bare prefix, decodes paths safely, and runs Chrome asynchronously — the
synchronous exec blocked the very server Chrome was waiting on, so
`--shoot` hung forever.
- SonarCloud: coverage runs in a job with no secret; the scan job installs
nothing and receives lcov as an artifact. A job's secrets are readable by
every step on its runner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the v1.1.0 adversarial review (security) and the docs pass:
- clsx (MIT) ships too — the Svelte runtime imports it — and wxt's browser
module as well as @wxt-dev/browser. All four are now credited in About,
PRIVACY, README and both notice files, and wxt.config.ts fails the build when
code from any uncredited package would ship; tests/unit/third-party.test.ts
keeps the notices in step with that list.
- Sanitizer, CSV: default-deny. A title with an unquoted comma — the row that
makes the extension report CSV_ROW_MISMATCH — shifted a file: path and free
text into columns no rule rewrote, and the host-only check passed them.
- Sanitizer, HTML: unknown attributes (Firefox POST_DATA, any DATA-*) are
rewritten; only dates, root markers and the charset line are kept.
- Sanitizer: a value-level leak check over CSV fields, attribute values and
JSON strings, and a refusal that prints counts only — it used to print the
leaked words and ask for them in a public issue.
- BM_ENV_ERROR_CODES joins the per-locale message check, with the four fixed
keys describeError maps; the popup no longer logs crashes nothing can read.
- docs 00/02/03/05/06/07/08/09/11/13 describe v1.1.0 (diagnostics moved to
09 §7; 13 §3 points at store/listing.* instead of a drifting copy); tokens
and gen-icons comments corrected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No LEGAL_VERSION bump: every change clarifies, corrects or removes an
obligation (docs/14 §3.1, new "contact details → No" row and a table of what
version 1 means).
- All four documents: version/date header and a copyright line.
- EULA clause 3 becomes a non-binding note — GPL-3.0 §10 forbids adding
restrictions; clause 6 gives legal@ and dmca@.
- DISCLAIMER describes Replace as it now behaves, and adds the name/fork
notice with takedown@ and dmca@.
- PRIVACY describes the in-memory diagnostics log, the Chrome Web Store's own
role, and that opening a bookmark is the browser's request, not ours;
contact privacy@.
- THIRD_PARTY_NOTICES lists the Svelte runtime and WXT's browser shim (MIT),
which the build always compiled in; the notices now ship as
THIRD_PARTY_NOTICES.txt and check:manifest requires the file.
- security@ (SECURITY.md), code@ (CoC, issue chooser), README Contact table;
contact@ retired. links.test.ts now scans all of src/ for an address.
- README: new formats and features, Sonar/CWS badges, verify:full, the
screenshot harness. Store listings EN/VI/JA follow.
- docs/15 decision rows, next direction and backlog; CLAUDE.md Phase 7, the
TS 7 / TS 6 alias rule and --ignore-scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every surface moves to the v1.1 design system: a header with the brand mark,
a route crumb and icon tabs with a sliding indicator; an IDE-style status bar
(local only · bookmarks, storage · version · licence · Settings · About);
numbered mono step labels on #import and #export; readout stats; mode and
format cards; marching-ants drop zone; striped progress; slide-in toasts; the
popup as launcher tiles over a live readout. Emoji glyphs are gone in favour of
the self-drawn icon set; all motion sits behind prefers-reduced-motion.
Behaviour fixed on the way:
- The Start button counts what will really be imported (a preview plan), and
Replace asks first, with the exact numbers it will delete and write (T4).
- The report counts bookmarks and folders separately, what was skipped and
reused, and where it all went — after a cancel or failure too (uM10, uM11).
- The backup hint names the file as the user saved it, not as suggested.
- Failure toasts stay until dismissed; export says "download started" and
keeps a failure's technical detail on screen.
- The popup routes an open Manager over a BroadcastChannel (refused while an
import writes), and no longer counts the three permanent roots as folders.
- Read-only previews and the export picker drop the role="tree" they never
implemented; both render 500 children at a time; "Everything" shows
indeterminate on a partial selection; the drop zone stops flickering.
- Per-route document titles; the status bar stays at the bottom of the window.
- The Move-to dialog no longer renders every folder while closed.
The Import tab's strings move to <lang>-import.ts so each locale file stays
under the size limit. scripts/screenshots.mjs serves the built extension with
a fake chrome and the production CSP, for visual QA and store screenshots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SonarCloud's second pass still flagged S8707: the directory to check came
from argv and flowed into file reads, and a startsWith() allowlist did not
count as sanitizing it. The CLI now only ever checks the repository's own
.output/chrome-mv3; the logic is an exported checkExtension(dir) (typed by
check-manifest.d.mts) that the tests call directly, so no command-line path
reaches a file read at all.
Path resolution moved inside the entry point: under Vitest's jsdom
environment import.meta.url is not a file: URL, so resolving it at module
load threw on import. The two Node-script suites now run in the node
environment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first CI-based SonarCloud scan failed the quality gate on its new-code
security rating, with two findings in check-manifest.mjs:
- S8707: it read whatever directory the CLI argument named. It now accepts
only paths inside this repository or the OS temp directory (where its
tests build fake extensions), and says so when it refuses.
- S8689: its success line echoed values read from the file. It now prints
constants — the manifest has just been proven equal to them.
And four S8786 regexes in guard.mjs plus one in the sanitizer, where a \s*
beside an optional quote beside another \s* could backtrack: each is now
written so no two quantifiers compete for the same characters, and the
markup rule is two linear steps (find the tag, then look inside it). The
sanitizer's JSON tokenizer no longer reassigns its loop counter (S2310).
While here: with no default-src, style-src was open, so a remote stylesheet
could still load. The CSP now adds `style-src 'self' 'unsafe-inline'`
(Svelte sets style attributes); check-manifest pins the new string.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sanitize-bookmarks.mjs accepted any JSON object and rewrote only "url" and
"title". Chrome's profile Bookmarks file keeps titles under "name" (plus
meta_info and a base64 sync_metadata blob), so it came out with every title
intact, passed the host-only leak check, and was written as "sanitized" —
the exact file a reporter whose import failed would attach.
- JSON dialects are recognised by shape (BookmarkMagic, Chrome profile,
Firefox backup); any other JSON is refused. Rewriting is default-deny: a
small tokenizer tracks the key of every string value and replaces all of
them except structural keys (types, ids, timestamps, root GUIDs), by span,
so layout and key order stay byte-identical.
- The backstop now reads the output's TEXT: for HTML it strips markup and
refuses on any word that is not a placeholder — independent of the
rewriting rules, unlike the old host-only check whose test shared its
blind spots. <DD class=…> notes, file: ICON_URIs and <H1>/<TITLE>
owner names are rewritten.
- Attribute values decode in one pass (CodeQL js/double-escaping), <DD>
bodies are found in linear time (Sonar S8786), the input is never
overwritten, size is checked before reading, and bytes are bytes.
- The 627-line file is split into scripts/sanitize/ modules; the
user-facing entry stays plain .mjs for reporters on any Node.
gen-fixture.mjs validates its flags (whole numbers >= 1, values required, no
unknown flags) and its loop visibly advances (Sonar S2189 blocker).
gen-icons.mjs says what is true: it is the icons' source of truth.
Every script now carries // @ts-check and tsconfig.scripts.json runs them
through the TS 7 tsc in `npm run check`; docs/10's size rule names .mjs.
Regenerated icons are byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The "no network access" claim rested on one grep gate. An audit ran its
exact patterns against 28 bypasses and every one got through — an alias
(`const go = fetch`), computed global access, a call split over two lines,
`innerHTML +=`, `{ @html }`, remote url() in CSS — and a checkout path with
a space or diacritic made it scan nothing and print "clean". Now:
1. The production manifest declares an extension-page CSP with
`connect-src 'none'` (plus closed img/font/media/frame/form sources), so
Chrome itself refuses every fetch, XHR, WebSocket, EventSource and beacon.
No default-src, so Svelte styles are untouched; dev builds omit it so
the HMR websocket works. docs/08 used to say "never add a CSP" because
MV3 forbids loosening — tightening was always allowed.
2. check:manifest scans every shipped .js for network APIs (dependency code
included), pins the exact CSP and the Chrome floor, checks that every
file the manifest and pages reference exists, resolves paths from the
script instead of the cwd, and sets exitCode instead of exit().
Vite's modulepreload polyfill — the one network call in the bundle — is
disabled; every Chrome at the floor supports modulepreload natively.
3. guard.mjs matches whole files (so \s* spans newlines), bans the API
identifiers outright, bans computed access on globals, scans .html and
.css, has no test-file exemption, uses fileURLToPath, and fails when it
scanned nothing. docs/08 §3 points at the file instead of restating it;
the restated copy had already drifted.
Both scripts finally have tests (48 + 18 cases, every audited bypass
included). One src comment named the API in prose and is reworded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six lenses over the branch, each finding independently attacked by a verifier
told to refute it. 31 filed, 18 survived, clustering into five real defects —
and the pattern held: every one is in work added earlier in this same branch.
**The sanitizer did not keep its promise (9 findings).** It is the single
privacy control in the intake flow, named as mandatory in SECURITY.md, README,
CONTRIBUTING, the privacy policy and the issue form — and it leaked in nine
distinct ways. Worst: `detectKind` fell back to 'csv' for anything it could not
identify, `sanitizeCsv` then matched no columns, and the input was emitted
verbatim with exit code 0. The users who run this tool are by definition the
ones whose file did not import, so a truncated or hand-excerpted file is the
TYPICAL input — and `tests/fixtures/malformed/no-doctype.html`, already in the
repo, reproduced it. The test could not catch any of this: it returned early
whenever the original failed to parse, so it passed vacuously on precisely the
dangerous inputs.
Nine holes found in one pass is not a signal to patch nine holes. The rules are
regexes over untrusted markup, so "we thought of every shape" is not a claim
anyone can make honestly. So the tool now fails safe:
- unidentified input is REFUSED, matching core detectFormat rather than being
weaker than the parser it fronts;
- the output is checked before it is written — any host that is not one of our
own `*.example` aliases means a rule missed something, and the file is refused
with the leaked host named. A rule this misses now degrades into an annoying
refusal instead of a published browsing history.
The individual holes are fixed too: single-quoted and bare attribute values were
never matched (a straight leak); `spansFrom` located capture groups by searching
the match text, landing on the wrong copy — replaced with the `d` flag's exact
offsets; overlapping spans spliced already-rewritten text using offsets measured
against the original; `[^<]*` made a title containing a raw `<` fail to match
entirely; `<DD>` stopped at the first newline, publishing the rest of a wrapped
note; and replaceSpans rebuilt the whole string per span, O(spans x file).
**The import report pointed users at a backup that was never written.** The
guard was "mode is replace and this is not a BmBackupError", but runImport
resolves the roots BEFORE proving the backup — so NO_WRITABLE_ROOTS, added in
this same branch, reaches the catch with nothing on disk. Now keyed on the
onClearing callback, which is the only signal that proveBackup actually
returned.
**Cancelling a Replace after the clear read as a harmless no-op.** The tree is
gone and only `created` of it rebuilt; "N items created" alone, on a browser
that is now nearly empty, is the wrong story. It now says so and names the
backup.
**Collapsing a folder while a search was active re-opened it instantly.** The
$effect read and wrote the same two `$state` sets, making it its own dependency:
every write re-invalidated it and it re-merged an unchanged `search.expand`.
Reproduced against the real Svelte runtime — `$effect` is stripped under this
repo's vitest config, so no unit test could have seen it. Fixed with `untrack`,
which also removes the self-retrigger loop.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
notify-ci-failure.yml called a reusable that declares DISCORD_CI_WEBHOOK as
`required: true`, which GitHub validates before any of the reusable's own logic
runs. With the secret unset — docs/00 §10.6 lists it as still open — that
workflow failed on *every* CI completion, success included, from the first push
after it landed. The file's own header comment admitted it. This is precisely
the failure mode commit 5f4c6e7 fixed for releases: a run that is red for a
reason nobody acts on teaches everyone to stop reading the colour, and the next
genuine failure goes unnoticed.
release.yml's `gh release create` had no existence check, so any failure after
it — realistically the CWS publish step, once autopublish is on — stranded the
tag: a re-run could not get past that line, and recovery meant deleting the
Release and the tag by hand. v1.0.1 is the first tag to exercise that path at
all, since both the continue-on-error announce fix and tag_override landed
after the v1.0.0 tag object.
check-manifest.mjs now asserts the exact top-level key SET, not just the absence
of ten enumerated reach-widening keys. The forbidden list can only catch what
someone thought to name; this catches a build tool that starts emitting a key
nobody asked for. That matters immediately: WXT is a 0.x dependency, so a
routine minor bump is exactly when it happens, and tests/unit/manifest.test.ts
is structurally blind to it — it reads wxt.config.ts, which a WXT upgrade cannot
change. Verified by injecting a `commands` key into a built manifest and
watching the gate fail.
docs/12's sample YAML updated in the same commit, so the drift this phase just
finished correcting does not immediately start again.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
docs/13 §6 stated as present-tense fact that "GitHub issues — templates route
bug reports with sample files", and docs/12 §5 carried the same as an unticked
box. Neither was true: .github/ held only FUNDING.yml, dependabot.yml and
workflows. Meanwhile the entire v1.0.x roadmap is "fixture + test per report",
which cannot happen if reports arrive without the file that broke.
Five issue forms plus a chooser, blank issues disabled. parser_report.yml is
the one that matters: it requires the sanitized sample, asks which browser
*version* produced the file, and asks explicitly for consent to commit the
sample as a GPL-3.0 fixture — it lives in a public repo forever, and nothing
previously asked.
scripts/sanitize-bookmarks.mjs makes "attach a sanitized sample" something a
reporter can actually do. It works by span replacement rather than by
reparsing, so every byte outside a replaced address or title is provably
untouched: BOM, doctype, line endings, tag and attribute case, quoting,
indentation and every timestamp survive, and so do the properties a parser
branches on — port, path depth, trailing slash, query-parameter count and
order, percent-escapes, HTML entities, and the distinctness of hosts that
dedupe depends on.
Its test asserts the promise rather than the implementation: for every fixture
in the repo, the sanitized file must detect as the same format, parse to the
same stats, warnings and topology — or fail with the same error code — and leak
no original hostname. Writing it immediately found three real defects: a data:
URL containing markup broke the title regex and left that bookmark's title
unsanitized; an & in an HREF came back as a bare &, silently repairing the
escaping of the file being reported; and Firefox's ICON_URI leaked a full
hostname past every other check. The last one is why URL-valued attributes are
now swept by value shape instead of by an enumerated list.
scripts/gen-fixture.mjs is the generator docs/11 §2 named, .gitignore has
always reserved a directory for, and the 2 s parse budget needed in order to be
measurable at all.
CONTRIBUTING.md collects the five-file ritual for turning a user's file into a
regression test, which was previously spread across CLAUDE.md, docs/04 and
docs/11 with no single entry point — including the .gitattributes rule that
stops EOL normalization destroying the bytes a bug depends on.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Five lenses filed 20; 8 survived verification.
**release.yml would have failed on the first tag.** The `announce` job called
the ops reusable with no `with:` block, but that reusable resolves
TAG="${INPUT_TAG:-$EVENT_TAG}" where EVENT_TAG is github.event.release.tag_name
-- empty, because this workflow is triggered by `on: push: tags`, not
`on: release`. The job would have exited 1 on "No release tag available" for
every release. Filed independently by three lenses and confirmed against the
reusable's actual source; docs/12 §2.3 had the same omission and is fixed too.
Ironically the comment right above it explains why the workflow deliberately is
not event-driven -- which is exactly what makes tag_override mandatory.
**Nothing checked the BUILT manifest.** The unit test reads wxt.config.ts,
which proves what we ask for, not what WXT emits. Those differ: a dev build of
this same config carries ["bookmarks","storage","tabs","scripting"] and
host_permissions ["http://localhost/*"]. Production is clean, but that is
WXT's behaviour, not ours. scripts/check-manifest.mjs now gates the artifact
and runs in both CI and release; verified by editing a built manifest. The
README sentence claiming a test asserted the built manifest was false and is
corrected -- the same overclaim I had already made once verbally.
**The contrast test I added last commit could not see its own bypass.**
TabBar's `.locked { opacity: 0.65 }` composites --fg-muted against the page and
drops the label to 2.83:1. The test reads token values, so alpha applied on top
is invisible to it. Opacity removed; the padlock and title already carried the
signal. TEXT_PAIRS also widened to check the status colours on --bg, not only
--bg-raised.
**docs/09 T3 was signed off with half its mitigation unbuilt.** The row has
always specified a ⚠ badge for dangerous schemes; only the blocking existed. A
`javascript:` bookmark titled "Your bank" rendered identically to a safe one
and its Open button silently did nothing. isBlockedUrl now drives a badge, and
a refused open raises a toast.
Also: the five row action buttons had glyphs as their accessible names (content
beats title in accname), so voice control could not address them; the manifest
test's literal-harvesting regex would have passed a spread or identifier;
resolveNewFolderParent returned a focused unmodifiable folder's id, which every
create rejects; and clipboard.ts was the only new module with no test.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Scaffolds the project per CLAUDE.md Phase 0 and docs/01, 02, 06, 07, 08, 10.
Both entrypoints render, and `npm run verify` is green.
- WXT 0.20.27 + Svelte 5 runes + TypeScript 6 strict, srcDir: 'src'.
- Manifest carries exactly ["bookmarks", "storage"], no host permissions, no
background worker, and never loosens the MV3 default CSP. Verified against
the built artifact, not just the config.
- scripts/guard.mjs implements the canonical grep gate from docs/08 §3 as a
single Node-stdlib script, so the same gate runs locally and in CI and
cannot drift between them.
- scripts/gen-icons.mjs writes placeholder PNGs by hand (zlib + CRC32), so no
image dependency enters the tree and the manifest loads before the designed
icon exists.
- i18n: en/vi/ja dictionaries with `satisfies Dict` (never `as const` — see
docs/07 §2), plus a pure resolve-locale module so locale mapping is testable
without the runes runtime.
- Tests run under jsdom, including an environment canary asserting the
implied-end-tag DL nesting and `:scope >` behaviour the Netscape parser will
depend on, and that a parsed hostile document stays inert.
- legal/ drafts, SECURITY.md, FUNDING.yml and .nvmrc land now because the
About tab and first-run gate link to them from the very first screens.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>