Author SHA1 Message Date
poli0981andClaude Opus 5.5 a5c42c98e3 docs: record the quiet re-run of spikes S5 and S4
CI / ci-ok (push) Skipped
Security / workflow-lint (push) Skipped
Reusable / Security / Secrets (gitleaks) (pull_request) Successful in 12s
Reusable / Security / .NET (NuGetAudit) (pull_request) Skipped
Security / workflow-lint (pull_request) Successful in 26s
CI / Windows · clippy, tests (pull_request) Successful in 36s
Reusable / Security / Dependencies (osv-scanner) (pull_request) Successful in 15s
Reusable / Security / SAST (Opengrep) (pull_request) Successful in 28s
CI / Linux · fmt, clippy, rules, tests, coverage (pull_request) Successful in 42s
CI / ci-ok (pull_request) Successful in 3s
Reusable / Security / Rust (cargo-deny) (pull_request) Successful in 37s
Security / scan (pull_request) Successful in 1m19s
Re-ran the non-GUI measurements on 2026-12-06 with no compiler running
before or after.

S5: Argon2id medians are 10-28 % lower than the busy run (Standard
88 ms by default, 44 ms with `parallel`; the calibration cap 270 ms),
so the conclusions and D-40 stand. The kill test passed again: 6 x
1,000 kills, 0 corrupt, 0 missing; copy mode still breaks backups,
link and atomic do not (S5b-M1 done). Large save p50 is 57.9 ms on an
idle drive and 91.9 ms when run straight after the kill test: fsync of
5 MiB ranged 3.5-59.5 ms while the CPU steps stayed fixed.

S4: the driver re-run gives the same security, limit and lifecycle
results with slightly lower latencies; the browser re-run (S4-M5)
remains.

Docs 04 §5, 05 §9 and 17 §2.1 and the beta 0.1 changelog carry the
new figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 05:41:37 +07:00
poli0981andClaude Opus 5.5 c965aa6e42 docs: record spikes S2 and S4; settle the open spike choices (D-39...D-48)
CI / ci-ok (push) Skipped
Security / workflow-lint (push) Skipped
S2 (tray, hotkey, single instance, autostart) is partial: every automated
clause passes, 12,267 events with none missed or duplicated; the hour of
use and the visual checks by hand (S2-M1...M12) are open. S4 (native
messaging) passes on Chrome, Edge, Firefox and Brave; Vivaldi is untested.

On 2026-12-06 Kokone delegated the choices the spikes left open. The
options chosen are the most conservative ones the spikes support, and
every one is flagged for review:
- D-39 format encodings: AAD_slot (88 bytes, LE), AAD_field (u64 field
  id, credential id for passkey boxes), box layout, HKDF argument order
  and salts, kdf_id 0, flags and limit errors, padding. They become the
  format contract with the first golden fixture; a human reads
  mv-crypto and mv-vault against them before that.
- D-40 key derivation: argon2 parallel off, calibration unchanged and
  docs 00/05 aligned to doc 04, KDF memory page-locked best-effort,
  password length in code points after NFKC, unassigned code points
  refused when a password is set.
- D-41 static C runtime; D-42 short TOTP secrets accepted; D-43
  save-pipeline details (restore counter, sidecar notice and file hash,
  leftover notice, 2 s sharing-violation retry, retention, fs4 and
  tempfile dropped); D-44 SecureInput paste and input-method hints;
  D-45 cargo xtask ui-smoke.
- D-46 tray and hotkey on GPUI's main thread, close to tray goes
  headless, explicit foreground, no default hotkey, Store start-up
  activation; D-47 session-scoped pipe name, listener before the window,
  identity checks both ways, pipe in mv-platform without interprocess;
  D-48 browser integration: Brave at P0, exactly three registry keys,
  host never parents the app, one long-lived port, size checks.

