[PR #1006] [MERGED] feat(slurp2): system events and message continuity extraction (slice 8) #1241

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

📋 Pull Request Information

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

Base: producing-content ← Head: slice/08-continuity-extraction


📝 Commits (1)

  • e6ce7a0 feat(slurp2): write system events and extract continuity from messages

📊 Changes

28 files changed (+1098 additions, -327 deletions)

View changed files

➕ artifacts/slurp2-0.1.30.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/slurp2/CHANGELOG.md (+7 -0)
📝 packages/slurp2/client.js (+21 -21)
📝 packages/slurp2/manifest.json (+5 -5)
📝 packages/slurp2/server.mjs (+243 -241)
📝 packages/slurp2/src/engine/packages/client/src/slp/locales/en.json (+2 -1)
📝 packages/slurp2/src/engine/packages/server/src/slp/data/continuity/slp-continuity-storage.ts (+76 -0)
📝 packages/slurp2/src/engine/packages/server/src/slp/features/feed/reserve/slp-reserve-operation.ts (+19 -0)
📝 packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-generation-service.ts (+10 -12)
📝 packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-post-plan-service.ts (+57 -1)
➕ packages/slurp2/src/engine/packages/server/src/slp/features/messages/slp-continuity-extraction-service.ts (+228 -0)
📝 packages/slurp2/src/engine/packages/server/src/slp/features/messages/slp-messages-contract.ts (+1 -0)
➕ packages/slurp2/src/engine/packages/server/src/slp/modules/continuity/slp-continuity-extraction.ts (+163 -0)
📝 packages/slurp2/src/engine/packages/server/src/slp/modules/continuity/slp-continuity-rules.ts (+17 -0)

...and 8 more files

📄 Description

Why

Slice 8 of plan/concept.md. The ledger from slice 7 had no writers. This adds the two kinds the plan calls for: deterministic events from successful operations, and a bounded extractor over Slurp messages.

What changed

System events (auto-applied, idempotent by fingerprint, never allowed to cost the operation):

  • every published post — creator_public, with intent, delivery, access, and shoot;
  • every chosen skip — creator_private, with its reason.

Message extraction (features/messages/slp-continuity-extraction-service.ts):

  • Runs on the world catch-up tick, with the player present, behind a new continuity model-budget kind that can be capped or turned off on its own.
  • Reads 20 new messages per thread, 3 threads per drain, past a per-thread checkpoint.
  • The model may cite only message ids from a server-built allowlist, and must quote evidence that actually appears in that message. A Creator fact must come from the Creator's own message; a request must come from the fan's.
  • Candidates are capped at 8, deduplicated, and each carries a source hash of the batch for later retraction.
  • Anything unverifiable is dropped, never repaired.

Auto-apply and review (modules/continuity/slp-continuity-extraction.ts):

  • Low risk, applied: the Creator's own boundary, plan, or business statement at ≥0.85 confidence (creator_private), and a fan's request (a thread_private event).
  • Medium, held as a proposal nothing reads: personal disclosures (interest, circumstance) and weaker statements.
  • High, nothing: confidence below 0.5.
  • Promises and disclosures stay thread_private. A failed batch keeps its checkpoint and is read again. Extraction writes only to the ledger.

recordSlurpPostOutcome moves the after-post bookkeeping into slp-post-plan-service.ts, which also keeps the generator under the architecture line limit.

Validation

  • New tests/slurp-continuity-extraction.regression.ts: valid candidates survive with clamped confidence; unknown message, quote not in the message, Creator fact from a fan message, fan request from a Creator message, unknown kind, empty text, and missing evidence are all dropped; evidence matching ignores case and spacing but not wording; duplicates and oversized batches are cut; risk and audience per kind; source hash stability and change on edit; the prompt frames the thread as data; identity resolution; the budget kind exists; and the service wiring including "writes only to the ledger".
  • Registered the new service in tests/slurp2-source.ts and in the model-answer coverage test.
  • npm run check: 0 errors, no new warnings. Architecture, typecheck, locale, catalog lane, catalog, release-notes, git diff --check pass.
  • Full Slurp sweep: 145 pass, no failure the branch base does not already have.
  • Not done: no live model run of the extractor against a real provider.
  • Known red: the Slurp Remastered browser suite, unchanged since 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/1006 **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/08-continuity-extraction` --- ### 📝 Commits (1) - [`e6ce7a0`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e6ce7a08e8df91c511c9f6a2d013b24c6e5cda41) feat(slurp2): write system events and extract continuity from messages ### 📊 Changes **28 files changed** (+1098 additions, -327 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/slurp2-0.1.30.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/slurp2/CHANGELOG.md` (+7 -0) 📝 `packages/slurp2/client.js` (+21 -21) 📝 `packages/slurp2/manifest.json` (+5 -5) 📝 `packages/slurp2/server.mjs` (+243 -241) 📝 `packages/slurp2/src/engine/packages/client/src/slp/locales/en.json` (+2 -1) 📝 `packages/slurp2/src/engine/packages/server/src/slp/data/continuity/slp-continuity-storage.ts` (+76 -0) 📝 `packages/slurp2/src/engine/packages/server/src/slp/features/feed/reserve/slp-reserve-operation.ts` (+19 -0) 📝 `packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-generation-service.ts` (+10 -12) 📝 `packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-post-plan-service.ts` (+57 -1) ➕ `packages/slurp2/src/engine/packages/server/src/slp/features/messages/slp-continuity-extraction-service.ts` (+228 -0) 📝 `packages/slurp2/src/engine/packages/server/src/slp/features/messages/slp-messages-contract.ts` (+1 -0) ➕ `packages/slurp2/src/engine/packages/server/src/slp/modules/continuity/slp-continuity-extraction.ts` (+163 -0) 📝 `packages/slurp2/src/engine/packages/server/src/slp/modules/continuity/slp-continuity-rules.ts` (+17 -0) _...and 8 more files_ </details> ### 📄 Description ## Why Slice 8 of `plan/concept.md`. The ledger from slice 7 had no writers. This adds the two kinds the plan calls for: deterministic events from successful operations, and a bounded extractor over Slurp messages. ## What changed **System events** (auto-applied, idempotent by fingerprint, never allowed to cost the operation): - every published post — `creator_public`, with intent, delivery, access, and shoot; - every chosen skip — `creator_private`, with its reason. **Message extraction** (`features/messages/slp-continuity-extraction-service.ts`): - Runs on the world catch-up tick, with the player present, behind a new `continuity` model-budget kind that can be capped or turned off on its own. - Reads 20 new messages per thread, 3 threads per drain, past a per-thread checkpoint. - The model may cite only message ids from a server-built allowlist, and must quote evidence that actually appears in that message. A Creator fact must come from the Creator's own message; a request must come from the fan's. - Candidates are capped at 8, deduplicated, and each carries a source hash of the batch for later retraction. - Anything unverifiable is dropped, never repaired. **Auto-apply and review** (`modules/continuity/slp-continuity-extraction.ts`): - Low risk, applied: the Creator's own boundary, plan, or business statement at ≥0.85 confidence (`creator_private`), and a fan's request (a `thread_private` event). - Medium, held as a proposal nothing reads: personal disclosures (`interest`, `circumstance`) and weaker statements. - High, nothing: confidence below 0.5. - Promises and disclosures stay `thread_private`. A failed batch keeps its checkpoint and is read again. Extraction writes only to the ledger. `recordSlurpPostOutcome` moves the after-post bookkeeping into `slp-post-plan-service.ts`, which also keeps the generator under the architecture line limit. ## Validation - New `tests/slurp-continuity-extraction.regression.ts`: valid candidates survive with clamped confidence; unknown message, quote not in the message, Creator fact from a fan message, fan request from a Creator message, unknown kind, empty text, and missing evidence are all dropped; evidence matching ignores case and spacing but not wording; duplicates and oversized batches are cut; risk and audience per kind; source hash stability and change on edit; the prompt frames the thread as data; identity resolution; the budget kind exists; and the service wiring including "writes only to the ledger". - Registered the new service in `tests/slurp2-source.ts` and in the model-answer coverage test. - `npm run check`: 0 errors, no new warnings. Architecture, typecheck, locale, catalog lane, catalog, release-notes, `git diff --check` pass. - Full Slurp sweep: 145 pass, no failure the branch base does not already have. - Not done: no live model run of the extractor against a real provider. - Known red: the Slurp Remastered browser suite, unchanged since 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:33 +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#1241
No description provided.