LearnNewsExamplesServices
Frontmatter
id10605
titleCompact redundant priority in wake digests
stateClosed
labels
enhancementaitestingperformance
assigneesneo-gpt
createdAtMay 1, 2026, 11:35 PM
updatedAtMay 16, 2026, 8:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/10605
authorneo-gpt
commentsCount0
parentIssue10311
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 16, 2026, 8:54 PM

Compact redundant priority in wake digests

Closedenhancementaitestingperformance
neo-gpt
neo-gpt commented on May 1, 2026, 11:35 PM

Context

A live wake digest now renders priority twice in the common single-message case:

[WAKE][priority:normal] 1 events for @neo-gpt:
- 1 new messages (latest: "..." from @neo-gemini-3-1-pro, priority: normal)

This is not a regression in the original priority feature. Issue #10525 intentionally added both surfaces so the header could carry the effective interrupt priority while the message summary could expose the latest message priority. The current friction is the redundant rendering when those two values collapse to the same signal, especially for the dominant 1 event / 1 message wake shape.

Duplicate sweep:

  • Semantic KB ticket sweep for wake digest duplicate priority returned no equivalent ticket.
  • Local sweep across resources/content/issues/, resources/content/issue-archive/, and resources/content/discussions/ found #10525 as the predecessor, not an equivalent follow-up. #10525 explicitly required both header priority and latest-message priority.

The Problem

The wake digest is a hot-path context injection surface. Repeating priority: normal in both the digest header and the latest-message breakdown spends user and model attention on no new information in the single-message case. This is small per wake, but wake digests happen exactly at interruption boundaries where scanability matters.

The subtlety: the two priority positions are not always semantically identical. In coalesced batches, bridge-daemon.mjs computes the header priority from the highest message priority in the queue, while the breakdown currently prints the latest message priority. Those values can diverge, so blindly deleting the line-item priority would lose information in mixed-priority coalesced wakes.

The Architectural Reality

The owning substrate is ai/scripts/bridge-daemon.mjs:

  • getHighestWakePriority(messages) selects the digest header priority from the strongest coalesced message priority.
  • flushSubscription(subId) renders the breakdown and currently appends , priority: ${latestPriority} unconditionally to the latest-message summary.
  • Existing bridge-daemon tests in test/playwright/unit/ai/scripts/bridge-daemon.spec.mjs assert both [WAKE][priority:normal] and priority: normal, reflecting #10525's first-pass acceptance criteria.

This is a display-shape optimization, not a mailbox schema change. The message node priority, priority filters, and wake interruption policy remain intact.

The Fix

Update the wake digest renderer so line-item message priority is shown only when it adds information beyond the header. Suggested rule:

  • Always keep [WAKE][priority:<digestPriority>] in the header.
  • Omit the latest-message priority: <latestPriority> fragment when latestPriority === digestPriority.
  • Preserve an explicit latest-message priority fragment when latestPriority !== digestPriority, because that is the coalesced-batch case where header and latest-message priority differ.
  • Adjust bridge-daemon tests to cover both the compact single-message case and the mixed-priority coalesced case.

Potential wording for the divergent case:

[WAKE][priority:high] 2 events for @neo-gpt:
- 2 new messages (latest: "Normal follow-up" from @peer, latest priority: normal)

The exact label is flexible; the invariant is that redundant same-priority text disappears while divergent coalesced priority remains visible.

Acceptance Criteria

  • Single-message wake digest renders priority only in the header, not again in the latest-message breakdown.
  • Coalesced mixed-priority wake digest preserves both signals when the header priority and latest-message priority differ.
  • Existing priority-gated interruption semantics from #10525 remain unchanged.
  • test/playwright/unit/ai/scripts/bridge-daemon.spec.mjs includes targeted coverage for compact same-priority rendering and divergent mixed-priority rendering.
  • git diff --check passes.

Out of Scope

  • Changing mailbox message schema or stored priority values.
  • Removing [WAKE][priority:<level>] from digest headers.
  • Adding new priority enum values.
  • Transport-level suppression of normal or low priority wakes.
  • Reworking coalescing windows or wake delivery routing.

Avoided Traps / Gold Standards Rejected

  • Do not remove line-item priority unconditionally. The header is the strongest coalesced priority, while the line item can describe the latest message. Mixed-priority batches need a way to preserve that distinction.
  • Do not move this into AGENTS.md policy. The issue is payload verbosity in bridge-daemon.mjs, not agent decision policy.
  • Do not create a new priority vocabulary. Reuse the existing low / normal / high A2A vocabulary from #10525.

Related

  • Related predecessor: #10525
  • Wake substrate context: #10311

Origin Session ID: 293810eb-4c0e-4e57-b5e5-5b3a2c98700a

Handoff Retrieval Hints:

  • query_raw_memories(query="wake digest priority duplicate latest message priority")
  • rg -n "getHighestWakePriority|latestPriority|priority:" ai/scripts/bridge-daemon.mjs test/playwright/unit/ai/scripts/bridge-daemon.spec.mjs
tobiu referenced in commit 74f160d - "fix(ai): compact wake digest priority text (#10605) (#11483) on May 16, 2026, 8:54 PM
tobiu closed this issue on May 16, 2026, 8:54 PM