fix(tsc): tighten Riven heartbeat status type to bus union — clear lint (tsc tools)#3684
Merged
AceHack merged 1 commit intoMay 16, 2026
Conversation
…nt (tsc tools)
`publishHeartbeat` accepted `"alive" | "shutdown"`, but the bus's
`HeartbeatPayload.status` is `"alive" | "idle" | "working"` and consumers
(`tools/bus/bus.ts` line 331) filter to that union. `"shutdown"` would
silently drop at the bus consumer even if the type allowed it.
Surgical fix:
- Import `HeartbeatPayload` type from `tools/bus/types.ts`
- Bind the local `status` param to `HeartbeatPayload["status"]` (single
source of truth; future-proof if the bus union widens)
- Change the SIGINT-graceful-shutdown call site to publish
`("alive", "shutdown:terminal-closed")` — the shutdown semantic is
preserved in the `note` field where it actually reaches consumers
Local verify: `bun --bun tsc --noEmit -p tsconfig.json` → exit 0.
Third of three drift cleanups from the 0111Z queue (after 22 §33 xrefs via
PR #3666 and BACKLOG.md regen via PR #3678). One drift remains:
`lint (backlog ID uniqueness)` — B-0498 collision per B-0545.
Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Tightens the publishHeartbeat status parameter type in the Riven cursor terminal loop to match the bus's HeartbeatPayload["status"] union ("alive" | "idle" | "working"), fixing a tsc lint failure where "shutdown" was being passed but would have been silently dropped by the bus consumer. The SIGINT path now publishes "alive" with the shutdown semantic preserved in the note field.
Changes:
- Import
HeartbeatPayloadtype from../bus/typesand bindstatusparameter toHeartbeatPayload["status"]. - Update SIGINT handler call site to
publishHeartbeat("alive", "shutdown:terminal-closed")so the shutdown signal lands in thenotefield that actually reaches consumers.
AceHack
added a commit
that referenced
this pull request
May 16, 2026
…of 3 drift items) (#3685) Riven cursor-terminal heartbeat status type tightened to bus union. Single tsc error since PR #3603 cleared via surgical 3-line fix (preserve shutdown semantic in note field; no widening of HeartbeatPayload union). Drift queue from 0111Z: 22 §33 xrefs (#3666 merged), BACKLOG.md regen (#3678 merged), tsc tools (#3684 armed this tick). Remaining: backlog ID uniqueness (B-0498 collision, needs B-0545 renumber coordination). Co-authored-by: Claude <noreply@anthropic.com>
AceHack
added a commit
that referenced
this pull request
May 16, 2026
…0545 scope re-assessment (#3688) Substrate-honest pivot tick. Two empirical catches landed: 1. peer-Otto landed byte-identical MD032 fix to PR #3681 seconds before my push (commit 6def403); fetch-before-push at git layer caught duplicate cleanly. My local commit dropped. Good failure mode firing as designed. 2. B-0545 (B-0498 collision renumber sweep) re-assessed as larger scope than the 0226Z next-tick framing suggested: B-0546+ already taken, cross-substrate search needed, tick-shard immutability discipline. Defer as focused PR with claim acquire first. All 3 prior-tick PRs (#3681 #3684 #3685) now unblocked + awaiting CI. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
publishHeartbeatintools/riven/riven-cursor-terminal-loop.tsaccepted"alive" | "shutdown", but the bus'sHeartbeatPayload.statusis"alive" | "idle" | "working". The bus'sstatusconsumer (tools/bus/bus.ts:331) explicitly filters to that union —"shutdown"would silently drop.Fix
HeartbeatPayloadfromtools/bus/typesstatusparam toHeartbeatPayload["status"]— single source of truthpublishHeartbeat("alive", "shutdown:terminal-closed")— shutdown semantic preserved in thenotefield (which actually reaches consumers)Verification
bun --bun tsc --noEmit -p tsconfig.json→ exit 0 locally.Drift queue (0111Z → now)
Co-Authored-By: Claude noreply@anthropic.com