Skip to content

fix(agents): a manifest-declared heartbeat IS an opt-in — project it into the install config - #895

Merged
lilyshen0722 merged 1 commit into
mainfrom
fix/native-heartbeat-optin
Aug 12, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
fix/native-heartbeat-optin

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

What

#833 (heartbeat opt-in) gates dispatch on config.heartbeat.enabled === true. The native-app seeder never projected the manifest's declared heartbeat into that flag, so pod-summarizer — whose only trigger is the heartbeat — has run zero times since the 2026-08-04 deploy. The Sharpen reviews on #891 surfaced it (msgs 52989/52991): all three first-party apps flipped stale this morning, and AgentRun shows the pulse stopping at 20:13Z on Aug 4 — minutes before #833's deploy.

buildInstallationConfig (extracted, pure, tested) now projects a manifest triggers: ['heartbeat'] into { heartbeat: { enabled: true, everyMinutes } }:

  • enabled: true — a manifest that declares the trigger IS the owner's choice; fix(agents): heartbeat is opt-in, not opt-out #833's "nobody chose this" reading was wrong for this class.
  • everyMinutes on the key the scheduler actually reads (resolveHeartbeatIntervalMinutes). The old top-level heartbeatIntervalMinutes was read by nothing — pod-summarizer declared 360 and ran hourly on the default for four months. The dead copy is removed rather than left to drift.

Deploy is the repair: the seeder $sets config (and status: 'active') on every boot, so the production install self-heals on the next deploy — no manual migration.

Deliberately unchanged

  • task-clerk (mention) and pod-welcomer (pod.join) get no heartbeat block — they never declared one; pre-fix(agents): heartbeat is opt-in, not opt-out #833 they ran on default-on heartbeats nobody asked for. Restoring that would undo fix(agents): heartbeat is opt-in, not opt-out #833's contract.
  • pod-welcomer's declared pod.join trigger has no producer anywhere in production (review msg 52990, confirmed against 1727 runs with zero pod.join firings in 52991) — that's a separate bug, being filed with the review follow-ups.

Tests

4 unit tests on the projection; mutation-checked (disabling the projection reddens exactly the two heartbeat tests).

🤖 Generated with Claude Code

https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8

…into the install config

#833 made heartbeat dispatch require config.heartbeat.enabled === true and
read every unset flag as "nobody chose this." For the native first-party
apps that reading was wrong: pod-summarizer's manifest declares
triggers: ['heartbeat'] — the author chose it — but the seeder never
projected that choice into the flag the scheduler gates on. Result: zero
runs for any first-party app since the 2026-08-04 deploy, an outage the
#891 reviews surfaced from AgentRun history (failure rate had already
climbed 45%→100% Apr→Aug on the LiteLLM wall before the pulse stopped
entirely).

The seeder now projects a declared heartbeat trigger into
{ heartbeat: { enabled: true, everyMinutes } } — everyMinutes on the key
the scheduler actually reads. The old top-level heartbeatIntervalMinutes
copy was read by nothing (pod-summarizer declared 360 and ran hourly on
the default for four months); it is gone rather than left to drift.
Deploy is the repair: the seeder $sets config on every boot.

task-clerk and pod-welcomer stay heartbeat-free by design — they never
declared one. pod-welcomer's declared pod.join trigger having NO producer
is a separate bug, filed separately.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
samxu01 pushed a commit that referenced this pull request Aug 12, 2026
…2986-52991)

The brief went to the Sharpen fleet as planned; this folds the review back
into the document so Sam ratifies one artifact:

