🤖 merge: main into the suite branch, and what the two lines disagreed about
Eighteen commits of main — the Notion connector, multi-file drop, draft 5 of the spec — against the suite strand. Seven files conflicted and the prose ones were not mechanical: both lines rewrote §1's review history, §4.1's S2 contract, §4.3's admission and §10's gate list. WHERE MAIN WAS RIGHT AND THIS BRANCH WAS WRONG. Three places, all mine: §2 said memoria holds "its own roster copy" four lines above main's paragraph explaining that the owners list is not a roster and why calling it one is the mistake. Main's distinction stands; ruling 4's pulled copy is a third thing and now says so. §4.2 said "memoria's own grants are authoritative". Main had already found that memoria has neither members nor grants — the test is admission plus presence, two facts, nothing else. Taken wholesale. §6.5 said memoria "pulls the roster and fires a warm-up S2 on wake". Main had corrected exactly that: S2 takes a person ref and there is nobody there on a wake. The roster pull is fine (call 8 carries no asker); the S2 was the same error draft 3 made and draft 4 fixed, reintroduced by me. THE ONE REAL DISAGREEMENT, LEFT OPEN RATHER THAN DECIDED. Draft 4 cut a fifth S2 value, AHEAD, for a sibling that is BEHIND memoria — its log stops short of our revision, or it has no row at all. STALE means we are behind, NOT_VISIBLE is silent and would delete history the sibling holds, and UNKNOWN reports that nobody answered when the sibling did. Three wrong homes, so a fourth value. suite.Authorization has four constants, and revision 7 rules the case UNKNOWN — on my word, given to the suite session from a branch that had not read draft 4. So the wire shape is the contract's four, the loss is recorded at the point of use and in §13, and it is raised with the suite as a contract change rather than settled here. §1.10's lesson, one repository over, with me on the wrong side of it. GATE NUMBERING. Both lines added gates 22 to 27. Main's six are cited some thirty times in its prose, so they keep their numbers and mine move to 28-33; §10 now runs 1-33 with no duplicates, and the Go tests follow. Gate 17 caught main's five connector routes on the way in, which is the gate working: they could not reach the app until somebody declared them. The egress gate keeps main's allowedNetworkDirs design rather than my hardcoded path — a list with "exactly N" asserted, each exemption paid for by a runtime guard the grep cannot perform. The sibling package is the second entry and pays the same way. One predicate, not two: main's owners/isOwner and my admits closure were the same question answered twice inside one struct. Signin collapses back to plain auth. make ci green: vet, fmt-check, test, migration-check.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H3VKtXnq6fSmM2F11Bjcsy
54 files changed,
+12745
−447
.gitignore+12 −0.impeccable/config.json+17 −0AGENTS.md+51 −21QUESTIONS-FOR-PAUL.md+33 −6README.md+35 −11cmd/memoria/main.go+6 −0docs/superpowers/specs/2026-09-03-memoria-design.md+1303 −118docs/superpowers/specs/2026-09-05-notion-ingest-design.md+860 −0internal/memoria/app.go+105 −1internal/memoria/auth.go+18 −28internal/memoria/chunk/chunk.go+44 −9internal/memoria/connector.go+364 −0internal/memoria/connector_models.go+106 −0internal/memoria/delete_test.go+363 −0internal/memoria/handlers.go+823 −87internal/memoria/handlers_connector.go+294 −0internal/memoria/index/index.go+76 −8internal/memoria/index/path_test.go+227 −0internal/memoria/lag_test.go+204 −0internal/memoria/migrations/0003_document_path.sql+10 −0internal/memoria/migrations/0004_create_connectors.sql+18 −0internal/memoria/migrations/schema.sql+19 −1internal/memoria/models.go+11 −0internal/memoria/notion/client.go+364 −0internal/memoria/notion/client_test.go+455 −0internal/memoria/notion/fake_test.go+336 −0internal/memoria/notion/markdown.go+325 −0internal/memoria/notion/traverse.go+425 −0internal/memoria/notion/verify.go+38 −0internal/memoria/render.go+1 −1internal/memoria/seal/seal.go+15 −0internal/memoria/static/drop.js+834 −0internal/memoria/static/memoria.css+155 −2internal/memoria/store.go+304 −31internal/memoria/sync.go+426 −0internal/memoria/templates/connectors.html+22 −0internal/memoria/templates/index.html+142 −4internal/memoria/templates/layout.html+22 −2internal/memoria/templates/notion.html+139 −0internal/memoriatest/admission_test.go+20 −15internal/memoriatest/ancestry_test.go+195 −0internal/memoriatest/app_test.go+33 −0internal/memoriatest/connector_test.go+630 −0internal/memoriatest/container_test.go+51 −0internal/memoriatest/drop_test.go+1253 −0internal/memoriatest/gates_test.go+326 −73internal/memoriatest/harness_test.go+156 −5internal/memoriatest/refresh_test.go+325 −0internal/memoriatest/regress_test.go+68 −0internal/memoriatest/routes_test.go+16 −1internal/memoriatest/signindial_test.go+19 −20internal/memoriatest/tray_test.go+572 −0tools/drive/main.go+76 −2tools/seed/main.go+3 −1
.gitignoreLoading diff…
.impeccable/config.jsonLoading diff…
AGENTS.mdLoading diff…
QUESTIONS-FOR-PAUL.mdLoading diff…
README.mdLoading diff…
cmd/memoria/main.goLoading diff…
docs/superpowers/specs/2026-09-03-memoria-design.mdLoading diff…
docs/superpowers/specs/2026-09-05-notion-ingest-design.mdLoading diff…
internal/memoria/app.goLoading diff…
internal/memoria/auth.goLoading diff…
internal/memoria/chunk/chunk.goLoading diff…
internal/memoria/connector.goLoading diff…
internal/memoria/connector_models.goLoading diff…
internal/memoria/delete_test.goLoading diff…
internal/memoria/handlers.goLoading diff…
internal/memoria/handlers_connector.goLoading diff…
internal/memoria/index/index.goLoading diff…
internal/memoria/index/path_test.goLoading diff…
internal/memoria/lag_test.goLoading diff…
internal/memoria/migrations/0003_document_path.sqlLoading diff…
internal/memoria/migrations/0004_create_connectors.sqlLoading diff…
internal/memoria/migrations/schema.sqlLoading diff…
internal/memoria/models.goLoading diff…
internal/memoria/notion/client.goLoading diff…
internal/memoria/notion/client_test.goLoading diff…
internal/memoria/notion/fake_test.goLoading diff…
internal/memoria/notion/markdown.goLoading diff…
internal/memoria/notion/traverse.goLoading diff…
internal/memoria/notion/verify.goLoading diff…
internal/memoria/render.goLoading diff…
internal/memoria/seal/seal.goLoading diff…
internal/memoria/static/drop.jsLoading diff…
internal/memoria/static/memoria.cssLoading diff…
internal/memoria/store.goLoading diff…
internal/memoria/sync.goLoading diff…
internal/memoria/templates/connectors.htmlLoading diff…
internal/memoria/templates/index.htmlLoading diff…
internal/memoria/templates/layout.htmlLoading diff…
internal/memoria/templates/notion.htmlLoading diff…
internal/memoriatest/admission_test.goLoading diff…
internal/memoriatest/ancestry_test.goLoading diff…
internal/memoriatest/app_test.goLoading diff…
internal/memoriatest/connector_test.goLoading diff…
internal/memoriatest/container_test.goLoading diff…
internal/memoriatest/drop_test.goLoading diff…
internal/memoriatest/gates_test.goLoading diff…
internal/memoriatest/harness_test.goLoading diff…
internal/memoriatest/refresh_test.goLoading diff…
internal/memoriatest/regress_test.goLoading diff…
internal/memoriatest/routes_test.goLoading diff…
internal/memoriatest/signindial_test.goLoading diff…
internal/memoriatest/tray_test.goLoading diff…
tools/drive/main.goLoading diff…
tools/seed/main.goLoading diff…