Skip to content

feat(certops): admit declaredCapabilities on the heartbeat contract - #119

Open
tokentimerch wants to merge 2 commits into
certops/adr-windows-execution-surfacefrom
agent/heartbeat-declared-capabilities
Open

feat(certops): admit declaredCapabilities on the heartbeat contract#119
tokentimerch wants to merge 2 commits into
certops/adr-windows-execution-surfacefrom
agent/heartbeat-declared-capabilities

Conversation

@tokentimerch

@tokentimerch tokentimerch commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Make heartbeat declaredCapabilities three-valued: omitted preserves the last declaration, an explicit [] clears it, and a non-empty array replaces it.
  • Persist the semantics through agentDispatch SQL (WHEN $n::jsonb IS NULL THEN declared_capabilities).
  • Add unit coverage for omit/clear/downgrade/filter behavior so agents can safely drop capabilities and become ineligible for matching jobs.

Test plan

Stack

Base: #120 (ADR-0012).

An omitted declaredCapabilities preserved the stored set and an explicit
empty array did too, so a capability could never be removed. An agent
downgraded to a build that no longer supports a capability stayed eligible
for jobs it could not execute.

Semantics are now: omitted preserves, [] clears, non-empty replaces.
Omitted reaches the UPDATE as NULL so the CASE arm can distinguish it
from an explicit [], which no longer collapses into a no-op.

The bundled agent is unaffected: its declared set is a non-empty frozen
constant, so it never sends [].
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