Docs: S2 and S4 reports; docs 00, 02, 03, 04, 05, 06, 07, 08, 10, 11,
12, 14, 15, 17, 18; S3 and S5 reports; changelog; the seed notices
(gpui-kit 0.12.0; interprocess, fs4 and tempfile removed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 05:28:45 +07:00
poli0981andClaude Opus 5.5 edfade614d docs: S1b passes; approve gpui-kit 0.12.0 and the xxhash-rust exception
Kokone ran S1b's manual checklist on 2026-12-06: S1b-M1...M6 give the
same results as S1 on gpui-kit 0.10.0. Kokone also approved D-33 and the
crate-scoped licence exception for xxhash-rust (BSL-1.0), which arrives
through gpui-component 0.12.0 and notify 9.0.0.

- S1b report: verdict pass, criteria rows and checklist result.
- Doc 02 §2.7: the exception is approved; it enters deny.toml with the
  change that brings gpui-kit into the workspace (M1).
- Doc 17: S1b row, D-33 and the decision-log note.
- Changelog: the gpui-kit entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 05:14:33 +07:00
poli0981andClaude Opus 5.5 95e3820652 docs: record spike S3, SecureInput on GPUI
CI / ci-ok (push) Skipped
Security / workflow-lint (push) Skipped
S3 (2026-12-05/06) built SecureInput as a custom GPUI element on
gpui-kit 0.12.0. In six memory scans no copy of a typed password, whole
or as any run of six characters, was found outside its zeroising buffer;
the framework's masked input left 3 to 14 whole copies, some still there
30 s after clearing. The element reports that it accepts no text input,
so GPUI detaches the window's IME context while it has focus. That is
what Microsoft prescribes for password fields, and needs no unsafe, no
OS call and no new crate. The IME, suggestion, paste, Caps Lock, mouse
and Narrator checks by hand (S3-M1...M9) are open.

- Add docs/spike-reports/S3_SECURE_INPUT.md.
- Doc 12 §4: SecureInput as built; paste and keystroke-hook input
  methods become open questions.
- Doc 10: new §11 (secret text entry), page-locked buffer in §8.
- Docs 04 §10, 07 §5/§6, 02: one-character residue, RR-2 limited to
  reveal, no new crate, windows features for the paste read.
- Doc 17: S3 row, D-38 (proposed, flagged for review), q15-q17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 05:13:41 +07:00
poli0981andClaude Opus 5.5 c45f07acad docs: record spike S5, crypto core and save pipeline
S5 ran in two parts (2026-12-05/06). Every independent known-answer test
for the crypto core passes; the field-box vector waits on the AAD_field
encoding. argon2 0.6.0 runs lanes on one thread unless its parallel
feature is on. The save pipeline survived 10,000 random and 220
fixed-point kills with no corrupt or missing vault, but copying the
backup straight into its final name left an unopenable backup after
about 80 % of the kills in that step.

- Add docs/spike-reports/S5_CRYPTO_FORMAT.md: verdict partial, setup,
  measurements, findings, the crypto and format choices left open, the
  manual checklist (S5-M1/M2, S5b-M1...M4) and re-run commands.
- Doc 05: hard-link backups with a flushed-copy fallback (D-34), the
  leftover rule (D-35), lock retry, read-only files, sidecar after the
  replace; preliminary I/O numbers.
- Doc 03: the atomic replace is injected into mv-vault (D-36); sidecar
  path. Doc 14 and doc 15: cargo xtask kill-test and the VM power-cut
  test (D-37).
- Doc 04: lane answer, preliminary timings, caller-owned and wiped KDF
  memory, decoder copies, S5 column in the verification table. Docs 02,
  06, 07: crate features, byte strings, TOTP short secrets, temp files.
- Doc 17: S5 row, D-34...D-37 (proposed, flagged for review), q2
  answered, q13 (open crypto and format choices) and q14.

Nothing in the vault format, KDF parameters or crypto constructions is
decided here; where doc 04 or 05 leaves an encoding open, the docs now
point to q13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 05:13:40 +07:00
poli0981andClaude Opus 5.5 bebdba2d73 docs: move to gpui-kit 0.12.0 after the S1b re-check (D-33)
The version check found gpui-kit 0.12.0 (2026-11-30; gpui-pre 0.3.15),
two releases past the 0.10.0 that S1 measured. Spike S1b rebuilt S1's
shell on it: no source change, clippy clean, the UI Automation
pre-check matches S1 in EN, VI and JA, scrolling and start-up hold, and
idle private memory is about 17 MiB lower. S1's eight findings and
D-31's four conditions are unchanged.

One licence changes: gpui-component 0.12.0 pulls xxhash-rust (BSL-1.0)
through notify 9. Doc 02 gets a licence-exception table (2.7) with it as
proposed; deny.toml gains the exception only with the change that adds
gpui-kit to the workspace, after the maintainer approves it.

Also: the backend stays gpui-pre (never gpui-fast); no spell checker on
vault fields; LiveRegion for announcements; Windows still ignores the
text-scale hook; D-05 becomes version-neutral; R-01 gains the weekly
release cadence and the S1b gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 05:13:40 +07:00
poli0981andClaude Opus 5.5 365568b16e docs: record S10's Qodana runs; the missing-std diagnosis was wrong
Five local runs with the CI image (qodana-rust 2026.3-eap, digest
b7338b92...) all gave the same 48 results: 47 false type errors in xtask
and one expected warning about the git-ignored spikes directory. The
planned fix, installing the toolchain in the bootstrap, changed nothing,
and neither did the toolchain version or the edition.

The IDE does attach the standard library; SDKs.json lists no Rust std
for any project, so its empty roots were a false lead. What is missing
is the set of items core and alloc generate with macros. The next tests
are the GA image (a 6 GB pull for the maintainer to approve) and a
volume-backed cache. Qodana stays report-only and the Cloud baseline is
not reset.

The S10 report (with the 2026-12-02 data moved out of doc 17) is
docs/spike-reports/S10_QUALITY_PIPELINE.md; docs 02, 14, 15 and 17 and
the qodana.yaml comment follow it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 05:13:40 +07:00
poli0981andClaude Opus 5.5 df60536ab9 docs: index changelog with per-release files; betas are 0.x (D-32)
The root CHANGELOG.md becomes an index: a table of release series, the
file layout and the rules for writing entries. Release notes live in
changelog/beta/beta-0.<minor>.md, one file per beta series, and in
changelog/v1/v1.<minor>.<patch>.md, one file per stable release.
Unreleased work is written straight into the next release's file, so the
existing entries move to changelog/beta/beta-0.1.md under [Unreleased].

D-32 (Kokone, 2026-12-05): the public beta is numbered 0.1.0 and every
release before 1.0.0 is a 0.x.y release on the beta channel; this
replaces the v1.0.0-beta.N tags. Doc 18 section 4 and the release
checklist, the tag rule in doc 15 section 6.4 and milestone M5 follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 23:28:34 +07:00
poli0981andClaude Opus 5.5 74e2145260 docs: split doc 15 and move spike reports out of doc 17
Doc 15 had grown to 525 lines. It now keeps build, CI and the Git workflow
(sections 1-5, with the old section 14 as section 6) and is renamed
15_BUILD_CI.md. Packaging, signing, extension release, versioning, the
release checklist, reproducibility, distribution channels and the
Microsoft Store move to the new doc 18 (old sections 6-13 become 1-8).
Every reference in the docs, CLAUDE.md, README, CONTRIBUTING and config
comments points at the new place.

Doc 17 would pass the length limit once the S2-S5 results arrive, so
spike results now live in docs/spike-reports/, one file per spike, and
doc 17 section 2.1 is their index. The S1 result moves there unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 23:28:01 +07:00
poli0981 1daef88c6e Merge pull request 'docs: record the Microsoft Store reservation and the draft's to-do list (H-10)' (#4) from docs/store-reservation into main
CI / Linux · fmt, clippy, rules, tests, coverage (push) Successful in 51s
CI / Windows · clippy, tests (push) Successful in 33s
Reusable / Qodana / Qodana (push) Successful in 8m48s
Qodana / rust (push) Successful in 8m48s
Security / workflow-lint (push) Successful in 39s
Reusable / Security / .NET (NuGetAudit) (push) Skipped
Reusable / Security / Secrets (gitleaks) (push) Successful in 15s
Reusable / Security / SAST (Opengrep) (push) Successful in 21s
Reusable / Security / Dependencies (osv-scanner) (push) Successful in 26s
Reusable / Security / Rust (cargo-deny) (push) Successful in 52s
Security / scan (push) Successful in 1m56s
CI / ci-ok (push) Successful in 3s
Reviewed-on: #4
2026-12-02 16:32:22 +00:00
poli0981andClaude Opus 5.5 0702001bb8 docs: record the Microsoft Store reservation and the draft's to-do list
CI / ci-ok (push) Skipped
Security / workflow-lint (push) Skipped
CI / Linux · fmt, clippy, rules, tests, coverage (pull_request) Successful in 1m1s
CI / Windows · clippy, tests (pull_request) Successful in 40s
Security / workflow-lint (pull_request) Successful in 35s
Reusable / Security / .NET (NuGetAudit) (pull_request) Skipped
Reusable / Security / Secrets (gitleaks) (pull_request) Successful in 15s
Reusable / Security / SAST (Opengrep) (pull_request) Successful in 32s
Reusable / Security / Dependencies (osv-scanner) (pull_request) Successful in 19s
Reusable / Security / Rust (cargo-deny) (pull_request) Successful in 51s
Security / scan (pull_request) Successful in 1m58s
CI / ci-ok (pull_request) Successful in 3s
H-10 is done: on 2026-12-02 the maintainer reserved "MuteVault" in
Partner Center as an MSIX or PWA app, Store ID 9NCTTCXCB4NQ.

doc 15 §13 now holds the package identity values the packaging/msix
manifest has to use:
- Name: poli0981.MuteVault
- Publisher: CN=9E5A4476-77F7-44DF-823F-E9C51AB961C8
- PublisherDisplayName: poli0981
- PFN: poli0981.MuteVault_x5gr0vpkwx3ec

It also has a table of the open Submission 1 draft. The draft cannot be
submitted before an MSIX package exists (M5, after S13). Before
submitting:
- set the price to Free;
- pick a category;
- answer the privacy question and give a privacy-policy URL;
- fill in the support info;
- save the IARC rating that was already generated.
Two product declarations that are checked today should be unchecked:
- OneDrive backup of the package's AppData, which holds settings, logs
  and the device-bound unlock slots (D-19, doc 00);
- record and broadcast, which is meant for games and conflicts with the
  app's screen-capture exclusion (doc 10 §8).

doc 17 H-10 is marked done and points there. CHANGELOG notes the
reservation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 23:25:45 +07:00
poli0981 7fcd7c2ce6 Merge pull request 'docs: S1 passes — gpui-kit 0.10.0 shell on Windows 11 (D-30, D-31)' (#3) from docs/s1-gpui-shell into main
CI / Linux · fmt, clippy, rules, tests, coverage (push) Successful in 57s
CI / Windows · clippy, tests (push) Successful in 37s
Reusable / Qodana / Qodana (push) Successful in 6m52s
Qodana / rust (push) Successful in 6m52s
Security / workflow-lint (push) Successful in 40s
Reusable / Security / .NET (NuGetAudit) (push) Skipped
Reusable / Security / Secrets (gitleaks) (push) Successful in 22s
Reusable / Security / SAST (Opengrep) (push) Successful in 30s
Reusable / Security / Dependencies (osv-scanner) (push) Successful in 22s
Reusable / Security / Rust (cargo-deny) (push) Successful in 53s
Security / scan (push) Successful in 2m9s
CI / ci-ok (push) Successful in 4s
Reviewed-on: #3
2026-12-02 16:12:53 +00:00
35 changed files with 2572 additions and 613 deletions

No files matched your search

+31 -61
View File
@@ -1,74 +1,44 @@
# Changelog
All notable changes to MuteVault are recorded here.
All notable changes to MuteVault are recorded under `changelog/`. This file is the
index: it says where each release's notes live and how entries are written.
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the
project uses [Semantic Versioning](https://semver.org/).
Three version numbers move independently and are all noted when they change:
the application version, the vault format version (`docs/05_VAULT_FORMAT.md` §7) and the
## Releases
| Series | Versions | Status | Notes |
|---|---|---|---|
| Beta 0.1 | 0.1.x | In development, unreleased | [`changelog/beta/beta-0.1.md`](changelog/beta/beta-0.1.md) |
Newest series first. Add a row when a series starts, and set its status to "Released
YYYY-MM-DD" when its first version ships.
## Layout
- **Betas are 0.x releases** (D-32, doc 18 §4). One file per minor series:
`changelog/beta/beta-0.<minor>.md` holds 0.<minor>.0 and its patch releases, newest
first.
- **Stable releases** start at 1.0.0. One file per release:
`changelog/v1/v1.<minor>.<patch>.md`; a later major version gets its own folder
(`changelog/v2/`).
- **Unreleased work** is written straight into the file of the next release, under an
`## [Unreleased]` heading. When the release is tagged, that heading becomes the
version and date, and nothing moves between files.
## Writing entries
Three version numbers move independently and are all noted when they change: the
application version, the vault format version (`docs/05_VAULT_FORMAT.md` §7) and the
IPC protocol version (`docs/08_BROWSER_INTEGRATION.md` §6).
Entries that affect security are prefixed **Security**. Entries that change the vault
format are prefixed **Format** and say whether older versions can still open the file.
## [Unreleased]
### Added
- Spike S1 **passed** (2026-12-02, D-31): `gpui-kit` 0.10.0 is the application shell.
The results are in `docs/17_SPIKES_ROADMAP.md` §2.1: cold start about 210 ms, a
22 MiB release binary, a 65 MiB working set at idle, and Vietnamese and Japanese IME,
Narrator and 200 % scaling all working. Spike code lives in a git-ignored `spikes/`
directory outside the workspace (D-30).
- **Security** The threat model (doc 07 §5) now lists text-input services as an exposure
channel. S1 showed Windows' text-suggestion popup displaying a password typed into the
framework's masked input. Spike S3's pass criterion now includes switching these off.
- Repository bootstrap (2026-12-02), D-29:
- the documentation suite at the repository root, plus the GPL-3.0 licence text;
- a Cargo workspace whose only member is `xtask`. It enforces the doc 03 §3 layer
rules and the doc 14 §2 coverage gate, and runs the local check;
- the config files `deny.toml`, `clippy.toml`, `rustfmt.toml` and `rust-toolchain.toml`;
- the Gitea Actions workflows `ci.yml`, `security.yml` (with workflow linting),
`qodana.yml` and `notify-ci-failure.yml`, pinned to ops v2026.11.5;
- Renovate, through the central preset.
- Documentation suite v1.0 (2026-11-22): charter, feasibility study, tech stack,
architecture, cryptography, vault format, data model, threat model, browser
integration, passkeys, desktop integration, import/export, UI/UX, code style, testing
and quality, build and release, costs, spikes and roadmap; legal drafts; security and
contribution policies.
### Changed
- Documentation suite v1.1 (2026-11-22): Windows distribution through the Microsoft
Store (MSIX) and winget in addition to direct downloads — new sections 12–14 in
`docs/15_BUILD_RELEASE.md`, spike S13, risk R-11, actions H-10 (revised) and H-13.
- Default vault and backup location moved from Local AppData to `%USERPROFILE%\MuteVault\`
so that a Store-build uninstall cannot delete a vault (D-21 revised).
- Documentation suite v1.2 (2026-11-23): the project moves from GitHub to the
self-hosted Gitea at `git.poli0981.dev` — Gitea Actions on the maintainer's PC,
Renovate, the ops security workflow, releases and the update feed on
`releases.poli0981.dev`, a read-only GitLab mirror, support by e-mail. New
`docs/15_BUILD_RELEASE.md` §4 and §14 (CI and Git workflow); `CLAUDE.md`,
`CONTRIBUTING.md` and `SECURITY.md` rewritten for the new forge.
- winget dropped as a distribution channel (D-25 revised).
- SonarQube Cloud and Snyk removed from the pipeline (D-15 revised).
- `.github/FUNDING.yml` removed.
- The Qodana Cloud project points at the GitLab mirror, because Qodana Cloud accepts
only github.com, gitlab.com and bitbucket.org URLs (doc 14 §6, doc 15 §14.5).
- rustfmt's `imports_granularity` and `group_imports` are not set: they are still
nightly-only (doc 13 §1).
### Decided
- Name MuteVault; Windows 11 first; passkeys through the browser extension in v1; own
vault format with KDBX import (decision log D-01 to D-04).
- Distribution through the project's release host and the Microsoft Store; winget
dropped (D-25).
- Forge, CI, release hosting and support channels (D-26 to D-28).
- The M0 workflow set, and the kick-off order after M0: S1 (`gpui-kit` shell) first,
with S5 (crypto core and format) as a parallel track (D-29, flagged for review).
<!--
Template for a release:
Template for a release heading inside a series or release file:
```markdown
## [x.y.z] - YYYY-MM-DD
Application x.y.z · Vault format a.b · IPC protocol n
@@ -78,4 +48,4 @@ Application x.y.z · Vault format a.b · IPC protocol n
### Security
### Format
### Removed
-->
```
+2 -2
View File
@@ -50,7 +50,7 @@ well it works.
## Forge, Git and CI
The full rules are in `docs/15_BUILD_RELEASE.md` §4 and §14. The short version:
The full rules are in `docs/15_BUILD_CI.md` §4 and §6. The short version:
- **The repository lives on a self-hosted Gitea**, `git.poli0981.dev/poli0981/mutevault`.
`origin` is Gitea and is the only remote you push to. GitLab is a read-only mirror fed
@@ -136,7 +136,7 @@ mv-platform, mv-net} → mv-crypto → mv-core`. Nothing below `mv-app` may depe
- **Versions are pinned.** Use the versions in doc 02. If one does not build, report it
rather than bumping. Dependency updates arrive as Renovate pull requests.
- **Two Windows builds, one code base.** `dist-velopack` (direct download) and
`dist-store` (Microsoft Store MSIX) — see doc 15 §12. Never call the Velopack updater
`dist-store` (Microsoft Store MSIX) — see doc 18 §7. Never call the Velopack updater
in the Store build. Never default a vault or backup path into AppData: the Store build
has AppData redirected and deleted on uninstall. Anything that writes to the registry
or assumes an install path must be checked against both builds.
+1 -1
View File
@@ -44,7 +44,7 @@ version details filled in.
## Development setup
See `docs/15_BUILD_RELEASE.md` §1. In short:
See `docs/15_BUILD_CI.md` §1. In short:
```
git clone https://gitlab.com/poli0981/mutevault.git # or the canonical HTTPS URL
+6 -4
View File
@@ -3,7 +3,7 @@
**Project:** MuteVault — a local-first, open-source manager for passwords, TOTP codes and passkeys
**Repo:** `https://git.poli0981.dev/poli0981/mutevault` (self-hosted Gitea, canonical) · read-only mirror `https://gitlab.com/poli0981/mutevault`
**Platforms:** Windows 11 (v1) · Fedora Workstation (v1.x)
**Stack:** Rust 1.100 (edition 2024) · GPUI through `gpui-kit` 0.10.0 · WXT + TypeScript browser extension
**Stack:** Rust 1.100 (edition 2024) · GPUI through `gpui-kit` 0.12.0 · WXT + TypeScript browser extension
**Distribution:** `releases.poli0981.dev/mutevault/` (Velopack) · Microsoft Store (MSIX)
**License:** GPL-3.0-only
**Suite version:** 1.2 · **Date:** 2026-11-23
@@ -65,11 +65,13 @@ filled where you need them.
| 12 | `docs/12_UI_UX.md` | Screens, menus, settings, shortcuts, i18n, accessibility |
| 13 | `docs/13_CODESTYLE.md` | Rust and TypeScript conventions, lints, secret-handling rules |
| 14 | `docs/14_TESTING_QUALITY.md` | Test strategy, fuzzing, static analysis and supply-chain checks, gates |
| 15 | `docs/15_BUILD_RELEASE.md` | Toolchain, Gitea CI, Velopack and R2, signing, stores, forge and Git workflow |
| 15 | `docs/15_BUILD_CI.md` | Toolchain, build profiles, Gitea CI, dependency hygiene, forge and Git workflow |
| 16 | `docs/16_COSTS.md` | Hosting, storage, domain, signing and store costs |
| 17 | `docs/17_SPIKES_ROADMAP.md` | P0 spikes, milestones, decision log, open actions |
| 18 | `docs/18_RELEASE_DISTRIBUTION.md` | Velopack and R2, signing, versioning, release checklist, distribution channels, Microsoft Store |
| — | `legal/` | Privacy, EULA, Disclaimer, Third-party notices (drafts) |
| — | `SECURITY.md`, `CONTRIBUTING.md`, `CHANGELOG.md` | Repo-level policy files |
| — | `SECURITY.md`, `CONTRIBUTING.md` | Repo-level policy files |
| — | `CHANGELOG.md`, `changelog/` | Release notes: the index at the root, one file per beta series or stable release |
Reading order for a new contributor: 00 → 03 → 04 → 07, then the doc for the area being
touched.
@@ -85,7 +87,7 @@ touched.
| Security reports | `security@poli0981.dev` (see `SECURITY.md`) |
There is no public issue tracker; the forge is closed to registration and the mirror is
not watched. Details in `CONTRIBUTING.md` and doc 15 §14.
not watched. Details in `CONTRIBUTING.md` and doc 15 §6.
## Building (once the workspace exists)
+121
View File
@@ -0,0 +1,121 @@
# Beta 0.1
> Release series 0.1.x of MuteVault, the first public beta (D-32). The index of all
> release files is the root `CHANGELOG.md`; the rules for writing entries are there.
## [Unreleased]
Work towards 0.1.0. Nothing has been released yet: M0 (spikes and repository) is in
progress, and the public beta is the exit criterion of M5 (doc 17 §3).
### Added
- Spike S4 **passed** (2026-12-06): the extension reaches the app through the native host
in Chrome, Edge, Firefox and Brave, with per-user registration and replies in a few
milliseconds on an open port. Brave becomes a P0 browser (it reads Chrome's key);
Vivaldi stays best-effort until it is tested. The host never starts the app as its
own child, because Firefox would kill it, and the pipe code moves to `mv-platform`
without `interprocess` (D-48, flagged for review;
`docs/spike-reports/S4_NATIVE_MESSAGING.md`).
- Spike S2 is **partial** (2026-12-06): the tray icon and global hotkey run on GPUI's own
loop with no missed or duplicated event in 12,267, a second launch always reaches the
first instance, and autostart works. Closing to the tray now removes the window and
switches GPUI to headless, which takes idle CPU to zero; the pipe name gains the
session id, and pipe clients check the server's identity (D-46, D-47, flagged for
review). The hour-long run and the visual checks by hand are open
(`docs/spike-reports/S2_TRAY_HOTKEY.md`).
- Spike S5 is **partial** (2026-12-06): every independent known-answer test for the
crypto core passes, and the save pipeline survived 10,000 random and 220 fixed-point
kills without a corrupt or missing vault. The backup step changes to a hard link,
because a plain copy left an unopenable backup after most kills in that step, and the
rule for leftover temp files is written down (D-34 to D-37, proposed). `argon2` runs
lanes on one thread unless its `parallel` feature is on. A re-run on a quiet machine
confirmed the timings and passed 6,000 more kills. The crypto and format choices the
docs left open are under "Decided" below; the low-end machine and a VM power-cut test
are still to do (`docs/spike-reports/S5_CRYPTO_FORMAT.md`).
- **Security** Spike S3 is **partial** (2026-12-06): `SecureInput`, a custom GPUI
element, keeps a typed master password in one zeroising buffer. Six memory scans found
no copy outside it, whole or in part, while the framework's masked input left 3 to 14
whole copies, some still there 30 s after clearing. The element reports that it
accepts no text input, so GPUI switches the IME and Windows text services off for it
(D-38, flagged for review). The IME, suggestion, paste, Caps Lock, mouse and Narrator
checks by hand are open (`docs/spike-reports/S3_SECURE_INPUT.md`).
- Spike S10 is **partial** (2026-12-05): the security scan and the coverage gate pass;
Qodana's Rust linter runs on the runner but reports 47 false type errors. Five runs
showed that the earlier diagnosis (no standard library attached) was wrong: the linter
misses only the items `core` and `alloc` generate with macros. Qodana stays
report-only; the next tests are the GA image and a volume-backed cache
(`docs/spike-reports/S10_QUALITY_PIPELINE.md`).
- Spike S1 **passed** (2026-12-02, D-31): `gpui-kit` 0.10.0 is the application shell.
The results are in `docs/spike-reports/S1_GPUI_SHELL.md`: cold start about 210 ms, a
22 MiB release binary, a 65 MiB working set at idle, and Vietnamese and Japanese IME,
Narrator and 200 % scaling all working. Spike code lives in a git-ignored `spikes/`
directory outside the workspace (D-30).
- The name "MuteVault" is reserved in Microsoft Partner Center (H-10, 2026-12-02), as
Store ID `9NCTTCXCB4NQ`. The package identity values, and the draft submission's
remaining settings, are in `docs/18_RELEASE_DISTRIBUTION.md` §8.
- **Security** The threat model (doc 07 §5) now lists text-input services as an exposure
channel. S1 showed Windows' text-suggestion popup displaying a password typed into the
framework's masked input. Spike S3's pass criterion now includes switching these off.
- Repository bootstrap (2026-12-02), D-29:
- the documentation suite at the repository root, plus the GPL-3.0 licence text;
- a Cargo workspace whose only member is `xtask`. It enforces the doc 03 §3 layer
rules and the doc 14 §2 coverage gate, and runs the local check;
- the config files `deny.toml`, `clippy.toml`, `rustfmt.toml` and `rust-toolchain.toml`;
- the Gitea Actions workflows `ci.yml`, `security.yml` (with workflow linting),
`qodana.yml` and `notify-ci-failure.yml`, pinned to ops v2026.11.5;
- Renovate, through the central preset.
- Documentation suite v1.0 (2026-11-22): charter, feasibility study, tech stack,
architecture, cryptography, vault format, data model, threat model, browser
integration, passkeys, desktop integration, import/export, UI/UX, code style, testing
and quality, build and release, costs, spikes and roadmap; legal drafts; security and
contribution policies.
### Changed
- `gpui-kit` 0.10.0 → **0.12.0** (D-33, approved 2026-12-06), with default features so
the GPUI backend stays upstream GPUI (`gpui-pre`). Spike S1b passes: S1's code built
unchanged, idle memory dropped by about 17 MiB, and the manual checklist gives the same
results as on 0.10.0. A crate-scoped licence exception for `xxhash-rust` (BSL-1.0) is
approved in doc 02 §2.7 (`docs/spike-reports/S1b_GPUI_KIT_012.md`).
- Documentation layout (2026-12-05). Doc 15 is split: `docs/15_BUILD_CI.md` keeps build,
CI and the Git workflow, and the new `docs/18_RELEASE_DISTRIBUTION.md` takes
packaging, signing, versioning, the release checklist and the distribution channels.
Spike results move out of doc 17 into `docs/spike-reports/`, one file per spike.
The changelog becomes an index (`CHANGELOG.md`) over one file per release series
under `changelog/`.
- Documentation suite v1.1 (2026-11-22): Windows distribution through the Microsoft
Store (MSIX) and winget in addition to direct downloads — new sections 12–14 in
doc 15 (now doc 18 §7–§8 and doc 15 §6), spike S13, risk R-11, actions H-10
(revised) and H-13.
- Default vault and backup location moved from Local AppData to `%USERPROFILE%\MuteVault\`
so that a Store-build uninstall cannot delete a vault (D-21 revised).
- Documentation suite v1.2 (2026-11-23): the project moves from GitHub to the
self-hosted Gitea at `git.poli0981.dev` — Gitea Actions on the maintainer's PC,
Renovate, the ops security workflow, releases and the update feed on
`releases.poli0981.dev`, a read-only GitLab mirror, support by e-mail. New
doc 15 §4 and §14 (CI and Git workflow; §14 is now doc 15 §6); `CLAUDE.md`,
`CONTRIBUTING.md` and `SECURITY.md` rewritten for the new forge.
- winget dropped as a distribution channel (D-25 revised).
- SonarQube Cloud and Snyk removed from the pipeline (D-15 revised).
- `.github/FUNDING.yml` removed.
- The Qodana Cloud project points at the GitLab mirror, because Qodana Cloud accepts
only github.com, gitlab.com and bitbucket.org URLs (doc 14 §6, doc 15 §6.5).
- rustfmt's `imports_granularity` and `group_imports` are not set: they are still
nightly-only (doc 13 §1).
### Decided
- The open choices from spikes S3 and S5, chosen on Kokone's delegation (2026-12-06) and
flagged for review: the vault-format encodings (D-39), key derivation in operation,
with `argon2`'s `parallel` feature off and calibration unchanged (D-40), a statically
linked C runtime (D-41), short TOTP secrets accepted (D-42), save-pipeline details
(D-43), paste and input-method hints for `SecureInput` (D-44), and `cargo xtask
ui-smoke` for `gpui-kit` upgrades (D-45). Qodana stays report-only.
- Betas are 0.x releases, starting at 0.1.0; 1.0.0 is the first stable release. Release
notes are kept per beta series and per stable release (D-32).
- Name MuteVault; Windows 11 first; passkeys through the browser extension in v1; own
vault format with KDBX import (decision log D-01 to D-04).
- Distribution through the project's release host and the Microsoft Store; winget
dropped (D-25).
- Forge, CI, release hosting and support channels (D-26 to D-28).
- The M0 workflow set, and the kick-off order after M0: S1 (`gpui-kit` shell) first,
with S5 (crypto core and format) as a parallel track (D-29, flagged for review).
View File
Whitespace-only changes.
+1 -1
View File
@@ -127,7 +127,7 @@ Priorities: **P0** ships in v1.0 · **P1** ships in v1.x · **P2** is an idea, n
| Criterion | Target |
|---|---|
| Cold start to lock screen | under 500 ms on the reference PC |
| Unlock with default KDF settings | 0.5–1.5 s |
| Unlock with default KDF settings | Standard's own time where it takes 250 ms to 2 s; raised to about 0.5 s on faster PCs, or less where calibration stops at its pass cap; over 2 s the user is told and may lower memory (doc 04 §5, D-40) |
| List scroll and search with 10,000 items | no visible stutter; search result under 50 ms |
| Browser fill round trip (shortcut → fields filled) | under 300 ms after the user picks an entry |
| Vault corruption in the kill-during-save test | zero in 1,000 iterations |
+3 -2
View File
@@ -58,6 +58,7 @@ first-party code is Rust, and memory-unsafe first-party code is confined to one
- `gpui-kit` 0.10.0 (released 2026-11-16, Apache-2.0, by Longbridge) is the crate an
application depends on. It re-exports GPUI, `gpui-component` 0.10.0 and assets, and pins
a matching GPUI snapshot. It targets Windows, Linux and macOS and lists 75+ components.
*MuteVault moved to 0.12.0 before M1 (D-33).*
- `gpui-component` provides a masked text input (`InputState::masked(true)` plus a
reveal toggle), virtualised lists and tables, and docking.
- The project README states AccessKit roles and actions are built into the interaction
@@ -156,7 +157,7 @@ than by an external service.
| ID | Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|---|
| R-01 | GPUI / `gpui-kit` breaking changes stall work | High | Medium | Exact pins; upgrade only between milestones; UI isolated in one crate. |
| R-01 | GPUI / `gpui-kit` breaking changes stall work | High | Medium | Exact pins; upgrade only between milestones; UI isolated in one crate. `gpui-kit` releases weekly: each upgrade re-runs the S1b scripts and reduced checklist (D-33). |
| R-02 | Passkey shim breaks on popular sites | Medium | High | Spike S6 against a site list; pass-through to native WebAuthn on any unsupported shape. |
| R-03 | Design or implementation flaw in crypto/format | Low–Medium | Critical | Standard constructions only; KATs; golden fixtures; fuzzing; public spec; invite review. |
| R-04 | Data loss from a save bug | Low | Critical | Atomic save with verify-after-write; rotating backups; kill-during-save test. |
@@ -166,7 +167,7 @@ than by an external service.
| R-08 | Qodana Rust EAP unstable in CI | Medium | Low | Non-blocking job. |
| R-09 | Scope creep for one maintainer | High | High | P0/P1/P2 discipline; milestone gates. |
| R-10 | Vietnamese civil-cryptography rules apply to distribution | Unknown | Unknown | H-04: confirm applicability before the first public release. Not legal advice. |
| R-11 | The Microsoft Store (MSIX) build breaks browser integration, or an uninstall deletes user data, because packaged apps have their registry and AppData writes virtualised | Medium | High | Vaults and backups outside AppData (D-21); spike S13 before the Store build is promised; signed-installer Store submission as fallback (doc 15 §13). |
| R-11 | The Microsoft Store (MSIX) build breaks browser integration, or an uninstall deletes user data, because packaged apps have their registry and AppData writes virtualised | Medium | High | Vaults and backups outside AppData (D-21); spike S13 before the Store build is promised; signed-installer Store submission as fallback (doc 18 §8). |
| R-12 | CI, releases and scheduled scans depend on one PC, and the forge on one small server | Medium | Medium | Releases are infrequent and can wait for the PC; the signed hash list protects users even if the release host is tampered with (D-23); the read-only mirror keeps the source reachable if the forge is down. |
## 9. Sources checked on 2026-11-22
+82 -12
View File
@@ -25,17 +25,33 @@ The highest minimum Rust version among the dependencies below is 1.90 (`tray-ico
| Crate | Version | Licence | Use |
|---|---|---|---|
| `gpui-kit` | 0.10.0 | Apache-2.0 | Application framework; re-exports GPUI and `gpui-component` 0.10.0 with a pinned GPUI snapshot |
| `gpui-kit` | 0.12.0 | Apache-2.0 | Application framework; re-exports GPUI and `gpui-component` 0.12.0 with a pinned GPUI snapshot. Default features (backend `gpui-pre`); never `gpui-fast` |
| `rust-i18n` | 4.2.4 | MIT | Localisation (EN/VI/JA); the same crate `gpui-component` uses |
Do not add `gpui` (0.2.2 on crates.io) as a direct dependency; take it through `gpui-kit`
so the framework and component versions always match.
Spike S1 (2026-12-02, doc 17 §2.1) confirmed both versions above; none had to change.
- The GPUI snapshot that `gpui-kit` 0.10.0 pins is the `gpui-pre` 0.3.12 family of
crates. `gpui-component` and `gpui-base` are 0.10.0.
- With the default features, the Windows and Linux dependency graph passes `deny.toml`.
Spike S1 (2026-12-02, `docs/spike-reports/S1_GPUI_SHELL.md`) confirmed `gpui-kit`
0.10.0 and `rust-i18n` 4.2.4. Spike S1b (2026-12-05,
`docs/spike-reports/S1b_GPUI_KIT_012.md`) re-ran its automated part on 0.12.0: S1's code
built unchanged, and `rust-i18n` stays at 4.2.4. The move to 0.12.0 is D-33.
- The GPUI snapshot that `gpui-kit` 0.12.0 pins (`=0.3.15`) is the `gpui-pre` 0.3.15
family of crates: Zed at commit `a36d485`, with AccessKit 0.25.2. `gpui-component`,
`gpui-base` and `gpui-kit-assets` are 0.12.0.
- Since 0.12.0 the GPUI backend is a feature. MuteVault uses the default, `gpui-pre`
(upstream GPUI), and never enables `gpui-fast` (Longbridge's GPUI Fast fork, still on
AccessKit 0.24). The other new default features, `x11` and `web-threads`, change
nothing on Windows.
- With the default features, the Windows and Linux graph passes `deny.toml`'s bans and
sources. Licences pass only with one exception, `xxhash-rust` (BSL-1.0), which comes
through `notify` 9 in `gpui-component` (§2.7).
- `gpui-kit-assets` depends on `reqwest` only on wasm targets.
- `Cargo.lock` lists about 100 packages that no target compiles with these features,
among them the GPUI Fast crates, AccessKit 0.24 and `quinn`. Cargo records optional
dependencies there without building them (rust-lang/cargo#10801). osv-scanner and
Renovate see them; `cargo deny` and the build do not.
- Releases come weekly. Upgrade only between milestones, and gate each upgrade on S1b's
scripts and reduced checklist (R-01).
### 2.2 Cryptography and secrets
@@ -55,6 +71,30 @@ Spike S1 (2026-12-02, doc 17 §2.1) confirmed both versions above; none had to c
| `unicode-normalization` | 0.1.26 | (MIT OR Apache-2.0) AND Unicode-3.0 | NFKC for the master password |
| `minisign-verify` | 0.3.0 | MIT | Update-manifest signature check |
Spike S5 (2026-12-06, `docs/spike-reports/S5_CRYPTO_FORMAT.md`) built doc 04's
constructions on these exact versions and found that their features matter:
- `argon2`: `default-features = false`, features `alloc` and `zeroize`. `zeroize` is
required, because wiping the caller-owned KDF memory needs `Block: Zeroize`
(doc 04 §10). Without the defaults, PHC-string support, which MuteVault does not use,
is left out.
- `chacha20poly1305`: `default-features = false`, features `alloc` and `zeroize`, so the
cipher wipes its own key copy on drop. Nonces come from `getrandom` directly (doc 04
§9), so the crate's own `getrandom` feature is not needed.
- `totp-rs` (§2.3): features `alloc` and `zeroize`.
- `argon2`'s optional `parallel` feature computes the lanes on several threads through
`rayon`. It stays off (D-40), so `rayon` 1.12.0 and its transitive crates
(`rayon-core` 1.13.0, `crossbeam-deque` 0.8.8, `crossbeam-epoch` 0.9.21,
`crossbeam-utils` 0.8.23, `either` 1.19.0; all MIT OR Apache-2.0, with substantial
`unsafe`) are not dependencies. It is revisited only if S5-M1 shows unlock on a
low-end PC over 2 s; turning it on would give those crates rows here (CLAUDE.md
rule 10).
- `unicode-normalization` 0.1.26 implements Unicode 18.0.0. An upgrade can change the
NFKC result, and so the derived key, for a password with a code point assigned in
between (doc 04 §4). Upgrading it is a crypto change (D-40): the known-answer tests
run again, and the committed table of assigned code points that password creation
checks against is regenerated from the new version's UCD. The table adds no runtime
crate.
### 2.3 Credentials
| Crate | Version | Licence | Use |
@@ -89,15 +129,35 @@ Spike S1 (2026-12-02, doc 17 §2.1) confirmed both versions above; none had to c
| Crate | Version | Licence | Use |
|---|---|---|---|
| `windows` | 0.62.2 | MIT OR Apache-2.0 | Win32 and WinRT bindings |
| `interprocess` | 2.4.9 | 0BSD OR Apache-2.0 | Named pipes / Unix domain sockets |
| `arboard` | 3.7.0 | MIT OR Apache-2.0 | Clipboard |
| `tray-icon` | 0.26.1 | MIT OR Apache-2.0 | Tray icon (Windows) |
| `global-hotkey` | 0.10.0 | Apache-2.0 OR MIT | Global shortcuts (Windows, X11) |
| `tray-icon` | 0.26.1 | MIT OR Apache-2.0 | Tray icon (Windows); `default-features = false`, a `cfg(windows)` dependency of `mv-platform` |
| `global-hotkey` | 0.10.0 | Apache-2.0 OR MIT | Global shortcuts (Windows; X11 only on Linux); a `cfg(windows)` dependency of `mv-platform` |
| `directories` | 6.0.0 | MIT OR Apache-2.0 | Per-user paths |
| `fs4` | 1.1.0 | MIT OR Apache-2.0 | Advisory file locks |
| `tempfile` | 3.27.0 | MIT OR Apache-2.0 | Same-directory temp files for atomic save |
| `velopack` | 1.2.161 | MIT | Install and update (use the stable line; 1.3 is pre-release) |
`fs4` 1.1.0 and `tempfile` 3.27.0 were removed from this table (D-43), because spike S5
showed that the standard library covers the lock (`File::try_lock`, which is
`LockFileEx`), exclusive create (`OpenOptions::create_new`), flushing
(`File::sync_all`), hard links and rename.
`SecureInput` (spike S3, D-38) adds no crate: `zeroize` is already here, and on Windows
GPUI itself switches text services off for the field. Its paste read in `mv-platform`
needs the `windows` features `Win32_System_DataExchange`, `Win32_System_Memory` and
`Win32_System_Ole` (`CF_UNICODETEXT`). The spike's input-scope, TSF and IME features and
`raw-window-handle` were for comparison only and are not needed.
Spikes S2 and S4 (D-46 to D-48):
- `tray-icon`'s default feature pulls GTK 3 on Linux, whose chain fails `deny.toml`;
without default features and as Windows-only dependencies, both crates pass. They
bring `muda` 0.21.2 (the menu), `dpi` 0.1.2, `keyboard-types` 0.8.3,
`crossbeam-channel` 0.5.17, and a second binding family (`windows-sys` 0.59,
`windows-targets` 0.52) that only `global-hotkey` uses; all are permissively
licensed. `async-channel` 2.5.0 and `raw-window-handle` 0.6.2, already in GPUI's
graph, carry the events and the window handle.
- `interprocess` is dropped. Its client cannot limit impersonation, and a full-duplex
relay needs overlapped handles; `mv-platform` implements the pipe on `windows` in
about 300 lines with the security checks.
### 2.6 Infrastructure
| Crate | Version | Licence | Use |
@@ -113,6 +173,16 @@ Licences are the values published on crates.io for these exact versions. Once th
workspace exists, `cargo deny check licenses` is the authority, including for transitive
dependencies.
### 2.7 Licence exceptions
A licence outside doc 14 §4's allow-list is allowed only for a named crate, through a
crate-scoped `[[licenses.exceptions]]` entry in `deny.toml`, and only once it is listed
here.
| Crate | Version | Licence | Comes from | Status |
|---|---|---|---|---|
| `xxhash-rust` | 0.8.21 | BSL-1.0 | `gpui-component` 0.12.0 → `notify` 9.0.0 (theme file watcher) | **Approved** by Kokone, 2026-12-06 (D-33): GPL-3.0-compatible according to the FSF, no notice required in binary-only distributions. Added to `deny.toml` in the change that brings `gpui-kit` into the workspace (M1); on a graph without the crate, cargo-deny warns that the exception is unused |
## 3. Development tools
| Tool | Version | Use |
@@ -162,7 +232,7 @@ no UI framework, no schema library. Every package above is a dev dependency.
| GitLab | Free | Read-only push mirror of the source |
| Cloudflare R2 (`releases.poli0981.dev`) | Existing bucket | Installers and the update feed |
| Renovate, self-hosted | — | Dependency-update pull requests and OSV vulnerability alerts, from the central preset `poli0981/renovate-config` |
| Qodana | Ultimate (existing) | `qodana-rust` linter (EAP). `qodana.yaml` names the linter, and the image release follows the Qodana CLI that the ops `reusable-qodana.yml` pins. With CLI 2026.3.1 (ops v2026.11.5) the image is `jetbrains/qodana-rust:2026.3-eap`, build QDRST-263.7944, first run 2026-12-02 (S10) |
| Qodana | Ultimate (existing) | `qodana-rust` linter (EAP). `qodana.yaml` names the linter, and the image release follows the Qodana CLI that the ops `reusable-qodana.yml` pins. With CLI 2026.3.1 (ops v2026.11.5) the image is `jetbrains/qodana-rust:2026.3-eap`, build QDRST-263.7944, digest `sha256:b7338b92220a7940800228a144cff257dd81a69072105920496dbc2064ce5956`, first run 2026-12-02 (S10). The tag floats; the GA `2026.3` (QDRST-263.8802.61) exists and is S10's next test |
| gitleaks, Opengrep, osv-scanner, cargo-deny | Open source | Secrets, static analysis and dependency checks, run by the ops `security.yml` |
## 6. Deviations from the maintainer's usual conventions
@@ -190,4 +260,4 @@ no UI framework, no schema library. Every package above is a dev dependency.
| `snow` / `crypto_box` on the IPC channel | Deferred | Protects against nothing inside the v1 threat model (doc 08 §5) |
| `tokio` | Rejected | GPUI has its own executors; a second runtime adds weight without need |
| UI framework in the extension | Rejected | Supply-chain surface; the popup is a few small views |
| `ksni` (Linux tray) | Deferred to v1.x | Fedora build is not in v1 |
| `ksni` (Linux tray) | Deferred to v1.x | Fedora build is not in v1. When it starts, enable `tray-icon`'s `ksni` feature (D-Bus, no GTK) rather than its GTK default (S2) |
+41 -14
View File
@@ -71,15 +71,25 @@ Rules enforced by `cargo xtask check` (it inspects `cargo metadata`):
- GPUI appears only in `mv-ui` and `bins/mutevault`.
- HTTP/TLS client crates appear only under `mv-net`.
- The `windows` crate appears only in `mv-platform` (and `bins/mutevault-host` for pipe
security attributes).
- The `windows` crate appears only in `mv-platform`. The pipe, server and client, is
implemented there on `windows` (D-47), so `mutevault-host` needs no FFI of its own.
- `unsafe` is forbidden everywhere except `mv-platform`.
- `mutevault-host` depends on `mv-ipc` framing only — never on `mv-crypto` or `mv-vault`.
- `mutevault-host` depends on `mv-ipc` framing and `mv-platform`'s pipe client and app
launch only — never on `mv-crypto` or `mv-vault`.
`mv-app` talks to infrastructure through traits (`VaultStore`, `Clipboard`, `Clock`,
`SecureMemory`, `UpdateSource`, `UserVerifier`, …) so use-cases are testable with fakes
and so a Linux implementation slots in for v1.x without touching use-cases (D-02).
One infrastructure crate needs another's OS code: the save's atomic replace (doc 05 §5
step 6) is write-through on Windows, which takes `MoveFileExW` and so FFI, and FFI
lives only in `mv-platform`. `mv-vault` does not depend on `mv-platform`. It takes the
atomic replace as an injected operation; `mv-app` passes `mv-platform`'s write-through
implementation, and tests pass `std::fs::rename` (D-36). Everything else in the save
pipeline is safe standard library. D-36 is revisited after the VM power-cut test
(S5b-M3): if write-through changes nothing, `mv-vault` uses `std::fs::rename` and the
injection goes.
## 4. Session state machine
```
@@ -110,8 +120,9 @@ failed association or rate-limit violations from the extension.
|---|---|---|
| Main thread (GPUI foreground executor) | Rendering, input, view-model updates | Never blocks: no file I/O, no KDF, no pipe reads |
| GPUI background executor | Argon2id, vault encode/decode, saves, imports, QR decoding | Results return to the foreground through tasks |
| IPC accept thread | Accepts pipe connections | One dedicated thread |
| IPC connection threads | Blocking frame reads per connection | Bounded count (8); requests are forwarded to the foreground through a channel and answered through a per-connection writer |
| IPC accept thread | Accepts pipe connections | One dedicated thread, started right after the single-instance check (§6.4) |
| IPC connection threads | Frame reads and writes per connection on overlapped handles, so a pending read never blocks a write (S4) | Bounded count (8); requests are forwarded to the foreground through a channel and answered through a per-connection writer |
| Tray, menu and hotkey handlers | Inside window procedures on the main thread; hotkey Released on a helper thread | Set before any icon or hotkey exists; only enqueue into one channel that a foreground task drains, never block (D-46) |
| Timer tasks | Idle lock, clipboard clear, TOTP tick, backup thinning | Foreground tasks driven by the executor's timers |
Use-cases run on the foreground and hand heavy work to the background executor. Because
@@ -132,8 +143,9 @@ all session state is owned by the foreground, there is no shared mutable state t
### 6.2 Save
Every mutation marks the session dirty and schedules a save 500 ms later (coalescing).
The save pipeline is in doc 05 §5. A failed save keeps the session dirty, shows a
persistent banner, and never discards in-memory changes.
The save pipeline is in doc 05 §5; `mv-app` hands `mv-vault` the atomic replace
operation it uses (§3, D-36). A failed save keeps the session dirty, shows a persistent
banner, and never discards in-memory changes.
### 6.3 Fill from the browser
@@ -145,9 +157,16 @@ came through.
1. `VelopackApp::build().run()` — must be first; it may handle an install/update hook
and exit.
2. Apply process hardening (doc 10 §8) before any secret exists.
3. Single-instance check; hand off and exit if another instance is running.
4. Load settings, set locale, open the window on the lock screen (or first-run flow).
5. Start the IPC listener. Start the update check if enabled, after a short delay.
3. Single-instance check (mutex `Local\MuteVault.<user-SID>`); if another instance is
running, ask it over the pipe to show its window, and exit. The second instance
retries the pipe for a few seconds, because the first may still be starting.
4. Start the IPC listener at once, before any window, so a second launch or a browser
never finds the mutex taken and no pipe (S2 finding 10, D-47).
5. Load settings and set the locale. Open the window on the lock screen (or the
first-run flow), unless the app was started at sign-in (`--minimized` from the Run
value, or the Store build's start-up activation): then it starts in the tray with
GPUI headless (doc 10 §5, D-46).
6. Start the update check if enabled, after a short delay.
## 7. Errors
@@ -166,10 +185,12 @@ came through.
| Default vault folder | `%USERPROFILE%\MuteVault\vaults\` |
| Backups | `%USERPROFILE%\MuteVault\backups\<vault-id>\` |
| Device-bound unlock slots | `%LOCALAPPDATA%\MuteVault\device-slots\` |
| Save-counter sidecars (rollback warning, doc 05 §6) | `%LOCALAPPDATA%\MuteVault\state\<vault-id>.json` (D-43) |
| Settings | `%APPDATA%\MuteVault\settings.toml` |
| Logs | `%LOCALAPPDATA%\MuteVault\logs\` |
| Native-messaging manifests | `%LOCALAPPDATA%\MuteVault\native-messaging\` |
| IPC pipe | `\\.\pipe\MuteVault.<user-SID>.v1` |
| IPC pipe | `\\.\pipe\MuteVault.<user-SID>.<session-id>.v1` (D-47): named pipes are machine-wide, so the session id keeps a second session of the same user (Remote Desktop beside the console) apart |
| Single-instance mutex | `Local\MuteVault.<user-SID>` (per session by construction) |
Vaults and backups default to a `MuteVault` folder directly under the user profile, on
purpose (D-21):
@@ -178,16 +199,22 @@ purpose (D-21):
thinking about it;
- not under AppData, because in the Microsoft Store (MSIX) build new AppData files go to
a private per-app location that Windows deletes when the app is uninstalled
(doc 15 §13). A vault must survive an uninstall, and both Windows builds must find
(doc 18 §8). A vault must survive an uninstall, and both Windows builds must find
the same vault.
The user may pick another location; if the chosen folder looks cloud-synced, the app says
so and asks for confirmation instead of deciding for the user.
Keeping backups on the vault's volume is also what lets a save add its backup as a hard
link (doc 05 §5 step 5, D-34). A vault folder on another drive than its backups still
works, through the slower flushed-copy fallback.
Every other row in the table is disposable state, and the table shows the Velopack
build. In the Store build the program files are the read-only package directory and the
AppData paths are the redirected per-package ones; losing them on uninstall costs
settings, logs and device-slot enrolment, never credentials.
AppData paths are the redirected per-package ones (doc 18 §7); losing them on uninstall
costs settings, logs, device-slot enrolment and the rollback-warning history, never
credentials. RR-6 (doc 07 §6) already accepts losing the sidecars: the rollback warning
only ever works on the same machine (D-43).
Settings contain no secrets. Association tokens for paired browsers are stored inside
the vault, not in settings.
+86 -21
View File
@@ -74,6 +74,12 @@ master password ──NFKC──► Argon2id(salt_slot, m, t, p [, secret = key
Reserved HKDF labels for later use: `MuteVault/v1/attachments`, `MuteVault/v1/export`.
A label is never reused for a different purpose.
`HKDF(a, b, c)` is RFC 5869 HKDF-SHA256 with salt = a, IKM = b and info = c.
`HKDF(VK, label)` takes no salt, which RFC 5869 treats as a string of zeros; VK is
uniformly random, so it needs none. Labels are their ASCII bytes without a terminator
(D-39). This becomes format contract with the first golden fixture (M1); before that
fixture a human reads `mv-crypto` against this text (CLAUDE.md).
## 4. Master password
- **Encoding:** UTF-8 after Unicode **NFKC** normalisation. Vietnamese text can be typed
@@ -83,7 +89,17 @@ A label is never reused for a different purpose.
- **Length:** 1–1,024 bytes after normalisation are accepted by the KDF.
- **Policy at creation or change:** at least 12 characters and a `zxcvbn` score of 3 or
more. A lower score may be accepted only after an explicit warning that names the
consequence; the override is not available below 8 characters.
consequence; the override is not available below 8 characters. Characters are
Unicode scalar values (code points), counted after NFKC (D-40).
- **Unassigned code points (D-40):** Unicode's stability policy covers only code points
assigned in the older version, so a code point that a later version assigns a
compatibility decomposition could normalise differently after a crate update and lock
the user out (S5). So when a password is set or changed, one that contains a code
point unassigned in the pinned Unicode version (18.0.0 for `unicode-normalization`
0.1.26) is refused with a message. The table of assigned code points is generated once
from that version's UCD and committed with a test; no runtime crate is added. Unlock
never applies this check. Upgrading `unicode-normalization` is a crypto change (§12):
the known-answer tests run again and the table is regenerated.
- **No hints.** Nothing derived from the password is stored except through the KDF.
- **Key file (P1):** 32 random bytes in a file the user keeps apart from the vault,
passed to Argon2id as its secret input. Slot type 3.
@@ -116,9 +132,22 @@ A label is never reused for a different purpose.
the floor.
- **Parameter upgrades:** when a later release raises the default, the app offers to
re-derive at the next successful unlock (a new slot with a new salt replaces the old).
- **Implementation note:** check in spike S5 whether `argon2` 0.6.0 runs lanes on
several threads. If it does not, the lane count affects the memory layout but not
wall-clock time, and calibration works through passes and memory only.
- **Lane threading (S5):** `argon2` 0.6.0 computes every lane on the calling thread
unless its optional `parallel` feature is on. With the feature it runs each slice's
lanes on rayon's current pool; on the dev PC p = 4 was 2.2–2.9× faster than p = 1 at
equal memory and passes, with identical output (RFC 9106 vector, OpenSSL
cross-check). **The feature stays off and `rayon` is not a dependency (D-40).** The
lanes stay part of the memory layout and cost no extra wall-clock time, and
calibration works through passes and memory only. Revisit only if S5-M1 shows unlock
on a low-end PC over 2 s.
- **Measured (S5, quiet re-run 2026-12-06):** on an i7-14700KF, Standard takes 88 ms
(median) by default and 44 ms with `parallel`; Strong 474 ms and 215 ms; the floor
17 ms. At 64 MiB and 10 passes, the calibration cap, it takes 270 ms or 92 ms, so
calibration stops at its cap below the ~500 ms target on that PC. Calibration stays
exactly as above, with no KDF parameter change (D-40). Doc 00 §6 and doc 05 §9 state
the unlock time this gives: Standard's own time where it takes 250 ms to 2 s; about
0.5 s on faster PCs, or less where calibration stops at its pass cap; over 2 s the
user is told. The low-end runs (S5-M1, S5-M2) are open.
- **Build note:** set `opt-level = 3` for the crypto crates in the dev profile; an
unoptimised Argon2id takes many seconds and makes tests unbearable.
@@ -136,6 +165,17 @@ The vault key is wrapped once per unlock method. Slot layout is in doc 05 §3.
**Wrap:** `wrapped_vk = XChaCha20-Poly1305(KEK, wrap_nonce, VK, AAD_slot)`, 48 bytes.
`AAD_slot = magic ‖ format_major ‖ vault_id ‖ slot_id ‖ slot_type ‖ kdf_id ‖ m ‖ t ‖ p ‖ salt`.
These rules are D-39. They become format contract with the first golden fixture (M1);
before that fixture a human reads `mv-crypto` and `mv-vault` against this text.
- **`AAD_slot` encoding:** the fields in the order above, each at its on-disk width from
doc 05 §2–§3, integers little-endian, `m` as `m_kib`: 88 bytes. The slot's
`created_at` and `flags` are not in `AAD_slot`. The payload AAD (§7) covers them, so
they are checked right after the unwrap, when the payload is opened.
- **HKDF salt for types 2 and 0x80:** the slot's own `salt`.
- **`kdf_id` = 0:** such a slot must have m = t = p = 0, otherwise it is rejected as
`HostileParameters`. The opening bounds of §5 apply only when `kdf_id` = 1.
**Operations**
- *Change master password:* derive a new KEK with a fresh salt, wrap the same VK into a
@@ -173,7 +213,17 @@ payload each one is an independent AEAD box:
- `box = XChaCha20-Poly1305(K_fields, nonce, plaintext, AAD_field)`
- `nonce`: 24 fresh random bytes whenever the field is written.
- `AAD_field = "MVF1" ‖ vault_id ‖ item_id ‖ field_id`, so a box cannot be moved to
another item or field.
another item or field. `"MVF1"` is its 4 ASCII bytes without a terminator, `vault_id`
its 16 raw bytes, `item_id` the item UUID's 16 raw bytes, and `field_id` (doc 06 §9)
a u64, little-endian, so custom field ids (10000 + id) fit without a cap.
- For a passkey private-key box (doc 06 §9, row 1000 + i), and only for it, `AAD_field`
continues with `‖ len(credential_id) ‖ credential_id`, the length a u16,
little-endian, so the box is also bound to its credential id.
- A sealed box is one CBOR byte string:
`nonce (24 bytes) ‖ ciphertext ‖ tag (16 bytes)`.
These encodings are D-39. They become format contract with the first golden fixture
(M1); before that fixture a human reads `mv-crypto` and `mv-vault` against this text.
After unlock the payload is decrypted but the boxes stay sealed. A box is opened only to
copy, reveal, fill, auto-type, sign, compute a TOTP code or export, and the plaintext
@@ -198,16 +248,26 @@ because `K_fields` is in the same process.
|---|---|
| Secrets live in dedicated types | `SecretBytes`, `SecretString` over `secrecy`/`zeroize`; no `Debug`, `Display`, `Clone`, `Serialize` |
| Wipe on drop | `ZeroizeOnDrop` everywhere; panics unwind so destructors run |
| Long-lived keys stay out of swap | VK and `K_fields` in page-locked allocations (`VirtualLock` / `mlock`) through `mv-platform` |
| Long-lived keys stay out of swap | VK, `K_fields` and `SecureInput`'s entry buffer in page-locked allocations (`VirtualLock` / `mlock`) through `mv-platform` |
| No accidental copies | APIs take `&SecretBytes`; plaintext is exposed inside a closure (`expose(|bytes| …)`) |
| KDF working memory is wiped | The Argon2id memory is a caller-owned buffer, passed to `hash_password_into_with_memory` and wiped afterwards; wiping it needs the crate's `zeroize` feature. Never `hash_password_into`: it frees its memory unwiped, and that memory holds every lane's last block, enough to rebuild MK (S5). The buffer is page-locked best-effort through `mv-platform` for the duration of the hash (working-set minimum raised, `VirtualLock`); if locking fails the hash runs unlocked. It is wiped afterwards either way, and unlock never fails because locking failed (D-40) |
| No secrets in errors | Error types carry codes and ids only |
| Core dumps and debuggers | Process hardening in doc 10 §8 |
**Decoder copies.** The CBOR decoder leaves unzeroised copies of decrypted *metadata*
behind (`ciborium`'s scratch buffer and `Vec` regrowth, S5). Secret fields stay sealed
boxes through decoding, so no secret field's plaintext is among those copies.
**The UI boundary is the weak point.** To show a password, the framework needs an
ordinary string, and that copy cannot be reliably wiped. Therefore: fields are masked by
default; reveal is explicit and times out after 30 seconds; the view drops the string
when hidden; password *entry* uses `SecureInput` (doc 12 §4), which never materialises
the text as a framework string. The residual exposure is listed in doc 07 §6.
when hidden; password *entry* uses `SecureInput` (doc 12 §4, D-38), which never
materialises more than one character at a time: each keystroke still passes through a
few one-character framework strings, freed but not wiped within the window message
that carried it (S3 finding 4). S3's memory scans found no copy of a typed password,
whole or as any run of six characters, outside the element's buffer. That buffer is a
secret type in a page-locked allocation, like VK and `K_fields` (S3 finding 11). The
residual exposure is listed in doc 07 §6.
## 11. Things MuteVault does not do
@@ -230,19 +290,24 @@ the text as a framework string. The residual exposure is listed in doc 07 §6.
## 13. Verification
| Area | Test |
|---|---|
| Argon2id | RFC 9106 test vectors |
| HKDF-SHA256 | RFC 5869 test vectors |
| XChaCha20-Poly1305 | Vectors from the CFRG draft and libsodium |
| TOTP | RFC 6238 Appendix B (all three hashes) |
| Slot wrap/unwrap | Round trip; wrong password; each AAD component altered → failure |
| Payload | Round trip; any header or ciphertext bit flipped → failure |
| Field boxes | Round trip; box moved to another item or field → failure |
| Normalisation | Composed vs decomposed Vietnamese passwords derive the same key |
| Golden fixtures | Vault files with known passwords from every released version open correctly |
| Nonce policy | No constant or repeated nonce across 10,000 operations in tests |
| Zeroisation | Unit tests on secret containers; Miri where FFI allows |
| Area | Test | Spike S5 (2026-12-06) |
|---|---|---|
| Argon2id | RFC 9106 test vectors | Pass |
| HKDF-SHA256 | RFC 5869 test vectors | Pass |
| XChaCha20-Poly1305 | Vectors from the CFRG draft and libsodium | Pass |
| TOTP | RFC 6238 Appendix B (all three hashes) | Pass |
| Slot wrap/unwrap | Round trip; wrong password; each AAD component altered → failure | Pass |
| Payload | Round trip; any header or ciphertext bit flipped → failure | Pass |
| Field boxes | Round trip; box moved to another item or field → failure | Behaviour passes; vector at M1, D-39 |
| Normalisation | Composed vs decomposed Vietnamese passwords derive the same key | Pass |
| Golden fixtures | Vault files with known passwords from every released version open correctly | Not applicable until a version is released (v0 at M1) |
| Nonce policy | No constant or repeated nonce across 10,000 operations in tests | Pass |
| Zeroisation | Unit tests on secret containers; Miri where FFI allows | Unit tests pass; Miri open (no nightly toolchain) |
S5 ran these in throwaway spike code (D-30), against the vectors' primary sources, and
had its self-generated regression vectors recomputed by a second implementation
(`docs/spike-reports/S5_CRYPTO_FORMAT.md`). `mv-crypto` re-implements them at M1; a pass
here does not replace the human read against this document that CLAUDE.md requires.
## 14. Known limitations
+101 -27
View File
@@ -70,6 +70,20 @@ Tags 0x80 and above are optional: ignored, but still covered by the AAD.
| 8 | `created_at` | Unix seconds |
| 1 | `flags` | Reserved, 0 |
Rules for a slot (D-39):
- `AAD_slot` (doc 04 §6) is the file's `magic`, `format_major` and `vault_id` followed
by the slot's first seven fields above, `salt` included, at these widths,
little-endian: 88 bytes. `created_at` and `flags` are not in it; `AAD_payload` covers
them.
- A slot with `kdf_id` = 0 must have `m_kib` = `t` = `p` = 0, otherwise the file is
rejected as `HostileParameters`. The opening bounds of doc 04 §5 apply only when
`kdf_id` = 1.
- A non-zero `flags` is `Malformed`.
These rules become format contract with the first golden fixture (M1); before that
fixture a human reads `mv-vault` and `mv-crypto` against this text.
Device-bound slots (Windows Hello) use the same structure with `slot_type` 0x80 and live
in `device-slots\<vault-id>.slot`, never in the vault file (D-19). A vault file therefore
never becomes unlockable merely by being copied to a machine with an enrolled device key,
@@ -92,48 +106,101 @@ Plaintext is a CBOR map; the schema is doc 06. Top level:
Readers ignore unknown map keys. Writers must not drop data they do not understand,
which is why an older app opens a newer-minor file read-only (§7).
`pad` is the shortest byte string that brings the payload to a multiple of 4 KiB.
Because its length prefix grows with its length, some gaps to the next boundary (0, 25
and 258 bytes) cannot be reached exactly; at those gaps the payload goes to the next
multiple. A sealed box is one CBOR byte string, `nonce (24) ‖ ciphertext ‖ tag (16)`
(doc 04 §8). Both rules are D-39 and become format contract with the first golden
fixture (M1); before that fixture a human reads `mv-vault` against this text.
## 5. Saving
Triggered 500 ms after the last mutation, on lock, and on exit.
1. Encode the payload, pad, draw a fresh nonce, increment `save_counter`, seal — all in
memory.
1. Encode the payload, pad, draw a fresh nonce, increment `save_counter` (for a file
older than the sidecar, see §6), seal — all in memory.
2. Create `<name>.mutevault.tmp-<random>` in the **same directory**, exclusive-create.
3. Write, flush, and sync the file to stable storage.
4. **Verify:** read the temp file back, parse the header, decrypt, compare a hash of the
plaintext with the one just written. A mismatch aborts the save.
5. Copy the current vault file into the backup folder (§6).
plaintext with the one just written. A mismatch aborts the save. The read-back is
served from the operating system's cache, so it catches encoder, key and memory
errors, not media errors.
5. Add the current vault file to the backup folder (§6) as a **hard link**. If the volume
refuses one (another volume, FAT/exFAT, a share), copy it to a temp file in the
backup folder, flush it, and rename it into place without replacing. Never write into
a final backup name; if that name already exists, skip the step (D-34).
6. Atomically replace the vault file with the temp file (rename with replace on the same
volume; write-through on Windows).
volume; write-through on Windows, injected into `mv-vault` by `mv-app`, D-36).
7. On Linux, sync the directory.
8. Update the local sidecar with the new `save_counter` and header hash.
8. After step 6, write the local sidecar with the new `save_counter` and file hash,
atomically (temp file, flush, replace), never lowering a counter it already holds.
Written before step 6, a crash between the two would raise a false rollback warning.
Spike S5 killed this pipeline 10,000 times at random points and 220 times at fixed ones
without a corrupt or missing vault (`docs/spike-reports/S5_CRYPTO_FORMAT.md`). Copying
straight into the backup name, as step 5 used to say, left an unopenable backup after
about 80 % of the kills that landed in that step.
Rules
- No step writes plaintext to disk.
- A failure at any step leaves the previous vault file untouched and the session dirty.
- An exclusive advisory lock on `<name>.mutevault.lock` is held while the vault is open.
If the lock is taken, the vault opens read-only with an explanation.
A busy lock is retried for up to 2 s, because Windows releases a dead process's lock
asynchronously; only then does the vault open read-only with an explanation. The lock
file is created if missing and never deleted (deleting it races with a concurrent
opener and can produce two holders); only the OS lock counts, not the file.
- A vault file marked read-only opens read-only. (`std::fs::rename` would replace it
anyway, so the check comes first.)
- A sharing violation at step 6 (antivirus, indexer, sync tool) is retried with back-off
for up to 2 s. Then the session stays dirty, a banner says that another program is
using the vault file and MuteVault will try again, and the save is retried at the next
trigger (D-43).
- Before step 1 the app compares the file's size, modification time and header hash with
what it loaded. If the file changed underneath it (a sync tool, another program), it
stops and offers: reload and discard local changes, overwrite, or save a copy. It never
merges silently.
- Leftover `*.tmp-*` files from a crash are removed at next open after confirming the
main file is valid.
- **Leftovers from a crash** (D-35). Only the holder of this vault's lock acts on them,
and only after the main file authenticates. They are `<name>.mutevault.tmp-*` (never a
wider pattern: the default vault folder holds every vault), plus this vault's backup
temps (`backups\<vault-id>\*.tmp-*`) and sidecar temps (`state\<vault-id>.json.tmp-*`).
- A leftover that authenticates with a higher `save_counter` holds the interrupted
save's edits (99.1 % of S5's leftovers did). It is moved into the backup folder,
renamed without replacing, not deleted, and the app shows a one-line notice naming
that backup and its time; no dialog (D-43).
- Anything else is deleted.
- If the main file is missing or fails authentication, every temp is kept, and the
newest one that authenticates is offered as a recovery candidate.
## 6. Backups and rollback warning
- Location: `backups\<vault-id>\<UTC timestamp>-<save_counter>.mutevault`.
- Location: `backups\<vault-id>\<UTC timestamp>-<save_counter>.mutevault`, where
`save_counter` is that of the file backed up, not of the save that replaced it.
- Retention (default): the 10 most recent, then one per day for 30 days, then one per
month for 12 months. Configurable; "no backups" is allowed with a warning.
month for 12 months. The 10 most recent also count toward the daily and monthly
slots, and the newest backup of a day or month is the one kept (D-43). Configurable;
"no backups" is allowed with a warning.
- Backups are ordinary vault files and open with the password that was valid when they
were written (doc 04 §14).
- **Rollback warning:** the sidecar `state\<vault-id>.json` stores the highest
`save_counter` seen on this machine. Opening a file with a lower counter shows a
warning that names both values. It is a warning, not a block, because restoring a
backup is legitimate.
- "Purge backups" is offered after rekey and on demand. Deletion is best-effort: on
SSDs and journaling file systems, removed data may remain recoverable.
- **No code opens a vault file or a backup for writing.** Until step 6 of §5 the newest
backup and the live vault are one file (a hard link), so a write in place would change
both. Every change is a new file renamed into place.
- **Rollback warning:** the sidecar `state\<vault-id>.json` (doc 03 §8) stores the
highest `save_counter` seen on this machine. Opening a file with a lower counter shows
a warning that names both values. It is a warning, not a block, because restoring a
backup is legitimate. If such a file is then saved, the save writes
max(sidecar, file) + 1 as `save_counter`, so the warning stops after the first save
(D-43).
- **Sidecar rules** (D-43). An unparseable sidecar is treated as missing: a notice says
that this vault's rollback history on this computer was reset, and the next save
rewrites it. The sidecar also keeps a SHA-256 of the whole file last saved or opened,
for one purpose: opening a file with the same `save_counter` as the sidecar's but a
different file hash shows a warning that two copies were edited apart. (A header hash
would not do: the header holds no nonce, so two copies saved apart from one counter
usually have identical headers.)
- "Purge backups" is offered after rekey and on demand. It only deletes files, never
overwrites them. Deletion is best-effort: on SSDs and journaling file systems, removed
data may remain recoverable.
## 7. Versioning
@@ -159,18 +226,25 @@ Rules
- Bound every length against the remaining input before allocating.
- Never run a KDF on parameters outside the accepted range.
- All parse failures surface as one of a small set of typed errors:
`NotAVault`, `UnsupportedVersion`, `Malformed`, `HostileParameters`.
`NotAVault`, `UnsupportedVersion`, `Malformed`, `HostileParameters`. Of the limits in
§2, `header_len` over its limit is `Malformed`; a slot count or file size over its
limit is `HostileParameters`. A non-zero `flags` is `Malformed`, and a `kdf_id` = 0
slot with non-zero `m_kib`, `t` or `p` is `HostileParameters` (§3). These mappings
are D-39 and become format contract with the first golden fixture (M1); before that
fixture a human reads `mv-vault` against this text.
- `vault_header` and `vault_payload` fuzz targets cover this code (doc 14 §5).
## 9. I/O characteristics
| Operation | Cost driver | Expectation (to be measured in S5) |
|---|---|---|
| Open + read | File size | Milliseconds |
| Unlock | Argon2id | 0.5–1.5 s by calibration |
| Decrypt + decode | Payload size | Tens of milliseconds for 10,000 items |
| Save | Encode + seal + fsync + verify | Under 200 ms for typical vaults; dominated by fsync |
| Search | In-memory scan of metadata | Under 50 ms for 10,000 items |
| Operation | Cost driver | Expectation | Spike S5 (dev PC) |
|---|---|---|---|
| Open + read | File size | Milliseconds | — |
| Unlock | Argon2id | Standard's own time where it takes 250 ms to 2 s; raised to about 0.5 s on faster PCs, or less where calibration stops at its pass cap; over 2 s the user is told and may lower memory (doc 04 §5, D-40) | 270 ms at the pass cap (64 MiB, 10 passes); Standard 88 ms |
| Decrypt + decode | Payload size | Tens of milliseconds for 10,000 items | ≈ 20 ms for 5 MiB (8,000 items) |
| Save | Encode + seal + fsync + verify | Under 200 ms for typical vaults | 5 MiB: 43–58 ms p50 on a quiet machine, 92 ms straight after heavy writes, 148 ms p95 under compile load; 4 KiB: 2–5 ms. fsync (3.5–60 ms for 5 MiB) is the largest and most variable step; encode, seal and verify together take about 22 ms |
| Search | In-memory scan of metadata | Under 50 ms for 10,000 items | — |
A rough size guide — an estimate until measured — is 0.5–1 KiB per login item, so a
10,000-item vault is in the 5–10 MiB range.
The S5 figures come from the maintainer's PC (i7-14700KF, NVMe SSD), most from the quiet
re-run of 2026-12-06; a low-end machine is open (S5-M1, S5b-M2). A rough size guide is
0.5–1 KiB per login item, so a 10,000-item vault is in the 5–10 MiB range; S5's fake
items averaged 650 bytes.
+18
View File
@@ -11,6 +11,11 @@
- **Secret fields** are sealed boxes (doc 04 §8), marked 🔒 below. They are opened one at
a time, on demand.
- Field ids used in the box AAD are stable small integers per item kind, listed in §9.
- **Every binary field** (`bytes` below, the bytes of a sealed box, `pad`) is a CBOR
byte string, never an array of integers. With `serde`, a `Vec<u8>` encodes as an
array, so the payload codec wraps binary fields in a byte-string type that serialises
with `serialize_bytes` and reads with `deserialize_byte_buf`; `ciborium`'s
`deserialize_bytes` fails on byte strings over 4,096 bytes (spike S5).
## 2. Vault
@@ -121,6 +126,13 @@ For API keys, licence keys, Wi-Fi passphrases and similar: `value` 🔒, optiona
Codes are computed from the system clock. A badly wrong clock produces wrong codes; the
TOTP view shows the current local time next to the countdown so the cause is visible.
**Short secrets.** RFC 4226 asks for at least 128 bits, and `totp-rs` 6.0.0 refuses
shorter secrets unless built through its non-compliant path, yet many services issue
80-bit secrets (16 Base32 characters). Secrets shorter than 128 bits are accepted on
import and on manual entry, through `totp-rs`'s `build_noncompliant`, and the import
report notes "shorter than recommended (chosen by the service)" for each (D-42,
doc 11 §3).
A TOTP entry may exist on a login item or as a login item that has only a TOTP — there
is no separate "authenticator" item kind.
@@ -202,6 +214,12 @@ that matches a phishing host.
Ids are never reused for another meaning. New fields take new ids.
In `AAD_field` (doc 04 §8) an id is a u64, little-endian, so custom field ids
(10000 + id) need no cap. Row 1000 + i binds the credential id: that box's AAD, and only
that box's, continues with `‖ len(credential_id) ‖ credential_id`, the length a u16,
little-endian (D-39). This becomes format contract with the first golden fixture (M1);
before that fixture a human reads `mv-crypto` and `mv-vault` against doc 04 §8.
## 10. Search
- Scope: title, identifier values, URL hosts, tags, folder name, custom field names and
+14 -7
View File
@@ -53,7 +53,7 @@
**A2 — network.** No listening sockets. One outbound request type by default (update
check) over TLS; the update manifest signature is verified against a key compiled into
the app before any download is applied (doc 15 §6). Residual: the release host's CDN sees the request; a tampered host can withhold an update but cannot forge one.
the app before any download is applied (doc 18 §1). Residual: the release host's CDN sees the request; a tampered host can withhold an update but cannot forge one.
**A3 — malicious website.**
- Fill only after a user gesture in extension UI; nothing on page load (D-20).
@@ -74,7 +74,12 @@ page access can read the DOM of pages where the user fills credentials — a bro
property, not something MuteVault can prevent.
**A5 — other local users.** Per-user install and data folders with default user-only
ACLs; pipe ACL restricted to the user's SID, remote clients rejected.
ACLs; pipe ACL restricted to the user's SID, remote clients rejected. A user-only ACL
does not stop another account from creating the pipe name first, so the app creates the
pipe with the first-instance flag and reports a squat instead of starting, and every
client (the native host, a second instance, the CLI) opens the pipe with
identification-level impersonation and checks the server's user SID before sending
anything (D-47; S4 finding 16, S4-M3).
**A6 — same-user malware, locked.** It can copy the vault (reduces to A1), and it can
wait for the next unlock (becomes A7). Signed updates and optional Authenticode signing
@@ -119,20 +124,20 @@ Where secrets can be observed in transit, who can observe them, and what is done
| Channel | Carries | Who can read it | Mitigation | Residual |
|---|---|---|---|---|
| Vault file, backups | Everything, sealed | Anyone with file access | AEAD + Argon2id | Master password strength |
| Temp file during save | Sealed bytes only | Same | Same directory, exclusive create, removed after replace | None beyond the vault itself |
| Temp files during save (vault, backup copy, sidecar) | Sealed vault bytes; the sidecar temp carries no secrets | Same | Same directory, exclusive create, renamed into place. A crash usually leaves a complete, newer, sealed vault; only that vault's lock holder acts on it, after the main file authenticates: a newer one moves to the backups, the rest are deleted, and all are kept for recovery if the main file fails (doc 05 §5, D-35) | One more sealed copy, as strong as the vault itself; a moved leftover ages out with the backups |
| Export files | **Plaintext** | Anyone with file access | Re-authentication, explicit warning, no default location, reminder to delete | The user's handling |
| Import source files | Plaintext from another tool | Same | Offer to delete after import; say that deletion is best-effort | Remnants on disk |
| Settings, sidecars | No secrets | — | By construction | Vault id and paths reveal that a vault exists |
| Logs | No secrets | — | Secret types cannot be formatted; item ids only | Timing and usage patterns |
| Clipboard | One secret at a time | Any process in the session; clipboard history and cloud sync if enabled | History/cloud exclusion formats; timed clear; clear on lock | A process polling the clipboard during the window |
| Keyboard — master password entry | Master password | Keyloggers running as the user or higher | Secure-desktop entry is a P2 idea | A7 |
| Text-input services (IME, Windows text suggestions and prediction) | Whatever is typed into a field that Windows does not know is a password | The suggestion popup on screen; the IME's and Windows' learned typing data | `SecureInput` turns these off for secret fields (S3). The `gpui-kit` masked input does not: S1 saw the suggestion popup show a typed password (doc 17 §2.1, finding 7) | Until S3 passes, and in its fallback, typed secrets can reach the suggestion popup and Windows' prediction data |
| Text-input services (IME, Windows text suggestions and prediction) | Whatever is typed into a field that Windows does not know is a password | The suggestion popup on screen; the IME's and Windows' learned typing data | `SecureInput` reports that it accepts no text input, so GPUI detaches the window's IME context while it has focus: text services are off for the field, as Microsoft prescribes for password fields (S3, D-38; `docs/spike-reports/S3_SECURE_INPUT.md`). The `gpui-kit` masked input keeps them on: S1 saw the suggestion popup show a typed password (S1 finding 7). No field holding vault data gets a spell checker, whose "Learn Spelling" writes words to disk (doc 12 §4) | Until S3-M1 and S3-M3 pass by hand, the switch is measured but its effect on a real IME and the popup is not. Keystroke-hook input methods (EVKey, UniKey) see every key whatever the field does; MuteVault does not detect them, and the master-password screens only hint at switching them to English mode (D-44). Each keystroke leaves one-character framework strings, freed unwiped. After a paste, the clipboard holds its own copy until the form is submitted; MuteVault then clears it if it is unchanged since the paste (D-44) |
| Keyboard — auto-type (P1) | Username, password | Keyloggers; the wrong window if focus changes | Window re-check before each chunk; off by default | A7; user error |
| Screen | Revealed secrets, TOTP codes | Screen capture, remote assistance, onlookers | Masking, timed reveal, capture exclusion | Cameras; capture below the window-manager level |
| Process memory | Keys, opened secrets | Same-user processes with access rights; administrator | Access restrictions, sealed fields, zeroise, short lifetimes | A7, A8 |
| Swap, hibernation file | Whatever is paged out | Offline disk access | Page-locked keys; recommend full-disk encryption; lock on hibernate | Unlocked pages that are not locked |
| Crash dumps | Process memory | Disk access | Dump exclusion, no custom dumps | System-level dumps (A8) |
| Named pipe | Requests and secrets being filled | The user's own processes | User-only ACL, peer checks, association token | A7 |
| Named pipe | Requests and secrets being filled | The user's own processes | User-only ACL, first-instance flag, session-scoped name, peer checks both ways, association token (D-47) | A7 |
| Native-messaging stdio | Same | The browser process | Private pipes created by the browser | A compromised browser |
| Page DOM after fill | Filled credentials | The page and extensions with access to it | User confirmation of host | Inherent |
| Network | Update check only | Network path, the release host's CDN | TLS, signed hash list | Metadata: IP, version |
@@ -142,7 +147,7 @@ Where secrets can be observed in transit, who can observe them, and what is done
| # | Risk | Why accepted | Revisit when |
|---|---|---|---|
| RR-1 | Same-user malware reads an unlocked vault | Not solvable in user space | Never; keep saying it |
| RR-2 | Revealed secrets leave unwipeable string copies in UI memory | Framework limitation | `SecureInput`/secure label work matures |
| RR-2 | Revealed secrets leave unwipeable string copies in UI memory. Entry is not covered: S3 found no copy of a password typed into `SecureInput` outside its buffer, while the masked input left 3–14 whole copies that outlived clearing by at least 30 s (S3 finding 5), so the masked input is never used for entry | Framework limitation | A secure label for reveal exists |
| RR-3 | Master password typed on the normal desktop | Secure-desktop entry is costly with GPUI | P2 |
| RR-4 | No independent audit | No budget | Funding or volunteer review appears |
| RR-5 | TOTP seeds beside passwords | User convenience; warned | — |
@@ -161,7 +166,9 @@ These are testable statements. Each has, or will have, a test.
association token, unlocked state, origin-to-item match, rate-limit pass.
5. The origin used for matching never originates from page-controlled data.
6. A vault file that fails authentication is never partially loaded.
7. A save either fully replaces the file with a verified new one or leaves the old one intact.
7. A save either fully replaces the file with a verified new one or leaves the old one
intact, and every file with a final backup name is a complete vault file that
authenticates (doc 05 §5–§6; `cargo xtask kill-test`, doc 14 §3).
8. KDF parameters outside the accepted bounds never reach the KDF.
9. No crate other than `mv-net` can open a network connection.
10. The extension's storage never contains a password, TOTP secret, passkey key or master password.
+56 -14
View File
@@ -11,8 +11,8 @@ native-messaging channel. It holds no vault data and performs no cryptography.
| Browser | v1 | Notes |
|---|---|---|
| Chrome, Edge | P0 | Manifest V3 service worker |
| Brave, Vivaldi, other Chromium | P0 best-effort | Same build; native-host registration verified per browser in spike S4 |
| Chrome, Edge, Brave | P0 | Manifest V3 service worker. Brave uses Chrome's registry key (S4) |
| Vivaldi, other Chromium | P0 best-effort | Same build; Vivaldi is expected to read Chrome's key too, until S4-M1 shows it |
| Firefox | P0 | Manifest V3 with an event page; add-on id `mutevault@poli0981.dev` |
Flatpak-packaged browsers on Linux cannot reach native-messaging hosts outside their
@@ -70,35 +70,73 @@ in the browser's shortcut settings.
extension origin; Firefox: the add-on id).
2. Compare it with the allowed ids compiled into the host (release ids; development ids
only in debug builds). Mismatch → exit.
3. Connect to the user's pipe `\\.\pipe\MuteVault.<user-SID>.v1`. If the app is not
running, answer every request with `app_not_running` (the popup then offers
"Open MuteVault").
3. Connect to the user's pipe (name in doc 03 §8, D-47) with identification-level
impersonation, and check that the server process runs as this user before sending
anything. If the app is not running, answer every request with `app_not_running`
(the popup then offers "Open MuteVault").
4. Send a preamble to the app: browser identity, host process id, host version.
Nothing else runs before relaying: the app checks the caller process itself, from the
pid the pipe reports (S4 finding 11). Chromium starts the host through `cmd.exe`, so
neither side may expect the browser to be the host's parent, and the manifest path never
contains `%` (S4 finding 4).
**Relay rules**
- Frames are a 32-bit native-endian length followed by UTF-8 JSON, as the browser
defines. The host enforces a 1 MiB cap in both directions.
- The host does not parse message bodies and logs nothing but lifecycle events.
- When stdin closes, the host exits.
defines. The host enforces a 1 MiB cap in both directions from the length header,
before allocating, and exits on a larger frame. The browsers accept at most 1 MiB
towards the extension, but Chromium sends up to 64 MiB and Firefox up to 4 GiB towards
the host (S4 finding 8). The extension checks a request's size before posting, so an
oversized one is a `bad_request`, not a lost connection; the app keeps responses well
below 1 MiB.
- The host does not parse message bodies, except while the app is not running: then it
reads only a request's `id`, to copy into the `app_not_running` answer, and whether it
is `open_app`. It logs nothing but lifecycle events.
- When stdin closes, the host exits. That is the only thing that ends it in Chromium,
which terminates only the `cmd.exe` it started. Firefox terminates the host's job
object after a disconnect and when the host exits, which kills every process the host
started inside the job (S4 finding 5).
**Opening the app** (D-48). When the app is not running and the user clicks "Open
MuteVault" in the popup, the extension sends `open_app` and the host starts the installed
app, through `mv-platform`, with `CREATE_BREAKAWAY_FROM_JOB`, so that it is in neither the
browser's job nor its process tree. It starts only that fixed path, only for `open_app`,
and passes no arguments from the message. There is no `mutevault:` URL protocol: any web
page could invoke one. The Store build's way is part of S13.
**Lifetime and latency.** An open port keeps the MV3 background (service worker, or
Firefox's event page) alive in all four browsers S4 tested; without one it stops after
about 30 s. The extension therefore opens one port per browser profile when it first
needs the app, keeps it open for `status` pushes (§8), and reconnects with back-off. The
budget is under 50 ms per request on an open port (S4: p99 at most 3.5 ms for 64 KiB in
Chromium browsers, 14 ms in Firefox's first round and 3 ms once warm) and under 150 ms
for connecting plus the first reply, host start included (S4: 33–82 ms).
**Registration** (per user, no administrator rights), performed by the app on install,
update and from Settings → Browser integration:
| Browser | Registry key under `HKCU\Software\` |
|---|---|
| Chrome (and Chromium browsers that read Chrome's key) | `Google\Chrome\NativeMessagingHosts\dev.poli0981.mutevault` |
| Chrome, Brave (S4), Vivaldi (expected, S4-M1) | `Google\Chrome\NativeMessagingHosts\dev.poli0981.mutevault` |
| Edge | `Microsoft\Edge\NativeMessagingHosts\dev.poli0981.mutevault` |
| Firefox | `Mozilla\NativeMessagingHosts\dev.poli0981.mutevault` |
Each key's default value is the path of a manifest JSON under
`%LOCALAPPDATA%\MuteVault\native-messaging\`. The Chromium manifest lists
`allowed_origins`; the Firefox manifest lists `allowed_extensions`. Uninstall removes
keys and manifests. Which key Brave and Vivaldi consult is confirmed in spike S4.
exactly the keys and manifests it wrote. Edge reads its own key, then Chromium's, then
Chrome's; Brave reads Chromium's, then Chrome's, and never `BraveSoftware`'s (S4,
measured). So MuteVault writes exactly these three keys, never `Software\Chromium\…`,
whose entry would shadow Chrome's in Edge and Brave, and never `Software\BraveSoftware\…`.
Chromium's policies `NativeMessagingUserLevelHosts`, `NativeMessagingBlocklist` and
`NativeMessagingAllowlist` can turn per-user hosts off. Settings → Browser integration
reads them and says why the extension cannot connect (S4 finding 14, S4-M4).
The above describes the Velopack build. In the Microsoft Store (MSIX) build, registry
writes and the program path are virtualised, so registration needs unvirtualised keys
and a host path the browser can start; that is designed in doc 15 §13 and proven in
and a host path the browser can start; that is designed in doc 18 §8 and proven in
spike S13 before the Store build claims browser integration.
## 5. Association (pairing)
@@ -139,7 +177,7 @@ Responses echo `id` and carry either `ok` with a result or `error` with a code.
| `hello` | ext → app | — | App version, protocol version, paired?, locked? |
| `pair_request` | ext → app | unlocked | Association id + token after user approval |
| `status` | ext → app | paired | `{vault_open, locked}`; also pushed on change |
| `open_app` | ext → app | paired | Brings the app window forward (to unlock) |
| `open_app` | ext → app | paired | Brings the app window forward (to unlock); if the app is not running, the host starts it (§4) |
| `find_logins` | ext → app | paired, unlocked | Candidates for an origin: item id, title, primary identifier label + value, `has_totp`, `has_passkey`. **No secrets.** |
| `get_fill` | ext → app | paired, unlocked | Identifier and password for one item |
| `get_totp` | ext → app | paired, unlocked | Current code and seconds remaining |
@@ -200,7 +238,9 @@ origin field from a content script or page message.
- When the vault is locked, the popup shows only "Locked — open MuteVault to unlock".
Unlock always happens in the desktop window; the extension never collects a password.
- The app pushes `status` on lock and unlock so the toolbar icon reflects the state.
- The app pushes `status` on lock and unlock so the toolbar icon reflects the state,
over the long-lived port of §4. Connections can last for days and survive system
sleep (S4), so lock-on-sleep (doc 10 §6) pushes `status` over them too.
- If the app exits, the host reports `app_not_running`; the extension keeps no cache to
fall back on.
@@ -220,7 +260,9 @@ nothing by itself. Until listings are approved, testers load the unpacked build.
- Validators and routing: unit tests (Vitest).
- Field heuristics: fixture pages covering common login-form shapes.
- End to end: Playwright with the extension loaded and a fake native host that speaks
the protocol.
the protocol. Branded Chrome ignores `--load-extension`, so the tests use Chrome for
Testing or CDP `Extensions.loadUnpacked`; Firefox installs the add-on through
WebDriver BiDi `webExtension.install` (S4 finding 10).
- Host framing: fuzz target `ipc_frame`.
- Protocol handlers in the app: tests for each check in §6, including origin mismatch,
revoked association, rate limiting and locked state.
+2 -2
View File
@@ -162,13 +162,13 @@ dialog to every browser and to native apps, with Windows Hello for verification.
| Aspect | Requirement |
|---|---|
| Registration | COM server implementing `IPluginAuthenticator`; registered with `WebAuthNPluginAddAuthenticator`; headers in `microsoft/webauthn` |
| Identity | The app must be **packaged** (MSIX). MuteVault's Microsoft Store build (D-25, doc 15 §13) is that package; the Store signs it, and individual developer registration is free |
| Identity | The app must be **packaged** (MSIX). MuteVault's Microsoft Store build (D-25, doc 18 §8) is that package; the Store signs it, and individual developer registration is free |
| User step | Enable under Settings › Accounts › Passkeys › Advanced options |
| Verification | `WebAuthNPluginPerformUserVerification` (Windows Hello) |
| Requests | CTAP-style make-credential / get-assertion, fed into the same `mv-passkey` authenticator |
| References | Microsoft's PasskeyManager sample; Bitwarden's Rust `windows_plugin_authenticator` (GPL-3.0) |
The Store build exists from v1.0 for distribution reasons (D-25, doc 15 §12), so the
The Store build exists from v1.0 for distribution reasons (D-25, doc 18 §7), so the
provider adds a COM server and its registration to a package that already ships. Users
of the direct-download build keep the extension path. Spike S12 proves COM
registration and one end-to-end ceremony from Rust before this is scheduled; it depends
+61 -13
View File
@@ -39,11 +39,16 @@ formats, otherwise the Windows path calls the clipboard API directly.
Residual: any process may read the clipboard during the window. The UI offers fill and
auto-type as alternatives and says why.
Reading the clipboard into `SecureInput` (paste) is the one inbound path; see §11.
## 3. Global hotkey and quick access (P1)
- A user-chosen hotkey (default `Ctrl+Alt+Space`, off until enabled) opens a small
always-on-top palette: type to search, Enter copies the password, modified Enter
copies the identifier or the TOTP code.
- A user-chosen hotkey opens a small always-on-top palette: type to search, Enter copies
the password, modified Enter copies the identifier or the TOTP code. It is off until
the user records a chord; there is no default (D-46). S2 found `Ctrl+Alt+Space`
already taken on the maintainer's PC, and on AltGr layouts it is also `AltGr+Space`.
- The app acts on the hotkey's Pressed event only (`global-hotkey` also reports Released,
from a thread it starts per press).
- If the vault is locked, the palette shows the unlock prompt first.
- Registration failures (hotkey taken by another program) are reported in Settings.
@@ -73,16 +78,33 @@ Safety rules
## 5. Tray, start-up and single instance
- Tray icon with: Open, Lock, Quick access, Quit. The icon reflects locked/unlocked.
Windows 11 puts a new icon in the hidden-icons flyout, so first run shows how to pin
it (doc 12 §3).
- "Close to tray" (default on): closing the window locks the vault and keeps the process
for browser integration. "Quit" always exits.
- "Start with Windows" (default off): per-user Run key, launching minimised and locked.
The Microsoft Store build uses a start-up task declared in its package manifest
instead, because its registry writes are virtualised (doc 15 §12).
for browser integration. It **removes** the window and switches GPUI to headless; a
hidden or minimised GPUI window keeps waking on every display refresh (S2: 1–2 % of a
core; headless: none). "Open" re-attaches the GPU, opens a window (about 110 ms) and
brings it forward with `SetForegroundWindow` itself, never GPUI's `activate_window()`,
which injects a synthetic Alt press into whatever window is in front (D-46). "Quit"
always exits.
- "Start with Windows" (default off) is a setting, not a tray-menu item. The Velopack
build writes a per-user Run value (launching in the tray, locked) when it is switched
on and removes it when it is switched off and in the uninstall hook; it points at a
path that survives updates (S9). Windows' Startup page only flags the entry under
`StartupApproved`; the app reads that flag and says "turned off in Windows settings",
and never writes it. The Microsoft Store build uses a start-up task declared in its
package manifest, because its registry writes are virtualised (doc 18 §7). That task
passes no command-line arguments, so the Store build detects a start-up activation
(`AppInstance::GetActivatedEventArgs()`, `StartupTask`) instead of `--minimized`, and
has no Run-key code.
- Single instance: a named mutex scoped to the session; the second launch asks the
first to show its window through the IPC pipe and exits.
- The tray and hotkey crates need their events pumped on the UI thread alongside GPUI's
loop. Spike S2 proves this before anything depends on it. Fallback: no tray; the app
stays in the taskbar.
first to show its window through the IPC pipe and exits (names in doc 03 §8, D-47).
- The tray, menu and hotkey objects are created on GPUI's main thread, whose message
loop already dispatches their windows; their event handlers are set before any of them
exists and only forward into one channel that a foreground task drains, with no
polling (S2, D-46). The tray menu runs a modal loop inside which GPUI keeps running, so
it is never opened from inside a GPUI update. Fallback, if S2-M1 fails: no tray; the
app stays in the taskbar.
## 6. Locking on system events
@@ -134,7 +156,7 @@ stack in spike S11; an item that breaks rendering is dropped and recorded.
|---|---|
| Restrict the process's access-control list so other same-user processes cannot open it for memory read/write | Opportunistic memory scraping |
| Opt out of Windows Error Reporting dumps; write no custom dumps | Secrets in crash dumps |
| Page-lock the allocations holding the vault key and field key | Secrets in the page file |
| Page-lock the allocations holding the vault key, the field key and `SecureInput`'s buffer (§11); the Argon2id working memory best-effort, for the duration of the hash, raising the working-set minimum (D-40) | Secrets in the page file |
| Mitigation policies that do not conflict with the renderer (for example extension-point disable, image-load restrictions) | DLL-injection style attacks |
| Exclude the window from screen capture (setting, default on) | Screenshots, screen sharing, recording tools |
| Clear the clipboard and lock on exit | Leftovers |
@@ -158,7 +180,33 @@ settings screen describes these as hardening, never as protection guarantees.
- `.mutevault` is associated with the app at install (per user); double-clicking opens
the vault on its lock screen.
- Command-line switches for the GUI: `--minimized`, `--vault <path>`, `--lock` (signal a
running instance). Nothing secret is ever accepted on the command line.
running instance). Nothing secret is ever accepted on the command line. The Store
build's start-up task passes none of them (§5).
- `mutevault-cli` (P1) talks to the running app over the pipe and inherits the app's
lock state; it cannot unlock by itself and never prints a secret unless the user
passed an explicit `--reveal` flag in an interactive terminal.
## 11. Secret text entry
`SecureInput` (doc 12 §4, D-38) is a GPUI element in `mv-ui`. On Windows it needs almost
nothing from this crate (`docs/spike-reports/S3_SECURE_INPUT.md`):
- **No text-services call.** The element reports that it accepts no text input, and GPUI
detaches the window's IME context while it has focus. `mv-platform` never calls the IME
or text-services APIs on a GPUI window: GPUI caches that state and undoes an outside
change at the next paint (S3 finding 2). No input scope and no TSF either: Microsoft
says password fields should have text services disabled, and that `IS_PASSWORD` is not
supported (S3 finding 3).
- **Paste read.** Next to the clipboard functions of §2, a read of `CF_UNICODETEXT` that
decodes the UTF-16 into a caller's sink without building a `String`. Every
`SecureInput` accepts paste, first line only; a clipboard-history paste (Win+V) is a
normal paste (D-44). The memory behind the clipboard handle belongs to the clipboard
and is not wiped by the app; how long the clipboard's own copy lives is S3-M4.
- **Clear on submit.** When a form whose `SecureInput` received a paste is submitted
(unlock, create, change, item save), MuteVault clears the clipboard if its sequence
number is unchanged since that paste (D-44, doc 12 §4), the same check as §2 step 4.
- **Page-locked buffer.** The element's 1,024-byte buffer is allocated through §8's
page-locking, like the vault key and field key.
Residual: each keystroke still passes through one-character framework strings that are
freed unwiped within the same window message (S3 finding 4, doc 07 §5).
+4 -2
View File
@@ -41,7 +41,7 @@ afterwards.
collected per record with line or entry references, never with secret values.
4. **Normalise** — trim, NFC for display text, validate URLs (invalid ones are kept as
plain text in notes), parse TOTP parameters, split multi-URL fields, apply doc 06 §12
limits.
limits. A TOTP secret shorter than 128 bits is accepted (doc 06 §5, D-42).
5. **Deduplicate** — against the vault and within the file:
- same registrable domain, same primary identifier, same password → skipped;
- same domain and identifier, different password → imported and flagged "possible
@@ -50,7 +50,9 @@ afterwards.
6. **Preview** — counts by kind, new folders, skipped duplicates, warnings, records that
will be truncated or rejected. Secrets stay masked.
7. **Commit** — add items, save once. A backup of the pre-import vault is taken first.
8. **Report** — what was added, skipped and rejected; exportable without secrets.
8. **Report** — what was added, skipped and rejected; exportable without secrets. Each
TOTP secret shorter than 128 bits is noted as "shorter than recommended (chosen by
the service)" (D-42).
9. **Clean up** — offer to delete the source file, with the honest note that deletion
from SSDs and synced folders is best-effort.
+60 -20
View File
@@ -1,9 +1,9 @@
# 12 — UI and UX
> MuteVault docs suite v1.2 · 2026-11-23 · Implemented in `mv-ui` on `gpui-kit` 0.10.0
> MuteVault docs suite v1.2 · 2026-11-23 · Implemented in `mv-ui` on `gpui-kit` 0.12.0 (D-33)
> Component names follow the pinned `gpui-kit` version. Spike S1 confirmed the shell's
> components: resizable panels, `List`, `Input` and the theme (doc 17 §2.1). Confirm the
> others as each view is built.
> components: resizable panels, `List`, `Input` and the theme
> (`docs/spike-reports/S1_GPUI_SHELL.md`). Confirm the others as each view is built.
## 1. Principles
@@ -90,22 +90,54 @@ tracker (D-28). "Documentation" opens the repository on the forge.
"I understand there is no other way back in".
5. **Timing.** "Unlocking will take about 0.8 s on this computer", with the preset
chooser behind an Advanced link.
6. **Done.** Offers: import existing passwords, set up the browser extension.
6. **Done.** Offers: import existing passwords, set up the browser extension. When
"Close to tray" is on, it also shows how to pin the tray icon: Windows 11 puts a new
icon in the hidden-icons flyout, where most people would not find it (S2 finding 6).
## 4. Secret entry and display
- **`SecureInput`** (spike S3) is used for the master password, the recovery key and
password fields in editors. It keeps typed characters in a zeroising buffer, renders
only dots, disables IME composition and Windows text suggestions and prediction, never
offers spell-check or autocomplete, and hands its content to the application as a
secret buffer. S1 found that the framework's masked input does none of these: Windows'
suggestion popup showed a typed password (doc 17 §2.1, finding 7).
- Fallback if S3 fails: `gpui-kit`'s masked input, with the residual risk recorded in
doc 07 §6 (RR-2).
- **`SecureInput`** is used for the master password, the recovery key and password
fields in editors. S1 found that the framework's masked input keeps none of the text
safe: Windows' suggestion popup showed a typed password (S1 finding 7), and S3 found
3 to 14 whole copies of it in memory, some still there 30 s after clearing (S3
finding 5). `SecureInput` is a custom GPUI element (D-38,
`docs/spike-reports/S3_SECURE_INPUT.md`):
- one fixed 1,024-byte zeroising buffer, page-locked (doc 10 §8), never reallocated,
handed to the application by move when the form is submitted;
- only dots are shaped; the text never reaches the text system, and the element
returns no text to the platform, an IME or assistive technology;
- it reports that it accepts no text input, so GPUI detaches the window's IME context
while it has focus. That keeps out IME composition, Windows text suggestions and
prediction, as Microsoft prescribes for password fields. `mv-platform` never touches
the IME context of a GPUI window (S3 finding 2);
- copy and cut do nothing. Every `SecureInput` accepts paste (Ctrl+V, Shift+Insert),
decoded from the clipboard straight into the buffer, first line only, without a
`String` (doc 10 §11). A clipboard-history paste (Win+V) is a normal paste: it
cannot be told apart (S3 finding 10). When a form with a `SecureInput` that received
a paste is submitted (unlock, create, change, item save), MuteVault clears the
clipboard if its sequence number is unchanged since that paste (D-44);
- it never shows how many characters it holds;
- security behaviour never depends on focus callbacks, which do not fire in an
inactive window (S3 finding 7).
S3's automated checks pass; the IME and suggestion checks by hand (S3-M1, S3-M3) are
open.
- No field that holds vault data, secure notes included, ever gets a `SpellChecker`:
its "Learn Spelling" would write the word to the user's dictionary on disk (S1b,
finding 10).
- Fallback if S3-M1 or S3-M3 fails: `SecureInput` stays for its memory behaviour, and the
text-services exposure moves to doc 07 §5 and §6 (RR-2). The masked input is never used
for entry.
- **Reveal** shows the value for 30 seconds or until focus leaves, whichever is first.
- **Caps Lock** indicator on every password field.
- The master password field has no "show" toggle on the lock screen by default
(setting), and never accepts paste from the clipboard history.
(setting).
- Keystroke-hook input methods (EVKey, UniKey) rewrite keys before any field sees them,
so with Telex or VNI on a master password may differ from what the user meant to type.
MuteVault does not try to detect them (D-44). The create and change master-password
screens show a static hint to switch Vietnamese input methods (EVKey, UniKey; Telex or
VNI) to English mode before typing; after a failed unlock the lock screen hints "check
Caps Lock and your input method". The strings get EN, VI and JA entries when those
screens are built (lock, create and unlock in M1; first run in M2).
## 5. States and feedback
@@ -113,7 +145,7 @@ tracker (D-28). "Documentation" opens the repository on the forge.
|---|---|
| Empty vault | Three actions: add an item, import, set up the browser extension |
| No search results | "Nothing matches" plus "Search also covers tags and URLs" |
| Wrong password | "That password did not unlock the vault." No hints; retry delay shown |
| Wrong password | "That password did not unlock the vault." No password hints; the Caps Lock and input-method hint of §4 (D-44); retry delay shown |
| Save failed | Persistent banner with the reason and Retry; changes stay in memory |
| File changed on disk | Dialog: reload / overwrite / save a copy (doc 05 §5) |
| Newer vault version | Opens read-only with a banner |
@@ -131,7 +163,8 @@ Toasts never contain secrets, identifiers or site names.
| General | Language | System (EN/VI/JA) |
| | Theme | System |
| | Close to tray | On |
| | Start with Windows, minimised | Off |
| | Start with Windows, minimised | Off. Shows "turned off in Windows settings" when Windows' Startup page (Velopack) or the start-up task state (Store) says so; the app never overrides that (D-46) |
| | Quick-access hotkey (P1) | None: off until the user records a chord; a chord another program holds is reported here (D-46) |
| Security | Lock after idle | 10 min |
| | Lock on screen lock / sleep / user switch | On |
| | Block screen capture | On |
@@ -189,8 +222,9 @@ can become user-configurable later.
stored in UTC.
- `cargo xtask i18n` fails the build if a key is missing in any locale or unused.
- `gpui-component` translates its own strings ("Show password", the input context menu,
"Clear") from its own file. In 0.10.0 that file has Japanese but no Vietnamese, so
those strings stay English in VI (S1). Contribute `vi` upstream before M5.
"Clear") from its own file. From 0.10.0 to 0.12.0 that file has Japanese but no
Vietnamese, so those strings stay English in VI (S1, S1b). Contribute `vi` upstream
before M5.
- Security-critical wording (warnings, consent dialogs) is translated by a person and
reviewed; machine drafts are not shipped for those strings.
- The extension uses `_locales` with the same three languages and the same glossary.
@@ -217,13 +251,19 @@ can become user-configurable later.
the value itself is read only on explicit request.
- Respect the system reduced-motion and text-scaling settings; layouts hold at 200 %.
S1 showed that display scaling works out of the box (up to 225 %). The Accessibility
text-size setting does not: `mv-ui` has to apply it itself.
text-size setting does not: `mv-ui` has to apply it itself. `gpui-pre` 0.3.15 has a
text-scale hook, but only Linux feeds it, so `mv-platform` reads Windows'
`UISettings.TextScaleFactor`.
- Announcements ("Copied; clears in N s", reveal, search result counts) go through
`gpui-component`'s `LiveRegion`. Its text is spoken and is the node's name in the
tree, so it never holds a secret value.
- GPUI reports to assistive technology only elements that have a role, and text only
through its `Text` element (`text!`). So any text a screen reader must find, such as
vault-list rows, section titles and status messages, is rendered with
`text!(id = …, …)`, with an id that is stable and unique for the row, or on an
element that has a role and a label. `gpui-component` 0.10.0's `List` rows have no
accessible name of their own (S1, doc 17 §2.1, finding 2).
element that has a role and a label. `gpui-component`'s `List` rows (0.10.0 to
0.12.0) have no accessible name of their own (S1, `docs/spike-reports/S1_GPUI_SHELL.md`,
finding 2).
- Verified with Narrator and keyboard-only passes in S1 and before each release.
## 10. Visual direction
+1 -1
View File
@@ -148,7 +148,7 @@ domain code, `rand`) are added together with that crate.
## 12. Git
The forge, remotes, branch protection, tags and the rules for AI agents are in
doc 15 §14. The conventions for the commits themselves:
doc 15 §6. The conventions for the commits themselves:
- Conventional Commits: `feat:`, `fix:`, `docs:`, `sec:`, `refactor:`, `test:`,
`build:`, `ci:`, `chore:`. Imperative subject, no trailing period, 72 characters.
+56 -10
View File
@@ -16,7 +16,7 @@ behaviours exist only in views.
| Golden | Vault files and exports from every released version | Fixtures + digest comparison |
| Fuzz | Every parser of untrusted bytes | `cargo-fuzz` |
| Integration | Use-cases against real files in temp directories; IPC against an in-process client | `cargo-nextest` |
| Crash safety | Kill-during-save loop | Custom harness |
| Crash safety | Kill-during-save: stall points plus random kills (§3); power cut in a VM (§9) | `cargo xtask kill-test` (D-37): the parent in `xtask`, the child an `mv-vault` example binary |
| UI | View-models and a few rendered views | `#[gpui::test]` |
| Extension unit | Validators, routing, field heuristics | Vitest |
| Extension end-to-end | Loaded extension, fake native host, fixture pages | Playwright |
@@ -56,11 +56,27 @@ coverage service is involved.
- Failed unlock back-off is applied and resets after success.
**Save**
- Kill-during-save: a child process saves in a loop while the parent kills it at random
points, 1,000 iterations; the vault file always opens and is either the old or the new
version.
- Kill-during-save, `cargo xtask kill-test` (D-37). The parent lives in `xtask`, because
`std::process::Command` is banned elsewhere (doc 13 §5); the child is an `mv-vault`
example binary that opens version N through the full unlock path and saves N+1,
printing a marker after each step of doc 05 §5.
- *Stall points:* the child blocks after each marker and is killed there; the vault
must be the old version before the replace and the new one from it on.
- *Random kills:* spread over the open and the whole save, with extra weight on the
backup and replace steps, which take well under a millisecond each.
- After each kill the parent, as the next opener, checks: the vault is byte-for-byte
the old or the new version; every backup opens and its name carries its counter;
leftovers fall into the expected classes and are handled as doc 05 §5 says; the lock
is reacquired within 2 s; no false rollback warning.
- *Negative control:* a writer that saves in place must be caught. (TerminateProcess
cannot show a missing fsync; that is the VM power-cut test's job, §9.)
- It touches only its temp directory (`MUTEVAULT_DATA_DIR`), so it is not `#[ignore]`d.
- Quick variant (stall points plus 100 random kills per vault size) on every pull
request; 1,000 random kills per size before each release (§8).
- A kill during the backup step never leaves an unopenable backup.
- Externally modified file is detected before overwrite.
- A failed verify-after-write leaves the original file untouched.
- A failed verify-after-write leaves the original file untouched. (Spike S5 did not
cover this: it needs fault injection.)
**IPC**
- Each check in doc 08 §6 has a negative test: bad token, revoked association, locked,
@@ -109,7 +125,8 @@ artifacts (SARIF, HTML), and Qodana's also appear in Qodana Cloud.
`deny.toml` essentials
- Licences: allow-list of GPL-3.0-compatible licences (MIT, Apache-2.0, BSD-2/3-Clause,
ISC, 0BSD, Zlib, Unicode-3.0, MPL-2.0, CC0-1.0, Unlicense); everything else fails.
ISC, 0BSD, Zlib, Unicode-3.0, MPL-2.0, CC0-1.0, Unlicense); everything else fails,
except a crate-scoped exception listed in doc 02 §2.7.
- Sources: crates.io only; no git dependencies in release builds.
- Bans: duplicate major versions of crypto crates; `openssl-sys` on Windows; any HTTP
client outside `mv-net`'s subtree.
@@ -153,9 +170,11 @@ and S10 records the image actually pulled). `qodana.yml` calls the ops
`-u root -e CARGO_HOME=/data/cache/cargo`, because the Rust linter has no native mode
and the Linux image needs Docker Desktop on the runner PC (spike S10). The image has no
C linker, and the linter runs build scripts while it opens the project, so `qodana.yaml`
has a `bootstrap` that installs `build-essential`. As of 2026-12-02 the linter still
attaches no Rust standard library inside the container, and reports false type errors
until S10 solves that. The Qodana Cloud
has a `bootstrap` that installs `build-essential`. The linter attaches the Rust standard
library but misses the items `core` and `alloc` generate with macros, so it reports 47
false type errors in `xtask`; its results are not trusted for Rust type errors until S10
closes (`docs/spike-reports/S10_QUALITY_PIPELINE.md`). Its one real warning, about the
git-ignored `spikes` directory in the workspace's `exclude`, is expected. The Qodana Cloud
project's VCS URL points at the GitLab mirror: Qodana Cloud accepts only github.com,
gitlab.com and bitbucket.org URLs. If the UI crates cannot be analysed inside the
container, the scan is limited to the non-UI crates; if the Docker route does not work
@@ -183,6 +202,9 @@ shared runners are noisy.
- All blocking gates green on `main`.
- No open issue labelled `security` or `data-loss` against the milestone.
- Golden fixtures added for any format-affecting change.
- `cargo xtask kill-test` with 1,000 random kills per vault size passes before each
release; any change to the save pipeline or the format also passes the VM power-cut
test (§9).
- Manual checklists in §9 completed and recorded in the release notes.
- Docs updated: version table, decision log, changelog.
@@ -201,10 +223,34 @@ approval; Narrator pass over the same; 200 % scaling; both themes.
**Upgrade.** Install the previous release, create data, update in place, confirm the
vault opens and the browser integration still works.
**`gpui-kit` upgrade.** Once `mv-ui` exists, S1b's upgrade harness (its measurement and
UI Automation scripts) becomes `cargo xtask ui-smoke` (D-45). It starts the GUI, so it
runs locally before each `gpui-kit` upgrade (D-33), together with S1b's reduced
checklist, and never in CI (host-mode rules, doc 15 §4.4).
**Fresh machine.** Install on a clean Windows 11 virtual machine with no developer
tools: first run, unlock, pairing, fill.
**Distribution channels.** For both channels (doc 15 §12), in a virtual machine:
**Power cut (VM), S5b-M3.** For any change to the save pipeline or the format. It needs
Hyper-V or another hypervisor, which takes elevation, so it runs by hand on a machine
where that is acceptable, never on the runner.
1. *Guest:* a Windows 11 VM with a second, fixed-size VHDX formatted NTFS for the vault.
A loop in the guest saves continuously; before each save it appends "saving N+1;
expect SHA-256(N) or SHA-256(N+1)" to a journal on the system disk and flushes it.
2. *Host:* wait a random 0–30 s, `Stop-VM -TurnOff`, `Start-VM`, wait for the guest,
then run the verifier inside it over PowerShell Direct (`Invoke-Command -VMName`).
3. *Check* against the last journal entry: the vault opens and is N or N+1, every backup
opens, leftovers are classified. At least 200 cycles per variant.
4. *Variants:* the default pipeline; no `sync_all` in step 3, a negative control that
must fail at least sometimes; write-through off (settles D-36). Optional: an exFAT
data disk; Windows' "turn off write-cache buffer flushing" policy (expected to fail,
which documents what users are told); a bugcheck instead of a power-off.
`Stop-VM -TurnOff` discards the guest's cache, but writes already handed to the VHDX may
sit in the host's cache, which survives. The test models an OS-level power cut on a
well-behaved disk, not a drive that ignores flushes.
**Distribution channels.** For both channels (doc 18 §7), in a virtual machine:
- *Direct download:* install from `releases.poli0981.dev/mutevault/`, update from the
previous version, uninstall; afterwards no program files, registry keys or
+34 -240
View File
@@ -1,10 +1,10 @@
# 15 — Build, CI, release and Git workflow
# 15 — Build, CI and Git workflow
> MuteVault docs suite v1.2 · 2026-11-23
> MuteVault docs suite v1.2 · 2026-11-23 · split 2026-12-05: packaging, signing, releases
> and distribution moved to doc 18.
> Forge and CI facts follow the ops runbook `poli0981/.github` → `docs/GITEA-MIGRATION.md`
> (read 2026-11-23). Where this document and the runbook disagree on forge or CI
> behaviour, the runbook wins and this document is corrected.
> Items marked **VERIFY** are confirmed in spikes S9, S10 and S13 before they are relied on.
## 1. Local setup (Windows 11)
@@ -43,6 +43,13 @@ debug = false
- Release builds always use `--locked`.
- `RUSTFLAGS` adds `--remap-path-prefix` so local paths do not end up in binaries.
- No `target-cpu=native`; the binary must run on any x86-64 Windows 11 machine.
- **The C runtime is linked statically** (D-41): from M1, `.cargo/config.toml` sets
`-C target-feature=+crt-static` for the MSVC target, so neither the Velopack nor the
Store build depends on or ships the VC++ redistributable (doc 18 §7). A `RUSTFLAGS`
variable replaces config `rustflags` entirely, so the release job's `RUSTFLAGS`
(above) repeats `+crt-static`. A default build
imports `VCRUNTIME140.dll` and `api-ms-win-crt-*` (spike S5); verify at M1 that the
binaries import neither.
## 3. Everyday commands
@@ -88,11 +95,17 @@ product. Security scanning, Qodana, notifications and R2 publishing call the ops
| `qodana.yml` | Push to `main`, weekly `9 14 * * 5`, manual | `qodana-rust` through the ops `reusable-qodana.yml` on `windows-latest` with `within-docker` | Ops caller | `contents: read` | M0; stays only if S10 passes |
| `fuzz.yml` | Weekly `17 15 * * 6`, manual | `cargo fuzz` per target on `ubuntu-latest`, corpus cache | Local | `contents: read` | First fuzz target (M1) |
| `notify-ci-failure.yml` | `workflow_run` of CI, Security, Qodana (and later workflows) | Discord notice through the ops notifier | Ops caller | `contents: read`, `actions: read` | M0 |
| `release.yml` | Tag `v*`, manual on a tag | §6, §8, §13 | Local, with the ops `publish-r2.yml` | `contents: write`, `releases: write` | M5, after S9 |
| `release.yml` | Tag `v*`, manual on a tag | Doc 18 §1, §3, §8 | Local, with the ops `publish-r2.yml` | `contents: write`, `releases: write` | M5, after S9 |
| `announce-release.yml` | Manual with a tag (dispatched by `release.yml`) | Discord announcement through the ops workflow | Ops caller | `contents: read` | M5 |
Ops callers pin **ops v2026.11.5**, commit `b93b3711b3049a879cfdfd515f7e72c23864da8f`.
From M1, once `cargo xtask kill-test` exists, `ci.yml`'s `windows` job also runs its
quick variant: the stall points plus 100 random kills per vault size (doc 14 §3, D-37,
proposed). It kills only its own child process and works in the job's temp directory
through `MUTEVAULT_DATA_DIR` (§4.4). The 1,000-kill run before a release is local
(doc 14 §8).
`cargo xtask check` is the local form of the static part of `ci.yml` (rustfmt, clippy,
cargo-deny, cargo-machete, `cargo xtask rules`). CI runs those as separate steps, so a
failure names its tool, and cargo-deny runs in the ops `security.yml`.
@@ -131,7 +144,7 @@ repo's registry when this repository is bootstrapped (H-13). `17 15 * * 6` is ke
referenced only in jobs triggered by a `v*` tag push or `workflow_dispatch` on a tag —
never in pull-request or scheduled jobs.
- `jobs.<id>.environment` is ignored by Gitea, so there is no approval gate in CI. The
gate is the signed tag (§14) and branch protection on `main`.
gate is the signed tag (§6.4) and branch protection on `main`.
- No workflow runs for outside pull requests: registration on the forge is closed, and
it stays that way because `windows-latest` jobs run on the maintainer's own machine.
@@ -155,8 +168,9 @@ CI job
broken (ops repo, free-steam-games-list guide).
Qodana's Rust linter has no native mode: it runs with `runs-on: windows-latest` and
`within-docker: true`, in Docker Desktop on the PC (**VERIFY**, S10). If that cannot be
made to work, MuteVault leaves Qodana rather than weakening the runner rules.
`within-docker: true`, in Docker Desktop on the PC. This runs (S10, 2026-12-05), but part
of its Rust results are false (doc 14 §6). If it cannot be made to work, MuteVault
leaves Qodana rather than weakening the runner rules.
## 5. Dependency hygiene
@@ -180,229 +194,9 @@ made to work, MuteVault leaves Qodana rather than weakening the runner rules.
source) is what the ops `security.yml` runs `cargo deny` against.
- Every dependency pull request that is merged updates doc 02 in the same change.
## 6. Packaging and updates (Velopack, Cloudflare R2)
## 6. Forge and Git workflow (D-26)
**Release host.** Installers and update feeds live in the R2 bucket
`poli0981-releases`, public only through `https://releases.poli0981.dev/mutevault/`.
There is no directory listing; links name exact files. The Gitea release for a tag
carries notes, hashes and links only — never binaries.
| Object under `mutevault/` | Name is | Uploaded |
|---|---|---|
| `<version>/MuteVault-<version>-SHA256SUMS.txt` and `.minisig` | Versioned | First |
| `<version>/` extension ZIPs, source ZIP, SBOM (`.cdx.json`) | Versioned | First |
| `MuteVault-<version>-full.nupkg`, `-delta.nupkg` | Versioned | By `vpk` |
| `MuteVault-Setup.exe`, `MuteVault-Portable.zip` | Stable (cache bypassed) | By `vpk` |
| `releases.win.json`, `assets.win.json`, `RELEASES` | Feed (cache bypassed) | **Last** |
Only the stable and feed names may ever be overwritten; every other name contains the
version. CI never deletes objects, apart from Velopack's own pruning. Exact file names
are copied from the first packed release (**VERIFY**, S9).
**Release job** (tag push, `windows-latest`), credentials as environment variables so
they never appear on a command line:
```yaml
env:
VPK_BUCKET: poli0981-releases
VPK_PREFIX: mutevault/
VPK_ENDPOINT: https://${{ vars.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com
VPK_KEY_ID: ${{ secrets.R2_RELEASES_ACCESS_KEY_ID }}
VPK_SECRET: ${{ secrets.R2_RELEASES_SECRET_ACCESS_KEY }}
```
1. `cargo build --release --locked -p mutevault -p mutevault-host`; stage the binaries,
licences and notices.
2. `vpk download s3 --channel win -o releases` — the previous release, for the delta
package. On the first release the "nothing found" result is expected.
3. `vpk pack` with pack id `MuteVault`, the version from the tag and `mutevault.exe` as
the main executable.
4. Compute SHA-256 for everything in `releases/` plus the extension ZIPs; write the hash
list; sign it with the update-signing key (H-07).
5. Upload the versioned side files with the ops `publish-r2.yml` (`app: mutevault`).
6. `vpk upload s3 --channel win -o releases --keepMaxReleases 10` — packages, then the
feed, last.
7. Create the Gitea release (notes, SHA-256 block, links) and dispatch the announcement.
Whether `vpk … s3` talks to R2 with the endpoint alone is **VERIFY** (S9); the fallback
is `vpk download http` plus `publish-r2.yml` with the feed files uploaded last.
**Install behaviour**
- Per-user install under `%LOCALAPPDATA%\MuteVault`; no administrator rights.
- `main()` starts with the Velopack app builder, which handles install, update and
uninstall hooks. In those hooks MuteVault registers or removes the native-messaging
manifests, the file association and the Run key. Hooks must finish quickly and must
not show UI.
- Uninstall leaves vaults and backups untouched and says where they are.
**Update flow in the app** (Velopack build only)
1. If "Check for updates" is on: a few seconds after start-up, and then daily, ask the
feed at `https://releases.poli0981.dev/mutevault` for a newer version (Velopack's
HTTP source).
2. Show "Update available" with the release notes. Nothing downloads without a click.
3. Download the package, then **verify before applying**:
- fetch `<version>/MuteVault-<version>-SHA256SUMS.txt` and its `.minisig`;
- verify the signature with the Ed25519 public key compiled into the app;
- check the downloaded package's hash against the signed list.
4. Lock the vault, apply, restart.
A failed verification discards the download and reports it as a security event. The
signed hash list is what makes the update trustworthy; the bucket and the CDN in front
of it are treated as untrusted transport.
## 7. Code signing and release trust (Windows)
Unsigned installers trigger SmartScreen warnings. For a password manager that is a
trust problem at the first step, so a signing route should be chosen before the public
beta (H-02).
| Route | Cost | Publisher shown | Notes |
|---|---|---|---|
| SignPath Foundation | Free for qualifying open-source projects | SignPath Foundation | Application and conditions. Ask first whether a project whose canonical repository is a self-hosted Gitea, with a GitLab mirror, qualifies |
| Certum Open Source Code Signing | From €69 for the set | The maintainer's name | Issued to natural persons only; identity verification |
| Azure Artifact Signing (formerly Trusted Signing) | US$9.99 per month (Basic) | — | Individual developers are accepted only in the USA and Canada — not available to the maintainer |
| Microsoft Store (MSIX) | Free | Store-signed | Only for the Store build (§13); does not sign the Velopack installer |
| None | Free | "Unknown publisher" | Acceptable for alpha builds with published hashes |
Build-provenance attestations need OIDC and are not available on this forge. What
stands in their place, and is described in every release's notes:
1. the minisign-signed SHA-256 list, verifiable with the public key printed in the
README and compiled into the app;
2. the same hashes in the Gitea release notes;
3. the release workflow's log on the forge, and the tag it ran from — a signed tag;
4. rebuild instructions (§11).
## 8. Extension release
| Step | Detail |
|---|---|
| Build | `pnpm -C extension build` (Chromium ZIP) and `build:firefox` (Firefox ZIP + source ZIP) |
| Ids | Stable Chromium extension id from a committed public key; Firefox id `mutevault@poli0981.dev` (H-09) |
| Versioning | Same version as the desktop app; the protocol version (doc 08 §6) is what must match, and the popup says so when the app is older or newer |
| Download copy | ZIPs under `releases.poli0981.dev/mutevault/<version>/`, linked from the Gitea release |
| Chrome Web Store | Manual upload at first; store API secrets, tag-only jobs, later |
| Firefox Add-ons | Upload with the source archive and build instructions; the source link is the tag on the forge |
| Edge Add-ons | Same package as Chrome |
| Testers | Load unpacked from the release ZIP |
The native host's allow-list contains the store ids and, in debug builds only, the
development id.
## 9. Versioning and channels
- Semantic versioning. Vault format version and IPC protocol version are separate
numbers (doc 05 §7, doc 08 §6).
- Channels: stable, and beta (pre-release tags such as `v1.0.0-beta.2`) on its own
Velopack channel. Beta builds show a banner and never touch a vault without first
creating a backup.
- Before v1.0, the README and the create-vault screen state that the format may change.
## 10. Release checklist
1. All gates green on `main`; milestone definition of done met (doc 14 §8).
2. `CHANGELOG.md`, doc 02 and the decision log updated; version bumped in the workspace
and `extension/package.json`.
3. Golden fixtures regenerated for format-affecting releases.
4. `cargo xtask notices` re-run; licences reviewed.
5. Manual checklists (doc 14 §9) completed, including the machine tests CI skips.
6. Create and push a **signed** tag `vX.Y.Z` from `main` (§14). The PC must be on: the
release job runs there.
7. Verify the published artefacts from a clean machine: hash-list signature, install,
update from the previous version.
8. Submit the extension packages to the browser stores and the MSIX package to the
Microsoft Store (§13).
9. Announce; watch the support mailbox for a week before starting the next milestone.
## 11. Reproducibility
Goal for v1: a **rebuildable** release — the release notes give the tag, the toolchain
(pinned in `rust-toolchain.toml`), and the commands, so anyone can rebuild and compare
behaviour and hashes of the unsigned binaries. Bit-for-bit reproducible builds on
Windows are a P2 goal; the pinned toolchain, `--locked` and path remapping are the
groundwork.
## 12. Distribution channels (D-25)
MuteVault for Windows is distributed two ways.
| Channel | What users get | Updates arrive through | Signed by | From |
|---|---|---|---|---|
| Project release host (`releases.poli0981.dev/mutevault/`) | Velopack `Setup.exe` and portable ZIP | The in-app updater | The route chosen in H-02 | Betas onward |
| Microsoft Store | An MSIX package | The Store | Microsoft, free of charge | v1.0 target, gated by spike S13 |
**winget is not a channel** (dropped 2026-11-23). A winget submission is a pull request
to a repository on GitHub, and the maintainer's GitHub account is suspended with an
appeal pending. It can be reconsidered if the account is restored. Independently of
that, a Microsoft Store listing can be installed through winget's built-in `msstore`
source, which involves no GitHub submission.
**One code base, two Windows builds**, selected by cargo features `dist-velopack`
(default) and `dist-store`:
| Concern | Velopack build | Store build (MSIX) |
|---|---|---|
| Updater | Velopack, with the signed hash list (§6) | Compiled out; the "Check for updates" setting is hidden |
| Program files | `%LOCALAPPDATA%\MuteVault\current\` | Read-only package directory |
| Settings, logs, device slots, sidecars | AppData | AppData redirected to a per-package location, removed on uninstall |
| Vaults and backups | `%USERPROFILE%\MuteVault\` | The same folder — never AppData (doc 03 §8) |
| Native-messaging registration | Registry keys and manifests written by the install hook | Needs unvirtualised registry keys and a host path the browser can start (§13, S13) |
| Start with Windows | Per-user Run key | Start-up task declared in the package manifest |
| File association | Written by the install hook | Declared in the package manifest |
| Native passkey provider | Not possible | Possible later (doc 09 §9) |
Everything under `crates/` is identical in both builds; the differences live in
`mv-platform`, `bins/mutevault` and `packaging/`.
## 13. Microsoft Store
**Submission type: MSIX.** The Store also accepts unpackaged EXE/MSI installers, but for
those the publisher must sign the installer and its binaries with a CA-issued
certificate, host the file, and deliver updates; the Store neither re-signs nor updates
them. An MSIX submission is re-signed and hosted by the Store at no cost, and it gives
the app the package identity the native passkey provider needs.
**Steps**
1. Register an individual developer account (free) and reserve the name "MuteVault" in
Partner Center (H-10). Do this early; the reservation holds the name.
2. Build the package in the release workflow with the Windows SDK's packaging tool from
`packaging/msix/`: manifest with the identity values Partner Center assigns, the
full-trust capability, `mutevault.exe`, `mutevault-host.exe`, assets and licences.
The upload does not need a trusted signature — the Store signs after certification.
CI only **builds** the package; it is never installed on the runner (§4.4).
3. Run the Windows App Certification Kit by hand before submitting.
4. First publication goes through Partner Center by hand. Later updates can be
automated with the Microsoft Store Developer CLI from a tag-only job.
5. Listing: description in EN/VI/JA, screenshots, privacy-policy URL, age-rating
questionnaire, and a justification for each restricted capability.
6. Certification of a new app typically takes a few business days — plan releases
around it. A Store release can trail the direct release by that long.
**How a packaged app behaves differently** (from Microsoft's MSIX documentation), and
what MuteVault does about it:
| Behaviour | Consequence | Design response |
|---|---|---|
| New files a packaged app creates under AppData go to a private per-app location and are removed when the app is uninstalled | A vault stored there would be deleted by an uninstall | Vaults and backups default to `%USERPROFILE%\MuteVault\` in every build (D-21) |
| Writes under `HKCU` are redirected to a private per-app registry hive | Browsers would not see the native-messaging host keys | Windows 11 lets a package declare specific `HKCU` keys as unvirtualised; this uses a restricted capability that must be justified at submission |
| The package directory is read-only and not a normal install path | The browser must be able to start `mutevault-host.exe` from a stable path | An app-execution alias for the host is the candidate; the manifest JSON goes to an unvirtualised location |
| Uninstall removes all package state, but not user-created files outside it | Settings, logs and device-slot enrolment disappear with the app | Acceptable; the uninstall notice says where vaults and backups remain |
Microsoft's pages are not fully consistent about `HKCU` behaviour for full-trust apps,
so none of the second and third rows is assumed to work until **spike S13** shows a
browser launching the packaged host and completing a fill.
**Fallback if S13 fails:** keep the Store listing but submit the signed Velopack
installer through the EXE path. That needs the CA-issued certificate from H-02, gives up
free Store signing and Store updates, and leaves the native passkey provider out of
reach — so it is a fallback, not a plan.
## 14. Forge and Git workflow (D-26)
### 14.1 Where things live
### 6.1 Where things live
| What | Where |
|---|---|
@@ -416,13 +210,13 @@ reach — so it is a fallback, not a plan.
Registration on the forge is closed: outside people cannot open issues or pull requests
there. There is no public issue tracker (D-28).
### 14.2 Remotes
### 6.2 Remotes
- `origin` is Gitea. It is the only remote anyone pushes to.
- There is no `gitlab` remote. The mirror is fed by Gitea alone; nobody pushes to it.
- A leftover `github` remote in a local clone is kept as history and never pushed to.
### 14.3 Branches, commits, pull requests
### 6.3 Branches, commits, pull requests
- `main` is protected on Gitea: the CI checks are required, no force push, no deletion.
History on `main` is never rewritten — a rewritten `main` also breaks the mirror,
@@ -436,15 +230,15 @@ there. There is no public issue tracker (D-28).
- Pull requests opened by `renovate-bot` are reviewed like any other; a merged one
updates doc 02.
### 14.4 Tags and releases
### 6.4 Tags and releases
- A release is a **signed, annotated** tag `vX.Y.Z` (or `vX.Y.Z-beta.N`) on a commit of
`main`, created and pushed by the maintainer: `git tag -s vX.Y.Z -m "…"`, then
`git push origin vX.Y.Z`.
- A release is a **signed, annotated** tag `vX.Y.Z` on a commit of `main` (betas are
`v0.X.Y`, doc 18 §4), created and pushed by the maintainer:
`git tag -s vX.Y.Z -m "…"`, then `git push origin vX.Y.Z`.
- The tag push is what starts `release.yml`. Nothing else can publish.
- Tags are never moved or deleted once pushed.
### 14.5 Bootstrapping the repository
### 6.5 Bootstrapping the repository
On an empty Gitea repository the first branch pushed becomes the default branch, and
only the default branch's scheduled workflows run. So:
@@ -453,7 +247,7 @@ only the default branch's scheduled workflows run. So:
commit is the documentation suite alone; the workspace and CI arrive through the
first pull request (`chore/ci-bootstrap`), which is also CI's first run.
2. Maintainer steps, in this order (H-13): branch protection on `main` with the required
checks of §4.2; enable Actions; create the repo-level secrets (§14.7); run
checks of §4.2; enable Actions; create the repo-level secrets (§6.7); run
`maintainer/gitea-repo-setup.ps1 -Only mutevault` (Renovate collaborator and labels)
and `setup-mirrors.ps1 -Only mutevault` (GitLab mirror) from the ops tooling; register
the security and Qodana cron slots in the ops registry (§4.2); point the Qodana Cloud
@@ -461,13 +255,13 @@ only the default branch's scheduled workflows run. So:
gitlab.com and bitbucket.org URLs (ops runbook, HashTool guide).
3. Push `chore/ci-bootstrap` and open its pull request on Gitea.
### 14.6 Applying outside contributions
### 6.6 Applying outside contributions
Patches arrive by e-mail (`git format-patch` / `git send-email` to `code@poli0981.dev`).
The maintainer saves them, runs `git am --3way` on a branch, lets CI run, reviews, and
merges on Gitea; the mirror follows. Contributors' authorship is preserved by `git am`.
### 14.7 Secrets and variables
### 6.7 Secrets and variables
Names only; values are created by the maintainer in Gitea and never appear in the
repository, in logs or in a session.
@@ -485,7 +279,7 @@ Needed from M0: `QODANA_TOKEN` and `DISCORD_CI_WEBHOOK`. The others arrive with
workflows that use them: the update-signing key, `DISCORD_RELEASES_WEBHOOK` and
`DISCORD_REPO_WEBHOOK` with `release.yml` and `announce-release.yml` (M5).
### 14.8 Rules for AI agents working in this repository
### 6.8 Rules for AI agents working in this repository
1. Push only to `origin`, only to a topic branch. Never push to `main`, never force
push, never rewrite history, never move or delete a tag.
+1 -1
View File
@@ -39,7 +39,7 @@ scans and dependency updates happen only while the maintainer's PC is on.
| Chrome Web Store | US$5 one-time registration (confirm on the developer dashboard) | Free if the existing developer account is reused |
| Firefox Add-ons | US$0 | — |
| Edge Add-ons | US$0 | — |
| winget | — | Not used (doc 15 §12) |
| winget | — | Not used (doc 18 §7) |
## 4. Code signing
+107 -151
View File
@@ -25,127 +25,26 @@ fallback has been chosen.**
| S10 | Quality pipeline on Gitea | Ops `security.yml` (gitleaks, Opengrep, osv-scanner, cargo-deny) green on the workspace; `qodana-rust` completes through the ops reusable with `within-docker: true` on `windows-latest`; coverage thresholds enforced in `ci.yml` | Qodana on non-UI crates only, or MuteVault leaves Qodana |
| S11 | Process hardening vs. the renderer | Each measure in doc 10 §8 applied without breaking rendering, IME or file dialogs | Drop the conflicting measure; record it |
| S12 | (v1.x) Windows plugin passkey provider from Rust | The Store (MSIX) build registers a COM `IPluginAuthenticator` and completes one create and one get ceremony | Keep passkeys extension-only |
| S13 | Does the app work as an MSIX package for the Microsoft Store? | Packaged build renders and unlocks; a browser starts the packaged native host and completes a fill; registration keys are visible to Chrome, Edge and Firefox; a vault under `%USERPROFILE%\MuteVault\` survives uninstall and reinstall; start-up task and file association work; the package passes the Windows App Certification Kit. Run in a virtual machine | Submit the signed Velopack installer to the Store through the EXE path (doc 15 §13) |
| S13 | Does the app work as an MSIX package for the Microsoft Store? | Packaged build renders and unlocks; a browser starts the packaged native host and completes a fill; registration keys are visible to Chrome, Edge and Firefox; a vault under `%USERPROFILE%\MuteVault\` survives uninstall and reinstall; start-up task and file association work; the package passes the Windows App Certification Kit. Run in a virtual machine | Submit the signed Velopack installer to the Store through the EXE path (doc 18 §8) |
Spikes that install software or change machine state (S2, S4, S7, S8, S9, S11, S13) are
run by hand or in a virtual machine — never as CI jobs, because the Windows runner is
the maintainer's own desktop (doc 15 §4.4).
### 2.1 S1 result — `gpui-kit` shell (2026-12-02)
### 2.1 Results
**Verdict: pass (D-31).** Every criterion passed: the automated ones in this session,
the IME, Narrator and scaling ones on Kokone's checklist (C1–C13). D-05 stands, and
neither fallback is needed. Two findings move work elsewhere:
- C6: Windows text suggestions read the password field. This goes to S3 and doc 07 §5
(finding 7).
- C15: the app ignores the system text size. This goes to the M5 accessibility pass
(finding 8).
Each spike that has run has a report in `docs/spike-reports/`: setup, criteria,
measurements, findings and the manual checklist. This table is the index.
**Setup.**
- Spike: `spikes/s1-gpui-shell/` (D-30), 640 lines of Rust. It depends on `gpui-kit`
=0.10.0 (default features) and `rust-i18n` =4.2.4, builds with Rust 1.100.0, and uses
the repository's build profiles.
- Machine: the maintainer's PC. i7-14700KF (20 cores, 28 threads), 32 GiB, RTX 5080,
NVMe disk, 2560 × 1440 at 240 Hz and 100 % scale, Windows 11 Insider build 29712.
This is a fast machine: a low-end PC will start and build more slowly. Repeat the start
measurement there when S5 does its low-end Argon2 run.
- Method: `measure.ps1` in the spike directory. Cold start runs from the launcher's clock
just before `Process.Start` to the app's first next-frame callback; both sides read
the same system clock. It covers 15 runs with a warm file cache. A true cold start
after a reboot (C14) was not measured.
| Criterion | Result |
|---|---|
| Three-pane window | **Pass.** `h_resizable` with three `resizable_panel`s, each with a size range. |
| 10,000-row virtual list | **Pass.** `List` with a `ListDelegate`; the search box is built in. Scrolling down and up through 10,000 rows at 25 rows per frame took 800 frames: p50 4.16 ms, p99 4.5 ms, max 6.0 ms at 240 Hz. No frame was dropped. |
| Masked input | **Pass.** `InputState::masked(true)` with `Input::mask_toggle()`. While masked, UI Automation reports `IsPassword` and exposes no Value or Text pattern. Once revealed, it is an ordinary text field to UI Automation, so doc 12 §4's time limit on reveal matters. The component's own tests keep a masked value out of the clipboard. It does **not** switch IME composition or Windows text suggestions off (C6, finding 7): that is S3's job. |
| Theme switch | **Pass.** `Theme::change(ThemeMode::…)` repaints every window. |
| Locale switch | **Pass.** `rust_i18n::set_locale` sets one global that the app and `gpui-component` share (both on `rust-i18n` 4.2). `set_window_title` updates the title. Vietnamese and Japanese text renders through the system font fallback. |
| Vietnamese and Japanese IME in normal inputs | **Pass** (C1–C5, C7). Telex and VNI through EVKey 6.0.5; Microsoft IME for Japanese. |
| Narrator reads controls | **Pass** (C8–C11). A read-only UI Automation pre-check found a name, in the current language, on every button and field and on the reveal button. List rows are read only with the workaround (finding 2). |
| Cold start < 500 ms | **Pass.** Launch to first frame: median 211–213 ms, first run 241 ms, worst 241 ms. Process creation to `main` takes 12 ms; `main` to first frame takes about 200 ms (window, DirectX device, fonts). |
| Layout at 200 % (doc 12 §9) | **Pass** (C12–C13). The scale was changed 100 → 200 → 225 → 125 → 100 % while the app ran, about two minutes at each step. |
| Measurement | Value |
|---|---|
| Release binary (thin LTO, one codegen unit, symbols stripped) | 23,361,024 bytes (22.3 MiB); 8.4 MiB zipped |
| Dev binary | 31.3 MiB |
| Memory at idle | working set 65 MiB, private 93 MiB, GPU dedicated 22 MiB |
| Memory while scrolling | working set at most 69–81 MiB, private at most 96–103 MiB; 67–73 MiB afterwards |
| Clean build | dev 199 s, release 146 s. Dev is slower: its profile builds every dependency at `opt-level` 3 with debug info. |
| Incremental build (one-line change in the app crate) | dev 5 s; release 41 s, because thin LTO with one codegen unit re-links everything |
| Dependency graph | 804 packages in `Cargo.lock`, all targets. `gpui-kit` 0.10.0 brings GPUI as the `gpui-pre` 0.3.12 crates. |
| `deny.toml` against that graph | bans, licences and sources pass. Only duplicate-version warnings remain, for example `windows` 0.58 next to 0.62. |
**Findings.**
1. **Icons have to be registered.** Call
`gpui_kit::application().with_assets(gpui_kit::assets::Assets)`. The crate's README
example leaves this out, and without it the reveal toggle and the search icon are
missing without any error.
2. **List rows reach assistive technology without a name.**
- GPUI reports only elements that have a role, and text only through its `Text`
element (`text!`).
- `gpui-component`'s `List` wraps each row in a list-item node that has no name.
- `ListItem::accessibility_label` puts the label on a node without a role, and GPUI
drops that node.
- Workaround in the spike: render the row text with `text!(id = <row id>, …)`. UI
Automation then shows that text as the list item's child, and Narrator reads it
(C10). Without the workaround, Narrator reads nothing.
- The proper fix belongs upstream. Until then, doc 12 §9 records the rule `mv-ui`
follows.
3. **Strings owned by the components have no Vietnamese.** `gpui-component`'s own
`ui.yml` has `ja` but not `vi`. In Vietnamese, "Show password", the input context
menu and "Clear" stay in English. Contribute `vi` upstream before M5, together with
H-12.
4. **No network client on the configured targets.** `gpui-kit-assets` depends on
`reqwest` (as `gpui-pre-reqwest`) for wasm only. `gpui-pre-http-client` holds types
only. Recheck the bans on every `gpui-kit` upgrade (R-01).
5. **Disk writes.** The spike writes nothing. The Direct3D runtime and the GPU driver
cache compiled shaders under `%LOCALAPPDATA%\D3DSCache` and `…\NVIDIA\DXCache`, keyed
by executable path, as they do for any DirectX application. No application data goes
there.
6. **Numbers are not localised.** `rust-i18n` inserts `%{count}` as given, so the list
shows "10000 items". Doc 12 §8 asks for per-locale numbers, so `mv-ui` needs a
formatter. Which one is not decided yet.
7. **Windows text suggestions read the password field (C6).**
- Typing `zzzzzzzz` into the password field opened the Windows text-suggestion
popup under it: "Press Tab to select", then "zzzzzzzz" and "Zzyzx". The reveal
toggle showed its revealed state at that moment. Behaviour while masked was not
recorded.
- Cause: the masked input does not tell Windows' text-input framework that the field
holds a password. So IME composition, the suggestion popup and Windows' typing
prediction all see the typed characters, and Windows may learn them.
- Consequences:
- S3's pass criterion now names text suggestions and prediction next to the IME.
- Doc 07 §5 lists text-input services as an exposure channel.
- Doc 12 §4 says what `SecureInput` opts out of.
- If S3 fails, its fallback (the masked input) carries this risk as well as RR-2.
8. **The system text size is ignored (C15).** At Settings › Accessibility › Text size
150 %, the app's text stays the same size. Display scaling works (C12, C13). Doc 12
§9 asks for both, so `mv-ui` must apply the text-size setting itself. That belongs to
the M5 accessibility pass.
**Manual checklist.** Kokone ran it on their PC on 2026-12-02, with the release build
of the spike. It used the "Notes" and "Input method test" fields and the list search
box.
| # | Check | Result |
|---|---|---|
| C1 | Vietnamese Telex: `Tieengs Vieetj ddaay` gives "Tiếng Việt đây"; no doubled or lost characters; Backspace removes one character | Pass, with EVKey 6.0.5 |
| C2 | VNI: `Tie61ng Vie65t d9a6y` gives the same | Pass, with EVKey 6.0.5 |
| C3 | Typing in the middle of a word, and retyping a selected word | Pass |
| C4 | Microsoft IME (Japanese): `nihongo`, Space, Enter gives 日本語; the candidate window sits at the caret; the composition is underlined inline; Esc cancels cleanly | Pass |
| C5 | Search with `ngân` and `銀行` filters the list | Pass |
| C6 | Typing in the masked field (record only) | The text-suggestion popup shows the typed value (finding 7) |
| C7 | Japanese glyph forms (言語, 検証, 銀行, 項目), not Chinese ones | Pass |
| C8 | Narrator reads every button and field by name, in EN, VI and JA | Pass |
| C9 | The masked field is announced as a password, and its value is not spoken | Pass. Narrator says only "mật khẩu", whether the value is masked or revealed. Whether the reveal button is announced was not reported. |
| C10 | Narrator reads list rows with the workaround, and nothing with `S1_A11Y_ROW_ROLE=plain` | Pass |
| C11 | Keyboard only: the Tab order makes sense and the focus ring is visible in both themes | Pass |
| C12 | Started at 200 %: text is sharp, the panes fit, nothing is clipped, a fast scroll stays smooth | Pass |
| C13 | Scale changed while the app runs: it re-lays out without blur | Pass (100 → 200 → 225 → 125 → 100 %) |
| C14 | Optional: one start measurement right after a reboot | Not run |
| C15 | Optional: the system text size at 150 % enlarges the app's text | No: the text does not grow (finding 8) |
| Spike | Run | Verdict | Report |
|---|---|---|---|
| S1 | 2026-12-02 | **Pass** (D-31) | [`S1_GPUI_SHELL.md`](spike-reports/S1_GPUI_SHELL.md) |
| S1b | 2026-12-05, checklist 2026-12-06 | **Pass** (D-33): S1's criteria hold on `gpui-kit` 0.12.0, the manual checklist gives the same results as on 0.10.0, and the `xxhash-rust` licence exception is approved | [`S1b_GPUI_KIT_012.md`](spike-reports/S1b_GPUI_KIT_012.md) |
| S2 | 2026-12-05/06 | **Partial**: every automated clause passes, 12,267 events with none missed or duplicated, single instance and autostart work; "an hour of use" and the visual checks by hand (S2-M1…M12) are open (D-46, D-47) | [`S2_TRAY_HOTKEY.md`](spike-reports/S2_TRAY_HOTKEY.md) |
| S3 | 2026-12-05/06 | **Partial**: every automated check passes, and no memory scan finds the password outside the zeroising buffer; the IME, text-suggestion, paste, Caps Lock, mouse and Narrator checks by hand (S3-M1…M9) are open (D-38) | [`S3_SECURE_INPUT.md`](spike-reports/S3_SECURE_INPUT.md) |
| S4 | 2026-12-05/06 | **Pass** on Chrome, Edge, Firefox and Brave: echo p99 at most 3.5 ms (Firefox 34 ms in its first round), per-user registration, the background stays alive while the port is open, the host exits on its own. Vivaldi is untested (S4-M1). The driver's quiet re-run (2026-12-06) gives the same results; the browsers' is S4-M5 (D-48) | [`S4_NATIVE_MESSAGING.md`](spike-reports/S4_NATIVE_MESSAGING.md) |
| S5 | 2026-12-05/06 | **Partial**: every independent known-answer test passes (the field-box vector waits on the `AAD_field` encoding); lane threading determined; 10,000 random and 220 fixed-point kills during save, 0 corrupt, 0 missing; save step 5 and the leftover rule change (D-34, D-35). The quiet re-run (2026-12-06) confirms it: Standard 88 ms by default, 6,000 more kills with 0 corrupt and 0 missing, large save p50 58 ms. The low-end Argon2id run (S5-M1, S5-M2), the VM power-cut test (S5b-M3) and Miri are open; q13's choices are made (D-39…D-43) and await review | [`S5_CRYPTO_FORMAT.md`](spike-reports/S5_CRYPTO_FORMAT.md) |
| S10 | 2026-12-02, 2026-12-05 | **Partial**: security and coverage pass; Qodana runs, but 47 of its 48 Rust results are false (open) | [`S10_QUALITY_PIPELINE.md`](spike-reports/S10_QUALITY_PIPELINE.md) |
## 3. Milestones
@@ -156,8 +55,8 @@ box.
| **M2 — TOTP, clipboard, interop** | `mv-otp`; clipboard policy; import (CSV, Bitwarden, KDBX, otpauth); export (encrypted, JSON, CSV); trash; password history; first-run flow and legal gate | Maintainer migrates own data in and out |
| **M3 — Browser** | `mv-ipc`, native host, registration, pairing, extension popup and fill for Chromium, then Firefox; tray and close-to-tray | Fill matrix passes |
| **M4 — Passkeys** | `mv-passkey`, consent dialogs, shim, passkeys view | Passkey matrix passes; S6 limits documented |
| **M5 — Hardening and polish** | Process hardening, screen-capture exclusion, update flow with signature check, VI and JA translations, accessibility pass, fuzzing in CI, signing route in place, browser-store submissions; MSIX build and spike S13; Microsoft Store name reserved | Public beta on `releases.poli0981.dev` |
| **M6 — v1.0** | Beta feedback, format freeze, golden fixture v1, documentation publication; Microsoft Store submission | Release checklist (doc 15 §10); both channels live, or the Store's delay explained in the release notes |
| **M5 — Hardening and polish** | Process hardening, screen-capture exclusion, update flow with signature check, VI and JA translations, accessibility pass, fuzzing in CI, signing route in place, browser-store submissions; MSIX build and spike S13; Microsoft Store name reserved | Public beta 0.1.0 on `releases.poli0981.dev` (D-32) |
| **M6 — v1.0** | Beta feedback, format freeze, golden fixture v1, documentation publication; Microsoft Store submission | Release checklist (doc 18 §5); both channels live, or the Store's delay explained in the release notes |
| **v1.x** | Windows Hello slot · key file · quick-access palette · auto-type · save-login capture · HOTP/Steam codes · CXF · 1PUX/Aegis/2FAS import · CLI · Windows native passkey provider in the Store build · Fedora build | Each ships when its spike passes |
Order within v1.x is by user demand; the native passkey provider and the Hello slot are
@@ -172,47 +71,31 @@ Done:
- Bootstrap steps the maintainer has done: branch protection with the required checks of
doc 15 §4.2, Actions enabled, `QODANA_TOKEN`.
S10, first data:
- The ops `security.yml` (gitleaks, Opengrep, osv-scanner, cargo-deny) is green on the
workspace.
- Coverage thresholds are enforced in `ci.yml`; no gated crate exists yet.
- `qodana-rust` 2026.3-eap runs through Docker Desktop on the Windows runner, and opening
the project took 3 minutes.
- Its first run reported 47 false "Critical" problems in `xtask`: `u64` "does not
implement" `PartialEq`, `usize` has no `Display`, and so on. Two causes were found:
1. The image (a Docker Hardened Image) has no C linker. Every build script failed with
"linker `cc` not found", and the sanity check reported "Cargo project loading".
**Fixed:** `qodana.yaml` now has a bootstrap that installs `build-essential`, using
the same `dhi.io` pin as free-steam-games-list. The loading error is gone.
2. The IDE attaches no Rust standard library: the report's
`projectStructure/SDKs.json` is `{"roots": []}`. Adding `rust-src` to
`rust-toolchain.toml` (which the image's 1.100.0 lacked) did not change that.
**Open.** A likely next step is to install the pinned toolchain in the bootstrap
(`rustup toolchain install`) before the IDE opens the project.
- Qodana Cloud took the first run as the project's baseline. Later runs pass because the
same 47 problems are "unchanged", not because they are gone. Once cause 2 is fixed,
reset the baseline in Qodana Cloud.
S10: the ops `security.yml` is green and coverage thresholds are enforced; `qodana-rust`
runs on the runner but reports 47 false type errors in `xtask`. The data of 2026-12-02 and
the five runs of 2026-12-05 are in `docs/spike-reports/S10_QUALITY_PIPELINE.md`.
Open:
- the rest of H-13: `DISCORD_CI_WEBHOOK`, the GitLab mirror, the Qodana Cloud VCS URL,
and `renovate-bot` as a collaborator;
- getting the standard library attached in Qodana's container, then resetting its
baseline (S10);
- Qodana's false Rust results: test the GA image and a volume-backed cache (S10-M1,
S10-M2); reset the Qodana Cloud baseline only after they are gone (S10);
- S1 **passed** on 2026-12-02 (§2.1, D-31); S2–S5 are next, in the order of D-29.
## 4. Feature gates that depend on spikes
| Feature | Depends on |
|---|---|
| Tray, close-to-tray, global hotkey | S2 |
| Tray, close-to-tray, global hotkey | S2 (open until S2-M1 passes; D-46) |
| Password entry without framework strings | S3 |
| Brave/Vivaldi listed as supported | S4 |
| Brave/Vivaldi listed as supported | S4: Brave met; Vivaldi waits for S4-M1 |
| Default KDF preset values | S5 |
| PRF extension, conditional-mediation hand-over | S6 |
| Windows Hello unlock | S7 |
| In-app update from the release host | S9 |
| Qodana as part of the pipeline at all | S10 |
| Microsoft Store (MSIX) build with browser integration | S13 |
| Start with Windows in the Store build (start-up task, no arguments) | S13 |
| Native Windows passkey provider | S13, then S12 |
## 5. Decision log
@@ -223,7 +106,16 @@ to D-24 were resolved while writing this suite and are **flagged for review**
overturn any of them and the affected documents are listed. D-29 was taken in the
repository-bootstrap session (2026-12-02) and is flagged for review in the same way.
D-30 is Kokone's (2026-12-02). D-31 records the S1 result: Kokone ran its manual
checklist (2026-12-02), and it is flagged for review in the same way as D-29.
checklist (2026-12-02), and it is flagged for review in the same way as D-29. D-32 is
Kokone's (2026-12-05). D-33 follows Kokone's request of 2026-12-05 to check the
`gpui-kit` version and change it if needed; Kokone approved it, the licence exception
and S1b's manual checklist on 2026-12-06.
D-34 to D-38 are proposals from the spikes run on 2026-12-05/06 (S5: D-34 to D-37;
S3: D-38) and are flagged for review. On 2026-12-06 Kokone delegated the choices the
spikes left open (§6 questions 5 and 12–17); D-39 to D-45, D-46 and D-47 from S2 and
D-48 from S4 are the options chosen under that delegation, the most conservative ones the spikes
support, and are flagged for review. D-39's encodings become the format contract with the first golden fixture (M1),
so a human reads `mv-crypto` and `mv-vault` against them before that fixture.
| ID | Decision | Affects |
|---|---|---|
@@ -231,7 +123,7 @@ checklist (2026-12-02), and it is flagged for review in the same way as D-29.
| D-02 | Windows 11 first; Fedora in v1.x; core stays cross-platform (OS code only in `mv-platform`) | 03, 10 |
| D-03 | Passkeys through the browser extension in v1; native Windows provider (MSIX/Store) in v1.x | 09 |
| D-04 | Own vault format with KDBX import; KDBX export later | 05, 11 |
| D-05 | UI on `gpui-kit` 0.10.0, not on `gpui` 0.2.2 directly | 02, 12 |
| D-05 | UI on `gpui-kit` (version in doc 02 §2.1), not on `gpui` directly. *Written for 0.10.0; made version-neutral by D-33.* | 02, 12 |
| D-06 | One fixed crypto suite: Argon2id + HKDF-SHA256 + XChaCha20-Poly1305 | 04 |
| D-07 | CBOR payload through `ciborium`; `minicbor` rejected for its licence, `postcard` for not being self-describing | 02, 05 |
| D-08 | No session-encryption layer on the native-messaging channel in v1; association token plus OS-level controls | 08 |
@@ -257,7 +149,24 @@ checklist (2026-12-02), and it is flagged for review in the same way as D-29.
| D-28 | No public issue tracker. Questions, bug reports and patches by e-mail (`code@poli0981.dev`) or the channels at `poli0981.dev/links/`; security reports only to `security@poli0981.dev`; the GitLab mirror is for reading the code. *The ops runbook (2026-11-23) still routes outside issues and merge requests to the GitLab mirror; this suite follows Kokone's later instruction — confirm which stands* | README, SECURITY, CONTRIBUTING, 12 |
| D-29 | Bootstrap and kick-off:<br>• The M0 workflow set is `ci.yml`, `security.yml` (with `workflow-lint`), `qodana.yml` and `notify-ci-failure.yml`, pinned to ops v2026.11.5.<br>• `extension.yml`, `fuzz.yml`, `release.yml` and `announce-release.yml` arrive with the work they check.<br>• The first spike after M0 is **S1** (`gpui-kit` shell): R-01 is the highest-likelihood risk, S1 is the only P0 spike whose failure changes the stack, and S2 and S3 build on it.<br>• **S5** (crypto core and format) runs alongside S1 as a second track, then S3, S2, S4. | 15, 17 |
| D-30 | Spike code lives in `spikes/<spike>/` at the repository root (§6 q11). The directory is git-ignored and listed in the workspace's `exclude`, so it is never committed, merged, built by CI or seen by Renovate. Each spike is its own Cargo workspace and copies the repository's profiles. Only the result reaches the repository, in this document and the documents it changes. Spike code is not backed up by the forge | 17, `.gitignore`, `Cargo.toml` |
| D-31 | **S1 passed**: `gpui-kit` 0.10.0 is the shell for `mv-ui`, so D-05 stands and neither fallback (Slint, Tauri 2) is needed. It carries four conditions:<br>• text that a screen reader must find, list rows included, goes through `text!` with a stable id (doc 12 §9);<br>• `vi` strings for `gpui-component` are contributed upstream before M5 (doc 12 §8);<br>• the system text size is applied by `mv-ui` itself, in the M5 accessibility pass;<br>• IME, Windows text suggestions and prediction are kept out of secret fields by S3 (doc 07 §5). | 02, 07, 12, 17 |
| D-31 | **S1 passed**: `gpui-kit` 0.10.0 is the shell for `mv-ui`, so D-05 stands and neither fallback (Slint, Tauri 2) is needed. It carries four conditions:<br>• text that a screen reader must find, list rows included, goes through `text!` with a stable id (doc 12 §9);<br>• `vi` strings for `gpui-component` are contributed upstream before M5 (doc 12 §8);<br>• the system text size is applied by `mv-ui` itself, in the M5 accessibility pass;<br>• IME, Windows text suggestions and prediction are kept out of secret fields by S3 (doc 07 §5).<br>Re-confirmed on 0.12.0 by S1b (D-33); the four conditions are unchanged. | 02, 07, 12, 17 |
| D-32 | Release numbering and notes:<br>• **Betas are 0.x releases.** The public beta starts at 0.1.0 (M5); every release before 1.0.0 is a 0.x.y release on the beta channel; 1.0.0 is the first stable release. This replaces the `v1.0.0-beta.N` pre-release tags the suite described before.<br>• The root `CHANGELOG.md` is an index. Release notes live in one file per beta minor series (`changelog/beta/beta-0.<minor>.md`) and one per stable release (`changelog/v1/v1.<minor>.<patch>.md`).<br>• Unreleased work is written into the next release's file under `[Unreleased]`, so nothing moves at release time. | 15, 17, 18, `CHANGELOG.md` |
| D-33 | **`gpui-kit` 0.12.0** (default features, so the GPUI backend is `gpui-pre`; never `gpui-fast`) replaces 0.10.0 before M1, as the version check of 2026-12-05 asked. S1b showed S1's code building unchanged and its criteria holding; **approved by Kokone on 2026-12-06**, with S1b-M1…M6 giving the same results as on 0.10.0.<br>• The crate-scoped licence exception for `xxhash-rust` (BSL-1.0, doc 02 §2.7) is approved, and is added to `deny.toml` with the change that brings `gpui-kit` into the workspace.<br>• Later upgrades only between milestones, each gated on S1b's scripts and checklist (R-01). | 01, 02, 12, 14, 17, README |
| D-34 | **Backups are added by hard link** (doc 05 §5 step 5), falling back to a flushed copy in the backup folder renamed into place without replacing. Nothing writes into a final backup name (the step is skipped if it exists), and no code opens a vault or backup for writing; "Purge backups" only deletes. S5: copying straight into the backup name left an unopenable backup after about 80 % of the kills in that step; a link or the atomic copy left none. | 03, 05, 07, 14 |
| D-35 | **Leftover temps after a crash** (`<name>.mutevault.tmp-*`, and that vault's backup and sidecar temps) are handled only by that vault's lock holder, after the main file authenticates. A leftover that authenticates with a higher `save_counter` moves to the backup folder; anything else is deleted. If the main file is missing or fails, every temp is kept and the newest that authenticates is offered for recovery. | 05, 07 |
| D-36 | `mv-vault` receives its write-through atomic replace (doc 05 §5 step 6) as an operation injected by `mv-app` and implemented in `mv-platform`; tests use `std::fs::rename`. Revisited after S5b-M3: if write-through changes nothing, `mv-vault` uses `std::fs::rename` and the injection goes. | 03, 05 |
| D-37 | **The kill-during-save test is `cargo xtask kill-test`:** the parent in `xtask`, the child an `mv-vault` example binary; stall points plus random kills, with an in-place-write negative control. The quick variant (stall points and 100 kills per size) runs in `ci.yml` on every pull request, 1,000 kills per size before each release, and the VM power-cut test for any change to the save pipeline or the format. | 14, 15 |
| D-38 | **`SecureInput` is a custom GPUI element that reports no text input** (S3). GPUI then detaches the window's IME context while the field has focus, so text services are disabled through GPUI, never through `mv-platform`, and without input-scope or TSF calls. `mv-platform` supplies only the clipboard read for paste and the page-locked buffer. The masked input is never used for entry.<br>• Holds if S3-M1 (IME) and S3-M3 (text suggestions) pass; if either fails, the element stays and its text-services exposure moves to RR-2 (doc 07 §6). | 04, 07, 10, 12 |
| D-39 | **Format encodings** (S5; q13):<br>• `AAD_slot`: doc 04 §6's fields at doc 05 §3's widths, little-endian, 88 bytes; the slot's `created_at` and `flags` are covered by the payload AAD.<br>• `AAD_field = "MVF1" ‖ vault_id ‖ item_id ‖ field_id (u64 LE)`, plus `‖ len (u16 LE) ‖ credential_id` for a passkey key box.<br>• A box is one byte string, `nonce ‖ ciphertext ‖ tag`.<br>• `HKDF(a, b, c)` = (salt, IKM, info); subkeys take no salt; labels are ASCII without a terminator; slot types 2 and 0x80 use the slot's `salt`.<br>• `kdf_id` = 0 requires m = t = p = 0; a slot's non-zero `flags` is `Malformed`; each size limit has a fixed typed error.<br>• `pad` is the shortest that reaches a multiple of 4 KiB, else the next one. | 04, 05, 06 |
| D-40 | **Key derivation in operation** (S5; q13): `argon2`'s `parallel` feature stays off (no `rayon`); calibration stays as doc 04 §5, and docs 00 and 05 are aligned to it; the KDF memory is page-locked best-effort and always wiped; password length counts code points after NFKC; a new password with a code point unassigned in the pinned Unicode version is refused, and an upgrade of `unicode-normalization` is a crypto change. | 00, 02, 04, 05 |
| D-41 | Windows binaries link the C runtime statically (`+crt-static`), so neither build needs the VC++ redistributable (S5; q13). | 15, 18 |
| D-42 | TOTP secrets under 128 bits are accepted on import and entry, with a note in the import report (S5; q13). | 06, 11 |
| D-43 | **Save-pipeline details** (S5; q14): the first save after opening an older file writes max(sidecar, file) + 1; an unparseable sidecar counts as missing, with a notice; a hash of the whole file in the sidecar warns about two copies edited apart; a newer leftover becomes a backup with a one-line notice; a sharing violation is retried for up to 2 s; the recent backups count toward the daily and monthly slots, the newest of each is kept; the sidecar lives in `%LOCALAPPDATA%\MuteVault\state\`; `fs4` and `tempfile` are dropped. | 02, 03, 05 |
| D-44 | **`SecureInput` policies** (S3; q15, q16): every `SecureInput` accepts paste, first line only, and the clipboard is cleared on submit if it is unchanged since the paste; no detection of keystroke-hook input methods, but the master-password screens show a static hint about them. | 07, 10, 12 |
| D-45 | The S1b upgrade harness becomes `cargo xtask ui-smoke` once `mv-ui` exists; it runs locally before each `gpui-kit` upgrade, never in CI (q12). | 14, 17 |
| D-46 | **Tray, hotkey and autostart on GPUI** (S2; holds once S2-M1 passes):<br>• `tray-icon` (`default-features = false`) and `global-hotkey` are Windows-only dependencies of `mv-platform`, created on GPUI's main thread, whose loop already serves their windows; their event handlers are set before any icon or hotkey exists and only enqueue into one channel.<br>• Close to the tray removes the window and switches GPUI to headless; Show re-attaches, opens a window and calls `SetForegroundWindow` itself, never GPUI's `activate_window()`.<br>• The hotkey acts on Pressed only and has no default chord: it stays off until the user records one.<br>• "Start with Windows" lives in Settings. The Velopack build writes and removes a Run value and only reads `StartupApproved`; the Store build uses a start-up task and detects that activation, since it gets no arguments. | 02, 10, 12, 18 |
| D-47 | **Single instance and the pipe** (S2): the mutex is `Local\MuteVault.<SID>`; the pipe is `\\.\pipe\MuteVault.<SID>.<session-id>.v1`, created with the first-instance flag, remote clients rejected and a user-only DACL; its listener starts right after the single-instance check, before the window. Clients (`mutevault-host`, a second instance, the CLI) open it with identification-level impersonation and check the server's user SID, The pipe, server and client, is implemented in `mv-platform` directly on `windows` with overlapped handles; `interprocess` is not used, because its client cannot limit impersonation and synchronous handles block a full-duplex relay (S4 finding 9). | 02, 03, 07, 08, 10 |
| D-48 | **S4 passed; browser integration** (S4): no browser is dropped from P0, and Brave joins Chrome and Edge at P0; Vivaldi stays best-effort until S4-M1.<br>• MuteVault registers exactly the Chrome, Edge and Mozilla keys, never `Software\Chromium\…` (it would shadow Chrome\'s in Edge and Brave) or `Software\BraveSoftware\…`.<br>• The host caps frames at 1 MiB both ways before allocating, parses nothing but `id` and `open_app` while the app is not running, exits on stdin EOF and never relies on its parent process.<br>• "Open MuteVault" when the app is not running: the host starts the installed app with `CREATE_BREAKAWAY_FROM_JOB`, only for `open_app` and with no arguments from the message; no `mutevault:` URL protocol.<br>• The extension keeps one long-lived port per profile and checks request size before posting. Budgets: under 50 ms per request on an open port, under 150 ms to connect. | 02, 03, 07, 08 |
## 6. Open actions
@@ -272,12 +181,12 @@ checklist (2026-12-02), and it is flagged for review in the same way as D-29.
| H-05 | Confirm D-28 (e-mail only, or GitLab issues as the runbook says) so README, SECURITY and CONTRIBUTING say one thing | Before the repo is public |
| H-06 | Generate the passkey AAGUID once and record it in doc 09 §5; it never changes afterwards | M4 |
| H-07 | Generate the update-signing key pair and publish the public key in the README. Default: the secret key is a repo-level Actions secret used only by the tag-triggered release job. Stronger option: keep it off the forge and sign the hash list by hand on the PC before the feed is uploaded — a two-step release | M5 |
| H-08 | Create the repo-level secrets listed in doc 15 §14.7 (`QODANA_TOKEN`, Discord webhooks; later the signing key and store credentials). The R2 secrets and `R2_ACCOUNT_ID` are user-level and already shared | M0 (S10) |
| H-08 | Create the repo-level secrets listed in doc 15 §6.7 (`QODANA_TOKEN`, Discord webhooks; later the signing key and store credentials). The R2 secrets and `R2_ACCOUNT_ID` are user-level and already shared | M0 (S10) |
| H-09 | Fix the extension ids: generate the Chromium key for a stable id; reserve the Firefox id | M3 |
| H-10 | Register as an individual developer on the Microsoft Store and reserve the app name "MuteVault" in Partner Center | M5 — earlier is better, the reservation is free |
| H-10 | **Done 2026-12-02.** Registered as an individual developer on the Microsoft Store and reserved the app name "MuteVault" in Partner Center (Store ID `9NCTTCXCB4NQ`; identity values and the open draft's to-do list are in doc 18 §8). Still to do in the draft before submitting (M5): price Free, category, privacy-policy URL, support info, uncheck the OneDrive-backup and broadcast declarations, save the IARC rating | M5 |
| H-11 | Decide whether the app or README carries a donation link, and to where — GitHub Sponsors is tied to the suspended account, so `.github/FUNDING.yml` was removed from this suite | M5 |
| H-12 | Have the VI and JA security-critical strings reviewed by a fluent reader | M5 |
| H-13 | Repository bootstrap on Gitea, in the order of doc 15 §14.5:<br>1. Push `main` first.<br>2. Branch protection with the required checks of doc 15 §4.2.<br>3. Enable Actions.<br>4. Create the secrets `QODANA_TOKEN` and `DISCORD_CI_WEBHOOK`.<br>5. Run `gitea-repo-setup.ps1 -Only mutevault` and `setup-mirrors.ps1 -Only mutevault`.<br>6. Register the cron slots `57 13 * * 2` (Security) and `9 14 * * 5` (Qodana) in the ops registry. `17 15 * * 6` is registered later, with `fuzz.yml`.<br>7. Point the Qodana Cloud project at the **GitLab mirror** URL; Qodana Cloud does not accept a Gitea URL.<br>8. Add `mutevault` to the runbook's tracker.<br>9. Push `chore/ci-bootstrap` and open its pull request. | M0 |
| H-13 | Repository bootstrap on Gitea, in the order of doc 15 §6.5:<br>1. Push `main` first.<br>2. Branch protection with the required checks of doc 15 §4.2.<br>3. Enable Actions.<br>4. Create the secrets `QODANA_TOKEN` and `DISCORD_CI_WEBHOOK`.<br>5. Run `gitea-repo-setup.ps1 -Only mutevault` and `setup-mirrors.ps1 -Only mutevault`.<br>6. Register the cron slots `57 13 * * 2` (Security) and `9 14 * * 5` (Qodana) in the ops registry. `17 15 * * 6` is registered later, with `fuzz.yml`.<br>7. Point the Qodana Cloud project at the **GitLab mirror** URL; Qodana Cloud does not accept a Gitea URL.<br>8. Add `mutevault` to the runbook's tracker.<br>9. Push `chore/ci-bootstrap` and open its pull request. | M0 |
### Ops-repository actions
@@ -288,17 +197,32 @@ checklist (2026-12-02), and it is flagged for review in the same way as D-29.
### Open questions to settle in the spikes
1. Which registry key Brave and Vivaldi read for native-messaging hosts (S4).
2. Whether `argon2` 0.6.0 parallelises lanes (S5).
1. ~~Which registry key Brave and Vivaldi read for native-messaging hosts (S4).~~
**Answered 2026-12-06 (S4):** Brave reads `HKCU\Software\Chromium\NativeMessagingHosts`,
then Chrome's key, never `BraveSoftware`'s; Vivaldi is expected to do the same
(S4-M1).
2. ~~Whether `argon2` 0.6.0 parallelises lanes (S5).~~ **Answered 2026-12-06 (S5):** only
with its optional `parallel` feature (rayon); by default every lane runs on the
calling thread. With the feature, p = 4 is 2.2–2.9× faster than p = 1 on the dev PC,
with identical output. Whether to enable it is part of question 13.
3. Whether PRF is exposed by `passkey` 0.6.0 in a usable form (S6).
4. Whether TypeScript 7.0.2 works with WXT 0.21.5, or the compiler is pinned to 5.9 (scaffold).
5. Whether `qodana-rust` runs through Docker Desktop on the host-mode runner, and whether
it can analyse the UI crates there (S10).
it can analyse the UI crates there (S10). *It runs (2026-12-05), but misses the items
`core` and `alloc` generate with macros. Open: is that the EAP build (test GA
`263.8802.61`) or the Windows bind-mounted `/data/cache`? Until then, keep Qodana
report-only and accept the 47 known false errors, or exclude the four Rust type-check
inspections that rustc and clippy already gate? The first changes nothing and is the
default.* **Decided 2026-12-06 (delegated):** report-only, no exclusions, until
S10-M1 and S10-M2 have run.
6. Whether `vpk … s3` works against R2 with the endpoint alone, and the exact file names
it writes (S9).
it writes (S9). Also which installed path the Run value names so that it survives
updates: the root stub or `current\` (S2 finding 11).
7. Which process-mitigation policies are compatible with the renderer (S11).
8. How a packaged (MSIX) app makes its native-messaging host visible to and startable by
browsers, and which restricted capability the Store will accept for it (S13).
browsers, and which restricted capability the Store will accept for it (S13). Also
whether a pinned tray icon stays pinned across a Store update, given that the package
path changes (S2 finding 14).
9. How Velopack's own HTTP client fits rule 5 ("network code lives only in `mv-net`").
`deny.toml` bans every HTTP/TLS stack today. The `velopack` crate pulls one in for
updates, so the change that adds it must decide where it lives and which `wrappers`
@@ -308,6 +232,38 @@ checklist (2026-12-02), and it is flagged for review in the same way as D-29.
(association tokens), the host reaches it transitively. Decide at M3.
11. ~~Where spike code lives, given that it is never merged (§1).~~ **Decided
2026-12-02: D-30** — a git-ignored `spikes/` directory, excluded from the workspace.
12. ~~Should the S1b upgrade harness (`measure*.ps1`, `uia-check.ps1`) become a repository
tool, for example `cargo xtask ui-smoke` once `mv-ui` exists, so the `gpui-kit`
upgrade gate (D-33) survives D-30's rule that spike code is not kept?~~ **Decided
2026-12-06: D-45.**
13. ~~The crypto and format choices S5 found open, all to settle before the first golden
fixture (M1): `argon2`'s `parallel` feature; the `AAD_field` and `AAD_slot` encodings
and the box layout; HKDF's argument order and salts; `kdf_id` = 0 slots; non-zero
`flags` and which error each size limit raises; the padding gaps; the calibration
target (doc 04 §5 against doc 00 §6 and doc 05 §9); how the 12-character minimum is
counted and NFKC's Unicode version; page-locking the KDF buffer; VC++ runtime
linkage; TOTP secrets under 128 bits on import. Options and consequences:
`docs/spike-reports/S5_CRYPTO_FORMAT.md`.~~ **Decided 2026-12-06: D-39 to D-42.**
14. ~~Save-pipeline details S5 left open (options in the S5 report): what the first save
after a deliberate backup restore writes as `save_counter`; whether an unparseable
sidecar counts as missing silently or with a notice, and what its header hash is
for; whether a newer leftover is also offered to the user or only kept as a backup;
how long step 6 retries on a sharing violation, and what the banner says.~~
**Decided 2026-12-06: D-43.**
15. ~~Does the master-password field accept paste at all? A paste from the clipboard
history (Win+V) cannot be told apart from Ctrl+V (S3 finding 10), so doc 12 §4's
"never from the history" cannot be built. Accepting paste helps people whose master
password is long and random; refusing it keeps the master password off the
clipboard.~~ **Decided 2026-12-06: D-44** (accept, clear on submit).
16. ~~What the UI says when a keystroke-hook input method (EVKey, UniKey) is on while a
master password is set or typed: a warning, the input-method state, or nothing.
S3-M2 shows whether such methods convert keys typed into `SecureInput`.~~ **Decided
2026-12-06: D-44** (a static hint).
17. Whether and how to report `gpui-base`'s one-line gap upstream: its masked input
still accepts text input, so Windows text services see it (S3 finding 6). The
project is on GitHub, where the maintainer's account is suspended (D-25).
**Deferred 2026-12-06** until the account is restored; the one-line change is in the
S3 report, so anyone can file it.
## 7. Out of scope, on purpose
+262
View File
@@ -0,0 +1,262 @@
# 18 — Release and distribution
> MuteVault docs suite v1.2 · 2026-11-23 · split out of doc 15 on 2026-12-05 (sections
> 6–13 there became 1–8 here).
> Forge, CI and release-host facts follow the ops runbook `poli0981/.github` →
> `docs/GITEA-MIGRATION.md` (read 2026-11-23). Where this document and the runbook
> disagree on forge or CI behaviour, the runbook wins and this document is corrected.
> Items marked **VERIFY** are confirmed in spikes S9 and S13 before they are relied on.
## 1. Packaging and updates (Velopack, Cloudflare R2)
**Release host.** Installers and update feeds live in the R2 bucket
`poli0981-releases`, public only through `https://releases.poli0981.dev/mutevault/`.
There is no directory listing; links name exact files. The Gitea release for a tag
carries notes, hashes and links only — never binaries.
| Object under `mutevault/` | Name is | Uploaded |
|---|---|---|
| `<version>/MuteVault-<version>-SHA256SUMS.txt` and `.minisig` | Versioned | First |
| `<version>/` extension ZIPs, source ZIP, SBOM (`.cdx.json`) | Versioned | First |
| `MuteVault-<version>-full.nupkg`, `-delta.nupkg` | Versioned | By `vpk` |
| `MuteVault-Setup.exe`, `MuteVault-Portable.zip` | Stable (cache bypassed) | By `vpk` |
| `releases.win.json`, `assets.win.json`, `RELEASES` | Feed (cache bypassed) | **Last** |
Only the stable and feed names may ever be overwritten; every other name contains the
version. CI never deletes objects, apart from Velopack's own pruning. Exact file names
are copied from the first packed release (**VERIFY**, S9).
**Release job** (tag push, `windows-latest`), credentials as environment variables so
they never appear on a command line:
```yaml
env:
VPK_BUCKET: poli0981-releases
VPK_PREFIX: mutevault/
VPK_ENDPOINT: https://${{ vars.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com
VPK_KEY_ID: ${{ secrets.R2_RELEASES_ACCESS_KEY_ID }}
VPK_SECRET: ${{ secrets.R2_RELEASES_SECRET_ACCESS_KEY }}
```
1. `cargo build --release --locked -p mutevault -p mutevault-host`; stage the binaries,
licences and notices.
2. `vpk download s3 --channel win -o releases` — the previous release, for the delta
package. On the first release the "nothing found" result is expected.
3. `vpk pack` with pack id `MuteVault`, the version from the tag and `mutevault.exe` as
the main executable.
4. Compute SHA-256 for everything in `releases/` plus the extension ZIPs; write the hash
list; sign it with the update-signing key (H-07).
5. Upload the versioned side files with the ops `publish-r2.yml` (`app: mutevault`).
6. `vpk upload s3 --channel win -o releases --keepMaxReleases 10` — packages, then the
feed, last.
7. Create the Gitea release (notes, SHA-256 block, links) and dispatch the announcement.
Whether `vpk … s3` talks to R2 with the endpoint alone is **VERIFY** (S9); the fallback
is `vpk download http` plus `publish-r2.yml` with the feed files uploaded last.
**Install behaviour**
- Per-user install under `%LOCALAPPDATA%\MuteVault`; no administrator rights.
- `main()` starts with the Velopack app builder, which handles install, update and
uninstall hooks. In those hooks MuteVault registers or removes the native-messaging
manifests, the file association and the Run key. Hooks must finish quickly and must
not show UI.
- Uninstall leaves vaults and backups untouched and says where they are.
**Update flow in the app** (Velopack build only)
1. If "Check for updates" is on: a few seconds after start-up, and then daily, ask the
feed at `https://releases.poli0981.dev/mutevault` for a newer version (Velopack's
HTTP source).
2. Show "Update available" with the release notes. Nothing downloads without a click.
3. Download the package, then **verify before applying**:
- fetch `<version>/MuteVault-<version>-SHA256SUMS.txt` and its `.minisig`;
- verify the signature with the Ed25519 public key compiled into the app;
- check the downloaded package's hash against the signed list.
4. Lock the vault, apply, restart.
A failed verification discards the download and reports it as a security event. The
signed hash list is what makes the update trustworthy; the bucket and the CDN in front
of it are treated as untrusted transport.
## 2. Code signing and release trust (Windows)
Unsigned installers trigger SmartScreen warnings. For a password manager that is a
trust problem at the first step, so a signing route should be chosen before the public
beta (H-02).
| Route | Cost | Publisher shown | Notes |
|---|---|---|---|
| SignPath Foundation | Free for qualifying open-source projects | SignPath Foundation | Application and conditions. Ask first whether a project whose canonical repository is a self-hosted Gitea, with a GitLab mirror, qualifies |
| Certum Open Source Code Signing | From €69 for the set | The maintainer's name | Issued to natural persons only; identity verification |
| Azure Artifact Signing (formerly Trusted Signing) | US$9.99 per month (Basic) | — | Individual developers are accepted only in the USA and Canada — not available to the maintainer |
| Microsoft Store (MSIX) | Free | Store-signed | Only for the Store build (§8); does not sign the Velopack installer |
| None | Free | "Unknown publisher" | Acceptable for alpha builds with published hashes |
Build-provenance attestations need OIDC and are not available on this forge. What
stands in their place, and is described in every release's notes:
1. the minisign-signed SHA-256 list, verifiable with the public key printed in the
README and compiled into the app;
2. the same hashes in the Gitea release notes;
3. the release workflow's log on the forge, and the tag it ran from — a signed tag;
4. rebuild instructions (§6).
## 3. Extension release
| Step | Detail |
|---|---|
| Build | `pnpm -C extension build` (Chromium ZIP) and `build:firefox` (Firefox ZIP + source ZIP) |
| Ids | Stable Chromium extension id from a committed public key; Firefox id `mutevault@poli0981.dev` (H-09) |
| Versioning | Same version as the desktop app; the protocol version (doc 08 §6) is what must match, and the popup says so when the app is older or newer |
| Download copy | ZIPs under `releases.poli0981.dev/mutevault/<version>/`, linked from the Gitea release |
| Chrome Web Store | Manual upload at first; store API secrets, tag-only jobs, later |
| Firefox Add-ons | Upload with the source archive and build instructions; the source link is the tag on the forge |
| Edge Add-ons | Same package as Chrome |
| Testers | Load unpacked from the release ZIP |
The native host's allow-list contains the store ids and, in debug builds only, the
development id.
## 4. Versioning and channels
- Semantic versioning. Vault format version and IPC protocol version are separate
numbers (doc 05 §7, doc 08 §6).
- **Betas are 0.x releases** (D-32). The public beta starts at 0.1.0 (M5), and every
release before 1.0.0 is a 0.x.y release on the beta channel, its own Velopack
channel. 1.0.0 is the first stable release, on the stable channel. Beta builds show
a banner and never touch a vault without first creating a backup.
- Before v1.0, the README and the create-vault screen state that the format may change.
- Release notes live under `changelog/`: one file per beta minor series
(`changelog/beta/beta-0.<minor>.md`) and one per stable release
(`changelog/v1/v1.<minor>.<patch>.md`). The root `CHANGELOG.md` is the index and
holds the rules for writing entries. Unreleased work is written into the next
release's file under `[Unreleased]`.
## 5. Release checklist
1. All gates green on `main`; milestone definition of done met (doc 14 §8).
2. The release's file under `changelog/` (its `[Unreleased]` heading becomes the version
and date) and the index in `CHANGELOG.md`, doc 02 and the decision log updated;
version bumped in the workspace and `extension/package.json`.
3. Golden fixtures regenerated for format-affecting releases.
4. `cargo xtask notices` re-run; licences reviewed.
5. Manual checklists (doc 14 §9) completed, including the machine tests CI skips.
6. Create and push a **signed** tag `vX.Y.Z` from `main` (doc 15 §6.4). The PC must be
on: the release job runs there.
7. Verify the published artefacts from a clean machine: hash-list signature, install,
update from the previous version.
8. Submit the extension packages to the browser stores and the MSIX package to the
Microsoft Store (§8).
9. Announce; watch the support mailbox for a week before starting the next milestone.
## 6. Reproducibility
Goal for v1: a **rebuildable** release — the release notes give the tag, the toolchain
(pinned in `rust-toolchain.toml`), and the commands, so anyone can rebuild and compare
behaviour and hashes of the unsigned binaries. Bit-for-bit reproducible builds on
Windows are a P2 goal; the pinned toolchain, `--locked` and path remapping are the
groundwork.
## 7. Distribution channels (D-25)
MuteVault for Windows is distributed two ways.
| Channel | What users get | Updates arrive through | Signed by | From |
|---|---|---|---|---|
| Project release host (`releases.poli0981.dev/mutevault/`) | Velopack `Setup.exe` and portable ZIP | The in-app updater | The route chosen in H-02 | Betas onward |
| Microsoft Store | An MSIX package | The Store | Microsoft, free of charge | v1.0 target, gated by spike S13 |
**winget is not a channel** (dropped 2026-11-23). A winget submission is a pull request
to a repository on GitHub, and the maintainer's GitHub account is suspended with an
appeal pending. It can be reconsidered if the account is restored. Independently of
that, a Microsoft Store listing can be installed through winget's built-in `msstore`
source, which involves no GitHub submission.
**One code base, two Windows builds**, selected by cargo features `dist-velopack`
(default) and `dist-store`:
| Concern | Velopack build | Store build (MSIX) |
|---|---|---|
| Updater | Velopack, with the signed hash list (§1) | Compiled out; the "Check for updates" setting is hidden |
| Program files | `%LOCALAPPDATA%\MuteVault\current\` | Read-only package directory |
| C runtime | Linked statically; the VC++ redistributable is neither needed nor shipped (D-41, doc 15 §2) | The same |
| Settings, logs, device slots, sidecars | AppData | AppData redirected to a per-package location, removed on uninstall |
| Vaults and backups | `%USERPROFILE%\MuteVault\` | The same folder — never AppData (doc 03 §8) |
| Native-messaging registration | Per-user `HKCU` keys (Chrome, Edge, Mozilla) and manifests written by the install hook, no administrator rights; verified for Chrome, Edge, Firefox and Brave (S4) | Needs unvirtualised registry keys, a manifest file outside the virtualised AppData, and a host path the browser can start through `cmd.exe` (§8, S13) |
| Start with Windows | Per-user Run value, written and removed by the setting and removed by the uninstall hook, pointing at an update-stable path (S9) | Start-up task declared in the package manifest (`windows.startupTask`); `DisabledByUser` cannot be overridden; it passes no arguments, so the app detects the start-up activation; no Run-key code (D-46) |
| File association | Written by the install hook | Declared in the package manifest |
| Native passkey provider | Not possible | Possible later (doc 09 §9) |
Everything under `crates/` is identical in both builds; the differences live in
`mv-platform`, `bins/mutevault` and `packaging/`.
## 8. Microsoft Store
**Submission type: MSIX.** The Store also accepts unpackaged EXE/MSI installers, but for
those the publisher must sign the installer and its binaries with a CA-issued
certificate, host the file, and deliver updates; the Store neither re-signs nor updates
them. An MSIX submission is re-signed and hosted by the Store at no cost, and it gives
the app the package identity the native passkey provider needs.
**Steps**
1. Register an individual developer account (free) and reserve the name "MuteVault" in
Partner Center (H-10). **Done 2026-12-02**, see "Partner Center state" below.
2. Build the package in the release workflow with the Windows SDK's packaging tool from
`packaging/msix/`: manifest with the identity values Partner Center assigns, the
full-trust capability, `mutevault.exe`, `mutevault-host.exe`, assets and licences.
The upload does not need a trusted signature — the Store signs after certification.
CI only **builds** the package; it is never installed on the runner (doc 15 §4.4).
3. Run the Windows App Certification Kit by hand before submitting.
4. First publication goes through Partner Center by hand. Later updates can be
automated with the Microsoft Store Developer CLI from a tag-only job.
5. Listing: description in EN/VI/JA, screenshots, privacy-policy URL, age-rating
questionnaire, and a justification for each restricted capability.
6. Certification of a new app typically takes a few business days — plan releases
around it. A Store release can trail the direct release by that long.
**Partner Center state (2026-12-02).** The name "MuteVault" is reserved as an "MSIX or
PWA app", Store ID `9NCTTCXCB4NQ`. These identity values go into the `packaging/msix/`
manifest exactly as shown; they are public, not secrets:
| Field | Value |
|---|---|
| `Package/Identity/Name` | `poli0981.MuteVault` |
| `Package/Identity/Publisher` | `CN=9E5A4476-77F7-44DF-823F-E9C51AB961C8` |
| `Package/Properties/PublisherDisplayName` | `poli0981` |
| Package family name (PFN) | `poli0981.MuteVault_x5gr0vpkwx3ec` |
Submission 1 is an open draft. It cannot be submitted before an MSIX package exists (M5,
after S13), so the draft only collects settings until then. What it holds, and what to
change before submitting:
| Page | State on 2026-12-02 | Before submitting |
|---|---|---|
| Pricing and availability | All markets, public, discoverable, release "as soon as possible"; **no price set** (the page reports "You must configure a price") | Set the base price to **Free**. Consider "publish manually" in Submission options, so certification does not decide the release day |
| Properties: category | Not picked | Pick one (Security, or Utilities & tools); a maintainer decision |
| Properties: privacy | Not answered | Answer that the app handles personal information (it stores credentials, locally), and give the URL of the published `legal/PRIVACY.md` |
| Properties: support info | Empty | `https://poli0981.dev/links/` and `code@poli0981.dev` (README "Where things live") |
| Properties: product declarations | Checked: alternate drives, **OneDrive backups**, **record and broadcast clips** | **Uncheck OneDrive backups**: the package's AppData holds settings, logs and the device-bound unlock slots (D-19), and nothing of MuteVault goes to a cloud by default (doc 00). **Uncheck record and broadcast**: Partner Center says it is for games only, and the app excludes itself from screen capture (doc 10 §8). Keep alternate drives. Check "tested for accessibility" only after the M5 pass. Generative AI: no |
| Age ratings | IARC questionnaire answered as "All Other App Types". Preview: IARC 3+, ESRB Everyone, PEGI 3, USK 0. Not saved yet | Tick the IARC terms and Save. Redo the questionnaire if an answer changes, for example if an opt-in network feature is added |
| Packages, Store listings | Empty. Listing languages appear only after a package is uploaded | Upload the MSIX (M5). The EN/VI/JA listings then follow the package's languages. Justify `runFullTrust` and the unvirtualised `HKCU` keys (S13) |
**How a packaged app behaves differently** (from Microsoft's MSIX documentation), and
what MuteVault does about it:
| Behaviour | Consequence | Design response |
|---|---|---|
| New files a packaged app creates under AppData go to a private per-app location and are removed when the app is uninstalled | A vault stored there would be deleted by an uninstall | Vaults and backups default to `%USERPROFILE%\MuteVault\` in every build (D-21) |
| Writes under `HKCU` are redirected to a private per-app registry hive | Browsers would not see the native-messaging host keys | Windows 11 lets a package declare specific `HKCU` keys as unvirtualised; this uses a restricted capability that must be justified at submission |
| The package directory is read-only and not a normal install path | The browser must be able to start `mutevault-host.exe` from a stable path | An app-execution alias for the host is the candidate; it must work from `cmd.exe /c`, which is how Chromium starts hosts (S4 finding 4). The manifest JSON goes to an unvirtualised location: the browser opens that file itself, so the Velopack location under `%LOCALAPPDATA%` would be redirected (S4 finding 13) |
| The package directory changes with every version | The app's check of the host process cannot pin an image path | The check uses the package identity (family name or signature) instead (S4 finding 13) |
| Uninstall removes all package state, but not user-created files outside it | Settings, logs and device-slot enrolment disappear with the app | Acceptable; the uninstall notice says where vaults and backups remain |
Microsoft's pages are not fully consistent about `HKCU` behaviour for full-trust apps,
so none of the second and third rows is assumed to work until **spike S13** shows a
browser launching the packaged host and completing a fill.
**Fallback if S13 fails:** keep the Store listing but submit the signed Velopack
installer through the EXE path. That needs the CA-issued certificate from H-02, gives up
free Store signing and Store updates, and leaves the native passkey provider out of
reach — so it is a fallback, not a plan.
+120
View File
@@ -0,0 +1,120 @@
# Spike S10 — Quality pipeline on Gitea
> MuteVault spike report · first data 2026-12-02 (moved out of doc 17 §3) · Qodana
> attempts 2026-12-05. The question, pass criterion and fallback are in doc 17 §2.
**Verdict: partial.** Two of the three criteria pass. The third half passes: Qodana's
Rust linter completes on the runner, but its results contain 47 false errors that five
runs could not remove. Qodana stays report-only, as before, and the open item is
narrowed (findings 3–6). The fallback (Qodana on non-UI crates only, or no Qodana) is
not needed yet: the scan works, it is the results that are wrong.
## Criteria
| Criterion | Result |
|---|---|
| Ops `security.yml` (gitleaks, Opengrep, osv-scanner, cargo-deny) green on the workspace | **Pass** (2026-12-02) |
| `qodana-rust` completes through the ops reusable with `within-docker: true` on `windows-latest` | **Runs, results partly false.** Every run completes; opening the project takes 2–6 minutes on a cold cache (preliminary, the machine was busy). 47 of its 48 results are false (finding 3) |
| Coverage thresholds enforced in `ci.yml` | **Pass.** Enforced; no gated crate exists yet |
## Setup
- Image: `jetbrains/qodana-rust:2026.3-eap`, digest
`sha256:b7338b92220a7940800228a144cff257dd81a69072105920496dbc2064ce5956`, created
2026-11-06, IDE build `QDRST-263.7944`, default toolchain 1.94.0. This is the image the
ops `reusable-qodana.yml` at v2026.11.5 (Qodana CLI 2026.3.1) pulls in CI.
- Newer, not tested: the GA image `jetbrains/qodana-rust:2026.3` (2026-11-30, build
`QDRST-263.8802.61`, index digest
`sha256:fa4b54848f40848ab3546fea26427f948f218d206cb5487810e39c9af0880d00`). It is a
download of about 6 GB, left for the maintainer to approve (S10-M1).
- Local runs: Qodana CLI 2026.2.2 with `--image` set explicitly, Docker Desktop 29.10.1,
a clone of `main` at 1daef88, the CI flags `-u root -e CARGO_HOME=/data/cache/cargo`,
a cold `--cache-dir` on a Windows bind mount as in CI, no token and no upload.
## First data (2026-12-02)
The first CI run reported 47 false "Critical" problems in `xtask` (`u64` "does not
implement" `PartialEq`, `usize` has no `Display`, …). Two causes were suspected:
1. The image (a Docker Hardened Image) has no C linker, so every build script failed and
the sanity check reported "Cargo project loading". **Fixed:** `qodana.yaml` has a
bootstrap that installs `build-essential` with the `dhi.io` pin from
free-steam-games-list.
2. "The IDE attaches no Rust standard library", because the report's
`projectStructure/SDKs.json` is `{"roots": []}`. **This diagnosis was wrong**
(finding 1).
Qodana Cloud took that first run as the baseline, so later runs pass because the 47
problems are "unchanged", not because they are gone.
## Attempts (2026-12-05)
| Run | Change | Opening (prelim.) | Results |
|---|---|---|---|
| 1 | None: the CI configuration. rustup installs 1.100.0 with `rust-src` from `rust-toolchain.toml` on the IDE's first `rustc` call | 2 min 49 s | 48 |
| 2 | The planned fix: `rustup toolchain install --no-self-update` in the bootstrap, so the toolchain exists before the IDE starts | 6 min 12 s | 48 |
| 3 | Toolchain 1.99.1, the version of the plugin's bundled std metadata | 2 min 30 s | 48 |
| 4 | No `rust-toolchain.toml` (image default 1.94.0), as in free-steam-games-list | not measured (the PC slept) | 48 |
| 5 | Edition 2021 instead of 2024 | 2 min 19 s | 48 |
The 48 results were identical in every run: 16 RsDerivableTraitMembers and 10
RsTraitObligations in `coverage.rs`, 14 RsTraitObligations in `rules.rs`, 4
RsFormatMacroErrors, 2 RsDerivableTraitMembers in `metadata.rs`, 1 RsBorrowChecker, and
one real warning (finding 7). The sanity check also flags `Iter::all`, `Iter::find` and
`u64::saturating_mul` as unresolved.
## Findings
1. **`SDKs.json` is no indicator for Rust.** The Rust plugin attaches std as a synthetic
library, not as an IntelliJ SDK, and Qodana's project-structure file lists only SDKs,
so it shows `roots: []` even when std works. Every run's `idea.log` shows
`Synthetic library 'stdlib 1.100.0'` loaded from a valid sysroot. Use the SARIF and
the sanity check instead.
2. **What is missing is everything `core` and `alloc` generate with macros:** trait
impls on primitives (`Clone`, `Copy`, `Debug`, `Default`, `Eq`, `PartialEq`, `Add`,
`Div`, `Display` for `u64` and `usize`), `uint_impl!` methods (`saturating_mul`), the
slice `iterator!` impls, and `impl_eq!` (`String == String`, `Vec == Vec`). All 47
errors follow from this.
3. **The failure is deterministic.** Toolchain (1.94.0, 1.99.1, 1.100.0), edition, when
the toolchain is installed and how long opening takes all leave the result
unchanged. `rust-src` was never the problem, and the planned fix is not worth
committing.
4. **It is not specific to MuteVault.** Run 4 reproduced it with free-steam-games-list's
setup, and another poli0981 project on the same runner reports the same class of
false problems and keeps Qodana report-only. Whether free-steam-games-list's clean
status is a baseline absorbing them is not verified (S10-M3).
5. **Candidate cause in the IDE, not proven:** the loader waits once for the first
"macro expansion finished" event, every run logs a SEVERE "Expected RustRover task
queue to be empty" twice, and core's rebuilds overlap with the analysis. A race that
always loses would fit; the GA build is the next test (S10-M1).
6. **Candidate cause in the environment, not tested:** `/data/cache` (the plugin's std
copy and the macro-expansion caches) lives on a Docker Desktop bind mount of a
Windows directory, locally and in CI. A run with the cache in a Docker volume would
separate this (S10-M2).
7. **One real warning:** `TomlUnresolvedReference` on `Cargo.toml` line 7, because
`exclude = ["spikes"]` names a directory that is git-ignored by design (D-30) and so
absent in CI. Expected, not a bug.
8. **The false errors duplicate rustc's own checks.** The four inspections involved
report E0277, E0369 and borrow errors, which `ci.yml` already rejects through the
build and clippy. Excluding them would remove the noise without losing coverage, but
would also hide them once the IDE is fixed.
9. **Do not reset the Qodana Cloud baseline yet:** a reset now would bring the 47 back
as new problems.
10. **The image tag floats.** `qodana.yaml` names only `linter: qodana-rust`; the CLI
picks `2026.3-eap`, which can move. Pinning by digest would make runs reproducible;
the exact form for CLI 2026.3.1 is not checked yet.
## Manual checklist
| ID | Step | Expected |
|---|---|---|
| S10-M1 | Approve the ~6 GB pull of `jetbrains/qodana-rust:2026.3@sha256:fa4b5484…0d00`, then repeat run 1 with `--image` set to it | 1 result (the `spikes` warning) if the GA build fixes it; otherwise go to M2 |
| S10-M2 | Repeat with `/data/cache` on a Docker named volume (check the image's documented `docker run` form first), then remove the volume | 1 result would mean the bind mount is the cause; the ops reusable would then need a volume-backed cache on Windows |
| S10-M3 | In Qodana Cloud, look at free-steam-games-list's baseline problems | RsTraitObligations or RsDerivableTraitMembers there would make this systemic on the runner |
| S10-M4 | If M1 and M2 both fail, report upstream (Qodana YouTrack) with run 1's `idea.log`, the SARIF and a minimal repro: `#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] struct S { a: u64 }` | A JetBrains ticket |
| S10-M5 | Delete the spike's `cache*` folders (3.6 GB) and the worktree `E:\mutevault-wt\s10-qodana-std` with its branch `fix/qodana-std`, which has no commits | Disk space back |
## Re-run
```powershell
$d='E:\mutevault\spikes\s10-qodana-std'; Set-Location "$d\proj"; qodana scan --image jetbrains/qodana-rust:2026.3-eap --skip-pull --within-docker true -i "$d\proj" --results-dir "$d\runs\runN\results" --cache-dir "$d\cacheN" -u root -e CARGO_HOME=/data/cache/cargo --disable-update-checks --log-level info
```
+118
View File
@@ -0,0 +1,118 @@
# Spike S1 — `gpui-kit` shell on Windows 11
> MuteVault spike report · run 2026-12-02 · moved out of doc 17 §2.1 on 2026-12-05.
> The question, pass criterion and fallback are in doc 17 §2; the decision is D-31.
**Verdict: pass (D-31).** Every criterion passed: the automated ones in this session,
the IME, Narrator and scaling ones on Kokone's checklist (C1–C13). D-05 stands, and
neither fallback is needed. Two findings move work elsewhere:
- C6: Windows text suggestions read the password field. This goes to S3 and doc 07 §5
(finding 7).
- C15: the app ignores the system text size. This goes to the M5 accessibility pass
(finding 8).
**Setup.**
- Spike: `spikes/s1-gpui-shell/` (D-30), 640 lines of Rust. It depends on `gpui-kit`
=0.10.0 (default features) and `rust-i18n` =4.2.4, builds with Rust 1.100.0, and uses
the repository's build profiles.
- Machine: the maintainer's PC. i7-14700KF (20 cores, 28 threads), 32 GiB, RTX 5080,
NVMe disk, 2560 × 1440 at 240 Hz and 100 % scale, Windows 11 Insider build 29712.
This is a fast machine: a low-end PC will start and build more slowly. Repeat the start
measurement there when S5 does its low-end Argon2 run.
- Method: `measure.ps1` in the spike directory. Cold start runs from the launcher's clock
just before `Process.Start` to the app's first next-frame callback; both sides read
the same system clock. It covers 15 runs with a warm file cache. A true cold start
after a reboot (C14) was not measured.
| Criterion | Result |
|---|---|
| Three-pane window | **Pass.** `h_resizable` with three `resizable_panel`s, each with a size range. |
| 10,000-row virtual list | **Pass.** `List` with a `ListDelegate`; the search box is built in. Scrolling down and up through 10,000 rows at 25 rows per frame took 800 frames: p50 4.16 ms, p99 4.5 ms, max 6.0 ms at 240 Hz. No frame was dropped. |
| Masked input | **Pass.** `InputState::masked(true)` with `Input::mask_toggle()`. While masked, UI Automation reports `IsPassword` and exposes no Value or Text pattern. Once revealed, it is an ordinary text field to UI Automation, so doc 12 §4's time limit on reveal matters. The component's own tests keep a masked value out of the clipboard. It does **not** switch IME composition or Windows text suggestions off (C6, finding 7): that is S3's job. |
| Theme switch | **Pass.** `Theme::change(ThemeMode::…)` repaints every window. |
| Locale switch | **Pass.** `rust_i18n::set_locale` sets one global that the app and `gpui-component` share (both on `rust-i18n` 4.2). `set_window_title` updates the title. Vietnamese and Japanese text renders through the system font fallback. |
| Vietnamese and Japanese IME in normal inputs | **Pass** (C1–C5, C7). Telex and VNI through EVKey 6.0.5; Microsoft IME for Japanese. |
| Narrator reads controls | **Pass** (C8–C11). A read-only UI Automation pre-check found a name, in the current language, on every button and field and on the reveal button. List rows are read only with the workaround (finding 2). |
| Cold start < 500 ms | **Pass.** Launch to first frame: median 211–213 ms, first run 241 ms, worst 241 ms. Process creation to `main` takes 12 ms; `main` to first frame takes about 200 ms (window, DirectX device, fonts). |
| Layout at 200 % (doc 12 §9) | **Pass** (C12–C13). The scale was changed 100 → 200 → 225 → 125 → 100 % while the app ran, about two minutes at each step. |
| Measurement | Value |
|---|---|
| Release binary (thin LTO, one codegen unit, symbols stripped) | 23,361,024 bytes (22.3 MiB); 8.4 MiB zipped |
| Dev binary | 31.3 MiB |
| Memory at idle | working set 65 MiB, private 93 MiB, GPU dedicated 22 MiB |
| Memory while scrolling | working set at most 69–81 MiB, private at most 96–103 MiB; 67–73 MiB afterwards |
| Clean build | dev 199 s, release 146 s. Dev is slower: its profile builds every dependency at `opt-level` 3 with debug info. |
| Incremental build (one-line change in the app crate) | dev 5 s; release 41 s, because thin LTO with one codegen unit re-links everything |
| Dependency graph | 804 packages in `Cargo.lock`, all targets. `gpui-kit` 0.10.0 brings GPUI as the `gpui-pre` 0.3.12 crates. |
| `deny.toml` against that graph | bans, licences and sources pass. Only duplicate-version warnings remain, for example `windows` 0.58 next to 0.62. |
**Findings.**
1. **Icons have to be registered.** Call
`gpui_kit::application().with_assets(gpui_kit::assets::Assets)`. The crate's README
example leaves this out, and without it the reveal toggle and the search icon are
missing without any error.
2. **List rows reach assistive technology without a name.**
- GPUI reports only elements that have a role, and text only through its `Text`
element (`text!`).
- `gpui-component`'s `List` wraps each row in a list-item node that has no name.
- `ListItem::accessibility_label` puts the label on a node without a role, and GPUI
drops that node.
- Workaround in the spike: render the row text with `text!(id = <row id>, …)`. UI
Automation then shows that text as the list item's child, and Narrator reads it
(C10). Without the workaround, Narrator reads nothing.
- The proper fix belongs upstream. Until then, doc 12 §9 records the rule `mv-ui`
follows.
3. **Strings owned by the components have no Vietnamese.** `gpui-component`'s own
`ui.yml` has `ja` but not `vi`. In Vietnamese, "Show password", the input context
menu and "Clear" stay in English. Contribute `vi` upstream before M5, together with
H-12.
4. **No network client on the configured targets.** `gpui-kit-assets` depends on
`reqwest` (as `gpui-pre-reqwest`) for wasm only. `gpui-pre-http-client` holds types
only. Recheck the bans on every `gpui-kit` upgrade (R-01).
5. **Disk writes.** The spike writes nothing. The Direct3D runtime and the GPU driver
cache compiled shaders under `%LOCALAPPDATA%\D3DSCache` and `…\NVIDIA\DXCache`, keyed
by executable path, as they do for any DirectX application. No application data goes
there.
6. **Numbers are not localised.** `rust-i18n` inserts `%{count}` as given, so the list
shows "10000 items". Doc 12 §8 asks for per-locale numbers, so `mv-ui` needs a
formatter. Which one is not decided yet.
7. **Windows text suggestions read the password field (C6).**
- Typing `zzzzzzzz` into the password field opened the Windows text-suggestion
popup under it: "Press Tab to select", then "zzzzzzzz" and "Zzyzx". The reveal
toggle showed its revealed state at that moment. Behaviour while masked was not
recorded.
- Cause: the masked input does not tell Windows' text-input framework that the field
holds a password. So IME composition, the suggestion popup and Windows' typing
prediction all see the typed characters, and Windows may learn them.
- Consequences:
- S3's pass criterion now names text suggestions and prediction next to the IME.
- Doc 07 §5 lists text-input services as an exposure channel.
- Doc 12 §4 says what `SecureInput` opts out of.
- If S3 fails, its fallback (the masked input) carries this risk as well as RR-2.
8. **The system text size is ignored (C15).** At Settings › Accessibility › Text size
150 %, the app's text stays the same size. Display scaling works (C12, C13). Doc 12
§9 asks for both, so `mv-ui` must apply the text-size setting itself. That belongs to
the M5 accessibility pass.
**Manual checklist.** Kokone ran it on their PC on 2026-12-02, with the release build
of the spike. It used the "Notes" and "Input method test" fields and the list search
box.
| # | Check | Result |
|---|---|---|
| C1 | Vietnamese Telex: `Tieengs Vieetj ddaay` gives "Tiếng Việt đây"; no doubled or lost characters; Backspace removes one character | Pass, with EVKey 6.0.5 |
| C2 | VNI: `Tie61ng Vie65t d9a6y` gives the same | Pass, with EVKey 6.0.5 |
| C3 | Typing in the middle of a word, and retyping a selected word | Pass |
| C4 | Microsoft IME (Japanese): `nihongo`, Space, Enter gives 日本語; the candidate window sits at the caret; the composition is underlined inline; Esc cancels cleanly | Pass |
| C5 | Search with `ngân` and `銀行` filters the list | Pass |
| C6 | Typing in the masked field (record only) | The text-suggestion popup shows the typed value (finding 7) |
| C7 | Japanese glyph forms (言語, 検証, 銀行, 項目), not Chinese ones | Pass |
| C8 | Narrator reads every button and field by name, in EN, VI and JA | Pass |
| C9 | The masked field is announced as a password, and its value is not spoken | Pass. Narrator says only "mật khẩu", whether the value is masked or revealed. Whether the reveal button is announced was not reported. |
| C10 | Narrator reads list rows with the workaround, and nothing with `S1_A11Y_ROW_ROLE=plain` | Pass |
| C11 | Keyboard only: the Tab order makes sense and the focus ring is visible in both themes | Pass |
| C12 | Started at 200 %: text is sharp, the panes fit, nothing is clipped, a fast scroll stays smooth | Pass |
| C13 | Scale changed while the app runs: it re-lays out without blur | Pass (100 → 200 → 225 → 125 → 100 %) |
| C14 | Optional: one start measurement right after a reboot | Not run |
| C15 | Optional: the system text size at 150 % enlarges the app's text | No: the text does not grow (finding 8) |
+163
View File
@@ -0,0 +1,163 @@
# Spike S1b — S1 re-run on `gpui-kit` 0.12.0
> MuteVault spike report · run 2026-12-05 · the version check asked for on 2026-12-05 ·
> manual checklist and licence exception approved by Kokone on 2026-12-06.
> Question: does `gpui-kit` 0.12.0 keep S1's result (`docs/spike-reports/S1_GPUI_SHELL.md`)?
> Pass criterion: S1's automated criteria hold, the UI Automation pre-check passes,
> `deny.toml` passes, and the reduced manual checklist (S1b-M1…M6) passes. Fallback:
> stay on 0.10.0. Decision: D-33.
**Verdict: pass** (2026-12-06). Every automated check passes, and the licence check
passes with the crate-scoped exception for `xxhash-rust` (finding 9), which Kokone
approved. Kokone ran S1b-M1…M6: the results match S1's on 0.10.0, unchanged. S1's code
built on 0.12.0 without a single change.
**Decision D-33, approved by Kokone on 2026-12-06:** move to 0.12.0 now, before any
`mv-ui` code exists, with default features (backend `gpui-pre`, never `gpui-fast`) and a
crate-scoped licence exception for `xxhash-rust`. After that, upgrade only between
milestones, each time re-running this spike's scripts and checklist.
## Setup
- Spike: `spikes/s1b-gpui-kit-012/` (D-30), a copy of S1's spike. `src/main.rs` is S1's
640 lines plus measurement hooks (a preselected row, a start-revealed switch, a build
probe); the upgrade itself needed no change.
- Dependencies: `gpui-kit` =0.12.0 with default features (`gpui-pre`, `component`,
`assets`, `x11`, `web-threads`); `rust-i18n` =4.2.4 unchanged (`gpui-component`
0.12.0 asks for ^4.2.0). Resolved: `gpui-component`, `gpui-base`, `gpui-kit-assets`
0.12.0; `gpui-pre` 0.3.15, a snapshot of Zed at `a36d485`; AccessKit 0.25.2.
- Machine: as S1, Windows 11 build 29716. Other spike agents compiled at the same time,
so every timing is preliminary. For a fair comparison, 0.10.0 was rebuilt from S1's
source and lockfile (byte-identical binary to S1's) and measured back to back with
0.12.0.
## Criteria
| S1 criterion | 0.12.0 result |
|---|---|
| Builds without API changes | **Pass.** No change, no warning, clippy clean |
| Three-pane window | **Pass** |
| 10,000-row virtual list | **Pass.** 800 frames, p50 4.16 ms, p99 4.43–4.93 ms, max 5.26 ms at 240 Hz; none dropped |
| Masked input | **Pass, unchanged.** Masked: `IsPassword`, no Value or Text pattern, the fake password nowhere in the tree. Revealed: an ordinary edit field, as in S1 |
| Theme and locale switch | **Pass** (driven through UI Automation's Invoke pattern) |
| Vietnamese and Japanese IME | **Pass** (S1b-M1, S1b-M2, Kokone 2026-12-06): as on 0.10.0. The Windows IME code did not change; the component's IME handling did (finding 12) |
| Narrator reads controls | **Pass.** Pre-check: names in EN, VI and JA on every control; list rows readable only with S1's `text!` workaround (14 of 14; 0 of 14 without it). Narrator (S1b-M4): as on 0.10.0 |
| Cold start < 500 ms | **Pass** (warm cache). Median 360 ms against 405 ms for 0.10.0 in the same session; 218 ms in a quieter session. One first start took 3.1 s (finding 15) |
| Layout at 200 % | **Pass** (S1b-M5): as on 0.10.0 |
| `deny.toml` | Bans and sources pass. Licences pass with the crate-scoped exception for `xxhash-rust` (BSL-1.0), approved 2026-12-06 (doc 02 §2.7) |
| No HTTP or socket client on the configured targets | **Pass,** unchanged (finding 4) |
## Measurements (preliminary; read the two A/B columns)
| Measurement | 0.10.0 (A/B, today) | 0.12.0 (today) |
|---|---|---|
| Release binary | 23,361,024 bytes | 24,076,800 bytes (+3.1 %); 8.6 MiB zipped |
| Memory at idle | working set 65.6, private 93.4, GPU 28.8 MiB | working set 65.1–65.4, **private 74.3–77.1**, GPU 25.3 MiB |
| Memory while scrolling (max) | working set 81.1, private 102.9 MiB | working set 68.4–78.3, private 77.3–84.1 MiB |
| Cold start, median of 15 | 405 ms | 360 ms |
| Compiled packages, Windows / Linux | 403 / 532 | 383 / 526 |
| `Cargo.lock` entries | 804 | 809, of which 98 are never compiled (finding 13) |
Clean builds took dev 373 s and release 277 s under heavy load (210 s dev with a lighter
load); S1's quiet numbers were 199 s and 146 s. Re-run everything, about 15 minutes on a
quiet machine: `pwsh -File run-all.ps1` in the spike directory.
## What changed upstream, 0.10.0 → 0.12.0
- **Releases are weekly, on Mondays** (0.10.0 on 2026-11-16, 0.11.0 on 11-23, 0.12.0 on
11-30). R-01: do not follow every release.
- **Breaking changes** (none touch S1's code): 0.11 makes `x11` a default feature and
moves date pickers to `jiff`; 0.12 makes `gpui-pre` a default feature, adds
`web-threads` (wasm only), and renames a few input and menu types.
- **The backend became a feature.** `gpui-pre` is upstream GPUI (Zed's snapshot, pinned
with `=`). `gpui-fast` is Longbridge's own fork, pinned with a caret and still on
AccessKit 0.24.
- **Accessibility:** a `LiveRegion` component; named popup menus, dialogs and sidebar
groups; Shift+F10 opens context menus; AccessKit 0.25.
- **Input:** 0.11 ends an IME composition on blur and redacts masked text returned to
the IME (not on Windows, finding 7); 0.12 adds an opt-in spell checker (finding 10).
- **Text size:** `gpui-pre` 0.3.15 adds `App::text_scale_factor()`; only Linux feeds it.
- **Dependencies:** `notify` 8 → 9 (brings `xxhash-rust`), one `windows` crate (0.62)
instead of 0.58 plus 0.62.
## Findings
S1's eight findings are unchanged on 0.12.0, so D-31's four conditions stand:
1. Icons still need `with_assets(gpui_kit::assets::Assets)`.
2. List rows still reach assistive technology without a name; the `text!` rule in
doc 12 §9 stays. The upstream fix is small (pass the item's label to the wrapper).
3. `gpui-component`'s own strings still have no `vi`.
4. No network client on the configured targets. `smol`'s socket crates are compiled, but
GPUI uses them only in a hot-reload module behind an off-by-default feature that
`gpui-kit` does not expose. Keep the recheck on every upgrade.
5. No application disk writes beyond the usual Direct3D and driver shader caches.
6. Numbers are still not localised.
7. **Text-input services still see the masked field on Windows.** The IME stays
associated with any focused input; 0.11's redaction changes a function the Windows
backend never calls; and `gpui-pre`'s `TextInputConfiguration` (suggestions off when
masked) is forwarded only on web and iOS. `SecureInput` must still switch these off
itself in `mv-platform` (S3). A Windows implementation upstream would help every
GPUI application.
8. The system text size is still ignored on Windows. Upstream now has the hook; the M5
pass reads `UISettings.TextScaleFactor` in `mv-platform`, or contributes the Windows
half upstream.
New on 0.12.0:
9. **`xxhash-rust` 0.8.21 is BSL-1.0** and fails `deny.toml`'s licence check. Path:
`gpui-component` 0.12.0 → `notify` 9.0.0 (non-optional, the theme file watcher) →
`xxhash-rust`. The FSF lists the Boost licence as GPL-compatible, and it asks for no
notice in binary-only distributions. Kokone approved option (a) on 2026-12-06. Options: (a) a crate-scoped
`[[licenses.exceptions]]` entry (tested with cargo-deny 0.22.1; CI's 0.20.2 is not
tested); (b) BSL-1.0 on the allow-list, which is wider; (c) stay on 0.10.0. Add the
exception in the change that adds `gpui-kit` to the workspace: on a graph without the
crate, cargo-deny warns that the exception is unused.
10. **Spell checking is opt-in and skips masked fields, but "Learn Spelling" persists
words.** A checker backed by the Windows spell checker would write learned words to
the user's dictionary on disk in plaintext. Rule: `mv-ui` never attaches a
`SpellChecker` to a field that holds vault data, secure notes included.
11. **`LiveRegion`** gives `mv-ui` its announcements ("Copied; clears in N s", reveal,
result counts). Its text is spoken and is the node's name in the tree, so it never
holds a secret.
12. **The component's IME handling changed** (about 16,000 diff lines in `gpui-base`),
though the Windows IMM32 code did not. Hence S1b-M1 and S1b-M2, including blur during
composition.
13. **`Cargo.lock` lists about 100 packages that no target compiles** (optional features
nothing enables, among them the GPUI Fast crates, AccessKit 0.24 and `quinn`). Cargo
records them without building them (rust-lang/cargo#10801). `cargo deny` and the
build never see them; osv-scanner and Renovate may. Check an alert with
`cargo tree -i <crate> --target all` before acting on it.
14. **A leaner Windows graph:** 20 fewer compiled packages and about 17 MiB less private
memory at idle. GPUI's clipboard write now makes two short-lived `String` copies
(CRLF conversion); that matters only for a copy from a revealed field through the
input's context menu, which RR-2 already covers.
15. **One first start took 3.1 s** and did not recur. The likely cause, not proven, is a
one-time shader-cache fill after `shaders.hlsl` changed. S1's method (warm cache) does
not cover "first start after an update"; S1b-M7 measures it.
## Why `gpui-pre`, not `gpui-fast`
It is the code S1 and S1b measured and Zed ships on Windows; `gpui-kit` pins it exactly;
it has the newer accessibility stack; GPUI Fast is a second codebase to trust (R-06) for
performance S1 does not need; and `gpui-pre` is the line `gpui-kit` says leads to the
official GPUI crates.
## Manual checklist (Kokone, on the 0.12.0 release build)
**Result, 2026-12-06:** S1b-M1…M6 pass, with the same results as S1 on 0.10.0. S1b-M7
(optional, first start after a reboot) is not recorded.
Run `.\target\release\s1b-gpui-kit-012.exe` in the spike directory. `$env:S1_LOCALE='vi'`
starts in Vietnamese; `$env:S1_A11Y_ROW_ROLE='plain'` turns the row workaround off;
`$env:S1_PRESELECT_ROW='0'` fills the password field. C7, C11, C12 and C15 are not
repeated: nothing that affects them changed.
| # | Check | Expected |
|---|---|---|
| S1b-M1 | (C1–C3) EVKey Telex `Tieengs Vieetj ddaay` and VNI `Tie61ng Vie65t d9a6y` in "Input method test" and the list search; edit mid-word; retype a selection | "Tiếng Việt đây"; nothing doubled or lost; Backspace removes one character |
| S1b-M2 | (C4 + new) Microsoft IME: `nihongo`, Space, Enter. Then type `nihongo` and, while it is underlined, click "Notes" | 日本語, candidates at the caret, Esc cancels. On the click the composition ends, with no stray or duplicated text |
| S1b-M3 | (C5) Search `ngân`, then `銀行` | The list filters |
| S1b-M4 | (C8–C10) Narrator in VI: Tab through everything; focus the password field masked, then reveal it; read rows; restart with `plain` | Vietnamese names ("Show password" stays English); the field is a password with no value in both states; record whether the reveal is announced; rows read with the workaround, silent with `plain` |
| S1b-M5 | (C13) Change the display scale 100 → 200 → 100 % while it runs | Sharp re-layout, nothing clipped |
| S1b-M6 | (C6, record only) Type `zzzzzzzz` into the password field masked, then revealed | Record whether the suggestion popup appears in each state; the result goes to S3 |
| S1b-M7 | (optional) After a reboot, and after a fresh release build: `pwsh -File measure.ps1 -StartRuns 1 -ScrollRuns 0` | The first-start time; over 1 s goes into doc 17 |
+204
View File
@@ -0,0 +1,204 @@
# Spike S2 — Tray icon, global hotkey, single instance and autostart with GPUI
> MuteVault spike report · run 2026-12-05/06 on `gpui-kit` 0.12.0 (D-33).
> Question: do tray icon, global hotkey, single instance and autostart coexist with
> GPUI's event loop? Pass criterion and fallback: doc 17 §2. Decisions: D-46, D-47.
**Verdict: partial.** Every clause a script can check passes: no missed or duplicated
event in 12,267, a second launch always reaches the first instance, and autostart
registers, starts and unregisters. One clause is open, "for an hour of use": the
desktop-lock rule capped each automated phase at about five minutes, so it is S2-M1 on
the manual checklist, with the visual checks and the Explorer restart (S2-M2…M12).
Nothing points to the fallback ("taskbar only").
**Recommendation, taken as D-46 and D-47 (chosen on Kokone's delegation, flagged for
review):** keep `tray-icon` and `global-hotkey` as Windows-only dependencies of
`mv-platform`, created on GPUI's main thread; close to the tray by removing the window
and switching GPUI to headless; bring windows forward explicitly; scope the pipe name to
the session and start its listener before the window; harden the pipe client.
## Setup
- Spike: `spikes/s2-tray-hotkey/` (D-30). App 1,796 lines (`main.rs` 1,218,
`platform.rs` 578), a test driver of 1,218 lines, helper scripts. `unsafe` only in the
two `platform` modules, each block with `// SAFETY:`.
- Crates, pinned `=`: `gpui-kit` 0.12.0, `rust-i18n` 4.2.4; Windows only: `tray-icon`
0.26.1 with `default-features = false`, `global-hotkey` 0.10.0, `windows` 0.62.2;
`async-channel` 2.5.0 and `raw-window-handle` 0.6.2, both already in GPUI's graph.
815 lock-file packages; release binary 18,991,104 bytes.
- Machine: as S1 (Windows 11 build 29716), 2560 × 1440 at 240 Hz, vertical taskbar.
Other agents compiled at times; each measurement records whether `rustc` ran.
- Hotkey under test: `Ctrl+Alt+Shift+F9`. Doc 10's default `Ctrl+Alt+Space` could not be
registered: another program holds it (finding 13).
How the spike works:
1. **One UI thread.** `tray-icon` (with `muda` for its menu) and `global-hotkey` create
their hidden windows on the GPUI main thread. GPUI's Windows loop is a plain
`GetMessageW(NULL)`/`DispatchMessageW`, which serves every window of the thread.
2. **Delivery without polling.** Each crate's event handler stamps a sequence number and
pushes into an `async_channel`; one foreground task awaits it and drains it in one
update. GPUI wakes itself when a task is scheduled from any thread.
3. **Close to the tray.** Closing removes the window (its views drop, standing in for
"close locks the vault"); 50 ms later the app asks GPUI to go headless, which stops the
vsync thread and releases Direct3D. "Show" re-attaches the GPU, opens a new window and
brings it forward. `--minimized` starts headless.
4. **Single instance.** Mutex `Local\<name>.<SID>`; "already exists" and "access denied"
both mean another instance (fail closed). Pipe `\\.\pipe\<name>.<SID>.<session id>`
with a user-only DACL, remote clients rejected, first-instance flag on the first
instance, one instance always listening. A second process opens the pipe with
identification-level impersonation only, allows the server process to take the
foreground, sends `activate`, waits for the reply and exits 0.
5. **Autostart.** A `HKCU\…\Run` value with `--minimized`; Windows' `StartupApproved`
key is read, never written.
## Criteria
| Clause | Result |
|---|---|
| Tray menu events arrive reliably | **Pass.** 1,000 synthetic tray callbacks raised and handled; 10 real left clicks gave 10 shows with the window in front; 4 real menu choices gave 4 events |
| Hotkey events arrive reliably | **Pass.** 2,000 injected chords in each of three states (window in front, closed to the tray, minimised), in bursts 0–3 ms apart: 6,000 Pressed, 6,000 Released |
| No missed or duplicated events | **Pass.** Final run 12,267 events: 0 gaps, 0 duplicates, 0 out of order |
| …for an hour of use | **Open: S2-M1.** About 5 minutes of automated soak; separately, the first instance ran 4 h 39 min in the tray through a 4.5 h sleep and still answered |
| Single instance | **Pass.** 100 sequential and 20 simultaneous second launches all handed over and exited 0; one process and one icon left; the window was in front after 100 of 100 |
| Autostart | **Pass** for register, cold start and removal; a real sign-in is S2-M10 |
## Measurements (preliminary)
| Measurement | Value |
|---|---|
| Hotkey handler → GPUI task (n = 6,000) | Pressed p50 48 µs, p99 198 µs, max 1.0 ms |
| Tray left click → GPUI task | p50 30 µs |
| Tray right click → GPUI task | 3.6–7.4 ms (the menu's modal loop starts first; finding 5) |
| Pipe request → GPUI task | p50 53 µs, p99 1.0 ms |
| Show from the tray, trigger → first frame (GPU re-attach included) | p50 108 ms, max 116 ms |
| Second launch, start → exit 0 with activation handled | p50 18.6 ms, max 25.4 ms (n = 100) |
| Cold start from the Run command → tray, hotkey and pipe ready | 67 ms, headless |
| Idle 60 s, window open | 1.07 % of one core; 571 context switches/s |
| Idle 60 s, window minimised | 2.29 % of one core |
| Idle 60 s, no window, GPU attached | 0.23 % (the vsync thread wakes 240 times a second) |
| Idle 60 s, closed to the tray and headless (the design) | 0.0 ms CPU, 0 switches/s |
| Idle 60 s, headless, 16 ms polling instead of the channel | 0.44 % of one core |
## Findings
1. **GPUI already pumps the tray and hotkey windows.** Created on the main thread inside
`Application::run`, they need no loop of their own, no GPUI change and no private API.
Created on another thread, they would need one, which doc 10 §5 worried about.
2. **The crates' event handlers are write-once and must be set before the first icon or
hotkey exists.** They live in a `OnceCell`; the first event freezes "no handler", and
later calls are ignored without an error. Handlers are process-global and run inside
a window procedure (hotkey Released on a helper thread), so they must only enqueue.
3. **A hidden or minimised GPUI window keeps the CPU awake.** GPUI's vsync thread wakes
every frame and invalidates every window it owns, minimised ones included. Closing to
the tray must remove the window and switch GPUI to headless
(`App::request_windowing(WindowingRequest::Headless)`, refused while a window is open);
re-attaching costs about 110–130 ms, fine for "Show". Minimising is no cheap
alternative: it costs more than an open window.
4. **A window opened from the tray does not reliably take the foreground.** Without help
it failed 2 of 5 checks; with an explicit `SetForegroundWindow` on the new window it
passed 133 of 133. The tray click, the hotkey and the second launch's
`AllowSetForegroundWindow` give the app the right. GPUI's `activate_window()` must not
be used: on Windows it injects a synthetic Alt press into whatever window is in front,
possibly while the user still holds the hotkey's modifiers.
5. **The tray menu runs a modal loop, and GPUI keeps running inside it.** Never open the
menu from inside a GPUI update. A hotkey or pipe request during an open menu should
still be served (S2-M6).
6. **Windows 11 puts a new tray icon in the overflow flyout.** Clicks there work, but most
users will not find it until they pin it: a first-run hint is needed. `tray-icon`
silently drops a mouse event when `Shell_NotifyIconGetRect` fails (not seen here; a
candidate upstream report). It uses the legacy notify-icon behaviour, so keyboard
access to the icon is unknown (S2-M4).
7. **`global-hotkey` starts a thread per press** to poll for the release. 6,000 presses
meant 6,000 short-lived threads, without a miss. MuteVault acts on Pressed only.
8. **`TaskbarCreated` is handled by the crate** (read in the source): after an Explorer
restart it re-adds the icon with its stored picture and tooltip (S2-M3).
9. **The pipe name of doc 03 §8 is not scoped to the session.** `Local\` mutexes are per
session, named pipes are machine-wide. With two sessions of the same user (Remote
Desktop beside the console), both would take their mutex and contend for one pipe
name, and one session's browser host could reach the other session's app. The spike
adds the session id; the first-instance flag makes a second owner fail instead of
sharing the name.
10. **Start the pipe listener before the window, and harden the client.** Doc 03 §6.4
opens the listener after the window, but the single-instance check comes first, so a
second launch in between finds the mutex taken and no pipe. `interprocess` 2.4.9 is
fine for the server side (first-instance and reject-remote by default, takes a
security descriptor), but its client opens the pipe without
`SECURITY_SQOS_PRESENT`, which lets whoever owns the name impersonate the client
fully. `mutevault-host`, the second instance and the CLI should open the pipe with
identification-level impersonation and check the server process's user SID.
11. **Autostart differs per build.** The Run value is written when the setting is turned
on and removed when it is turned off and by the Velopack uninstall hook, not on Quit;
it must point at a path that survives updates (S9). Windows' Startup page writes an
undocumented disabled flag under `StartupApproved`, which the app reads and reports
but never writes. The Store build (from Microsoft Learn, not tested) uses a
`windows.startupTask` extension, can be `DisabledByUser`, and passes **no
command-line arguments**, so it must detect a start-up activation through
`AppInstance::GetActivatedEventArgs()` rather than `--minimized`; a Run-key write
from the package would be virtualised and do nothing.
12. **Licences and new crates.** `tray-icon`'s default feature pulls GTK 3 on Linux, whose
chain fails `deny.toml`; `default-features = false` with Windows-only dependencies
fixes it. The other failure is `xxhash-rust` from `gpui-kit` 0.12, covered by the
approved exception (doc 02 §2.7). New on Windows: `muda` 0.21.2, `dpi` 0.1.2,
`keyboard-types` 0.8.3, `crossbeam-channel` 0.5.17, and a second `windows-sys`
family (0.59) that only `global-hotkey` brings. No network client.
13. **Doc 10's default hotkey is taken on this PC.** `RegisterHotKey` for
`Ctrl+Alt+Space` failed ("already registered"), and Windows cannot say who holds it.
On AltGr layouts the chord is also `AltGr+Space`. Keep the hotkey off until the user
picks one.
14. **Side effects.** Explorer records every new tray icon under
`HKCU\Control Panel\NotifyIconSettings`, keyed by executable path; the Store path
changes with each version, so whether pinning survives a Store update is S13's
question. `tray-icon`'s optional icon GUID ties the icon to one path and is not used.
15. **Linux (not tested):** `libappindicator` needs a GTK loop GPUI does not run;
`tray-icon`'s `ksni` feature (D-Bus, no GTK) matches doc 02's deferred `ksni`.
`global-hotkey` is X11-only.
16. **Sleep:** the instance survived a 4.5 h sleep in the tray and kept its hotkey
(observed once; S2-M8).
## Manual checklist (Kokone)
Build with `cargo build --release --locked` in `spikes\s2-tray-hotkey` and start
`.\target\release\s2-tray-hotkey.exe --test-control`. `s2-driver ctl stats` prints the
counters; the log is `logs\events-<pid>.log`. Quitting from the tray removes the Run
value if it is set (spike only).
| ID | Check | Expected |
|---|---|---|
| S2-M1 | **Hour of use.** Work normally for 60 min; every few minutes, tally on paper: (a) `Ctrl+Alt+Shift+F9`; (b) left click on the icon; (c) menu › Lock; (d) menu › Show/Hide; (e) close with ×. Include presses with other apps in front, full-screen video and the window minimised. Then `s2-driver ctl stats` and `py -I analyze.py logs\events-<pid>.log` | Hotkey count = (a), left clicks = (b), menu events = (c) + (d); `gaps=0 dups=0`; each press acted once; no stuck modifiers |
| S2-M2 | Pin the icon (Settings › Personalisation › Taskbar › Other system tray icons), click it | On the taskbar; the window comes to the front |
| S2-M3 | Restart Windows Explorer from Task Manager with the window closed; then click, menu, hotkey | The icon returns with the same picture; each action counts once |
| S2-M4 | Win+B, arrows to the icon, Enter; Shift+F10 or the menu key | Record what works; neither working is an accessibility finding |
| S2-M5 | Start with `--doc10-hotkey`; press `Ctrl+Alt+Space` in Notepad, a browser, a terminal (and `AltGr+Space` on an AltGr layout) | On this PC: "not available". Find and record which program holds it |
| S2-M6 | Hotkey with the tray menu open; while dragging; while resizing | Each press counted once; no hang |
| S2-M7 | Lock/unlock picture and tooltip; `$env:S2_LOCALE='vi'` and `'ja'`; scale 150/200 %; light and dark taskbar | Icon and tooltip follow; VI and JA menu text correct; icon sharp |
| S2-M8 | Close to the tray; sleep and wake; Win+L and back; hotkey and icon | Each counted once; the window opens in front |
| S2-M9 | Menu › "Start with Windows"; Settings › Apps › Startup off, then on; `s2-driver ctl autostart query` after each | `approved=None`, then `Some(false)`, then `Some(true)`; after Quit no Run or StartupApproved value (delete the latter if left) |
| S2-M10 | Enable "Start with Windows", sign out and in | Tray icon, no window, nothing takes the foreground, near-zero CPU; a click shows the window |
| S2-M11 | With the window in the tray, start the exe from Explorer, from Start search, and with a full-screen app in front | The existing window comes forward with focus; no second icon |
| S2-M12 | Clean-up: quit; remove any `NotifyIconSettings` entry whose `ExecutablePath` is in `spikes\s2-tray-hotkey` | No process, no Run or StartupApproved value |
## Re-run
From `spikes\s2-tray-hotkey`, after `cargo build --release --locked`:
```powershell
Start-Process .\target\release\s2-tray-hotkey.exe -ArgumentList '--minimized','--test-control'
.\target\release\s2-driver.exe soak hidden 2000 11 # desktop lock, ~95 s each
.\target\release\s2-driver.exe soak foreground 2000 12
.\target\release\s2-driver.exe soak minimized 2000 13
.\target\release\s2-driver.exe tray-sim 1000
.\target\release\s2-driver.exe tray-real 10 4 # real clicks (lock)
.\target\release\s2-driver.exe instances 100 20 # second launches (lock)
.\target\release\s2-driver.exe autostart # Run value on, cold start, off
.\target\release\s2-driver.exe idle 60 hidden ; pwsh -NoProfile -File wakeups.ps1 -Seconds 60 -Label hidden
py -I analyze.py logs\events-<pid>.log
```
## Machine changes
The Run value `MuteVaultSpikeS2` was written for the autostart test and removed (verified);
`StartupApproved` was never written; Explorer's `NotifyIconSettings` entry for the spike
executable was removed (Explorer may write it again; S2-M12). No installer, no
elevation, nothing under `%USERPROFILE%\MuteVault\`, no clipboard access, no Explorer
restart. Every injected key went to the spike's own window or the driver's target window.
The logs hold the pipe name with the user's SID and stay local.
+211
View File
@@ -0,0 +1,211 @@
# Spike S3 — `SecureInput` on GPUI
> MuteVault spike report · run 2026-12-05/06 on `gpui-kit` 0.12.0 (D-33).
> Question: can a `SecureInput` element keep typed secrets out of framework strings?
> Pass criterion and fallback: doc 17 §2. Decision: D-38.
**Verdict: partial.** Everything that can be automated passes. Nine manual checks
(S3-M1…M9) are open: agents may not use a real IME, the clipboard or Caps Lock, and the
automatic suggestion-popup check saw no popup even in the normal input, so it proves
nothing either way (finding 8). If S3-M1 (IME) and S3-M3 (text suggestions) pass, S3
passes and the fallback (masked input with RR-2) is not needed for entry.
**Recommendation, taken as D-38 (flagged for review):** `SecureInput` is a custom GPUI
element that reports no text input. GPUI then removes the window's IME context while the
field has focus, which is what Microsoft prescribes for password fields. It needs no
`unsafe`, no OS call and no new crate in `mv-ui`; `mv-platform` only supplies the paste
read and the page-locked buffer.
## Setup
- Spike: `spikes/s3-secure-input/` (D-30), 3,163 lines: the app (1,581), a memory
scanner (462) and a driver that types into the app (1,042). `unsafe` only in the three
`platform` modules, each block with `// SAFETY:`.
- Dependencies: `gpui-kit` =0.12.0 (`gpui-pre` 0.3.15), `zeroize` =1.9.2 and
`windows` =0.62.2 (doc 02 pins), `rust-i18n` =4.2.4; `raw-window-handle` 0.6.2 for
comparison modes only.
- Machine: as S1 (Windows 11 build 29716, i7-14700KF, en-US layout, EVKey64, ctfmon and
TextInputHost running). Memory results are counts, not timings; the memory runs from
04:30 on had no `cargo` or `rustc` running.
- Fake secret: `Zq7-correct-horse-S3-fake` (25 characters), compiled into the driver and
scanner only, never into the app.
- The app window holds `SecureInput`, `gpui-component`'s masked `Input` (the baseline, and
doc 17's fallback) and a normal `Input` (the positive control). It prints its PID, window
handle and buffer address range, never field content.
- The scanner opens the app as the same user without elevation, walks every committed
readable region and reports every run of 6 or more password characters in UTF-8 and
UTF-16LE, with address, region type and mapped file. It writes no dumps.
- The driver types with `SendInput` (Unicode and virtual-key + scan code) under the
desktop lock, checking before every key that the spike window is in front, or posts
`WM_CHAR`/`WM_KEYDOWN` to the spike's own window without a foreground change.
## The element as built
- **Buffer:** one 1,024-byte `Box<[u8]>` (doc 04 §4's maximum), allocated once and never
reallocated. Edits shift bytes in place, freed tail bytes are wiped at once, `clear`
and drop wipe the whole allocation. No `Debug`, `Display`, `Clone` or `Serialize`.
Input beyond capacity is refused with a "Field is full" note.
- **Rendering:** only `•` repeated n times is shaped; caret, selection and the IME
candidate position come from the dot layout. The text never reaches the text system.
- **Editing:** arrows, Shift-selection, Home/End, Backspace, Delete, Ctrl+Backspace (to
start: a masked field has no visible words), Ctrl+A, Enter submits; mouse click, drag,
Shift+click, double-click. Copy and cut keys are bound to nothing.
- **Platform path:** `replace_text_in_range` copies GPUI's `&str` into the buffer and
drops control characters; `text_for_range` always returns `None`, so no text goes back
to the platform, an IME or assistive technology; IME composition is refused and counted.
- **Text services:** `accepts_text_input` returns false (finding 1).
- **Paste:** Ctrl+V and Shift+Insert read `CF_UNICODETEXT` through Win32 and decode the
UTF-16 straight into the buffer: no `String`, first line only. GPUI's clipboard API is
not used, because it returns a `String`.
- **Submit:** the allocation is moved to the application (no copy) and a fresh buffer
takes its place.
- **Caps Lock:** an indicator while focused, refreshed on modifier changes.
- **Accessibility:** role `PasswordInput` with a label and no value. Strings in EN/VI/JA.
## Criteria
| Clause | Result |
|---|---|
| Dots | **Pass.** Window captures: dots and caret only |
| Caret | **Pass** |
| Selection | **Pass** with the keyboard: 10 of 10 edit checks in three text-service modes. Mouse: **open, S3-M6** |
| Paste | Implemented, **open, S3-M4** |
| Caps Lock indicator | Implemented, **open, S3-M5** |
| IME composition off | **Pass** for the mechanism: no IME context whenever `SecureInput` has focus, every run; composition reaching the field: 0. Real IME: **open, S3-M1** |
| Text suggestions and prediction off | Mechanism in place (finding 3); **open, S3-M3** (finding 8) |
| No copy outside the zeroising buffer | **Pass**, 6 runs (below) |
| UI Automation: password field, no value | **Pass.** `IsPassword=True`, no patterns; the normal input has Value and Text patterns |
## Measurements
Each scan counts the whole password outside the buffer ("full out", UTF-8 / UTF-16LE)
and runs of 6–24 characters outside the buffer in heap or stack memory ("part"). Mapped
and image regions hold the same system strings in every scan, control included (the
word "correct" in `KernelBase.dll.mui`), and are left out.
| `SecureInput` step | In buffer | Full out | Part |
|---|---|---|---|
| Before typing | 0 | 0 / 0 | 0 |
| After typing 25 characters | 1 | 0 / 0 | 0 |
| After 25 × Backspace | 0 | 0 / 0 | 0 |
| After typing again and Enter (submit) | 0 | 0 / 0 | 0 |
The same in all 6 runs: posted messages in three text-service modes (GPUI's switch, none,
the spike's own IMM call), `SendInput` virtual-key in two, `SendInput` Unicode in one.
With text services left on (mode "none") nothing was found outside the buffer either:
the in-process text-service layer kept no copy of directly typed characters.
| Masked `Input` baseline (doc 17 fallback) | Full out | Part |
|---|---|---|
| After typing 25 characters | 3 / 1, every run | 14–26: a prefix of every length |
| After 25 × Backspace | 8–14 / 0 | 15–21 |
| After `set_value("")` (also empties undo) | 2–9 / 0 | 14–27 |
| 30 s later, idle | 1–9 / 0 | 1–9 |
Out of process: `TextInputHost.exe` never held the whole password, also not after typing
into the masked field with text services on; its partial hits were the same in the
control scan. `ctfmon.exe` cannot be opened by a same-user process and was not scanned.
A scan of the app takes about 1 s.
## Findings
1. **GPUI already has the switch.** `gpui-pre-windows` 0.3.15 checks after every paint
whether the focused input handler accepts text input. When it stops, GPUI completes
any composition and detaches the window's IME context; when a text-accepting handler is
focused again, it re-attaches the default one. `WM_CHAR` still reaches the element, so
typing works. Edge case: a composition GPUI completes on that focus change arrives as a
result string in whichever handler is focused by then (S3-M8).
2. **An IME call from outside GPUI is undone.** The spike's own detach call reported
success, yet the context was back at the next paint: GPUI caches its state. So
`mv-platform` must not touch a GPUI window's IME context; the switch belongs to the
element.
3. **Microsoft's guidance matches.** Its InputScope reference says `IS_PASSWORD` is not
supported and that password fields should have text services disabled. That rules out
input-scope and TSF calls, and with them new `windows` features.
4. **Single characters remain, briefly.** With text input off, each keystroke still
creates up to about five framework strings of 1–4 bytes (the `WM_CHAR` conversion, and
for virtual-key typing the key-name and key-char strings and their clones into
keystroke observers). They are freed when the window message returns, but not wiped.
No path ever holds more than one typed character, which is why no scan found a run of
six. Doc 04 §10's "never materialises the text" holds for the text, not for single
characters.
5. **The masked fallback is much worse in memory than S1 knew:** 3 whole copies after
typing, up to 14 after Backspace, 1–9 still there 30 s after clearing. If the fallback
is ever used for entry, RR-2 covers entry too, not only reveal.
6. **Upstream could fix the masked input in one line.** `gpui-base` 0.12's
`accepts_text_input` ignores `masked`; adding `&& !self.masked` would give the masked
input finding 1's behaviour. `InputContentType::Password` only maps to macOS. Worth
reporting whatever S3's outcome (open question 17: deferred while the maintainer's
GitHub account is suspended; the one-line change is recorded here so anyone can file
it).
7. **Focus callbacks did not fire in an inactive window.** Finding 1 does not depend on
them (the check runs at paint), but `mv-ui` must not hang security behaviour on focus
callbacks.
8. **Automatic popup detection is inconclusive.** Typing `zzzzzzzz` changed nothing in
`TextInputHost.exe`'s windows, also for the normal input. Either injected keys do not
trigger suggestions, the popup is elsewhere, or the feature is off; the registry key
has no values on this build. S3-M3 decides by hand.
9. **Keystroke-hook input methods are outside any field's control.** EVKey and UniKey
rewrite keystrokes by sending their own Backspace and Unicode input; removing the IME
context does not affect them. With Telex or VNI on, a master password may be stored
differently from what the user thinks they typed (S3-M2; open question 16, decided:
D-44).
10. **Clipboard-history paste cannot be told apart.** Win+V puts the item on the
clipboard and sends Ctrl+V, so doc 12 §4's "never accepts paste from the clipboard
history" cannot be implemented as written. The choice is "accepts paste" or "refuses
all paste" for the master password (open question 15, decided: D-44).
11. **The buffer is not page-locked.** It is an ordinary heap allocation. It lives
seconds, but a page-out would write it to the page file. It should be `mv-crypto`'s
secret type on a page-locked allocation from `mv-platform` (doc 04 §10, doc 10 §8).
12. **The spike shows a character count** to make tests readable. The product must not:
it tells the length to anyone looking at the screen.
13. **Licences:** `cargo deny` fails only on `xxhash-rust` from `gpui-kit` 0.12 (S1b
finding 9). S3's own crates pass.
14. **Tooling:** cargo-deny is not installed on the PC (the agent built 0.22.1), and in
0.22 `--config` goes before `check`. The desktop lock was held by S4 for about 4.6 h;
S3 worked around it by posting messages. A stale-lock rule would help the next run of
parallel spikes.
## Manual checklist (Kokone)
Build once with `cargo build --release --bins` in `spikes\s3-secure-input`, start
`.\target\release\s3-secure-input.exe`, and type `status` + Enter in its console to see
focus, character count and IME context. Use only the fake password above.
| ID | Steps | Expected |
|---|---|---|
| S3-M1 | Microsoft Japanese IME on. Type `nihon` in SecureInput; then in Notes; back in SecureInput type `a` | SecureInput: five dots, no underline, no candidate window, never a "WARNING: IME composition" line. Notes composes normally (control). Back: one more dot |
| S3-M2 | EVKey Telex: type `aa`, then `dd`. VNI: clear, type `a6` | Record the dot counts (2 = left alone, 1 = converted). Either is acceptable (open question 16, decided: D-44) |
| S3-M3 | Note whether Settings → Time & language → Typing → "Show text suggestions when typing on the physical keyboard" is on (turn it on for the test if needed, back after). Type `zzzzzzzz` into Notes, SecureInput, the masked field | Notes: popup (else the test is void). SecureInput: no popup. Masked: popup |
| S3-M4 | Copy the fake password in Notepad; Ctrl+V, clear, Shift+Insert. Paste two lines `abc`/`def`. Ctrl+C in SecureInput, paste into Notepad. Scan with the password pasted, copy something else, scan again | 25 dots, 25 dots, 3 dots; Notepad gets the old clipboard. Scan 1: one copy in the buffer; record the clipboard's own copy. Scan 2: record whether it is gone |
| S3-M5 | Focus SecureInput, press Caps Lock twice | The indicator appears and disappears at once; not shown when unfocused |
| S3-M6 | Type 10 characters; click between dots; drag across 3; double-click; Shift+click; type over a selection | Caret at the gap; exactly the dots crossed; all; extends; replaces |
| S3-M7 | Narrator. Tab to SecureInput, type 3 characters, Shift+Left, Left, Right | Label and "password, edit"; characters never spoken |
| S3-M8 | Japanese IME on: type `nihon` in Notes without committing, click SecureInput | The composition ends in Notes; SecureInput stays at 0, no WARNING line |
| S3-M9 | Settings → Privacy & security → Inking & typing personalization → personal dictionary | Record whether the fake strings typed into Notes or the masked field appear; clear if wanted |
If S3-M1 or S3-M3 fails, nothing in the app holds the text (finding 4 is unchanged), but
typed text would reach out-of-process text services. The fallback would then be the
masked input with RR-2 extended to entry (finding 5) plus the doc 07 §5 text-input
exposure; `SecureInput` would still be better in memory and would stay, with only the
text-services clause moved to RR-2.
## Re-run
From `spikes\s3-secure-input`, after `cargo build --release --bins`:
```powershell
cargo test --release --bin s3-secure-input
.\target\release\s3-drive.exe edit --mode gpui # takes the desktop lock
.\target\release\s3-drive.exe memory --mode gpui --typing vk # about 3 min
.\target\release\s3-drive.exe memory --mode gpui --typing unicode
.\target\release\s3-drive.exe memory --mode none --typing vk # control
.\target\release\s3-drive.exe memory --mode gpui --input post # no foreground change
```
## Machine changes
No registry writes (a few `HKCU\Software\Microsoft\Input` keys were read), no clipboard
access, no keyboard or input-language change. The fake strings typed into fields with text
services on may be in the Windows typing dictionary (S3-M9). No memory dumps were written
anywhere, and no spike process is left running.
+183
View File
@@ -0,0 +1,183 @@
# Spike S4 — Native messaging round trip
> MuteVault spike report · run 2026-12-05/06. Question and pass criterion: doc 17 §2
> (extension ↔ host ↔ pipe ↔ app echo under 50 ms; per-user registration without admin;
> the service worker stays alive while the port is open; the host exits cleanly when the
> browser closes). Fallback: drop a browser from the P0 list. Decision: D-48.
**Verdict: pass.** Every clause passed in Chrome 158, Edge 159, Firefox 160 and Brave
1.100 (Chromium 158), with per-user `HKCU` registration and no administrator rights. No
browser is dropped from P0. The browser numbers are preliminary (the PC was shared). The
driver part was re-run on a quiet PC on 2026-12-06 with the same results; the browser
part is S4-M5. Outside the criterion:
- doc 17 §4's gate "Brave/Vivaldi listed as supported": **Brave is met; Vivaldi is not
tested** (not installed, and the spike may not install software): S4-M1;
- open question 1 is answered: Brave reads `HKCU\Software\Chromium\NativeMessagingHosts`
first, then Chrome's key, and never the `BraveSoftware` key (finding 1, measured).
Three findings change the design: the host must never start the app as its own child
(Firefox kills it, finding 5); Chromium starts the host through `cmd.exe` (finding 4);
the Store build needs the manifest file, not only the registry value, outside the
virtualised AppData (finding 13).
## Setup
- Spike: `spikes/s4-native-messaging/` (D-30), 1,699 lines of Rust (`s4-app` console
stand-in for the GUI, `s4-host` relay, `s4-driver`, `platform`, framing), 227 lines of
extension code, Node and Bash test tooling, PowerShell register/unregister scripts.
`unsafe` only in `platform.rs`, each block with `// SAFETY:`.
- Crates, pinned `=`: `serde_json` 1.0.154, `interprocess` 2.4.9, `widestring` 1.2.1,
`windows` 0.62.2. All 29 third-party crates have allowed licences (checked by hand
against `deny.toml`: cargo-deny is not installed).
- **App:** pipe `\\.\pipe\MuteVault.<user-SID>.v1` with a protected user-only DACL,
remote clients rejected, the first-instance flag. On each connection it checks the
client process: same session, same user SID, image path in an allow-list, and the pid
in the host's preamble equal to the pipe's client pid.
- **Host:** stateless relay of 4-byte-length JSON frames between stdio and the pipe. It
checks the caller id from its command line against ids compiled in, opens the pipe with
identification-level impersonation and overlapped I/O, checks the server (owner SID,
process user and image), sends a preamble, then relays. It caps both directions at
doc 08's 1 MiB and exits on an oversized frame, stdin EOF or a broken pipe.
- **Extension:** plain-JavaScript MV3, `nativeMessaging` only, a throwaway fixed key for
Chromium and a fixed add-on id for Firefox.
- Browsers ran with throwaway profiles under the desktop lock. Vivaldi is not installed.
- Machine: as S1, Node 26.13.1. No `rustc` ran at the start or end of the reported runs.
## Criteria
| Criterion | Result |
|---|---|
| Echo under 50 ms | **Pass** on all four, on an open port. p99 for ~100 B: Chrome 0.5 ms, Edge 1.6, Brave 1.3, Firefox 34 in the first round after connecting and 1 once warm; for 64 KiB: 1.1, 2.6, 3.5 and 14 (3 warm). One echo took 103 ms, in Firefox's first round (warm-up). The first reply after `connectNative`, host start included, took 42–82 ms in Chromium browsers and 33–64 ms in Firefox (finding 7) |
| Per-user registration without admin | **Pass.** Only `HKCU` keys from a non-elevated shell; all four started the host. Brave uses Chrome's (or Chromium's) key (finding 1); Edge also accepts Chrome's and Chromium's (finding 2) |
| Service worker alive while the port is open | **Pass.** Chromium browsers: the same worker answered after 180 s idle on the same host process; with the port closed it stopped after about 30 s. Firefox's event page: the same instance after 180 s with the port; a new one 45 s after closing it |
| Host exits cleanly when the browser closes | **Pass** on all four: the host ended by itself on stdin EOF, before the browser process had exited (100–170 ms after the close); no browser had to kill it. Extension reload: the host exits by itself 63–97 ms after the reload |
| Limits | Host → browser exactly 1 MiB delivered in all four; 1 byte more makes the host exit. Browser → host over 1 MiB: the host exits on its cap (finding 8) |
## Measurements (preliminary)
| | Chrome 158 | Edge 159 | Brave 1.100 | Firefox 160 |
|---|---|---|---|---|
| `connectNative` → first reply (ms) | 42–47 | 45–82 | 44–72 | 33–64 |
| Echo ~100 B, first round, p50 / p99 / max (ms) | 0.1 / 0.5 / 0.6 | 0.3 / 1.6 / 1.8 | 0.3 / 1.3 / 1.6 | 3 / 34 / 103 |
| Echo 64 KiB, p50 / p99 / max (ms) | 0.6 / 1.1 / 1.4 | 1.2 / 2.6 / 6.8 | 1.2 / 3.5 / 4.2 | 2 / 14 / 49 |
| Echo ~100 B, later rounds, p99 (ms) | 0.2 | — | — | 1 |
| Background stopped after the port closed | 30.1 s | 30.2 s | 30.2 s | within 45 s |
| Host started as | `chrome.exe → cmd.exe → host` | `msedge.exe → cmd.exe → host` | `brave.exe → cmd.exe → host` | `firefox.exe → host` (job object) |
Without a browser (driver, n = 1,000; quiet re-run of 2026-12-06, first run in
brackets): the relay adds p99 0.041 ms for 100 B (0.048) and 0.143 ms for 64 KiB
(0.148); host start-up to first reply 16.0 ms p50 directly (17.4) and 25.3 ms through
`cmd.exe` (28.3); the host exits 4–7 ms after stdin closes; "app not running" is
answered in 15 ms (24), and the next request after the app starts is served. The
security, limit and lifecycle cases give the same results in both runs. An idle host
holds 1.2 MiB of private memory, 85 handles and 5 threads.
## Findings
1. **Brave does not read the `BraveSoftware` key.** Brave builds Chromium with Chromium
branding and does not override the launch code, so it looks under
`Software\Chromium\NativeMessagingHosts`, then `Software\Google\Chrome\…`. Measured:
Chrome key only → connects; `BraveSoftware` key only → "host not found"; Chromium key
only → connects; Chromium and Chrome keys → the Chromium entry wins. Chrome itself
does not read the Chromium key. The Chrome key covers Chrome and Brave.
2. **Edge reads its own key, then Chromium's, then Chrome's** (documented by Microsoft,
and measured). Keep writing the Edge key, which wins over a stale Chrome entry. Never
write `Software\Chromium\…`: Edge and Brave read it before Chrome's key, so an entry
there would only shadow the Chrome one.
3. **Vivaldi is untested.** KeePassXC registers it through Chrome's key, consistent with a
Chromium-branded build, but that is not proof. Best-effort until S4-M1 passes.
4. **Chromium starts an `.exe` host through `cmd.exe`** (`%COMSPEC% /d /s /c` with the
quoted path, origin and parent window). The `cmd.exe` lives as long as the host and
costs 9–11 ms of start-up; it also expands `%VAR%` in the path. So the app's peer
check must not expect the browser to be the host's parent, the manifest path must not
contain `%`, and nothing in the host may depend on its parent process.
5. **Firefox kills everything the host started when the host exits.** It runs the host in
a job object and terminates the job on disconnect (after 3 s) and when the host exits,
killing every child not created with `CREATE_BREAKAWAY_FROM_JOB`. Chromium terminates
only its direct child (`cmd.exe`), which does not reach the host, so exiting on EOF is
the only thing that ends a Chromium host. If "Open MuteVault" (doc 08 §8) started the
app as the host's child, the app would die at the next port close in Firefox.
6. **An open native port keeps the MV3 background alive** in all four (measured, not a
documented guarantee). The status push of doc 08 §8 can rely on one long-lived port
per browser profile, with a reconnect path for updates, reloads and
`app_not_running`. It means one running host per profile, which costs little.
7. **Latency is dominated by host start-up, not by the relay.** The 50 ms budget holds
per request on an open port; the first request pays 33–82 ms of start-up. So the
extension opens the port when the popup or a command needs it and keeps it open;
start-up gets its own budget (under 150 ms on this machine).
8. **Browser limits and doc 08's 1 MiB cap.** Both browser families accept at most 1 MiB
towards the extension, but Chromium allows 64 MiB and Firefox 4 GiB towards the host.
The host enforces the cap from the 4-byte header before allocating, and exits (fail
closed); the extension then sees only a generic error, so it checks the size before
posting. The app keeps every response well below 1 MiB (cap `find_logins` results).
9. **`interprocess` 2.4.9 is not enough, and synchronous pipe handles serialise.** Its
client cannot set identification-level impersonation (as S2 found), it brings
`windows-sys` 0.61 beside `windows` 0.62, and a full-duplex relay needs overlapped
handles: on a synchronous handle a pending read blocks a write from another thread.
Implementing the pipe in `mv-platform` directly on `windows` takes about 300 lines
with the security checks.
10. **Test tooling:** branded Chrome 158 ignores `--load-extension` (CDP
`Extensions.loadUnpacked` works); Edge and Brave accept it. Firefox's WebDriver BiDi
installs a temporary add-on but cannot open its pages without an extra environment
variable. Doc 08 §10's end-to-end tests need Chrome for Testing or the CDP path.
11. **The host's start-up path must stay short.** Walking its ancestor processes added
about 22 ms. The host does only doc 08 §4's four steps; caller-process checks belong
in the app, which gets the pid from the pipe.
12. **Doc 08 §4 contradicts itself:** "does not parse message bodies" and "answer every
request with `app_not_running`" cannot both hold, since the answer echoes the request
`id`. The host parses only `id`, and only in that state.
13. **The Store build (for S13):** the browser reads the manifest path from the registry
and opens the file itself, then starts the host through `cmd.exe` (Chromium) or in a
job (Firefox). So both the registry value and the manifest file must be outside the
package's virtualised HKCU and AppData, the host path must be startable by `cmd.exe`
(an app-execution alias is a candidate), and the app's peer check cannot pin an image
path, which changes with each package version: it needs the package family name or
the signature.
14. **Per-user registration can be switched off by policy** (`NativeMessagingUserLevelHosts`,
and block or allow lists for host names). Settings should detect these and say why
the extension cannot connect (not tested: S4-M4).
15. **Long-lived connections.** The port, host and worker survived a 4.4 h sleep in one
Chrome run. The app must expect connections that last for days, and lock-on-sleep
pushes `status` over them.
16. **The pipe defences work (driver).** Wrong origin, wrong add-on id or no arguments: the
host exits before touching the pipe. The remote path `\\localhost\pipe\…` is refused.
A same-user client with a wrong image is dropped by the app. A same-user squatter that
holds the name first makes the app fail (first-instance flag), and the host refuses
it. A squatter in another account is S4-M3; the host's owner-SID check stops it.
## Manual checklist (Kokone)
From the spike directory, without administrator rights. Build with `cargo build
--release; Copy-Item target\release\s4-host.exe target\release\s4-host-alt.exe` and
`node tools\build-ext.mjs`; afterwards `pwsh -File unregister.ps1` must print
`verify: no spike_s4 key left`.
| ID | Check | Expected |
|---|---|---|
| S4-M1 | On a VM or PC with Vivaldi: `register.ps1 -Targets Chrome`, start `s4-app.exe`, start Vivaldi with a profile under `profiles\`, load `build\chromium` unpacked, open the extension's `results.html`, *Connect + ping*. Repeat with `-Targets Chromium` only | Both connect; the app logs the extension origin. Record the Vivaldi version |
| S4-M2 | Watch the extension tab during a `node tools\browser-test.mjs full --browser <b>` run | Status and benchmark shown; no console errors |
| S4-M3 | With a second local standard account, create a server on **your** pipe name that admits everyone (PowerShell `NamedPipeServerStreamAcl`), then start your host | The other account can take the name; your host refuses the server (owner SID) and answers `app_not_running`; your app fails to start and says so |
| S4-M4 | Only if managed PCs matter: on a VM set Chrome's `NativeMessagingUserLevelHosts` = 0, register, run a lookup | "Host not found"; MuteVault's Settings must explain the policy |
| S4-M5 | Quiet re-run: `s4-driver.exe all`, then `bash tools/run-all-browsers.sh` (about 30 min), `node tools\summarize.mjs` | Same conclusions; every unregister verifies. The driver part was done on 2026-12-06 (same results); the browser part remains |
| S4-M6 | Store build: part of S13 (finding 13) | — |
## Re-run
```powershell
target\release\s4-driver.exe all --out results\driver-all.json # no browser, no lock
node tools\browser-test.mjs full --browser chrome # or edge, brave, firefox; lock, 4-6 min
node tools\browser-test.mjs bench --browser firefox --pings 500
node tools\lookup-matrix.mjs # registry lookup order
cargo test --release --locked # framing unit test
```
## Machine changes
`HKCU` only, no admin: the spike's host entry under the Chrome, Edge, Mozilla,
`BraveSoftware` and Chromium `NativeMessagingHosts` keys was created per run and removed
by `unregister.ps1`, which searches `HKCU\Software` afterwards; the final check found no
match and the five keys hold exactly their baseline entries. Browser profiles lived
under `profiles\` and were deleted after each run; the real profiles, `%LOCALAPPDATA%`
and `%USERPROFILE%\MuteVault\` were not touched, and the maintainer's running Edge was
left alone. No software was installed. One Chrome run held the desktop lock through a
4.4 h sleep and was stopped by hand.
+417
View File
@@ -0,0 +1,417 @@
# Spike S5 — Crypto core and vault format
> MuteVault spike report · run 2026-12-05/06 in two parts: A, crypto core
> (`spikes/s5a-crypto-core/`); B, vault format and save pipeline
> (`spikes/s5b-vault-store/`). Pass criterion (doc 17 §2): all known-answer tests pass;
> Argon2id timing measured for the presets on the dev PC and a low-end machine; lane
> threading of `argon2` 0.6.0 determined; a 1,000-iteration kill-during-save test never
> corrupts. Fallback: adjust presets; revisit the save pipeline. Decisions: D-34…D-37
> (proposed) and D-39…D-43 (chosen 2026-12-06 on Kokone's delegation), all flagged for
> review.
**Verdict: partial.**
- **Known-answer tests pass** for every independent vector doc 04 §13 names, and the
construction tests pass. The field-box regression vector waits for M1, where it is
generated from D-39's `AAD_field` encoding (finding A6).
- **Lane threading is determined:** one thread unless `argon2`'s `parallel` feature is on
(finding A1). The feature stays off (D-40).
- **Kill-during-save passes:** 10,000 random kills and 220 at fixed points, **0 corrupt,
0 missing**. Every surviving vault opened and was byte-for-byte version N or N+1.
- **The fallback "revisit save pipeline" triggers, narrowly.** The vault file needs no
change. Step 5 (the backup) and the leftover rule change, and the lock and sidecar
rules are written down (findings B2–B6; D-34, D-35).
- **Quiet re-run done** (2026-12-06, no compiler running): the Argon2id timings below
replace the busy ones, and the kill test passed again (6 × 1,000 kills, 0 corrupt,
0 missing; S5b-M1). **Open:** the low-end Argon2id run (S5-M1, S5-M2); the VM
power-cut test (S5b-M3); Miri (the PC has no nightly toolchain).
- **The crypto and format choices the docs left open** are listed under "Decisions".
The spike took none of them; they were chosen on Kokone's delegation of 2026-12-06
(D-39…D-43, flagged for review).
## Setup
- **Machine:** the maintainer's PC: i7-14700KF (20 cores, 28 threads, hybrid P/E cores),
32 GiB, AVX2, Windows 11 build 29716; vaults on an NVMe SSD, NTFS. Rust 1.100.0.
- **Pins:** the doc 02 versions, exact (`argon2` 0.6.0, `chacha20poly1305` 0.11.0,
`hkdf` 0.13.0, `ciborium` 0.2.2, `unicode-normalization` 0.1.26, …); `totp-rs` 6.0.0
as a dev-dependency; `rayon` 1.12.0 only with the spike's `parallel` feature. Feature
choices: finding A3.
- **Part A** (2,738 lines): the doc 04 constructions as a library (736 lines), 40 tests,
a benchmark (`unsafe` only in its `platform.rs`), a fixture generator, a cross-check.
All 40 tests pass in debug and release, with and without `parallel`; clippy and fmt
are clean; `cargo deny` bans, licences and sources pass in both feature sets.
- Independent vectors come from primary sources, each cited in its test: RFC 9106
§5.3, RFC 5869 App. A, draft-irtf-cfrg-xchacha-03 App. A.3.1, libsodium
`aead_xchacha20poly1305.{c,exp}`, RFC 6238 App. B, UAX #15 rev. 58 Tables 6 and 8.
- Self-generated regression vectors (fake inputs) were recomputed by a second
implementation (Node 26.13.1: OpenSSL 3.5.9 Argon2id and HKDF, ICU 78.3 NFKC):
16/16 agree. Their XChaCha20-Poly1305 parts rest on the primitive vectors.
- **Part B** (2,719 lines of Rust, 78 of PowerShell): MVLT v1 exactly as doc 05 §2–§3
give it, the doc 05 §5 steps, the lock, backups with doc 05 §6 retention, the sidecar,
and a kill harness. `unsafe` only in `platform.rs` (two `MoveFileExW` calls). 11 unit
tests pass. Not fmt- or clippy-clean against the repository configuration (style lints
and the banned `std::process::Command`, finding B14). `cargo deny` was not available
to this part; licences read from `cargo metadata` are all permissive.
- Fake data in two sizes: **large**, 8,000 items, 5,193,991 bytes; **small**, 3 items,
one 4 KiB bucket. KDF at the doc 04 §5 creation floor (19 MiB, t 2, p 1).
- Step 5 in three variants: `copy` (the doc read literally: `std::fs::copy` into the
final name), `atomic` (temp file, flush, rename without replacing) and `link`
(`std::fs::hard_link`, falling back to `atomic`). Step 6 in two: `wt` (`MoveFileExW`
with `REPLACE_EXISTING | WRITE_THROUGH`) and `plain` (`std::fs::rename`).
- Each iteration, a fresh child opens N through the full unlock path, changes it, and
on `GO` saves N+1, printing a marker after each step. The parent kills it
(TerminateProcess) before `READY` (5 %), uniformly over 1.5 × the median save
(70 %), or around the backup and replace steps (25 %). As the next opener it takes
the lock (retrying up to 2 s), classifies the vault (old, new, corrupt, missing) and
the leftovers, opens every backup and checks the sidecar. The **stall test** kills
the child while it is blocked after a chosen marker, five times per marker.
## Criteria
| Clause (doc 17 §2, S5) | Result | Evidence |
|---|---|---|
| Argon2id: RFC 9106 | **Pass** | §5.3 (m 32 KiB, t 3, p 4, secret and AD), with the crate's and with caller-owned memory |
| HKDF-SHA256: RFC 5869 | **Pass** | A.1–A.3, PRK and OKM |
| XChaCha20-Poly1305: CFRG draft, libsodium | **Pass** | Draft A.3.1 through the crate and the wrapper; libsodium with and without AD |
| TOTP: RFC 6238 App. B | **Pass** | 18/18 codes, all three hashes |
| Slot wrap/unwrap | **Pass** | Round trip; wrong password; all 704 bits of the 88-byte `AAD_slot`; nonce and `wrapped_vk` bits; tampered KDF parameters |
| Payload | **Pass** | Every bit of a 4,420-byte file fails with `Authentication`; an old slot grafted into a newer header fails |
| Field boxes | **Behaviour passes; vector open** | Moved to another item, field (2, 100, 1000, 10001) or vault, or opened with `K_payload`: all fail. Vector at M1, from D-39's `AAD_field` |
| Normalisation | **Pass** | Five input-method shapes of "mật khẩu" give the same NFKC bytes and the same MK; UAX #15 Tables 6 and 8 (21 rows) |
| Nonce policy | **Pass** | 30,000 nonces (payload, field, slot): all distinct, none all-zero |
| Zeroisation | **Pass; Miri open** | `SecretBox` and `Zeroizing` wipe on drop; the Argon2 memory is full after hashing and empty after wiping; a compile-time check shows the secret types implement none of `Debug`, `Display`, `Clone`, `PartialEq`, `Hash` |
| Hostile parameters before any KDF work | **Pass** | 8 out-of-range sets, each rejected in under 50 ms |
| Golden fixtures | **Not applicable yet** | No released version; v0 at M1 |
| Argon2id timing, dev PC | **Pass** | Quiet re-run, 2026-12-06; table below |
| Argon2id timing, low-end machine | **Open** | S5-M1, S5-M2 |
| Lane threading determined | **Pass** | Source and measurements (finding A1); KATs pass with `parallel` |
| 1,000-iteration kill-during-save never corrupts | **Pass** | Final run 6 × 1,000 (large, small × link, copy, atomic): 2,769 old, 3,231 new, **0 corrupt, 0 missing**. First run 4 × 1,000: 0 corrupt, 0 missing. Stall test: 220 kills, each as expected. Quiet re-run (2026-12-06): 6 × 1,000, 2,662 old, 3,338 new, **0 corrupt, 0 missing**; stall test 110 kills, each as expected |
| Leftover temp and lock files handled | Done | Findings B4, B5 |
| Doc 14 §3 "Save" must-haves | 2 of 3 | Changed-underneath check and lock refusal are unit tests. "A failed verify leaves the original untouched" is untested: no fault injection |
## Measurements
### Argon2id
Release build, a fresh process per run, timer over allocate + hash + wipe, N = 10.
Quiet re-run of 2026-12-06 (no compiler running, before and after):
| Config | m / t / p | Default: median / p90 ms | `parallel`: median / p90 ms | Peak working set |
|---|---|---|---|---|
| Floor | 19 MiB / 2 / 1 | 17.4 / 18.4 | 17.2 / 19.5 | 24.2 MiB |
| **Standard** | 64 MiB / 3 / 4 | **88.4 / 91.1** | **43.8 / 45.2** | 69.2 MiB |
| **Strong** | 256 MiB / 4 / 4 | **474.2 / 482.6** | **215.4 / 223.9** | 261.2 MiB |
| Standard, p 1 | 64 MiB / 3 / 1 | 86.5 / 88.8 | 95.5 / 99.0 | 69.2 MiB |
| Standard, p 2 | 64 MiB / 3 / 2 | 85.4 / 90.6 | 58.5 / 60.4 | 69.2 MiB |
| Calibration cap | 64 MiB / 10 / 4 | 269.9 / 274.3 | 91.9 / 97.7 | 69.2 MiB |
- The busy runs of 2026-12-05 were 10–28 % slower (Standard 113.0 / 48.2 ms, Strong
601.7 / 242.7 ms, cap 315.8 / 116.7 ms); the conclusions do not change.
- `cpu/wall` stays near 1.0 in the default build; with `parallel` it is 1.6 at p 2 and
2.6–3.3 at p 4. Threads: 3–4 by default; 31–32 with `parallel` on rayon's global pool,
even at p 1; 7–8 with a dedicated 4-thread pool, 9–14 % faster (Standard 37.8 ms,
Strong 195.6 ms).
- **Paired comparison** (`measure-lanes.ps1`, builds alternated run by run): `parallel`
is 2.25× faster at Standard, 2.46× at Strong, 1.61× at p 2 and 0.98–0.99× at p 1
(quiet); 2.58× and 2.86× with four compilers busy.
- **Variance:** Standard in the default build ranged 113–199 ms between busy sessions at
`cpu/wall` 1.0, and Strong took 474 ms in the benchmark and 540 ms in the paired run
a minute later, both quiet: most likely E-core or memory-bandwidth contention
(finding A12).
### Save and open
The kill runs of 2026-12-05 ran under compile load; the other rows are quiet.
| Measurement | Value |
|---|---|
| Save, large (5.0 MiB), `GO` to sidecar done, p50 / p95 of 30, quiet | 2026-12-05: link + wt **42.9 / 44.8 ms** · copy + wt 46.5 / 48.0 · atomic + wt 63.2 / 88.6 · link + plain 52.4 / 69.8. 2026-12-06, idle drive: link + wt **57.9 / 59.6** · copy + wt 60.9 / 62.9 · atomic + wt 92.0 / 93.3 · link + plain 58.3 / 59.6 |
| Save, large, straight after the 9-minute kill test, p50 | link + wt 91.9 ms, copy + wt 90.0 (fsync 59.5 and 54.1 ms); the next two batches atomic + wt 35.5, link + plain 28.4 (fsync 3.6 and 3.5 ms) |
| Steps, large, link + wt, p50 | encode 10.9 · seal 4.2 · create 0.1 · write 1.0 · **fsync 17.1** · verify 7.0 · backup 0.26 · replace 0.33 · sidecar 2.0 · thinning 1.9 ms (2026-12-05); fsync 32.5 ms on the idle drive |
| Which steps move | The CPU steps do not: encode + seal + write ≈ 16 ms and verify ≈ 6.9 ms in every run. The flushes do: fsync of 5 MiB took 3.5–59.5 ms, and the write-through replace plus the sidecar flush rose from about 2 ms to 9 ms straight after the kill test |
| Backup step, large, p50 | link 0.25 ms · copy 2.5–2.9 ms · atomic 16.6–33.2 ms quiet (its own flush), 41.8 ms under load |
| Replace step, p50 | write-through 0.33 ms (large), 0.46 ms (small); `std::fs::rename` 0.11 / 0.13 ms |
| Save, small (4 KiB), p50 | 2.2–5.1 ms with write-through, 2.0–2.3 ms with `plain`; the sidecar's own flush is the largest part |
| Save, large, under compile load | p50 62.9 ms, **p95 147.8 ms**, max 636 ms; `GO` to `synced` up to 363 ms |
| Open in the child (lock, read, Argon2id at the floor, decrypt, decode, leftover scan), p50 | large 32.2–33.3 ms, small 13.6–14.6 ms, so decrypt + decode of 5 MiB ≈ **20 ms** |
| Lock wait of the next opener after a kill | max 31.2 ms (first run), 0.76 ms (final run), 0.15 ms (quiet re-run); never 2 s |
| Leftovers after kills, final run | Vault temps 2,177: 2,158 complete newer vaults that authenticate (99.1 %), 19 empty, 0 partial. Backup temps 505, atomic mode only. Sidecar temps 505. The next opener removed them all |
| Bad backups (do not open, or name ≠ counter) | copy mode: 71 of 102 and 184 of 211 kills in the backup step (final run); 67 and 129 bad backups in the quiet re-run. link and atomic: **0** in 10 loops and in the quiet re-run's 4 |
| Sidecar | 0 unparseable, 0 false rollback warnings (both runs) |
| Whole kill script | about 10–12 min under load; 9.0 min quiet |
Kills landed in all 13 phases: 21 between `sealed` and `tmp_created`, 33 in the write,
987 in the fsync, 957 in the backup, 890 in the replace (32 left the old vault and a
complete temp, 858 the new vault, none a missing name).
## Findings
### Part A: crypto core
1. **`argon2` 0.6.0 runs lanes in parallel only with its `parallel` feature.** By
default `for_each_segment` loops over slices × lanes on the calling thread. With the
feature it runs each slice's lanes with `into_par_iter()` on rayon's *current* pool:
the global one (a thread per logical CPU, alive for the life of the process) unless
the call runs inside `ThreadPool::install`. Output is identical (RFC 9106 at p 4, all
regression vectors, OpenSSL). p 4 is 2.2–2.9× faster than p 1; it cannot reach 4×,
because each pass has 4 synchronisation points and the work is memory-bound. The
feature adds `rayon` 1.12.0, `rayon-core` 1.13.0, `crossbeam-deque` 0.8.8,
`crossbeam-epoch` 0.9.21, `crossbeam-utils` 0.8.23 and `either` 1.19.0, all MIT OR
Apache-2.0, with substantial `unsafe` in rayon-core and crossbeam.
2. **`Argon2::hash_password_into` frees its memory without wiping it,** even with the
`zeroize` feature, which wipes only H0 and the final block. The freed memory holds
every lane's last block; their XOR hashes to MK, so a copy of it is as good as the
key for that slot. The spike calls `hash_password_into_with_memory` with a buffer it
owns and wipes; that needs `Block: Zeroize`, hence the `zeroize` feature. Whether to
page-lock the 64–256 MiB buffer is open: `VirtualLock` at that size needs a larger
working-set minimum.
3. **Crate features matter, and doc 02 did not pin them.** `argon2`:
`default-features = false` (drops PHC strings), `alloc`, `zeroize`.
`chacha20poly1305`: `default-features = false`, `alloc`, `zeroize` (wipes the
cipher's key copy). `totp-rs`: `alloc`, `zeroize`. Also: `secrecy::SecretBox` has a
redacting `Debug`, so it needs a wrapper to have none (rule 1); `totp_rs::Secret`
implements `Display` and `Clone` and `Totp` derives `Debug` and `Clone`, so `mv-otp`
builds a `Totp` only for the moment it is used; `SecretSlice::from(Vec)` can
reallocate and leave the old buffer unwiped, so variable-length secrets use
`Zeroizing<Vec<u8>>` with a fixed capacity.
4. **Calibration stops at its cap on the dev PC, and the docs disagree on the target.**
Doc 04 §5 raises passes toward about 500 ms with a cap of 10; at 64 MiB and t 10 this
PC takes 270 ms quiet (92 ms with `parallel`). Doc 00 §6 and doc 05 §9 expected
unlock in 0.5–1.5 s. Not a weakness (t 10 is stronger than Standard), but
calibrating through passes alone leaves memory unused. A vault calibrated here opens
proportionally slower on a slow machine; S5-M1 gives the factor.
5. **Doc 04 §6 lists the parts of `AAD_slot` but not their encoding.** The spike uses
doc 05's on-disk widths, little-endian, with m = `m_kib`: 88 bytes. `AAD_slot` leaves
out the slot's `created_at` and `flags`; the payload AAD covers them right after the
unwrap, which is fine but unstated.
6. **`AAD_field` is under-specified (doc 04 §8, doc 06 §9).** Neither `item_id` (16 raw
bytes or text) nor `field_id` (width, byte order) is fixed, and a custom field's id is
an unbounded `uint` to which doc 06 §9 adds 10000. Doc 06 §9 binds a passkey key box
"to the credential id as well"; the doc 04 formula does not. The spike's
`src/field.rs` carries the options as a `DECISION NEEDED`.
7. **HKDF details are implicit (doc 04 §3, §6).** The spike reads `HKDF(a, b, c)` as
(salt, IKM, info), `HKDF(VK, label)` as having no salt (RFC 5869: zeros), and labels
as ASCII bytes without a terminator. No salt is stated for type 2 (recovery, v1) or
0x80 (Hello). Types 2, 3 and 0x80 are not implemented; for type 3 the spike only shows
that `argon2`'s secret input works.
8. **Bounds for `kdf_id` = 0 slots are undefined (doc 05 §3, doc 04 §5).** `m_kib` is
0, but `t` and `p` are unstated; applied blindly, the opening bounds reject recovery.
9. **NFKC depends on the Unicode version (doc 04 §4).** `unicode-normalization` 0.1.26
is Unicode 18.0.0; Node's ICU is 17.0; every vector agrees. Unicode's stability
policy covers only code points assigned in the older version, so a password with a
code point that a later version assigns a compatibility decomposition derives a
different key after a crate update: rare, but a lock-out. Also unstated: whether "at
least 12 characters" counts code points, graphemes or bytes, before or after NFKC (a
decomposed "ậ" is 3 code points, 1 grapheme). The `nfkc()` iterator's buffers are not
wiped, which is part of the UI-boundary weak point (doc 04 §10).
10. **`totp-rs` 6.0.0 `Builder::build` rejects secrets under 128 bits** (RFC 4226's
minimum), but many services issue 80-bit secrets. `build_noncompliant` accepts them.
11. **Windows builds import the Visual C++ runtime by default** (`VCRUNTIME140.dll`,
`api-ms-win-crt-*`); a `+crt-static` build imports neither. Doc 15 is silent.
12. **Risk: hybrid CPUs.** Single-threaded Argon2id varied about 1.6× between sessions at
`cpu/wall` 1.0, which fits P-core versus E-core; on a quiet PC, two runs a minute
apart differed by 14 % (Strong 474 and 540 ms). If Windows puts GPUI's background
executor on E-cores (EcoQoS while minimised), unlock and calibration slow down.
13. **Tooling.** `cargo-deny` is not on the PC's PATH; part A built 0.22.1 into the
spike's `.tools/bin/` (`--config` goes before `check`). No nightly, so no Miri.
### Part B: vault format and save pipeline
1. **The vault file was never corrupt or missing, the replace included:** `MoveFileExW`
was atomic with respect to process death in all 890 replace-phase kills. Steps 1–4
and 6 of doc 05 §5 stand, and doc 07 invariant 7 holds; power loss is untested (B9).
2. **Step 5 read literally destroys backups.** `std::fs::copy` writes into the final
name, so a kill leaves a 0-byte file or a full-size file that fails authentication
(the size is set up front). A save retried within the same second repeats the name
and overwrites a good backup in place. About 80 % of kills in the backup step left a
bad backup, and retention counts bad backups among "the 10 most recent". A hard link
(0.26 ms) and an atomic copy (16.6–41.8 ms more on 5 MiB) each gave 0. An interrupted
save can leave two backups of one counter: harmless, but they use retention slots.
3. **The hard link is safe only if no code ever opens a vault file or a backup for
writing.** Until step 6 the newest backup and the live vault are the same file; after
it the backup is the old file's only name (unit test
`link_backup_keeps_the_old_bytes_after_replace`). "Purge backups" may only delete.
Under the default paths (doc 03 §8) vaults and backups share a volume, so the link
works; a vault folder on another drive gets the copy fallback.
4. **Doc 05's leftover rule is unsafe as worded and throws data away.** (a) The
`*.tmp-*` glob is unscoped, and the default `vaults\` folder holds every vault, so it
matches another vault's temp file, perhaps mid-save in another process (the P1 CLI);
(b) only the holder of that vault's lock knows no save is in flight; (c) before unlock
"valid" can only mean "the header parses"; (d) 99.1 % of leftovers were complete,
newer, authenticating vaults: the interrupted save's edits. No partial temp appeared
(TerminateProcess never tore the one 5 MiB `WriteFile`); a chunked writer could.
5. **Windows releases a dead process's lock asynchronously** (up to 31 ms here, "depends
upon available system resources" per Microsoft). With "busy lock → read-only", a
crash followed by a quick restart could open read-only for no reason. Deleting the
lock file races with a concurrent opener and can yield two holders.
6. **The sidecar needs a write rule.** A torn write leaves JSON that does not parse. The
spike writes it atomically, strictly after step 6, keeping `max(old, new)`: 505
sidecar temps, 0 unparseable sidecars, 0 false warnings. Written before step 6, a kill
between the two would cause a false rollback warning. Unstated: what an unparseable
sidecar means, what its header hash is for, and what the first save after a
deliberate restore writes (the restored counter is below the sidecar's maximum, so
every open warns until it catches up). Doc 03 §8 has no row for `state\`.
7. **Write-through conflicts with doc 03's layering.** `MOVEFILE_WRITE_THROUGH` needs
FFI, which lives only in `mv-platform`, and `mv-vault` and `mv-platform` are both
Infrastructure (doc 03 §3). The rest of the pipeline is safe std:
`OpenOptions::create_new`, `File::sync_all`, `File::try_lock` (`LockFileEx`),
`fs::hard_link`, `fs::rename`. **`fs4` and `tempfile` were not needed.**
8. **`MOVEFILE_WRITE_THROUGH` is cheap (0.2–0.3 ms) but its benefit here is
undocumented:** Microsoft describes it for moves done as copy-and-delete, and a
same-directory rename never copies. `std::fs::rename` (Rust 1.100.0) retries after
`ERROR_ACCESS_DENIED` with POSIX semantics, which replaces even a **read-only**
target; the spike's own call does not. Sharing violations (antivirus, indexer, sync
tool) were never seen.
9. **The kill test cannot see a missing fsync, and step 4 does not read the disk.**
After TerminateProcess every write already made survives in the OS cache, so a
pipeline without step 3's `sync_all` would pass. Step 4's read-back is served by the
cache: it catches encoder, key and memory errors, not media errors. The vault side
had no negative control; its detection power rests on the unit tests (every
single-byte flip fails closed) and on the same classifier flagging 255 bad backups in
copy mode.
10. **Some pad lengths cannot be reached.** `pad` is a CBOR byte string whose length
prefix takes 1, 2, 3 or 5 bytes, so the pad entry can never be exactly 0, 25 or 258
bytes; at those gaps the writer must jump to the next 4 KiB bucket (unit test
`padding_reaches_every_bucket_boundary`).
11. **Other encodings are not pinned** (choices made by the spike): `AAD_slot` widths
(on-disk, little-endian); `AAD_field` (u32 LE `field_id`, 16-byte `item_id`); box
layout `nonce ‖ ciphertext ‖ tag`; no HKDF salt for `K_payload`/`K_fields`;
m = t = p = 0 for `kdf_id` = 0; non-zero `flags` rejected as `Malformed`; limit
errors (`Malformed` for `header_len`, `HostileParameters` for slots and file size).
12. **`ciborium` needs a byte-string wrapper.** With serde, a `Vec<u8>` encodes as a CBOR
array of integers, and `from_reader`'s 4,096-byte scratch buffer makes
`deserialize_bytes` fail on longer byte strings. The spike's `Bytes` newtype
(`serialize_bytes` / `deserialize_byte_buf`) is about 30 lines, no new crate. The
scratch buffer and `Vec` regrowth leave unzeroised copies of decrypted metadata;
secret fields stay boxed.
13. **Save and open times are within doc 05 §9** (200 ms target; table above). fsync is
the largest and most variable step: 3.5–59.5 ms for 5 MiB, depending on what the
drive did just before. Encode, seal and verify take about 22 ms. The slowest quiet
p50, 92 ms, is under half the target. The fake items average 650 bytes, inside the
0.5–1 KiB guess.
14. **The kill test's parent must live in `xtask`,** because `std::process::Command` is
banned elsewhere (doc 13 §5). The child can be an `mv-vault` example binary. The
test touches only a temp directory, so it needs no `#[ignore]` on the host-mode
runner, given `MUTEVAULT_DATA_DIR`.
**Not simulated by TerminateProcess:** power loss or a hard reset (OS and drive caches
lost); an OS crash (NTFS journals metadata, not data, so a size can survive with stale
contents); drives that ignore flushes, or the "turn off write-cache buffer flushing"
policy; torn sector writes; exFAT/FAT32 (no journal, no hard links), network shares,
cloud placeholders, removed USB sticks; other processes holding the file (sharing
violations at step 6); disk full, I/O errors, very slow media. S5b-M3 covers the first.
## Decisions (D-39…D-43, 2026-12-06)
Each item changes the format contract, the derived keys or a user-visible behaviour. The
spike chose none (doc 17 §6 questions 13 and 14). On 2026-12-06 Kokone delegated the
choice; the options marked **Chosen** were taken under that delegation and are flagged
for review (doc 17 §5). D-39's encodings become format contract (rule 6) with the first
golden fixture (M1); before that fixture a human reads `mv-crypto` and `mv-vault`
against docs 04 and 05 (CLAUDE.md: AI-written crypto and parsing code is a draft).
- **`argon2` `parallel` feature** (A1; rule 10). (a) Off: no new crates; lanes cost no
time. (b) On, global rayon pool: Standard ≈ 2.5× faster; six crates with substantial
`unsafe`; 31–32 threads for the life of the process. (c) On, in a dedicated p-thread
pool: about as fast, 7–8 threads. **Chosen: (a), D-40**; revisit only if S5-M1 shows
unlock on a low-end PC over 2 s.
- **`AAD_field` encoding and the passkey credential-id binding** (A6). `item_id` raw or
text; `field_id` u32 LE with a cap, or u64; a length-prefixed credential id for
passkey boxes or not. **Chosen, D-39:** 16 raw `item_id` bytes, `field_id` u64 LE, and
`‖ len (u16 LE) ‖ credential_id` for a passkey key box only. The vector follows at M1.
- **`AAD_slot` widths and byte order** (A5, B11a). Doc 05's widths, LE, 88 bytes, or
another encoding; add the slot's `created_at` and `flags`, or state that the payload
AAD covers them. **Chosen, D-39:** doc 05's widths, LE, 88 bytes; the payload AAD
covers `created_at` and `flags`, which are checked right after the unwrap.
- **Box layout** (B11c). `nonce ‖ ciphertext ‖ tag` in one byte string, or separate CBOR
fields. **Chosen: one byte string, D-39.**
- **HKDF argument order and "no salt" for subkeys** (A7, B11d). (salt, IKM, info), no
subkey salt and ASCII labels without terminator; or a subkey salt such as `vault_id`.
**Chosen: the first, D-39.**
- **HKDF salt for slot types 2 and 0x80** (A7). The slot's own `salt`, or none.
**Chosen: the slot's `salt`, D-39.**
- **`t` and `p` for `kdf_id` = 0 slots** (A8, B11e). (a) Require m = t = p = 0, opening
bounds only when `kdf_id` = 1; (b) ignore `t`/`p`. **Chosen: (a), D-39**; anything
else is `HostileParameters`.
- **Reserved `flags` and limit errors** (B11f–g). Reject or ignore non-zero `flags`;
which typed error each doc 05 §2 limit raises. **Chosen, D-39:** non-zero `flags` and
`header_len` over its limit are `Malformed`; slot count or file size over its limit
is `HostileParameters`.
- **Padding at unreachable gaps** (B10). (a) The shortest pad that reaches a multiple of
4 KiB, else the next multiple; (b) a gap-free pad encoding (a layout change).
**Chosen: (a), D-39.**
- **Calibration target** (A4). Doc 04 §5 (about 500 ms, pass cap 10) against docs 00 §6
and 05 §9 (0.5–1.5 s): raise the cap, calibrate memory first, or restate the target.
**Chosen, D-40:** doc 04 §5 unchanged; docs 00 and 05 aligned to it.
- **Password length and the NFKC Unicode version** (A9). Code points, graphemes or
bytes, before or after NFKC; (a) refuse unassigned code points when a password is
set, or (b) record the Unicode version. **Chosen, D-40:** code points after NFKC; (a),
against a committed table for Unicode 18.0.0, never at unlock; an upgrade of
`unicode-normalization` is a crypto change.
- **Page-locking the KDF buffer** (A2). Lock (a larger working-set minimum, can fail on
small machines) or leave it pageable. **Chosen, D-40:** best-effort through
`mv-platform`; on failure the hash runs unlocked; wiped either way.
- **VC++ runtime linkage** (A11). `+crt-static`, or ship the runtime in both packages.
**Chosen: `+crt-static`, D-41**, verified at M1.
- **TOTP secrets under 128 bits on import** (A10). Accept through `build_noncompliant`,
with or without a report note, or reject. **Chosen, D-42:** accept on import and
entry, with a note in the import report.
- **`save_counter` after a deliberate backup restore** (B6). (a) max(sidecar, file) + 1;
(b) reset the sidecar on an in-app restore; (c) keep warning. **Chosen: (a), D-43.**
- **Unparseable sidecar and the sidecar header hash** (B6). Missing silently or with a
notice; give the hash a purpose or drop it. **Chosen, D-43:** missing, with a notice;
the hash warns when one `save_counter` comes with a different header (two copies
edited apart).
- **Whether a newer leftover is offered to the user** (B4). Backup only (D-35), or also
a recovery dialog. **Chosen, D-43:** backup, with a one-line notice; no dialog.
- **Sharing-violation retry at step 6** (B8). How long, and what the banner says.
**Chosen, D-43:** back-off for up to 2 s; then dirty, a banner, and a retry at the
next trigger.
- **Retention details** (doc 05 §6). Do the 10 recent fill the daily slots; which backup
of a day or month is kept. **Chosen, D-43:** yes, also the monthly ones; the newest.
- **`fs4` and `tempfile`** (B7). **Removed from doc 02, D-43.**
**Proposed, flagged for review** (doc 17 §5): D-34 backups by hard link (B2, B3); D-35
the leftover rule (B4); D-36 the atomic replace injected into `mv-vault` (B7, B8); D-37
the kill test in `xtask` (B14). Docs updated: 02, 03, 04, 05, 06, 07, 14. Not yet: a
quick kill-test step in `ci.yml` (doc 15 §4). D-39…D-43 are written into docs 00, 02,
03, 04, 05, 06, 11, 15 and 18.
## Manual checklist (Kokone)
| # | Check | Expected |
|---|---|---|
| S5-M1 | On a low-end Windows PC (dual or quad core, 4–8 GB, ideally without AVX2), follow `spikes/s5a-crypto-core/RUN-ON-LOW-END.md`: run both exes and `measure-lanes.ps1`, send back the three CSV files and notes | Every configuration finishes; the CSV records CPU, cores, RAM and `avx2`. Standard well under 2 s; over 2 s makes doc 04 §5's "offer to lower memory" path real |
| S5-M2 | Same laptop on battery, power mode "Best power efficiency": `.\dist\s5a-bench.exe --runs 10 --only standard,strong > lowend-battery.csv` | The worst case for calibration and unlock; compare with S5-M1 |
| S5b-M1 | Quiet re-run: close builds and agents, run `run-kill-test.ps1`, then `measure-save.ps1`; note the compiler counts the scripts print | Every loop "PASS (no corrupt or missing vault)", exit 0. Copy mode shows bad backups again, link and atomic 0. About 10–12 min. Large link + wt save p50 under 60 ms. **Done 2026-12-06** by the session, 0 compilers before and after: all as expected, 9.0 min; save p50 57.9 ms on an idle drive, 91.9 ms when run straight after the kill test |
| S5b-M2 | Low-end machine: copy the part B spike to the S5-M1 PC and run both scripts | Same pass; record save p50/p95 for doc 05 §9 |
| S5b-M3 | Power-cut test in a VM (doc 14 §9): at least 200 cycles each for default, no-fsync and write-through-off | Default: 0 corrupt or missing, every backup opens. No-fsync: at least one lost or corrupt result. Write-through off: the result settles D-36 |
| S5b-M4 | Optional, exFAT link fallback. With a spare exFAT stick as `F:`: `New-Item -ItemType Junction -Path E:\mutevault\spikes\s5b-vault-store\tmp -Target F:\s5b-tmp`; from the spike directory `target\release\s5b-vault-store.exe kill-loop --variant large --iterations 100 --backup link`; then remove only the junction (`cmd /c rmdir E:\mutevault\spikes\s5b-vault-store\tmp`) and delete `F:\s5b-tmp` | PASS; backup temps after kills in the backup step show the atomic fallback ran; 0 bad backups |
## Re-run
Check `Get-Process rustc,cargo` first. Windows PowerShell 5.1 refuses `-File` under this
PC's execution policy; use `pwsh`.
```powershell
# Part A, from E:\mutevault\spikes\s5a-crypto-core
cargo test; cargo test --features parallel # 40 tests each
node crosscheck.mjs tests\fixtures\s5a-regression-vectors.json # 16/16
cargo build --release --bin s5a-bench; copy target\release\s5a-bench.exe dist\s5a-bench.exe
cargo build --release --bin s5a-bench --features parallel; copy target\release\s5a-bench.exe dist\s5a-bench-parallel.exe
.\dist\s5a-bench.exe --runs 10 > results\quiet-default.csv
.\dist\s5a-bench-parallel.exe --runs 10 > results\quiet-parallel.csv
powershell -NoProfile -ExecutionPolicy Bypass -File measure-lanes.ps1 -Rounds 10 -Out results\quiet-lanes.csv
.\.tools\bin\cargo-deny.exe --manifest-path Cargo.toml --config E:\mutevault\deny.toml --features parallel check bans licenses sources
# Part B: build, 2 stall tests, 6 x 1,000 kills, deletes tmp\ (about 10-12 min); -Iterations 100 is quick
pwsh -NoProfile -File E:\mutevault\spikes\s5b-vault-store\run-kill-test.ps1
pwsh -NoProfile -File E:\mutevault\spikes\s5b-vault-store\measure-save.ps1 # timings, no kills, ~25 s
cargo test --release --locked --manifest-path E:\mutevault\spikes\s5b-vault-store\Cargo.toml
# One loop or stall test, from the part B directory after a release build
target\release\s5b-vault-store.exe kill-loop --variant large --iterations 1000 --backup link --replace wt [--seed HEX] [--keep]
target\release\s5b-vault-store.exe stall-test --variant large --reps 5 --backup link
```
Results stay in each spike's `results\`: counts, timings and seeds, never vault data.
+1 -4
View File
@@ -13,7 +13,7 @@ distribution as part of a GPL-3.0 work.
| Component | Version | Licence |
|---|---|---|
| gpui-kit (with GPUI and gpui-component) | 0.10.0 | Apache-2.0 |
| gpui-kit (with GPUI and gpui-component) | 0.12.0 | Apache-2.0 |
| rust-i18n | 4.2.4 | MIT |
| argon2 | 0.6.0 | MIT OR Apache-2.0 |
| chacha20poly1305 | 0.11.0 | Apache-2.0 OR MIT |
@@ -48,13 +48,10 @@ distribution as part of a GPL-3.0 work.
| time | 0.3.55 | MIT OR Apache-2.0 |
| data-encoding | 2.11.1 | MIT |
| windows | 0.62.2 | MIT OR Apache-2.0 |
| interprocess | 2.4.9 | 0BSD OR Apache-2.0 |
| arboard | 3.7.0 | MIT OR Apache-2.0 |
| tray-icon | 0.26.1 | MIT OR Apache-2.0 |
| global-hotkey | 0.10.0 | Apache-2.0 OR MIT |
| directories | 6.0.0 | MIT OR Apache-2.0 |
| fs4 | 1.1.0 | MIT OR Apache-2.0 |
| tempfile | 3.27.0 | MIT OR Apache-2.0 |
| velopack | 1.2.161 | MIT |
| tracing | 0.1.44 | MIT |
| tracing-subscriber | 0.3.23 | MIT |
+3 -2
View File
@@ -16,8 +16,9 @@ profile:
# "linker `cc` not found" and the sanity check reported "Cargo project loading"
# (2026-12-02). The bootstrap installs build-essential; it needs root (the
# workflow passes `-u root`). It does not fix the 47 false type errors in
# xtask: those come from the IDE attaching no Rust standard library (its
# projectStructure/SDKs.json has `"roots": []`), still open in spike S10.
# xtask: the IDE attaches std but misses the items core and alloc generate
# with macros (SDKs.json's empty roots were a false lead), still open in
# spike S10 (docs/spike-reports/S10_QUALITY_PIPELINE.md).
#
# Why the pin: the image's libraries are installed as `<version>+dhi0`, which
# sorts above the `<version>+deb13u0+dhi0` that its own repository dhi.io ships.
+1 -1
View File
@@ -1,6 +1,6 @@
# The one place the Rust version lives (doc 02 §1). CI reads it: the Windows job
# with `rustup toolchain install`, the Linux job by passing `channel` to the
# toolchain action. Release builds are rebuildable from this pin (doc 15 §11).
# toolchain action. Release builds are rebuildable from this pin (doc 18 §6).
#
# `rust-src` is the standard library's source. rust-analyzer needs it to resolve
# std. The JetBrains engine behind Qodana's Rust linter reads it too. The