- Split the key (52987's amendment): alarm is ownership-keyed, explanation
  is dependency-keyed — resolves the P1/P2 contradiction, and gives fan-out
  installs and agent-dm rooms (no owner member) a surface.
- Per-runtime-class signal table (52988/52991): lastUsedAt is only honest
  for CLI wrappers; moltbots share the gateway boot timestamp; native reads
  AgentRun (which recorded a four-month first-party degradation no surface
  showed — #895); webhook never authenticates inbound.
- Sixth state: Unreachable (52990) — declared trigger with no producer,
  static at install time; pod-welcomer's 0-of-1727 pod.join firings (#898).
- Degraded resolved without new telemetry: route capture on the existing
  agentRuntimeAuth write + AgentRun.toolCalls for native + the
  ack-without-ledger-write driver signature (#896).
- Copy contract: certainty matches signal certainty; the drafted "can't see
  this yet" over-promised against the ~30-min mention GC — park-and-redeliver
  vs honest copy is now an explicit ratification decision.
- Derivation caveats measured in review: union both token arrays, normalize
  runtimeType (88% unset), precedence between structural and inferred states,
  test-debris exclusion, evidence-retention windows (the cleanup cron
  false-positived all three native apps on GC'd AgentEvents).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
@lilyshen0722
lilyshen0722 merged commit cec6835 into main Aug 12, 2026
11 checks passed
@lilyshen0722
lilyshen0722 deleted the fix/native-heartbeat-optin branch August 12, 2026 07:54
lilyshen0722 added a commit that referenced this pull request Aug 12, 2026
)

* docs(design): agent status honesty — brief for fleet design review

The "Never connected" label in #888 was a patch. This is the brief for the
real thing: agent health as a first-class designed surface, because Your Team
was built to display a roster and the job turned out to be displaying a
fleet, where alive-vs-dead is the whole point.

Grounded in named casualties (spiderpc, user-8863, ngoc-tran, user-575a) and
in the five states the kernel can honestly derive today from signals that
already exist — Listening, Gone dark, Never connected, Misconfigured, and
Degraded (the hq-support acks-but-cannot-act state, which has no clean kernel
signal yet and is the hardest open problem in the brief).

The priority surface is not a dashboard: it is the moment a human @mentions
an agent that cannot answer. An inline explanation at send time converts the
#887 silence into an answer in the room at that second — the intervention
that would have saved every named user.

Principles to argue with in review: alarm where the user owns the fix; every
bad state names its fix; cobalt stays out of it (small semantic token set,
tokens.css and v2.css moving together); "gone dark" is normal for laptops
overnight and must not read as an outage; zh-CN from day one.

Review runs in the Sharpen pod under the new tone contract, with reviewers
assigned per their edge: UX Lead interaction, Pod Architect state
derivations, Sprint Review as adversary on the ownership-keyed alarm rule.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8

* docs(design): agent status honesty — fold the fleet review in (msgs 52986-52991)

The brief went to the Sharpen fleet as planned; this folds the review back
into the document so Sam ratifies one artifact:

- Split the key (52987's amendment): alarm is ownership-keyed, explanation
  is dependency-keyed — resolves the P1/P2 contradiction, and gives fan-out
  installs and agent-dm rooms (no owner member) a surface.
- Per-runtime-class signal table (52988/52991): lastUsedAt is only honest
  for CLI wrappers; moltbots share the gateway boot timestamp; native reads
  AgentRun (which recorded a four-month first-party degradation no surface
  showed — #895); webhook never authenticates inbound.
- Sixth state: Unreachable (52990) — declared trigger with no producer,
  static at install time; pod-welcomer's 0-of-1727 pod.join firings (#898).
- Degraded resolved without new telemetry: route capture on the existing
  agentRuntimeAuth write + AgentRun.toolCalls for native + the
  ack-without-ledger-write driver signature (#896).
- Copy contract: certainty matches signal certainty; the drafted "can't see
  this yet" over-promised against the ~30-min mention GC — park-and-redeliver
  vs honest copy is now an explicit ratification decision.
- Derivation caveats measured in review: union both token arrays, normalize
  runtimeType (88% unset), precedence between structural and inferred states,
  test-debris exclusion, evidence-retention windows (the cleanup cron
  false-positived all three native apps on GC'd AgentEvents).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8

* docs(design): second fleet pass — orthogonal axes replace the inverted precedence rule

The fleet verified the fold against their own findings through the shipped
claim/wake machinery (msgs 53002-53011) and caught two defects in the first
revision:

- "Structural states outrank inferred ones" inverted the finding it cited
  (53004): it renders the fleet's two freshest agents Misconfigured, in the
  most-confident copy register — the exact false positive 52988's finding B
  raised. Replaced with 53006's resolution: liveness and config are
  orthogonal render axes (working + config-attention chip, never broken),
  live evidence outranking static config where a single verdict is forced.
  Now ratification decision 6.
- ":115 reaches a third of the fleet" overgeneralized a 3-app measurement
  fleet-wide (53008) — scoped honestly; fleet trigger distribution is
  unmeasured.

Sprint Review's pre-registered falsifier fired against its own earlier
claim and confirmed the fold's version (53009) — recorded in Process.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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