Skip to content

feat(wakes): split board wakes from wake-on-message (#1071, TASK-033) - #1089

Merged
lilyshen0722 merged 2 commits into
mainfrom
feat/split-board-wake-from-wake-on-message
Aug 22, 2026
Merged

lilyshen0722 merged 2 commits into
mainfrom
feat/split-board-wake-from-wake-on-message

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

TASK-033, assigned by @sam. Closes the admission-condition problem #1071 filed against the Planner card.

The coupling

One config key gated three different subscriptions:

producer gate
ambient chat enqueueWakeOnMessage config.wakeOnMessage.enabled
board deltas notifyPodAgents (taskEventService:147) same key
kernel found-work notifyFoundWork (taskEventService:296) same key

So a persona whose defining behaviour is the board could only subscribe by also taking every message in the pod. #1071's recommendation — "the manifest must set wakeOnMessage at install, or the card ships a persona whose defining behaviour never fires" — was the only answer available, and it is the wrong shape for a board-shaped card.

The split

boardWakeEnabled in agentMentionService, used by both board producers. The ambient path keeps wakeOnMessageEnabled unchanged.

boardWake absent, wakeOnMessage on   -> board wakes      (today's behaviour)
boardWake absent, wakeOnMessage off  -> no board wakes   (today's behaviour)
boardWake.enabled true               -> board wakes, whatever chat says
boardWake.enabled false              -> no board wakes, whatever chat says

The third row is what unblocks the Planner manifest. The fourth did not previously exist either: a seat can now hear the room without the board.

Backward compatibility is the load-bearing half

Absent boardWake inherits wakeOnMessage, so nothing that exists today changes. Measured against the running instance rather than assumed: 263 active installs, 34 with wakeOnMessage.enabled, zero carrying a boardWake key. The inherit branch is therefore the entire live population and both explicit branches are currently unreachable — which is exactly why a test that only exercised the new flag would prove nothing about production.

The backward-compat cells assert boardWakeEnabled(i) === wakeOnMessageEnabled(i) rather than a hard-coded false, so they track the old predicate rather than a snapshot of it. If someone changes wakeOnMessageEnabled, they move together or the test fails.

Verification

12 tests, all green; adjacent suites (taskEventService, kernelWorkSweepService, agentMention*) 110 green; tsc --noEmit clean on both changed files.

Three mutations, each verified applied then red:

mutation result
inherit removed (absent → false) 2 failed
explicit-false override removed 2 failed
=== true widened to truthy 1 failed

That last one guards a manifest typo: enabled: "true" as a string must not subscribe, because wakeOnMessageEnabled uses strict equality and the split must not quietly widen it.

Not verified

  • No manifest sets the new key yet. This makes the Planner shape expressible; it does not install anything. Persona cards: a residency claim needs a wake that ARRIVES, not a producer that fires #1071's second recommendation — a ship-time probe asserting an AgentEvent row actually arrives for the seat — is still the check that would prove delivery, and it is not in this PR.
  • I have not run the four-cell matrix against a live install, only the predicate. The producers' filter change is covered by the existing taskEventService suite continuing to pass, not by a new integration test.

🤖 Generated with Claude Code

Board deltas and the #1055 kernel found-work sweep were gated by the same
config key as ambient chat, so a board-shaped persona could only subscribe
to the board by also taking every message in the pod. Planner is the case
that forced it: #1071 records that its residency rides board wakes, and the
only available answer was "set wakeOnMessage", which is the opposite of what
the card wants.

Adds boardWakeEnabled, used by notifyPodAgents and notifyFoundWork. The
ambient chat path keeps wakeOnMessageEnabled untouched.

Backward compatibility is the load-bearing half: an absent boardWake key
INHERITS wakeOnMessage, so no existing install changes behaviour. Measured
against the running instance — 263 active installs, 34 with wakeOnMessage
on, zero carrying a boardWake key — so the inherit branch is the entire live
population and the explicit branches are currently unreachable.

12 tests. The backward-compat cells assert boardWakeEnabled(i) ===
wakeOnMessageEnabled(i) rather than a hard-coded false, so they track the
old predicate instead of a snapshot of it. Three mutations each red:
inherit removed (2), explicit-false override removed (2), === true widened
to truthy (1).

Co-Authored-By: Claude Opus 5 <[email protected]>
@lilyshen0722

Copy link
Copy Markdown
Contributor Author

Wake-split reviewed and it's what TASK-033 asked for — but holding merge on one rider: this PR moves _external/clawdbot from 5d88a3f1 back to 70bd82b8. Verified via the fork's compare API: 5d88a3f1 is a clean 2-commit fast-forward of 70bd82b8 (ahead_by: 2, behind_by: 0), so this would roll the live gateway back two commits — the pin-cycling regression class, from a stale local submodule. (Not your intent: #1078 carried the pin forward as its own accidental rider yesterday, so your checkout predates it.) Drop the gitlink from this PR — git checkout main -- _external/clawdbot on your branch or equivalent — and it merges on green. The three real files look right.

My commit rolled _external/clawdbot back from 5d88a3f1 to 70bd82b8. Caught
by @ux-lead on #1089. `git add -A` staged my stale local submodule checkout
over main's pin — the branch was cut from origin/main today, which already
carried 5d88a3f1, so this is not an inherited rider.

Merging as-is would have rolled the live gateway back two commits.

Co-Authored-By: Claude Opus 5 <[email protected]>
samxu01 pushed a commit that referenced this pull request Aug 22, 2026
The #1089 gitlink rollback: ux-lead attributed it to an inherited rider,
sprint-review to a guard that would have caught it, and I agreed with both
before checking either. All three accounts were plausible, offered in good
faith, and pointed away from the cause — `git add -A` staging a stale
submodule pointer, which no intent-based explanation can reach because the
author typed no submodule command.

What broke it was one command whose result was not implied by the story:
git merge-base --is-ancestor. Adds habit 7 — test an exculpatory account as
hard as an accusatory one; both of these ran toward the author.

Co-Authored-By: Claude Opus 5 <[email protected]>
@lilyshen0722
lilyshen0722 merged commit ce5b447 into main Aug 22, 2026
11 checks passed
@lilyshen0722
lilyshen0722 deleted the feat/split-board-wake-from-wake-on-message branch August 22, 2026 03:47
samxu01 pushed a commit that referenced this pull request Aug 22, 2026
…back

Two defects in this branch, both caught by @sprint-review saying they had
pushed "entry 36" to a different PR.

1. NUMBER COLLISION. #1056 also adds a "## 36." — "the fleet's checkout tracks
   no revision". Both PRs append to the end of the same file, so git merges
   them cleanly and main ends up with two entries numbered 36. A merge tool
   detects overlapping lines, not contradictory content, and appends never
   overlap. Renumbered to 37; #1056 keeps 36 as the earlier claim.

2. GITLINK ROLLBACK, again. This branch carried _external/clawdbot at
   70bd82b8 against main's 5d88a3f1 — the same `git add -A` stale-submodule
   trap as #1089. I checked #1095 and #1096 for it and not this one, because
   it is a docs branch and the trap does not care.

Co-Authored-By: Claude Opus 5 <[email protected]>
samxu01 pushed a commit that referenced this pull request Aug 22, 2026
Containment asserts the pin is on the declared branch, which is true of every
commit that branch ever had — so it cannot catch a rollback. Measured on
#1089: compare/70bd82b8...5d88a3f1 returns status=ahead, behind_by=0, and the
check passed while the gateway reverted two commits.

Adds a direction check against the merge base with origin/main. Strict
ancestor => rollback, exit 1. Unchanged, forward, diverged, undeterminable =>
unchanged behaviour.

Keys on nothing the author intends, because the author intends nothing:
`git add -A` in a checkout whose submodule sits at an older commit stages
that pointer as an edit. Three branches acquired one that way in two hours.

The failure message names the repair that WORKS — update-index --cacheinfo —
and warns that `git checkout origin/main -- <path>` followed by any `git add`
of that path re-stages the stale sha from the working tree.

RE-COMMIT. The first attempt at this branch shipped an empty PR: a mutation
probe restored the script from a backup after its last mutation, wiping the
edits, and `git add -A` then committed only the dirty gitlink. The PR whose
purpose is catching accidental gitlink changes consisted solely of one.

Co-Authored-By: Claude Opus 5 <[email protected]>
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.

1 participant