[PR #441] [MERGED] fix(slurp): prevent duplicate auto-post schedulers #967

Closed
opened 2026-10-20 17:32:48 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/441
Author: @Gunterlie
Created: 8/19/2026
Status: ✅ Merged
Merged: 8/19/2026
Merged by: @Gunterlie

Base: staging ← Head: stuck-on-repeat


📝 Commits (10+)

  • 812ca7b fix(slurp): prevent duplicate auto-post schedulers
  • 7ff4920 fix(slurp): clean up partial activation
  • 513634e fix(slurp): roll back failed activation
  • 9643959 test(slurp): cover activation teardown
  • 206cf96 build(slurp): release 1.0.10
  • 96b9d97 fix(slurp): handle falsy teardown errors
  • 69d0e66 test(slurp): exercise activation lifecycle
  • 0b6c214 fix(slurp): make scheduler startup rollback-safe
  • deec442 test(slurp): cover teardown failures
  • ebd6ba3 test(slurp): verify all scheduler teardowns

📊 Changes

14 files changed (+319 additions, -208 deletions)

View changed files

➕ artifacts/slurp-1.0.10.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 packages/slurp/manifest.json (+3 -3)
📝 packages/slurp/server.mjs (+133 -133)
📝 packages/slurp/src/engine/packages/server/src/services/slurp/server-entry.ts (+20 -25)
➕ packages/slurp/src/engine/packages/server/src/services/slurp/slurp-activation-lifecycle.ts (+44 -0)
📝 packages/slurp/src/engine/packages/server/src/services/slurp/slurp-autopost-scheduler.service.ts (+10 -9)
📝 packages/slurp/src/engine/packages/server/src/services/slurp/slurp-fan-activity-scheduler.service.ts (+11 -8)
📝 packages/slurp/src/engine/packages/server/src/services/slurp/slurp-refresh-scheduler.service.ts (+9 -9)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/slurp-automatic-posting.regression.ts (+59 -1)
📝 tests/slurp-boundary.regression.ts (+11 -1)

📄 Description

Closes #440

Why this change

Slurp 1.0.8 could start more than one automatic scheduler when activation calls overlapped. Each scheduler polled the reserve independently, which caused repeated generation calls after a manual post and placed the newest post into the next prompt context.

What changed

  • Claim Slurp activation before asynchronous route registration.
  • Reject a second activation while the first instance owns the schedulers.
  • Roll back already-registered routes and started schedulers if activation fails.
  • Release ownership when activation fails.
  • Release Slurp 1.0.10 with a new ZIP artifact and catalog hashes.
  • Add regression assertions for activation ownership and failure cleanup.

Validation

  • npm exec tsx tests/slurp-automatic-posting.regression.ts
  • npm exec tsx tests/slurp-boundary.regression.ts
  • npm run check
  • node scripts/test-catalog-lanes.mjs
  • node scripts/validate-package-locales.mjs
  • node scripts/validate-catalog.mjs
  • unzip -tq artifacts/slurp-1.0.10.zip
  • git diff --check

Manual install, update, restart, offline restart, and uninstall verification were not run in this environment.

Summary by CodeRabbit

  • New Features

    • Updated Slurp to version 1.0.10.
    • Improved activation lifecycle management for more reliable startup and shutdown.
  • Bug Fixes

    • Prevented duplicate activation attempts.
    • Added automatic cleanup after failed activation.
    • Improved teardown order, error handling, and scheduler recovery.
    • Made shutdown operations safely repeatable.
  • Tests

    • Added regression coverage for activation failures, lifecycle reuse, teardown behavior, scheduler cleanup, and repeated shutdown.

🔄 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/441 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 8/19/2026 **Status:** ✅ Merged **Merged:** 8/19/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `stuck-on-repeat` --- ### 📝 Commits (10+) - [`812ca7b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/812ca7bbc17f964f54acf32fc57b10bab6dbc099) fix(slurp): prevent duplicate auto-post schedulers - [`7ff4920`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7ff4920452f4783e7cf2ff969815cc8b6979cf49) fix(slurp): clean up partial activation - [`513634e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/513634e64c1f525db007a849dd55f84f47ce2028) fix(slurp): roll back failed activation - [`9643959`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9643959b99d691945abdfaa1190c731cdd551456) test(slurp): cover activation teardown - [`206cf96`](https://github.com/Pasta-Devs/Marinara-Agents/commit/206cf965563ec7cab84ef297a97e9e80e9c209ee) build(slurp): release 1.0.10 - [`96b9d97`](https://github.com/Pasta-Devs/Marinara-Agents/commit/96b9d977dab7036ac838e6fb7313400479fec901) fix(slurp): handle falsy teardown errors - [`69d0e66`](https://github.com/Pasta-Devs/Marinara-Agents/commit/69d0e66caacef22a452fbfabe8ca5388029458ed) test(slurp): exercise activation lifecycle - [`0b6c214`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0b6c2146cb544dcfa69f30bf328b141811ae81f7) fix(slurp): make scheduler startup rollback-safe - [`deec442`](https://github.com/Pasta-Devs/Marinara-Agents/commit/deec442934911a94222491614cc6553ba079c920) test(slurp): cover teardown failures - [`ebd6ba3`](https://github.com/Pasta-Devs/Marinara-Agents/commit/ebd6ba348e0d1bc95b3cdd5b49b568ea382244ef) test(slurp): verify all scheduler teardowns ### 📊 Changes **14 files changed** (+319 additions, -208 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/slurp-1.0.10.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `packages/slurp/manifest.json` (+3 -3) 📝 `packages/slurp/server.mjs` (+133 -133) 📝 `packages/slurp/src/engine/packages/server/src/services/slurp/server-entry.ts` (+20 -25) ➕ `packages/slurp/src/engine/packages/server/src/services/slurp/slurp-activation-lifecycle.ts` (+44 -0) 📝 `packages/slurp/src/engine/packages/server/src/services/slurp/slurp-autopost-scheduler.service.ts` (+10 -9) 📝 `packages/slurp/src/engine/packages/server/src/services/slurp/slurp-fan-activity-scheduler.service.ts` (+11 -8) 📝 `packages/slurp/src/engine/packages/server/src/services/slurp/slurp-refresh-scheduler.service.ts` (+9 -9) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/slurp-automatic-posting.regression.ts` (+59 -1) 📝 `tests/slurp-boundary.regression.ts` (+11 -1) </details> ### 📄 Description Closes #440 ## Why this change Slurp 1.0.8 could start more than one automatic scheduler when activation calls overlapped. Each scheduler polled the reserve independently, which caused repeated generation calls after a manual post and placed the newest post into the next prompt context. ## What changed - Claim Slurp activation before asynchronous route registration. - Reject a second activation while the first instance owns the schedulers. - Roll back already-registered routes and started schedulers if activation fails. - Release ownership when activation fails. - Release Slurp 1.0.10 with a new ZIP artifact and catalog hashes. - Add regression assertions for activation ownership and failure cleanup. ## Validation - `npm exec tsx tests/slurp-automatic-posting.regression.ts` - `npm exec tsx tests/slurp-boundary.regression.ts` - `npm run check` - `node scripts/test-catalog-lanes.mjs` - `node scripts/validate-package-locales.mjs` - `node scripts/validate-catalog.mjs` - `unzip -tq artifacts/slurp-1.0.10.zip` - `git diff --check` Manual install, update, restart, offline restart, and uninstall verification were not run in this environment. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Updated Slurp to version 1.0.10. - Improved activation lifecycle management for more reliable startup and shutdown. - **Bug Fixes** - Prevented duplicate activation attempts. - Added automatic cleanup after failed activation. - Improved teardown order, error handling, and scheduler recovery. - Made shutdown operations safely repeatable. - **Tests** - Added regression coverage for activation failures, lifecycle reuse, teardown behavior, scheduler cleanup, and repeated shutdown. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:32:48 +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#967
No description provided.