Skip to content

Queue sends during provider-owned compaction turns - #6381

Closed
bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-6379
Closed

bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-6379

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

The server's manual-compaction wait gate recognized bb /compact requests but not an open root compaction item in a provider-owned maintenance turn. Sends during those turns could reach Pi while its manual compaction rejects prompts instead of remaining queued.

Reproduction and root-cause report.

What changed

Keep the existing command-request guard and also recognize an open root compaction item in an active turn with no accepted bb request. Ordinary requested turns, completed compaction items, previous turns, and nested items retain their previous steering behavior.

The change stays within server thread admission: two files, 242 additions and 6 deletions, 248 changed text lines against origin/main. No dependency, generated artifact, schema, stored-data, public API, or daemon-protocol change.

How you verified

  • Added the public send-route regression before changing production. On trusted main b6743a36bd9eae1408c35cfc2c7ab1d2419dc79d, it fails because delivery is sent instead of queued. Repeated the corrected active-thread fixture in a second clean worktree: the same failure, with all 16 controls passing in each run.
  • After the fix, all 17 compaction tests pass, including queue retention and delivery after completion, plus four controls for requested turns, completed items, previous turns, and nested items.
  • pnpm exec turbo run test --filter=@bb/server -- test/public/public-thread-compaction.test.ts test/services/threads/thread-events.test.ts test/threads/thread-send-dispatch.test.ts test/threads/requested-queue-drain.test.ts test/threads/queue-drain-failure.test.ts test/public/public-thread-offline-followup.test.ts: 102 tests pass across six files.
  • pnpm exec turbo run typecheck --filter=@bb/server passes.
  • pnpm exec turbo run build --filter=@bb/server passes.
  • Changed files formatted with the existing formatter; git diff --check passes; no binary changes. The server has no lint task.
  • Scope: deterministic public server API tests using real migrated SQLite and existing host RPC fixtures, not an authenticated live Pi extension or desktop run.

Fixes #6379

AGENT GENERATED

@ymichael

Copy link
Copy Markdown
Collaborator

Closing in favour of #6380, which we're taking. This PR only queues sends during a separate compaction turn. It misses the main case in #6379, where the extension's compaction starts inside the user's own turn, and that still errors here. #6380 handles both cases.

@ymichael ymichael closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pi: a message sent during an extension-started compaction is steered, rejected, and lost

2 participants