Skip to content

No artifact distinguishes capture off / misconfigured / inert: add plugin_load heartbeat and hook_error evidence #138

Closed

Description

@abogartz

Problem

Every evidence event the plugin writes is emitted by something that already worked. There is no startup heartbeat, so the three states a user can be in are indistinguishable from any artifact they can read:

state observable today
autoCapture off (default) nothing
on but misconfigured (bad captureModel, captureOnCompact alone, host missing a capability) console.warn → host log only (src/index.ts:1161, 1165, 1278); never chat, never the evidence file
on, correctly configured, inert (wrong event name, host rename) nothing — every capture failure is swallowed by design (src/index.ts:1249-1251)

This is why the dead-pipeline bug sat undetected across a review and a merge: absence of auto_capture_* rows was ambiguous three ways. During the 2026-10-26 live test, config was loaded, setup() ran three times, sessions were active — and the system produced exactly zero signal that capture was armed and doing nothing.

The same blindness applies to swallowed hook errors: guarded() logs hook failed (ignored) to console only (src/index.ts:268), so a plugin that is quietly failing every turn looks identical to a healthy one.

Fix

  1. plugin_load heartbeat — one evidence line per setup(), includeContext=false: plugin version, host version if reachable, capture=on|off|invalid_model|no_capabilities|partial_switch, captureOnCompact, which of event.subscribe / generate.text / session.context exist, location count, store row counts, budgets. "Off", "misconfigured" and "dead" then differ by one line.
  2. hook_error events for the paths guarded() swallows — hook name + error class, never content.
  3. Mirror the three startup warnings into evidence, not just stdout.
  4. Surface it: a memory_status line — auto-capture: off (default) / on, last fired 3h ago, 4 rows, 1 blocked / ARMED BUT NEVER FIRED.

Acceptance

Red-first scenarios asserting the evidence file alone distinguishes: off / invalid-model / missing-capability / switch-mismatch / armed-and-inert. All are red today because no such line exists.

Note this is a prerequisite for the field-readiness work generally, not just capture: without it, no field test of any default-off feature can produce interpretable results.

Activity

  1. added
    enhancement
    capture
    on Oct 26, 2026
  2. added
    severity:medium
    on Oct 30, 2026
  3. abogartz commented on Oct 30, 2026

    @abogartz
    OwnerAuthor

    Severity triage 2026-10-30 — severity:medium (partially shipped; scope should shrink)

    Reviewed against main @ 525ed89. Item 1 of your fix list has shipped, so this ticket is smaller than it reads:

    The plugin_load heartbeat is live at src/index.ts:1645-1680 — one evidence line per setup(), includeContext=false, carrying plugin version, capture=off|invalid_model|no_capabilities|on, capture_on_compact, which of event.subscribe/generate.text/session.context exist, the subscribed event list, inject budget, and store row count. That is the artifact that makes "off", "misconfigured" and "armed-but-inert" distinguishable from a file the user can read, which was the core ask.

    Still unbuilt:

    • Item 2 — hook_error evidence. guarded() still logs swallowed hook failures to console only (src/index.ts:286: hook failed (ignored)), so a plugin failing every turn looks identical to a healthy one in every artifact.
    • Item 4 — the memory_status line. grep -rn "auto-capture:" src/index.ts → zero hits. The evidence file distinguishes the states; the chat-facing surface still doesn't.
    • Item 3 (mirroring the three startup warnings into evidence) is partly subsumed by the heartbeat's capture field, since the heartbeat encodes the same conditions the warnings fire on.

    Suggest retitling/rescoping to "hook_error evidence + auto-capture line in memory_status" so the remaining ~2 items aren't hidden behind an already-shipped headline. Kept at medium: no user-facing promise is false today, but without hook_error this is exactly the blindness that let #136 ship dead across several releases, and your point that it gates any field test of a default-off feature still stands.

  4. added
    agent:ready
    on Nov 3, 2026
  5. ocsi-triager commented on Nov 3, 2026

    @ocsi-triager

    osi-spec-hash: 898e760635e7f8a6 2026-11-03T22:31:45Z - acceptance criteria frozen at this text. A later edit to the body changes this hash, and the reviewer will withhold approval until a maintainer replies spec ok.

  6. added
    fix:working
    fix:pr-open
    and removed
    fix:working
    on Nov 4, 2026
  7. added 2 commits that reference this issue on Nov 4, 2026
  8. abogartz-opencode-self-improvement commented on Nov 4, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.15.29 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:readycaptureenhancementfix:pr-openreleasedseverity:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions