From b42993322ce6455b143f831e67206766ff710e3b Mon Sep 17 00:00:00 2001 From: Robert Allan James Date: Thu, 13 Aug 2026 09:32:16 -0400 Subject: [PATCH] FABRIC-2.md: close block_subsystem encoding-field item, wider scope found Investigated 2026-08-13: not just the encoding field -- blk_get_meta()/ blk_set_meta() and the whole blk_meta_t on-disk layout have zero callers. Captain Bob's ruling: flag and leave as-is, expected to be consumed once Artemis's design (content-typed/owned/ACL'd blocks) is completed. No code changed. Co-Authored-By: Claude Sonnet 5 --- FABRIC-2.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/FABRIC-2.md b/FABRIC-2.md index 468e054..aee95e7 100644 --- a/FABRIC-2.md +++ b/FABRIC-2.md @@ -157,9 +157,20 @@ and recorded. call, 2026-08-13: leave the three stubs in place as scaffolding for a future per-arch MMU milestone rather than deleting or wiring in a no-op call site now — ruling recorded, closed as investigated/not-a-bug rather than left open. Found during item 4.3.5a. -- [ ] `include/block_subsystem.h:168`'s `encoding` field (ASCII/UTF-8/binary) is dead - metadata — nothing reads or writes it. A ruling on wiring it up vs. removing it is still - open. (FABRIC.md §27.6) +- [x] **`include/block_subsystem.h:168`'s `encoding` field (ASCII/UTF-8/binary) is dead + metadata — nothing reads or writes it.** (FABRIC.md §27.6) Investigated 2026-08-13, scope + turned out wider than the field itself: `blk_get_meta()`/`blk_set_meta()` + (`src/block_subsystem.c:881,903`) are the only public API for the whole `blk_meta_t` + struct and have **zero callers anywhere in the tree** — not just `encoding` but + `content_type`, `content_length`, `owner_id`, `permissions`, `acl_block`, `signature`, + `entropy`, `hash`, the chain fields, and `app_data[15]` are all unused. The struct is a + real fixed on-disk byte layout (packed 341 bytes/block into `META_REGION_OFFSET`, + `src/block_subsystem.c:69-71`), serialized via `meta_to_slice()`/`meta_from_slice()` + during cache writeback/load — so it isn't free-standing dead code to delete, removing a + field would shift every subsequent field's on-disk offset. **Ruling (Captain Bob, + 2026-08-13): flag and leave as-is** — this metadata subsystem is scaffolding expected to + get consumed once Artemis's design (content-typed/owned/ACL'd blocks) is completed, not a + bug to fix now. - [ ] `tools/README.md` documents a `fbtest.c` example that does not actually exist in `tools/` — stale-doc discrepancy. - [ ] `hotwords_cache_promote()` has a NULL-write bug on a full cache. Unreachable under