Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(ci): add storage bypass notes

Steven Enamakel0a5121768485
diff --git a/scripts/ci/storage-bypass.md b/scripts/ci/storage-bypass.md
new file mode 100644
index 0000000000..56f04242bb
--- /dev/null
+++ b/scripts/ci/storage-bypass.md
@@ -0,0 +1,77 @@
+# Storage bypass coverage and retained debt
+
+The cancellation-supervised checks lane scans every immediate `crates/*/src`
+host directory. The original core document/storage implementation exclusion and
+sibling test exclusions remain. It also scans explicitly curated classic
+TinyAgents session stores and the TinyMCP registry/audit stores actually opened
+by host composition. Native storage driver implementations are not bypasses;
+their host adapters remain scanned.
+
+Rules cover database opens, filesystem writes/creation, rename/copy/hard-link
+publication, tempfile builders, JSON writer destinations, the known filesystem
+helper definitions `write_private`, `create_private`, and `write_atomic`, and
+store open calls with a nearby `.db` or `.jsonl` literal argument. Tokio calls
+are included: the original `fs::write` pattern already recognized their `fs::`
+suffix. The missing embed detection was a directory coverage bug.
+
+## Two exact debt inventories
+
+`storage-bypass-baseline.json` retains the original **68** core rule identities.
+This change does not increase or replace that baseline. Regeneration requires an
+existing baseline and refuses new findings; it can only remove fixed sites.
+The merge-base check also prevents editing the manifest to accept new debt.
+
+`storage-bypass-extension.json` contains **95** reviewed identities for coverage
+that this change introduces. Each identifies its exact rule, path, source line,
+and occurrence, with a destination classification, reason, and owning issue.
+These are sites, not 95 independent stores. The initial extension must match
+source already present at the canonical merge base, including its recorded
+vendor gitlinks. A branch-added or moved writer cannot enter this inventory.
+Once the extension exists in the base, its identities can only shrink. Removing
+an entry while its writer survives fails the ordinary added-finding check.
+
+`storage-bypass-allow-reasons.json` audits the original **16** pinned exclusions
+and one existing browser lock permission probe. The old claim that the port has
+no blob store is removed: local artifact reservation is historical migration
+debt, not an absent native BlobStore capability. Initial audited exclusions must
+also exist at the canonical merge base; later exclusions cannot grow. An exact
+site allowance never covers a second occurrence or another call in the file.
+
+The browser lock probe opens an existing file without create, truncate or a
+write call. The separate Apple chat.db record explicitly uses
+`SQLITE_OPEN_READ_ONLY`. Neither classification establishes storage authority.
+Other records distinguish classic compatibility/import paths, machine bootstrap,
+scratch, explicit external exports, and genuine unmigrated state. A classification
+is review evidence, not a claim that its issue or native host routing is complete.
+
+## Bounds and verification
+
+This is a source guard, not Rust name resolution or whole-program dataflow.
+It does not expand macros or resolve renamed imports, follow arbitrary writer
+helpers, or infer a destination behind a variable. Opener literal matching spans
+the current and following source line; curated owner store definitions cover
+known indirect host opens. New rules mask Rust comments and quoted fixtures;
+original core rule identities retain their existing lexical behavior.
+
+Real CI uses the canonical merge base and fails if the base, original baseline,
+or recorded vendor source is unavailable. `--root` supports isolated source
+fixtures; those tests independently exercise the manifest comparison policy.
+Do not use a synthetic fixture result as proof of actual host storage isolation.
+
+The embed Tokio writer and five additional coverage/regeneration cases genuinely
+failed against the original scanner (0 passed, 6 failed), then passed unchanged.
+A separate missing-baseline regeneration case also genuinely failed before its
+fix. Current focused scanner/debt/lane controls cover exact identity moves and
+copies, initial branch writes, later manifest growth, surviving unrecorded writes,
+missing history, comments/fixtures, original core debt, and both CI profiles.
+
+Run:
+
+```sh
+node --test scripts/__tests__/storage-bypass*.test.mjs scripts/__tests__/self-hosted-lanes.test.mjs
+bash scripts/ci-cancel-aware.sh node scripts/ci/check-storage-bypass.mjs
+```
+
+This guard does not implement backend migration, desktop import authority, or
+Memory/SQLite/MongoDB runtime composition. Those belong to the linked owner
+issues and their authentic native integration proofs.