[PR #1004] [MERGED] feat(slurp2): Creator continuity ledger (slice 7) #1236

Closed
opened 2026-10-21 05:06:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1004
Author: @Gunterlie
Created: 9/21/2026
Status: ✅ Merged
Merged: 9/21/2026
Merged by: @Gunterlie

Base: producing-content ← Head: slice/07-continuity-ledger


📝 Commits (1)

  • 6eedfb6 feat(slurp2): add the Creator continuity ledger

📊 Changes

19 files changed (+1134 additions, -275 deletions)

View changed files

➕ artifacts/slurp2-0.1.29.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/slurp2/CHANGELOG.md (+6 -0)
📝 packages/slurp2/manifest.json (+3 -3)
📝 packages/slurp2/server.mjs (+235 -235)
📝 packages/slurp2/src/engine/packages/server/src/db/schema/slurp.ts (+72 -0)
➕ packages/slurp2/src/engine/packages/server/src/slp/data/continuity/slp-continuity-storage.ts (+340 -0)
📝 packages/slurp2/src/engine/packages/server/src/slp/data/creators/slp-creators-storage-2.ts (+2 -0)
📝 packages/slurp2/src/engine/packages/server/src/slp/data/creators/slp-creators-storage-3.ts (+2 -0)
📝 packages/slurp2/src/engine/packages/server/src/slp/data/host/slp-storage-constants.ts (+6 -0)
➕ packages/slurp2/src/engine/packages/server/src/slp/modules/continuity/slp-continuity-rules.ts (+122 -0)
➕ packages/slurp2/src/engine/packages/shared/src/slp/slp-continuity.ts (+146 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
➕ tests/slurp-continuity-ledger.regression.ts (+163 -0)

📄 Description

Why

Slice 7 of plan/concept.md. Slurp already has Creator state, thread notes, promises, and projects. It has no single place that stores a durable fact once, together with its origin and its readers. Slices 8–11 extract message events into that store and read it into prompts. This slice adds the storage and the privacy rules they depend on.

What changed

  • shared/src/slp/slp-continuity.ts defines the vocabulary:
    • reality scopes (canon, slurp, conversation, roleplay, game, campaign);
    • audience scopes (thread_private, fan_private, creator_private, creator_public, cross_platform, canon_only);
    • statuses, source labels, fact and event types, contributions, proposal risk and status, and read surfaces;
    • the fact and event record types.
  • New slurp2_continuity_facts, slurp2_continuity_events, and slurp2_continuity_proposals tables, registered for backup. Every record carries the source identity and the Slurp account.
  • modules/continuity/slp-continuity-rules.ts holds one read rule for every surface:
    • Thread- and fan-private records never reach a post, public or locked, and never reach another fan's thread.
    • canon_only records reach only the editor.
    • Conversation, roleplay, and game records are stored but never read by a Slurp prompt.
    • Prompts read only confirmed or active records that have not expired.
    • Retracted and rejected are final statuses.
    • Retention: finished events are kept 30 days, with a cap of 500 events per Creator.
  • data/continuity/slp-continuity-storage.ts:
    • Events are idempotent by fingerprint.
    • A fact is bounded, and an empty fact is refused.
    • A manual edit becomes a manual contribution. Source retraction skips manual contributions.
    • Status moves follow the rules. Reads go through the read rule. Retention runs on write.
  • Account deletion now removes the Creator's ledger, plans, campaigns, and shoots on both delete paths. Before this, the planner and shoot rows from earlier slices outlived the deleted account.
  • Slurp2 0.1.29.

Deviation from the plan: there is no separate slurp2_creator_canon_map table. The Slurp accounts table already enforces one Creator per (sourceKind, sourceEntityId) through uniqueBy. The ledger stores both ids instead of keeping a second copy of that mapping.

Validation

  • New tests/slurp-continuity-ledger.regression.ts covers:
    • every audience against every surface, and thread isolation;
    • reality scopes, readable statuses, and expiry;
    • finality of retracted and rejected records;
    • retention by window and by cap;
    • storage wiring: idempotency, the single read rule, manual protection, status rules, and text bounds;
    • that both account-delete paths remove all seven tables.
  • slurp2-backup-roundtrip covers the new tables.
  • npm run check: 0 errors, no new warnings. Architecture, typecheck, locale, catalog lane, catalog, release-notes, and git diff --check pass.
  • Full Slurp sweep: 144 pass. No failure is new relative to the branch base.
  • Nothing writes to the ledger or reads from it yet. Slice 8 adds the writers.
  • Known red: the Slurp Remastered browser suite. The failing set is the same one that was red before slice 1 (#996).

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1004 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 9/21/2026 **Status:** ✅ Merged **Merged:** 9/21/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `producing-content` ← **Head:** `slice/07-continuity-ledger` --- ### 📝 Commits (1) - [`6eedfb6`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6eedfb663540c306965e6bdc8c3f2c6fbd9cc400) feat(slurp2): add the Creator continuity ledger ### 📊 Changes **19 files changed** (+1134 additions, -275 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/slurp2-0.1.29.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/slurp2/CHANGELOG.md` (+6 -0) 📝 `packages/slurp2/manifest.json` (+3 -3) 📝 `packages/slurp2/server.mjs` (+235 -235) 📝 `packages/slurp2/src/engine/packages/server/src/db/schema/slurp.ts` (+72 -0) ➕ `packages/slurp2/src/engine/packages/server/src/slp/data/continuity/slp-continuity-storage.ts` (+340 -0) 📝 `packages/slurp2/src/engine/packages/server/src/slp/data/creators/slp-creators-storage-2.ts` (+2 -0) 📝 `packages/slurp2/src/engine/packages/server/src/slp/data/creators/slp-creators-storage-3.ts` (+2 -0) 📝 `packages/slurp2/src/engine/packages/server/src/slp/data/host/slp-storage-constants.ts` (+6 -0) ➕ `packages/slurp2/src/engine/packages/server/src/slp/modules/continuity/slp-continuity-rules.ts` (+122 -0) ➕ `packages/slurp2/src/engine/packages/shared/src/slp/slp-continuity.ts` (+146 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) ➕ `tests/slurp-continuity-ledger.regression.ts` (+163 -0) </details> ### 📄 Description ## Why Slice 7 of `plan/concept.md`. Slurp already has Creator state, thread notes, promises, and projects. It has no single place that stores a durable fact once, together with its origin and its readers. Slices 8–11 extract message events into that store and read it into prompts. This slice adds the storage and the privacy rules they depend on. ## What changed - `shared/src/slp/slp-continuity.ts` defines the vocabulary: - reality scopes (`canon`, `slurp`, `conversation`, `roleplay`, `game`, `campaign`); - audience scopes (`thread_private`, `fan_private`, `creator_private`, `creator_public`, `cross_platform`, `canon_only`); - statuses, source labels, fact and event types, contributions, proposal risk and status, and read surfaces; - the fact and event record types. - New `slurp2_continuity_facts`, `slurp2_continuity_events`, and `slurp2_continuity_proposals` tables, registered for backup. Every record carries the source identity and the Slurp account. - `modules/continuity/slp-continuity-rules.ts` holds **one read rule for every surface**: - Thread- and fan-private records never reach a post, public or locked, and never reach another fan's thread. - `canon_only` records reach only the editor. - Conversation, roleplay, and game records are stored but never read by a Slurp prompt. - Prompts read only confirmed or active records that have not expired. - Retracted and rejected are final statuses. - Retention: finished events are kept 30 days, with a cap of 500 events per Creator. - `data/continuity/slp-continuity-storage.ts`: - Events are idempotent by fingerprint. - A fact is bounded, and an empty fact is refused. - A manual edit becomes a `manual` contribution. Source retraction skips manual contributions. - Status moves follow the rules. Reads go through the read rule. Retention runs on write. - **Account deletion now removes the Creator's ledger, plans, campaigns, and shoots on both delete paths.** Before this, the planner and shoot rows from earlier slices outlived the deleted account. - Slurp2 0.1.29. **Deviation from the plan:** there is no separate `slurp2_creator_canon_map` table. The Slurp accounts table already enforces one Creator per `(sourceKind, sourceEntityId)` through `uniqueBy`. The ledger stores both ids instead of keeping a second copy of that mapping. ## Validation - New `tests/slurp-continuity-ledger.regression.ts` covers: - every audience against every surface, and thread isolation; - reality scopes, readable statuses, and expiry; - finality of retracted and rejected records; - retention by window and by cap; - storage wiring: idempotency, the single read rule, manual protection, status rules, and text bounds; - that both account-delete paths remove all seven tables. - `slurp2-backup-roundtrip` covers the new tables. - `npm run check`: 0 errors, no new warnings. Architecture, typecheck, locale, catalog lane, catalog, release-notes, and `git diff --check` pass. - Full Slurp sweep: 144 pass. No failure is new relative to the branch base. - Nothing writes to the ledger or reads from it yet. Slice 8 adds the writers. - Known red: the Slurp Remastered browser suite. The failing set is the same one that was red before slice 1 (#996). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:06:27 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1236
No description provided.