Repository navigation
Unified SQLite storage: corpus pins + parity core + shadow dry-run + drop-in read path (#2671 Phases 1 & 1.5) - #2690
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3036-pr.2690.5caa5b4This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2690.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 PR #2690(#2671 统一 SQLite 存储 · Phase 1 & 1.5)审查结论 先给结论:PR 设计扎实、默认关闭、unset 即回滚。我独立审查时发现两个会挡 CI 的缺陷,分支上的并发提交已把它们都修好——我逐行核对了修法正确、最小,并丢弃了我本地那份重复修复(没有再推,避免冲突)。当前分支头 背景:该 PR 把 legacy JSONL 持久化迁到统一 SQLite( 我审查中独立发现、且已被并发提交修复的两处:
--- 结构化八问 ---
--- 现状与判定 ---
|
|
Two CI-drift causes found and fixed (
|
[bot] 🏷 已核对 ① legacy loadSync 单构建恢复(cause a) — 确认正确。diff 里两条 legacy 路径都改回单一 ② render golden 重生成(cause b) — 确认最小且正确。四个 wire 的 golden 各只改一行 CI(@ 代码层面我这边无需再改;合并前仍建议 rebase 到最新 master(分支落后约 28–30 提交,src/persist.ts 是热文件,有语义冲突风险)——需要的话我来做。本 PR 属 §7.4 human-gate(持久化格式 + 新增可选原生依赖 + feat),由你手动合并即可。 |
[bot] 🏷 更正上一条的乐观判断: 不是「golden 旧了」,是「不可复现」。 每条 wire 的
也就是说 为什么会漂(两个候选根因,需你本地一步定位区分):
建议的定位步骤(我这边沙箱没装 node_modules,tsx/kernel dist 都缺,起不来,就没硬跑;你在本机能更快): 判定: 这条 PR 现在还不能合(test 矩阵红);它仍是 §7.4 human-gate(持久化格式 + 新增可选原生依赖 + feat),由你手动合并。合并前 rebase 到最新 master 的建议不变(落后约 28–30 提交,src/persist.ts 热文件有语义冲突风险)。等你把 golden 稳定下来(或确认是 defect ② 另立处理),我再给最终全绿确认。 |
[bot] 🏷 补充确认(刚跑完的 CI 全量结果): 这说明 golden 漂移是跨所有平台/架构的系统性问题,不是某台 runner 的偶发超时——进一步支持「每次必漂」的判断(倾向候选 A 漏掩字段,或 B 写侧竞态在任意 runner 上都稳定复现)。定位手段不变: |
|
Remaining red on this PR is a pre-existing master regression, not from this branch: master ( |
[bot] 🏷 核实完了你的说法 + 补几个我的独立发现: ① master 回归属实,且已用代码证实(不是本分支的锅)。 ② 关键补充:golden 现在被挡在 typecheck 后面,根本没跑到。 ③ golden 根因给个具体方向。 「跨 runner 稳定、却和本机不同」这个签名 = 持久化 state 里有机器/环境相关字段没被 canonicalize 归一(canonical.ts 只掩三种:epoch-ms 数值、UUID、biliVersion)。最可疑是环境字符串(路径/host/tmpdir 漏进 stats/metadata)或 TZ 相关字符串时间戳。一个我能排除的候选先说清:render golden 的 stateDigest 是对 legacy 文件回读( ④ 别漏了新红: 判定: PR 仍未绿 / 不能合。现在是三个独立问题叠着:(a) #2698 master tsc 回归[非本分支];(b) golden 不可复现[本分支,仍 open,目前被 (a) 挡在后面看不见];(c) image-billing e2e 新红[待查]。到绿的路径:#2698 落 master → 本分支 rebase → typecheck 过 → golden 变可见 → 修掉那个泄漏字段。全程 human-gate。等 (a) 落地后我再给 golden 那一段的最终确认。 |
|
Soak round 1 found and fixed a real parity bug — pushed as 221f53d. Finding (live traffic, Root cause: Fix: Verification:
Also noticed master's #2698 regression is fixed via #2702 — the remaining CI red on this branch should clear on the next run. |
[bot] 🏷 把 ① 修法正确性(sound,root-cause 不是 mask)。 ② 这正是 Phase 1 shadow dry-run 按设计该抓的东西——live traffic 下 ③ #2698 已在分支上解决:master merge
📊 ⑤ 决定性验证要等那 4 条 test 腿落地。 判断很简单:若它们红在 判定: 暂不拍板「可合」——等 4 条 test 腿结果。修法本身给正面评价(sound、root-cause、有回归测试+live 验证)。全程 human-gate。 |
[bot] 🏷 决定性结果出来了: ① 失败面锁定(3/4 leg 已出:red,win-24 在跑必同)。 三条腿(win-22/ubu-22/ubu-24)只挂在
② 你
③ 核了
④ 决定性下一步(~2 行,比再 blind-regen 强得多): drive harness 已在算 per-section/per-state-key digest,只差一层——mismatch 时把 raw canonicalized
判定: PR 仍不能合(test 矩阵红)。状态清晰:parity fix 已成立且自测通过;唯一 blocker 是与它正交的 render-golden 非确定性,现已精确定位到 |
|
Soak round 2 — dogfooding the default data dir ( Finding: boot-importing the real corpus left only 249 block rows across 440 sessions. One quiet session with 28 blocks replayed with zero blocks — silent fold loss. Root cause: block ids are per-session ( Fix: composite key Verified: fresh re-import of the real corpus now holds 3072 block rows; 11 quiet sessions sampled digest-true, including the one that lost all 28 blocks (28/28 replay). |
[bot] 🏷 把 ① 根因与严重性:确认属实,且是硬数据丢失。 block id 天然是 per-session( ② 我额外做的:全表 + 全查询点扫描,确认无「同机制漏网」。
③ 回归测试有牙: 两个会话共用
📊 ⑤ CI: 判定: 这条 fix 本身通过(正确、完整、有回归测试、扫过同类无漏网)。但整条 PR 仍不能合——上一轮定位的那个 render-golden S1 非确定性( |
[bot] 🏷 PR 状态收口(多轮核对后的单一快照): ✅ 已验证通过的两处 soak parity fix:
🔴 唯一剩余 blocker(与上面两处正交):render-golden S1 非确定性。
📊 CI: 判定:PR 仍不能合——卡的是 render-golden S1 这一条,不是 parity(两处 parity fix 都已成立且自测通过)。全程 human-gate。你推 S1 fix,或者给我一个能本地跑的环境让我直接上手定位,说一声我就动。 |
|
Soak UX follow-up: |
[bot] 🏷 核完 ✅ 功能正确性(sound、最小、设计干净):
🔴 阻塞项(CI 会红,独立于 render-golden):违反 Kernel Boundary。 这条 commit 动了
修复(都很轻):
判定: |
|
Per-session storage mode visibility (follow-up to the
storage suites + goldens + corpus: 46/46 green locally. |
[bot] 🏷 等待期间把 #2671 defect ②(写侧竞态)在
所以 B 现在有具体落点了:最后一轮是否保证为它 arm 住一次 pending save。要彻底排除 A(canonicalize 漏掩某字段)仍需那 2 行 dump——但 dump 也能反过来验证 B:子字段值每次任意变=A;整个对象在两个快照间跳=B。 (分支/CI 自上一条未变: |
|
Soak bug #3 found and fixed: The dogfood lane (full mode, real traffic) fired 23 DIGEST DRIFT reports across 8 plugin-mode sub-agent sessions — every session containing a protected message drifted on every save, starting from its first save. Root cause: kernel protected refs use the byRaw-only token Soak scoreboard so far: bug #1 sliding-tail rebase ( |
[bot] 🏷 核完这轮三个 commit( ✅ bug #3(
👍 顺带点一句 bug #1/#2/#3 的共性: 全由真实流量(soak)抓到、全落在 assembly/ledger 侧、零迁移、各带回归测试——Phase 1 shadow dry-run 就是为这个设计的,它按预期把「单 ingest corpus 抓不到」的多轮/多会话/受保护消息缺陷一个个逼了出来。这套 dogfood 方法本身是成功的。
🔴 S1 render-golden —— 我要更正前几轮的判断。
🔴 唯一明确硬 blocker 仍是 kernel-guard: 判定: 三个 soak bug 全部验证通过(修法+回归测试+共性健康)。S1 render-golden 大概率已解决(确定性 staleness),待 CI 跨-runner 稳定性确认;已更正此前把它当非确定性的误判。眼下最该处理的是 kernel-guard(加声明 + bump 版本)。全程 human-gate,CI 落地我给最终绿/红。 |
[bot] 🏷 顺手把上轮标的那处注释瑕疵直接修了(按「小问题直接修」): persist.ts:949 原来说 canonical.ts 把 其余状态不变:
要我把 kernel 的 version-bump commit 也代推吗?( |
|
[bot] 🏷 核完 ✅ 实现正确、安全栏全保住(逐处核过代码):
🔴 阻塞项 1(硬 CI 红,老问题):kernel-guard。 刚重新核过:
小注(非阻塞): ① file 值写错(如 判定: |
[bot] 🏷 一个值得注意的新观察(CI 触发层面,非代码): CI 自
两个流程 blocker 依旧未动(与上次一致):
判定: 自上次报告后无实质进展——两个流程项仍需你处理;且 CI 得先在当前 head 真正跑起来,才能谈绿/红。我这边能核的都核完了,等你动作或 CI 起来。 |
4fd8fa2 to
7cd7b33
Compare
|
Rebased onto current master + three post-rebase fixes (7cd7b33, force-push) Rebase replayed all 17 commits cleanly onto master@4ecd82f3 (47 commits ahead of the old base; only two textual conflicts: package-lock and a persist.ts field block). The #2698 master tsc regression is resolved by master's own follow-ups — Post-rebase findings (all fixed in 7cd7b33):
Local battery: 69/69 green across golden-storage-render, storage-corpus, storage-unified, web-sessions, config-file-cache, config-surface-guard, admin-origin, image-request-budget; tsc clean; unused-export gate clean (2 waived). — prepared by an agent under the local git identity (ranxianglei), human merge required |
[bot] 🏷 Rebase + 三个 post-rebase fix 都核了。先说最重要的:这次 force-push 让 CI 真正跑起来了(我上轮报的「没触发」被 force-push 解决),但 15/26 红——而且这几乎肯定是一个系统性问题,不是 15 个独立回归。 🔴🔴 头号发现:像 package-lock 失步 → 全线
✅ rebase 干净、我的改动保住: 17 个 commit 全部重放到 master@4ecd82f3,仅你说的两处文本冲突(lockfile + persist 字段块);我的注释修 ✅ 三个 post-rebase fix 都 sound:
🔴 kernel-guard 仍红(rebase 没解决): 判定: rebase + 三 fix 质量好。变绿前差:① 修 lockfile(清那片系统性 e2e 红)② kernel-guard(声明+bump)③ 正文 config-surface 段;之后再跑确认 render-golden 跨 runner 稳定。全程 human-gate,等你的 lockfile re-push。 |
…ixes Storage review fixes: authoritative refs/blocks, corrupt-index guard, BEGIN IMMEDIATE, restore 409 + CCR sidecar (#2690 review)
…s replacement, corrupt-index guard, BEGIN IMMEDIATE, restore 409 + CCR sidecar Owner review (blocking findings, issuecomment-6108173553): 1. refs rows: DELETE-then-INSERT per ingest — a renumbered byRaw map (native compaction drops a front key) no longer trips the (session_id, ord) PK; ghost rows cleared, ords compact. 2. blocks rows: authoritative replacement — destroyed-substrate rows are deleted (CAS refcounts released); ranxianglei#2695 zombies cannot resurrect on later saves. 3. conversations table dropped before schema v1 ships (zero writers). 4. corrupt index.db: guarded open — warn + legacy-only, never bricks the proxy (3-strike self-disable stays as backstop). 5. BEGIN IMMEDIATE at top-level transactions (multi-process SQLITE_BUSY_SNAPSHOT, ranxianglei#394 topology). 6. restoreReplica: refuses live-id overwrite (409 via admin mapping); freezes the disk content-store envelope into the checkpoint and materializes the sidecar for the restored id (CCR originals survive the next live save — buildRecord drops forkContentStore). 7. export: listSessions/exportSession close one-shot handles (Windows EPERM regression); --jsonl degrades to legacy renderer on unreadable/encrypted index. 8. PLUGIN.md registration example updated to fork protocol v2. Tests: tests/storage-review-fixes.test.ts (4) + full storage family green locally (unified 13, replicas 4, corpus 9, export-jsonl 4, cli-export 2).
…3932 review) The --jsonl path hardcoded new SqliteBackend(UnifiedStore.open(index)), so a deliberate mysql selection silently exported from sqlite instead of failing with the documented stub error that CONFIGURATION.md and #3931 promise. The selection is now enforced before the guarded open: registered-but-unshipped names go through openBackend and throw their documented line before any file access; typo'd names warn once and read sqlite. The guarded try/catch is untouched, so the corrupt-index legacy-tail degrade contract (#2690) on the sqlite path is byte-for-byte preserved.
…3932 review) The --jsonl path hardcoded new SqliteBackend(UnifiedStore.open(index)), so a deliberate mysql selection silently exported from sqlite instead of failing with the documented stub error that CONFIGURATION.md and #3931 promise. The selection is now enforced before the guarded open: registered-but-unshipped names go through openBackend and throw their documented line before any file access; typo'd names warn once and read sqlite. The guarded try/catch is untouched, so the corrupt-index legacy-tail degrade contract (#2690) on the sqlite path is byte-for-byte preserved.
bun has no node:sqlite, and a better-sqlite3 N-API prebuild cannot be
loaded there at all ("Could not load the default exports from
better-sqlite3", measured on bun 1.3.14), so the ranxianglei#2833 ladder resolved
to no engine and every bun-run proxy degraded to legacy-only storage.
- driver.ts: ladder step 0 = bun:sqlite, required only when
process.versions.bun exists. bun's builtin is synchronous and already
shaped like better-sqlite3, so the adapter covers the three measured
divergences: named params bind by the sigil written in the SQL (the
store's SQL is better-sqlite3 style and passes bare { a: 1 } bags, so
bare keys are duplicated into the sigil forms each statement really
uses, string literals blanked first); BLOB columns come back as a bare
Uint8Array and are normalized to Buffer; run() reports BigInt
changes/lastInsertRowid (now Number) and there is no .open flag.
Writes take .immediate(), reads .deferred() (ranxianglei#2690: a deferred
transaction that upgrades mid-flight hits SQLITE_BUSY_SNAPSHOT, which
busy_timeout cannot resolve); close() is idempotent.
- probe seam: a bag pinning only { builtin, host } now simulates a NODE
host (bun off unless the test opts in with bun: true), so the ladder
suites keep passing on a machine whose runtime happens to be bun.
- engine-bootstrap.ts: bun never downloads a prebuild (not-needed);
nodeSqliteUpgradeHint and the degrade banner name bun:sqlite instead
of the Node lever; the self-contained integrity worker picks its
engine by the runtime it runs on ({ readonly: true } on bun).
- tests: new tests/storage-bun-sqlite.test.ts (9 tests: fake-Database
contract pins that also run on Node CI, plus real-bun lock/rollback
and a real UnifiedStore round-trip through open, ingest, reads, close
and reopen). Seven raw test handles stop pinning node:sqlite so those
suites run on any runtime; the three node:sqlite-only legs in
storage-unified skip by probe instead of failing to load.
Measured under bun against the pre-change baseline on this machine: 24
more storage tests pass, zero regressions (storage-unified 4/13 -> 14
pass + 4 skip + 0 fail; ingest-watermark 1/15 -> 15/1; bounded-load
1/4 -> 4/1; engine-proofs 1/11 -> 7/5; plugin-fork 35/21 -> 51/5;
engine-bootstrap unchanged at 43/1). Remaining bun failures are the
node:test shim's missing t.mock (oven-sh/bun#5090), Node-only suites
that statically import node:sqlite, and ERR_SERVER_NOT_RUNNING in the
child-process harness.
…xianglei#5744) The refs table (one row per message the session has ever seen) was maintained by DELETE-all plus one-row INSERT on every save, so a steady-state delta save of a few new messages into a long session still executed O(full history) native SQLite statements synchronously on the event loop - the 96.5% StatementSync.run profile behind ranxianglei#5744. Now: an in-memory diff against one indexed read of the stored set. Vanished raw_ids are deleted (no ghost rows survive a save, so the review-ranxianglei#2690 replace-all contract still holds), untouched survivors are skipped, and added/moved rows go out as multi-row upsert batches with a bounded parameter count - first-ingest and compaction-renumber storms cost ~one batch per 160 rows instead of H native calls. Bench (H=3100, K=4/turn): delta lane 3223 -> 82 stmts/save, 34.8 -> 4.6 ms; folded-resident lane 3855 -> 714; steady-state refs work is now constant in history length. Regression suite pins end-state parity, the refs statement budget, and a ghost-free reopen.
Summary
kernel-change: storage —
kernel/src/panel/panel.tsaccepts a host-rendered one-line storage-mode label (storage?: string, display-only; the kernel never guesses the mode). Version bumped to 0.0.118 (master moved to 0.0.116/#2695 and 0.0.117 mid-flight; this branch stays one ahead).Executable parity oracle for the storage refactor (#2671), built in four stacked commits on one branch:
92e75315) — render goldens for 4 wires + a 9-case legacy-format corpus (tests/golden/storage-corpus/: folded, tier2, deadrefs, fork-receipt, fork-retained, image, ccr, twinfile, zstd), each case pinned to a canonical digest bytests/storage-corpus.test.ts. The corpus is generated byscripts/update-storage-corpus.tsfrom real SessionStore writes, so it pins exactly what the current writer produces.90cb99dd+43145719) —src/storage/:driver.ts(better-sqlite3 primary,node:sqlitefallback),schema.ts(STORAGE_SCHEMA_VERSION 1),store.ts(CAS content dedup with refcounts, single-transaction ingest,deleteSession),ingest.ts(plan/load round-trip +toLegacyLike). Corpus-proven design decisions:messagesis an append-only log keyed(session_id, msg_id, content_hash)— split tool-call cores stay distinct rows, identical re-sends intern to oneseq;pluginSnapshot/lastMessagesare pointer sequences into it.byRawbut in no message array (compress failure is self-amplifying: failed calls are hidden as orphan refs, making the same range permanently un-compressible #2362 Kernel Contract — death never unmaps), andObject.entries(byRaw)key order is digest-sensitive, sorefs(session_id, ord PK, raw_id, ref)preserves it verbatim.dead_refscarries its own ordinal so ordering never depends on numeric ref parsing.biliVersionstamp as environment (__TS__/__VER__) — probe-proven these are the only fields a legacy save→reload round-trip rewrites.tests/storage-unified.test.ts).ff8685ee) —BILI_STORAGE_UNIFIED=1: every committed session write is double-ingested into<sessions-dir>/index.dband digest-reconciled against the legacy load view; mismatch logsDIGEST DRIFT, never blocks the write path; self-disables after 3 consecutive internal failures. Pure observability — production traffic becomes the migration test corpus.ad747fe7, Phase 1.5) —BILI_STORAGE_UNIFIED=full:loadSync/boot()/loadAll()/loadStateForSearchgo unified-first. A legacy-file session is organically imported into the index on first open ([storage] unified import on first open: …) and later loads are served fromindex.db; any unified failure falls back to the legacy file. Write path unchanged (legacy files + double-ingest), so rollback = unset the env. Safety rails:BILI_ENCRYPTION_KEYactive → sidecar never opens (index.db would hold cleartext payloads; warn + legacy-only)removeLegacyFile(会话身份不稳定:credential/upstream 维度导致长会话状态孤儿化(sessions 缺失) #286 rekey/dedup) now also deletes the session's index rows in one transaction and releases CAS refcountsloadLegacyView()omittedcreatedAt/lastSeen, which structurally drifted the shadow's internal digest reconciliation (logged, unasserted before)Phase 2a (added on top, single-branch policy)
The branch now also carries replica/checkpoint REST (was briefly PR #2745, closed and folded in here per reviewer preference — one branch, one final merge for the whole #2671 initiative):
checkpointstable:label+state_hash(CAS refcount) + session index;deleteSessionsweeps unpinned checkpoints and releases their blobsSessionStore:createReplica/restoreReplica/listReplicas/deleteReplica— restore re-materializes a checkpoint as a NEW session through the normal dual write path (meta.restoredFromprovenance)POST/GET /__bili/replicas,GET …/<cpId>,POST …/<cpId>/restore,DELETE …/<cpId>; legacy lanes → 501 + knob hintdeleteSessionGC (copy taken before a destructive experiment outlives the experiment); explicit delete still removes pinned onestests/storage-replicas.test.ts4/4 (round-trip; restore-after-GC digest equality; pinned survives/unpinned swept; legacy 501 + pinned delete override); whole-blob-vs-events trade-off noted in the descriptionPhase 2b (fork protocol v2) —
b1693a77parentRevisionnow hashes{sessionId, seq, blockSet}(active block ids, sorted) instead of the whole store snapshot — stats churn (contextEstimateTokens, usage grades) no longer invalidates forks mid-session; only structural change (message count or block set) does.protocolVersion: 2, acceptsProtocolVersions: [1, 2]; server accepts BOTH revisions during the transition (v1 clients keep working)forkParentRevisionLegacy()exported for the v1 fallback path — a v1 revision still matches exactly (double-take acceptance, verified by test)src/agent/fork-adopt.tsclient gate widened toversion === 1 || version === 2plugin-fork48/48, fork family 68/68 + 37/37Phase 2c (export --jsonl) —
4ca9b8c7bili export <id> --jsonl [--full]: line-delimited JSON dump rendered from the unified index tables whenindex.dbexists and covers the id (header + per-message lines in seq order with--fullCCR deref + block lines + deadRefs line); legacy-tail fallback renderer otherwise. Generated interoperability artifact, never a source of truth (design doc §85). Flag seeded in CONFIGURATION CLI tables (config-surface-guard).Fix on top — stale load-side import guard —
3e17052fbuildForLoadAllre-ingested the on-disk payload unconditionally; when a load raced a newer in-flight write (e.g.#286rekey re-serializing an older envelope on first boot), the stale payload reverted newer fold state in the index — the load-side face of#2401, surfacing as raw originals leaking through folded handoff exports (tests/e2e-export-handoff.test.tsunder machinestorage.unified=full). Guard: import only when the index has never seen the id (organic first open) or the payloadsavedAtis strictly newer than the row'supdated_at(#408 clamp rewrites, #286 rekey,restoreReplicastill import — freshsavedAtat build time). AddsUnifiedStore.sessionUpdatedAt+ shadow pass-through. That e2e now passes locally under full mode.Golden regenerations on this branch (justified)
tests/golden/storage-render/*— master added an anchor-kind field ("c": tool-call/tool-result/…) tometadata.foldAnchorsafter the last regen on this branch; only the metadata section digest moves (state/blockContents/stats identical, verified key-by-key). Regen:node --import tsx scripts/update-storage-render-goldens.ts.tests/golden/wire-contract/manifest-*.json— fork capability now advertisesprotocolVersion: 2, acceptsProtocolVersions: [1, 2](Phase 2b). Regen:node --import tsx scripts/update-wire-contract-goldens.ts.t()branches so all threedet.storage_mode_*catalog keys are statically referenceable (the Web UI 英文翻译开关(i18n)— 社区 PR #807 (@amirzamli) #1024 dead-key gate cannot follow string concat).Test plan
tests/storage-corpus.test.ts— corpus round-trips + case-specific invariants (twinfile namespaced-wins, zstd twin identical digest, fork receipt/retained asymmetry, deadrefs ghosts)tests/storage-unified.test.ts— dual-engine digest parity ×9 cases, whole-corpus idempotent re-ingest, real-persist shadow e2e,resolveStorageModeenv matrix, full-mode organic-import read e2e (digest == manifest), second-load stability, boot#286rekey GC parity (old id gone from index), encryption guard (noindex.dbcreated)Rollout
Default off.
1= shadow (observe drift logs),full= drop-in read. Soak in shadow mode first, then flipfull; unset env = instant rollback.🤖 This PR was prepared by an agent under the local git identity (ranxianglei), per the user instruction to push the branch and open the PR (human merge required).
Config surface
storage.unified(file tier,legacy|shadow|full, default unset = legacy) + envBILI_STORAGE_UNIFIED(1/true= shadow,full/unified= full; env wins over the file; resolved once per lane boot). Canonical resolver lives insrc/knobs.ts(彻底整治环境变了滥用,除非必要都走配置文件 #2030 env discipline), re-exported fromsrc/storage/shadow.ts. Documented in CONFIGURATION.md / zh-CN (compact + long-form rows).bili export --jsonl [<selector>] [--full](new flag on the existing export command; documented in CONFIGURATION.md CLI table).GET/POST /__bili/replicas,GET /__bili/replicas/<cpId>,POST /__bili/replicas/<cpId>/restore,DELETE /__bili/replicas/<cpId>.protocolVersion: 2withacceptsProtocolVersions: [1, 2](PLUGIN.md documents the v2 revision-token scope and the legacy-token transition window);/acppanel gains a STORAGE line (legacy label when the knob is off).