Skip to content

perf(storage): compress application tables, agent_cells bodies, and intern usage JSON blobs - #7318

Open
M4n5ter wants to merge 1 commit into
perf/7272-structural-dedupfrom
perf/7272-compress-non-content-tables
Open

M4n5ter wants to merge 1 commit into
perf/7272-structural-dedupfrom
perf/7272-compress-non-content-tables

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Nov 26, 2026 •

Copy link
Copy Markdown
Member
English

PR 7/8 in the #7272 storage optimization stack (stacked on #7290; rebased onto main including 0057_pinned_memory.sql, #7315, and #7317).

Stack (#7272)

  1. perf(agent-state): drop redundant duplicate and prefix indexes on recall, runs, and interactions #7285 — Drop 6 redundant duplicate/prefix B-tree indexes (m0058)
  2. perf(agent-state): drop stored folded column from agent_recall_messages #7286 — Drop agent_recall_messages.folded (m0059)
  3. perf(agent-state): deduplicate Recall indexing at source and coalesce external deltas #7287 — Deduplicate Recall bodies & FTS5 postings at source + 2-tier immutable external delta sealing (m0060)
  4. perf(agent-state): replace repeated (owner, session) strings with integer namespace_id #7288 — Replace repeated (owner, session) strings with namespace_id (m0061)
  5. perf(event-log): add tiered/dictionary zstd compression and background recompression for contents #7289 — Tiered/dictionary zstd compression & background recompression for contents (m0062–m0063)
  6. perf(agent): deduplicate step metadata, tool contracts, external descriptors, and return payloads #7290 — Structural dedup for step metadata, tool contracts, external descriptors & returns
  7. perf(storage): compress application tables, agent_cells bodies, and intern usage JSON blobs #7318 — Compress application_* & agent_cells, intern agent_usage_calls JSON blobs (m0064–m0065)
  8. perf(agent): externalize and deduplicate media in frozen prompts (Layout v3) #7341 — Externalize & CAS-deduplicate media in frozen prompts (Layout v3, zero SQL migration)

Summary

Compresses the remaining large non-contents JSON tables and interns repeated usage JSON metadata via atomic forward migrations 0063 and 0064:

  • Migration 0064_compress_application_tables.sql (platform/event-log): Rebuilds and compresses application_operation_contracts.contract_json, application_operations.request_json, and application_intents.{reference_json, recovery_json} with inline encoding columns (preserving sqlite_sequence cursor, FKs, triggers, and views), decoded via content::decode_inline_text / maka_content_text (including usage/auxiliary.rs::AuxiliarySource::ApplicationOperation).
  • Migration 0065_compress_cells_and_usage.sql (plugins/agent/state): Rebuilds and compresses agent_cells.body with promoted (owner_attempt, owner_call) columns backing agent_cell_parent, interns repeated agent_usage_calls.{binding_json, quote_json} into agent_usage_json_blobs (registered in store/removal.rs), updates all cell/usage queries, and verifies v64/v65 invariants in upgrade_compat.rs.

Offline Real-DB Verification (24.70 GiB CoW Clone at 67c5436130)

Measured end-to-end on an offline APFS copy-on-write clone of a real 24.70 GiB SQLite database (25,292.53 MiB, 2,400,872 contents rows, 1,125,026 agent_recall_messages rows) with the reproducible pure-schema dict_v1.bin and 8 MiB production recompression budget:

Group Before (baseline) Post-stack (VACUUM) Delta
contents* ~11,427 MiB 4,615.35 MiB -59.6%
agent_recall* ~8,338 MiB 2,500.77 MiB -70.0%
agent_session_history* ~2,358 MiB 674.92 MiB -71.4%
application_* ~482 MiB 236.07 MiB -51.0%
agent_usage* ~419 MiB 227.14 MiB -45.8%
agent_cells* ~275 MiB 114.32 MiB -58.4%
agent_facts+pins* ~406 MiB 367.52 MiB -9.4%
agent_memory* ~203 MiB 180.81 MiB -10.9%
other ~1,417 MiB 811.66 MiB -42.7%
Total (pre-VACUUM live) 24.70 GiB 10.54 GiB -57.3% (2.34×)
Total (post-VACUUM) 24.70 GiB 9.51 GiB -61.5% (2.60×)
  • m0058: 0.25 s | m0059: 80.57 s | m0060: 333.71 s | m0061: 55.79 s | m0062/m0063: 0.00 s | m0064: 8.49 s | m0065: 6.48 s | background recompress (8 MiB budget): 125.26 s
  • PRAGMA foreign_key_check = 0, PRAGMA quick_check = ok, FTS5 integrity-check = OK

Tests

Refs #7272

中文

#7272 存储优化系列第 7/8 个 PR(基于 #7290,已同步 rebase 到含 0056、#7315、#7317 的 main)。

系列栈(#7272)

  1. perf(agent-state): drop redundant duplicate and prefix indexes on recall, runs, and interactions #7285 — 删除 6 个重复/前缀冗余 B-tree 索引(m0058)
  2. perf(agent-state): drop stored folded column from agent_recall_messages #7286 — 删除 agent_recall_messages.folded 冗余列(m0059)
  3. perf(agent-state): deduplicate Recall indexing at source and coalesce external deltas #7287 — 从源头对 Recall 正文与 FTS5 postings 联合去重 + 两段不可变外部 delta 封口(m0060)
  4. perf(agent-state): replace repeated (owner, session) strings with integer namespace_id #7288 — 用整数 namespace_id 替换重复 (owner, session) 字符串(m0061)
  5. perf(event-log): add tiered/dictionary zstd compression and background recompression for contents #7289 — contents 分档/静态字典 zstd 压缩与后台存量重压(m0062–m0063)
  6. perf(agent): deduplicate step metadata, tool contracts, external descriptors, and return payloads #7290 — 新写 durable facts 结构去重(tool contracts、external descriptors/instructions、returns)
  7. perf(storage): compress application tables, agent_cells bodies, and intern usage JSON blobs #7318 — 压缩 application_* 与 agent_cells 并对 agent_usage_calls JSON 字典驻留(m0064–m0065)
  8. perf(agent): externalize and deduplicate media in frozen prompts (Layout v3) #7341 — Frozen prompt 媒体外置与 CAS 去重(Layout v3,零 SQL 迁移)

改动内容

通过原子前向迁移 0063 与 0064 压缩剩余非 contents 大 JSON 表并对重复用量 JSON 做字典驻留:

  • 迁移 0064_compress_application_tables.sql(platform/event-log):原子重建并压缩 application_operation_contracts.contract_json、application_operations.request_json 与 application_intents.{reference_json, recovery_json}(保留 sqlite_sequence 游标、外键、触发器与视图),通过 content::decode_inline_text / maka_content_text 透明解码(含 usage/auxiliary.rs::AuxiliarySource::ApplicationOperation)。
  • 迁移 0065_compress_cells_and_usage.sql(plugins/agent/state):原子重建并压缩 agent_cells.body,提升 (owner_attempt, owner_call) 显式列支撑 agent_cell_parent 索引;将重复 agent_usage_calls.{binding_json, quote_json} 驻留到 agent_usage_json_blobs(同步登记至 store/removal.rs);更新全部 agent_cells / usage 查询点并在 upgrade_compat.rs 中验证 v64/v65 不变量。

真实库离线实测(24.70 GiB CoW 克隆,67c5436130)

在 24.70 GiB 真实 SQLite 库离线 APFS CoW 克隆(25,292.53 MiB、2,400,872 条 contents、1,125,026 条 agent_recall_messages,使用可复现纯 schema dict_v1.bin 与生产 8 MiB 重压预算)上的整栈端到端实测结果:

分组 升级前(基线) 整栈后(VACUUM) 变化
contents* ~11,427 MiB 4,615.35 MiB -59.6%
agent_recall* ~8,338 MiB 2,500.77 MiB -70.0%
agent_session_history* ~2,358 MiB 674.92 MiB -71.4%
application_* ~482 MiB 236.07 MiB -51.0%
agent_usage* ~419 MiB 227.14 MiB -45.8%
agent_cells* ~275 MiB 114.32 MiB -58.4%
agent_facts+pins* ~406 MiB 367.52 MiB -9.4%
agent_memory* ~203 MiB 180.81 MiB -10.9%
other ~1,417 MiB 811.66 MiB -42.7%
总计(VACUUM 前活跃页) 24.70 GiB 10.54 GiB -57.3%(2.34×)
总计(VACUUM 后) 24.70 GiB 9.51 GiB -61.5%(2.60×)
  • m0058: 0.25 s | m0059: 80.57 s | m0060: 333.71 s | m0061: 55.79 s | m0062/m0063: 0.00 s | m0064: 8.49 s | m0065: 6.48 s | 后台重压(8 MiB 预算): 125.26 s
  • PRAGMA foreign_key_check = 0,PRAGMA quick_check = ok,FTS5 integrity-check = OK

Refs #7272

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English

I ran the full 7-PR stack (#7285–#7290 + #7318 at c45173350e) end-to-end on an offline CoW clone of my real 1,714.77 MiB database (~130 MiB actual content, previously 13.2×):

  • After migrations (m0056–m0064) + full background recompression + incremental_vacuum(512) (no full VACUUM): 726.51 MiB (-57.6%, 5.6×).
  • After full VACUUM: 641.55 MiB (-62.6%, 4.9×) — hitting the 3–5× target in place even before #7290's new-write structural dedup applies.
  • application_* dropped -58.3% (54.18 -> 22.58 MiB, m0063 took 1.40 s), agent_cells* dropped -63.5% (22.53 -> 8.23 MiB, m0064 took 0.85 s), and agent_usage* dropped -43.8% (38.62 -> 21.69 MiB). PRAGMA foreign_key_check (0 errors), PRAGMA quick_check (ok), and FTS5 integrity-check all passed.

One must-fix bug before merging

  1. Missed compressed-column reader in plugins/agent/state/src/usage/auxiliary.rs:387-395: AuxiliarySource::ApplicationOperation still queries o.request_json, k.contract_json directly and reads them with r.get::<_, String>(2)? / r.get::<_, String>(3)?. Because 0063 and the new write paths store both columns as SQLite BLOBs (zstd-compressed or raw bytes), r.get::<_, String> will fail deterministically with InvalidColumnType(..., Blob) on any AuxiliarySource::ApplicationOperation call. Updating it to read o.request_encoding / k.contract_encoding and decode via maka_event_log::content::decode_inline_text (plus a regression test) fixes this.

Minor notes

  1. Single-SAVEPOINT synchronous rebuild on very large DBs: On my 1.71 GiB DB m0063 + m0064 only took 2.25 s, which is great, though both rebuild and compress synchronously inside the outer SAVEPOINT via TEMP tables—worth keeping an eye on total WAL peak when combined with m0059/m0060 on 20+ GiB DBs.
  2. Module naming drift: migrate_v62.rs (actually migration 0063) and migrate_v63.rs (actually migration 0064) are off by one after the 0056 rebase.
中文

我在本地真实 1,714.77 MiB 库(约 130 MiB 实际内容,原 13.2×)的离线 CoW 克隆上端到端跑完了整个 7-PR 栈(#7285–#7290 + #7318,c45173350e):

  • 迁移(m0056–m0064)+ 全量后台重压 + incremental_vacuum(512)(不跑全库 VACUUM):726.51 MiB(-57.6%,5.6×)。
  • 全库 VACUUM 后:641.55 MiB(-62.6%,4.9×)——还没算 #7290 对新写入的结构去重,原地升级就已经打进了 3–5× 目标。
  • application_* 下降 -58.3%(54.18 -> 22.58 MiB,m0063 仅耗时 1.40 s),agent_cells* 下降 -63.5%(22.53 -> 8.23 MiB,m0064 仅耗时 0.85 s),agent_usage* 下降 -43.8%(38.62 -> 21.69 MiB)。PRAGMA foreign_key_check(0 错)、PRAGMA quick_check(ok)与 FTS5 integrity-check 全部通过。

合并前必须修的一处 Bug

  1. plugins/agent/state/src/usage/auxiliary.rs:387-395 漏改压缩列读取:AuxiliarySource::ApplicationOperation 仍直接查询 o.request_json, k.contract_json 并用 r.get::<_, String>(2)? / r.get::<_, String>(3)? 读取。由于 0063 和新写路径都将这两列以 SQLite BLOB 写入(zstd 压缩或原始字节),触发 AuxiliarySource::ApplicationOperation 时会稳定报 InvalidColumnType(..., Blob)。改为同时读 o.request_encoding / k.contract_encoding 并经 maka_event_log::content::decode_inline_text 解码(并补一条回归测试)即可修复。

其余小点

  1. 超大库单 SAVEPOINT 同步重建:在我 1.71 GiB 库上 m0063 + m0064 合计只要 2.25 s,速度很快;不过两者在单外层 SAVEPOINT 内同步走 TEMP 表压缩重建,20+ GiB 库上叠在 m0059/m0060 后面时建议一并留意总 WAL 峰值。
  2. 模块命名偏移:rebase 到 0056 之后,migrate_v62.rs(实际为 0063)与 migrate_v63.rs(实际为 0064)和实际迁移版本号差 1。

@M4n5ter
M4n5ter force-pushed the perf/7272-compress-non-content-tables branch from c451733 to 67c5436 Compare November 26, 2026 15:36
@M4n5ter

M4n5ter commented Nov 26, 2026

Copy link
Copy Markdown
Member Author
English

@Astro-Han Thanks for testing end-to-end on your real DB clone and catching usage/auxiliary.rs! Rebased onto the updated stack and fixed in 67c5436130:

  1. plugins/agent/state/src/usage/auxiliary.rs compressed-column decode: Updated AuxiliarySource::ApplicationOperation to select o.request_encoding and k.contract_encoding and decode both BLOB columns via maka_event_log::content::decode_inline_text. Added regression test application_operation_auxiliary_source_decodes_compressed_and_raw_blob_rows covering both compressed (encoding != 0) and raw BLOB (encoding = 0) rows. Audited all peer Rust readers of application_operations, application_operation_contracts, application_intents, agent_cells, and agent_usage_calls with no remaining raw reads found.
  2. Module & migration naming alignment: Renamed platform/event-log/src/applications/migrate_v62.rs -> migrate_v63.rs and plugins/agent/state/src/cells/migrate_v63.rs -> migrate_v64.rs, plus aligned internal temp table / test / upgrade_compat.rs assertion labels to v63 / v64.

Full top-of-stack verification on 67c5436130:

中文

@Astro-Han 感谢在真实库克隆上端到端实测并揪出 usage/auxiliary.rs 的漏改!已同步 rebase 并在 67c5436130 修复:

  1. plugins/agent/state/src/usage/auxiliary.rs 压缩列解码:AuxiliarySource::ApplicationOperation 改为同时查询 o.request_encoding 与 k.contract_encoding,通过 maka_event_log::content::decode_inline_text 严格解码,并补回归测试 application_operation_auxiliary_source_decodes_compressed_and_raw_blob_rows 同时覆盖压缩行(encoding != 0)与 raw BLOB 行(encoding = 0)。已全仓核查上述五张表的其余 Rust 读路径,未发现同类漏改。
  2. 模块与版本号命名对齐:将 migrate_v62.rs 重命名为 migrate_v63.rs、migrate_v63.rs 重命名为 migrate_v64.rs,并同步对齐内部临时表名、测试名与 upgrade_compat.rs 断言文案到 v63 / v64。

栈顶 67c5436130 全套验证通过:

@UncertaintyDeterminesYou4ndMe

Copy link
Copy Markdown
Contributor

Posted by Claude Opus 5.5 (AI).

A data point from a different workload, measured on the full stack at c45173350e.

The database. A desktop trial root created on 11-23, so every row was written by current main (after #7102 and #7115). 444.9 MiB, 92 runs (all terminal), 928 model steps, 24 fork snapshots, many pasted screenshots. Text content is about 13.8 MiB: recall bodies split by fields_json into user text, assistant text, reasoning, tool arguments and tool output, each distinct text counted once, receipts and images left out (21.4 MiB with receipts). Image originals are 34.0 MiB in 45 contents rows.

The upgrade. On a .backup copy: migration runner with the product migration list, then recompress_legacy_batch until done, then VACUUM. All migrations took 6.3 s (m0059: 4.3 s), recompression 2.0 s, VACUUM 1.4 s. quick_check ok, FTS5 integrity-check ok on all five FTS tables, every contents row decodes to its original bytes.

Before After, no VACUUM After VACUUM
File 444.9 MiB ~260 MiB 246.3 MiB
÷ text content 32× 19× 18×
÷ (text + image originals) 9.3× 5.4× 5.2×

With image bytes taken out of both sides, the upgraded file is about 14× its text content.

Where the 246 MiB is, per step (246 MiB ÷ 928 steps ≈ 265 KiB; new text content ≈ 15 KiB per step):

Area MiB KiB per step
Prompt chunks (zstd) 60.2 65
Image originals 32.2 35
agent_recall* 32.5 35
agent_history_snapshot* 30.8 33
Step metadata 10.8 12
agent_session_history* 11.5 12
Fact envelopes 8.5 9

Prompt chunks.

  • The 928 frozen prompts total 2,067 MiB logical and 89.9 MiB of distinct chunks (60.2 MiB after per-chunk zstd).
  • 864 prompts extend an earlier prompt by appending; the appended bytes total 44.6 MiB, of which 20.5 MiB is base64 image data. The other 64 are first steps or prompts whose earlier bytes changed (for example a Skill revision hash in the instructions).
  • Images are stored twice: as originals, and as base64 inside prompt chunks. 35 distinct PNG images appear 138 times across chunks; one appears in 23 different chunks.
  • Most chunks are shared prefixes, so the latest request of each session holds nearly every chunk of its earlier requests. Chunks referenced only by requests that no current reader restores (not the latest Main request of a session's latest run, which next-input prediction restores, and not held by a fork snapshot) are 13.7 MiB of the 60.2 MiB. No request here has adjudications, and there are no compaction or summary requests.

agent_history_snapshot*. 30.8 MiB for 24 snapshots, about 1.3 MiB each: nav_chunks 7.2, nav_terms_data 7.0, entries 5.2, the rest under 1.2 each. No PR in the stack touches these tables.

Two questions:

  1. Is the 3–5× target in perf(agent-state): stop storing session content ~13× in the runtime database #7272 meant to count images as content? On this database the answer moves the result from 18× to 5.2×.
  2. perf(storage): compress application tables, agent_cells bodies, and intern usage JSON blobs #7318 says Fixes #7272. Is the issue meant to close with the stack, given how much the result depends on the workload?

@M4n5ter

M4n5ter commented Nov 27, 2026

Copy link
Copy Markdown
Member Author
English

@UncertaintyDeterminesYou4ndMe Thanks a ton for measuring on a fresh post-#7102/#7115 screenshot-heavy DB — that per-step breakdown was super valuable!

Answering both questions:

  1. Does 3–5× count image originals as content? Yes — pasted screenshots and other user/tool media are actual content bytes, so 9.3× -> 5.2× against text + image originals is the intended denominator.
  2. Fixes #7272 vs keeping #7272 open: Great point — I've updated perf(storage): compress application tables, agent_cells bodies, and intern usage JSON blobs #7318 from Fixes #7272 to Refs #7272 so perf(agent-state): stop storing session content ~13× in the runtime database #7272 stays open for the remaining new-write amplification sources you surfaced.

In fact, tracing your prompt-chunk finding uncovered an even bigger multiplier in snapshot_prompt: serialize_source::exact_message_async base64-encoded every media part (1.33×) into CaptureArena, and canonical_prompt::project::decode_media immediately decoded a raw binary copy (+1.0×) back into the same arena (2.33× per image inside a single prompt), and any 1-byte prefix shift (like a skill revision hash) broke 32 KiB chunk alignment and re-stored all 2.33× again.

I just opened #7341 (stacked on #7318, zero SQL migration) to fix this cleanly via Layout v3 + FrozenInput.prompt_media — replacing inline base64+decoded media in prompt arenas with compact content-addressed ContentRef placeholders (cryptographically bound by 32-byte SHA-256 inside the arena records and pinned via RequestSpec.request_contents for both live GC and fork snapshots). That eliminates the duplicated base64/binary image chunks completely on new writes across screenshots and CUA sessions.

The other two buckets you called out — agent_history_snapshot* (nav_chunks/entries) and pruning unreachable intermediate prompt chunks — are great independent follow-ups under #7272 once this stack lands.

中文

@UncertaintyDeterminesYou4ndMe 非常感谢在 #7102/#7115 之后新建的多截图桌面库上做了一轮端到端实测,按 step 拆出来的占比太有价值了!

回复你的两个问题:

  1. 3–5× 口径是否包含图片原件? 包含——用户粘贴的截图和其他媒体原件本身就是有效内容字节,所以按 文本 + 图片原件 算出的 9.3× -> 5.2× 是合理口径。
  2. #7318 的 Fixes #7272:说得对,已经把 perf(storage): compress application tables, agent_cells bodies, and intern usage JSON blobs #7318 改成 Refs #7272,留着 perf(agent-state): stop storing session content ~13× in the runtime database #7272 继续追剩余的新写放大源。

顺着你指出的 prompt chunk 重复 base64 查代码,发现现场比预想的更夸张:serialize_source::exact_message_async 先把每张图 base64(1.33×)写进 CaptureArena,紧接着 canonical_prompt::project::decode_media 又解码一份原始二进制(+1.0×)追加进同一个 arena(单次 prompt 里每张图占 2.33×),且前面只要错位 1 字节(如 Skill revision 变化)就会把所有图片的 32 KiB 切片全部重写一遍。

刚在 #7318 上面补了 #7341(零 SQL 迁移),通过 Layout v3 + FrozenInput.prompt_media 把媒体从 prompt arena 外置成 ~100 B 内容寻址占位,arena 记录内绑定 32 字节 SHA-256 并在恢复时 fail-closed 校验,原图直接 CAS 复用 contents 现有行并经 request_contents 自动纳入活库与 fork snapshot pin。剩下你点出的 agent_history_snapshot* 和过期中间 prompt chunk 清理可以在这栈合入后留在 #7272 下面独立跟进。

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English

Confirmed on b4da5cabea that plugins/agent/state/src/usage/auxiliary.rs:384-429 now selects o.request_encoding and k.contract_encoding and decodes both BLOB columns via decode_inline_text (with regression coverage for both compressed and raw rows). I also audited all remaining Rust and SQL readers of application_*, agent_cells, and agent_usage_calls with no unmigrated raw reads left, and verified 0064/0065 match migrations.lock.json and upgrade_compat.rs.

Minor non-blocking note: the header comments in 0064_compress_application_tables.sql:20 and 0065_compress_cells_and_usage.sql:19 still mention migrate_v62 / migrate_v63 (if you touch them before merge, remember to refresh migrations.lock.json).

Ready to merge once the base stack lands.

中文

已确认 b4da5cabea 中 usage/auxiliary.rs:384-429 已读取 request_encoding / contract_encoding 并通过 decode_inline_text 解码(含压缩与原始行回归测试);排查了全仓对 application_*、agent_cells、agent_usage_calls 的全部读点无遗漏,且 0064/0065 与 migrations.lock.json、upgrade_compat.rs 完全对齐。

小提示:0064/0065 SQL 头部注释里还留着 migrate_v62 / migrate_v63(合并前若修改需同步刷新 migrations.lock.json)。前置 PR 合并后可直接合入。

@M4n5ter
M4n5ter force-pushed the perf/7272-compress-non-content-tables branch from b4da5ca to aa95520 Compare November 27, 2026 06:29
@M4n5ter

M4n5ter commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

@Astro-Han Quick heads-up on the rebase push aa95520c04: alongside rebasing onto #7290 (which now inherits version-sorted migrations from #7289), we added read_compat guards in applications/{operations,intents}.rs for unmigrated read-only inspection (keeping write-path read() pragma-free), skipped zstd compression in WriteDispatch when application_operation_contracts already contains the digest, and tightened upgrade_and_rebuild_preserve_the_original_senders_of_pending_requests to assert v57 runs before v64 compresses pending requests.

…ntern usage JSON blobs

Compress remaining large non-contents JSON tables and intern repeated usage
JSON metadata via atomic forward migrations 0064 and 0065:
- Migration 0064 (platform/event-log): rebuild and compress
  application_operation_contracts.contract_json,
  application_operations.request_json, and
  application_intents.{reference_json, recovery_json} with inline encoding
  columns (preserving sqlite_sequence cursor, FKs, triggers, and views) and
  decode via content::decode_inline_text / maka_content_text.
- Migration 0065 (plugins/agent/state): rebuild and compress agent_cells.body
  with promoted (owner_attempt, owner_call) columns backing agent_cell_parent,
  and intern repeated agent_usage_calls.{binding_json, quote_json} into
  agent_usage_json_blobs (registered in store/removal.rs).
- Update all agent_cells and usage SQL queries (including quiescence,
  source_tree, and reconcilable waits) and verify v64/v65 invariants in
  upgrade_compat.rs.

Refs #7272

Generated-by: Antigravity
@M4n5ter
M4n5ter force-pushed the perf/7272-compress-non-content-tables branch from aa95520 to 40ce0fa Compare November 27, 2026 09:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Under 2500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants