docs feat/attachment-store-contract-2f-b #3 / 3
aaronrene · 22 days ago · Jul 2, 2026 · Diff

docs: freeze attachment gates contract (Scooling 2F-b-a, Thinking)

Freeze docs/ATTACHMENT-STORE-CONTRACT-2F-b.md — the Knowtation side of the Scooling Phase 2F entry criteria (attachment listing, scoped metadata reads, data-lifecycle/consent/deletion, prompt-injection labeling).

Attachments are DERIVED (read-time) from three existing sources: media/** files, frontmatter Mist blob IDs (SPEC §2.4), and embedded body URLs (media-url-extract). Durable state is a small consent/retention overlay (hub_attachment_store.json), mirroring the calendar store. Read-only listAttachments/getAttachment over three identical surfaces (CLI/MCP/Hub REST); scope INHERITED from the owning note (deny-by-default); *ForClient content-minimization (no bytes/paths/credentialed URLs/OCR); untrusted injection-labeling; automatic deletion propagation. Seven-tier test matrix + hosted smoke checklist + OpenAPI shapes + Scooling mediaLibraryAdapter/v0 mapping (§6). Mirrors TASK-STORE-CONTRACT-2G.md structure.

Contract only: no lib/attachments code, no Hub routes, no posture flips. Build is 2F-b-b (Auto) on feat/phase-2f-b-attachment-store. Consent-toggle/OCR/connector writes are separate Tier 3 gates.

sha256:82c82af23c41421d6b82adf4f0e28c036a500928d2e7a7741aa22d8527dcdf5a sha
+61 ~5 −3 symbols
sha256:e2fd816d4e5ffeb1171d249bec1882da3c00541802a982e67483e52eb55665e2 snapshot
+61
symbols added
~5
symbols modified
−3
symbols removed
0
dead code introduced
Semantic Changes 69 symbols
+ Attachment Gates — List/Get + Consent/Deletion Contract (Scooling Phase 2F-b, Step 2F-b-a) section Attachment Gates — List/Get + Consent/Deletion Contract (Scooling Phase 2F-b, Step 2F-b-a) L1–542
+ attachment/v0 (derived view) section 1. Canonical record — knowtation.attachment/v0 (derived view) L84–134
+ 1 Id derivation and regexes (pin v0) section 1.1 Id derivation and regexes (pin v0) L110–134
+ table@L117 section table@L117 L117–122
+ table@L123 section table@L123 L123–131
+ table section table L89–105
+ Hosted smoke checklist (2F-b-b deliverable) section 10. Hosted smoke checklist (2F-b-b deliverable) L414–444
+ table section table L428–438
+ OpenAPI wire shapes (land with routes in 2F-b-b) section 11. OpenAPI wire shapes (land with routes in 2F-b-b) L444–490
+ 1 GET /api/v1/attachments section 11.1 GET /api/v1/attachments L448–470
+ code[yaml] variable variable code[yaml] L453–467
+ 2 GET /api/v1/attachments/{id} section 11.2 GET /api/v1/attachments/{id} L470–490
+ code[yaml] variable variable code[yaml] L474–484
+ Acceptance (2F-b-a) section 12. Acceptance (2F-b-a) L490–503
+ 2F-b-b implementation checklist (Auto — mechanical) section 13. 2F-b-b implementation checklist (Auto — mechanical) L515–542
+ code[bash] variable variable code[bash] L535–539
+ table section table L519–532
+ json section 2. Policy overlay store — hub_attachment_store.json L134–175
+ 1 Store rules section 2.1 Store rules L157–167
+ table section table L159–166
+ 2 Persistence primitives (2F-b-b — new, mirrors calendar) section 2.2 Persistence primitives (2F-b-b — new, mirrors calendar) L167–175
+ code[jsonc] variable variable code[jsonc] L140–156
+ mjs section 3. Derivation + read operations — lib/attachments/attachment-store.mjs L175–208
+ 1 Derivation sources (reuse — do not duplicate) section 3.1 Derivation sources (reuse — do not duplicate) L181–192
+ table section table L183–188
+ 2 Read operations (v0 surface) section 3.2 Read operations (v0 surface) L192–199
+ table section table L194–198
+ 3 Client projections (*ForClient) section 3.3 Client projections (*ForClient) L199–208
+ table section table L201–205
+ mjs section 4. Shared handlers — lib/attachments/attachment-handlers.mjs L208–235
+ table@L212 section table@L212 L212–216
+ table@L223 section table@L223 L223–232
+ Triple-surface parity (CLI = MCP = Hub REST) section 5. Triple-surface parity (CLI = MCP = Hub REST) L235–271
+ 1 CLI — knowtation attachment … section 5.1 CLI — knowtation attachment … L239–249
+ code variable variable code L241–245
+ 2 MCP — attachment_list, attachment_get section 5.2 MCP — attachment_list, attachment_get L249–256
+ 3 Hub REST section 5.3 Hub REST L256–271
+ code variable variable code L260–265
+ Scooling consumer mapping (for later live wire — not 2F-b-b Knowtation scope) section 6. Scooling consumer mapping (for later live wire — not 2F-b-b Knowtation scope) L271–300
+ table section table L276–288
+ Scope enforcement (server-side, deny-by-default) — scope inheritance section 7. Scope enforcement (server-side, deny-by-default) — scope inheritance L300–320
+ table section table L304–314
+ Fail-closed rules section 8. Fail-closed rules L320–346
+ Seven-tier test matrix (2F-b-b Auto) section 9. Seven-tier test matrix (2F-b-b Auto) L346–414
+ mjs section 1. unit — test/attachment-store-unit.test.mjs L352–363
+ mjs section 2. integration — test/attachment-list-get-parity-integration.test.mjs L363–370
+ mjs section 3. e2e — test/attachment-store-e2e.test.mjs L370–376
+ mjs section 4. stress — test/attachment-store-stress.test.mjs L376–381
+ mjs section 5. data-integrity — test/attachment-store-data-integrity.test.mjs L381–390
+ mjs section 6. performance — test/attachment-store-performance.test.mjs L390–395
+ mjs section 7. security — test/attachment-store-security.test.mjs L395–414
+ Non-goals (2F-b) section Non-goals (2F-b) L503–515
+ Simple summary section Simple summary L48–64
+ Technical summary section Technical summary L64–84
~ docs/OVERSEER-HANDOVER.md .md 7 symbols added, 3 symbols removed, 5 symbols modified
~ table
Next step at a glance (2026-07-02) section Next step at a glance (2026-07-02) L10–25
table section table L12–22
Verified snapshot (P1b complete) section Verified snapshot (P1b complete) L25–59
+ Attachment gates (Scooling Phase 2F-b unblock) section Attachment gates (Scooling Phase 2F-b unblock) L24–37
+ table section table L26–34
+ Next step at a glance (2026-07-01) section Next step at a glance (2026-07-01) L10–24
+ table section table L12–21
+ Next-chat prompt — P1b-c merge + mirror · Model: Auto (Tier 3) section Next-chat prompt — P1b-c merge + mirror · Model: Auto (Tier 3) L63–81
+ code[text] variable variable code[text] L67–78
+ Verified snapshot (P1b-c) section Verified snapshot (P1b-c) L37–63
~ table

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:82c82af23c41421d6b82adf4f0e28c036a500928d2e7a7741aa22d8527dcdf5a --body "your comment"