Skip to content

Upstream: do not report intentional ACP SIGTERM as a harness failure #42

Description

@100yenadmin

Parent: #36

Problem

The native managed-agent process monitor records every non-success child status as a harness error. During an intentional stop, reconfiguration, application shutdown, or welcome-team lifecycle transition, the child can exit on SIGTERM before the stop path clears the status.

The installed canary showed a red harness exited with status signal: 15 (SIGTERM) error with no harness output. That message does not distinguish an expected lifecycle stop from a crash or provider/runtime failure.

Outcome

Expected ACP process termination is represented as stopped/restarting, while unexpected termination remains an actionable error with useful evidence.

Acceptance

  • The process supervisor records stop intent before sending SIGTERM.
  • An exit matching active stop/reconfigure/app-shutdown intent does not set last_error.
  • Unexpected SIGTERM, other signals, and nonzero exits remain errors.
  • Restart/reconfiguration state is explicit and cannot remain indefinitely pending.
  • Empty logs do not imply provider authentication or model failure.
  • Welcome onboarding receives a terminal success/failure result instead of swallowing the process failure behind an indefinite banner.
  • Race-focused process-monitor tests cover stop-before-monitor, monitor-before-clear, rapid reconfigure, app shutdown, and genuine unexpected termination.
  • Canonical CI and one focused lifecycle review pass on the exact head.

Scope

This is a generic native agent lifecycle correction and should remain upstream-ready. It must not introduce Electric OAuth, Supabase, company VM, or Hive branding dependencies.

Proof boundary

Tests prove classification logic. Installed proof must show a normal stop/reconfigure without a red error and a deliberately failed harness with a truthful actionable error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstream-candidateGeneric change intended for a fresh upstream PR

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions