Skip to content

Canary E-01 has no lease-awareness — will fire on legitimately-running pull turns #1990

Closed

Description

@obasilakis

Summary

E-01 (terminal-state closure — "no running row older than execution_timeout_seconds + 300s") does not exclude #1081 pull-CLAIMED rows. It is the last canary invariant without lease-awareness now that S-01 has it (shipped with the pull phases) and E-05 gets it in #1982.

Listed as remaining in docs/testing/PULL_MIGRATION_TESTING.md §8 (T3.7) but never filed.

Why

A pull-claimed row (lease_expires_at IS NOT NULL) is status='running' and owned exclusively by the lease-reaper, which re-queues or poison-parks it on its own schedule bounded by MAX_REDELIVERY. Its age is therefore not evidence of the stuck-execution class E-01 exists to detect — a re-delivered row can legitimately carry an old started_at across attempts while the machinery is working exactly as designed.

The db-layer sweeps already encode this: mark_no_session_executions_failed carries lease_expires_at IS NULL, and PULL_MIGRATION_TESTING.md §Appendix records six such sweep exclusions. The canary is the layer that hasn't caught up.

Impact

Nuisance today (no agent is piloted), but it lands squarely on #1766: the soak's AC is "canary green throughout", and M7 reads canary_violations to decide go/no-go. A critical-severity E-01 stream from the pilot agent is worse than noise — it is indistinguishable from the real lights-out condition, so it either aborts a healthy soak or trains the operator to ignore the one invariant they most need.

Acceptance Criteria

  • E-01 skips rows with a non-NULL lease_expires_at, mirroring S-01's exclusion (agent.running_lease_expires_at.get(eid) is not None)
  • A NULL-lease control row of the same age still fires — the exclusion is keyed on the lease, not a blanket silencing
  • The reasoning lives in the module docstring, as S-01/E-05 do, not just an inline comment
  • snapshot.py's comment on running_lease_expires_at updated to list E-01 among its readers
  • Confirm no other invariant reading running_exec_ids needs the same treatment (E-02 was assessed as not needing it — record that verdict either way)

Technical Notes

Activity

  1. added
    priority-p2
    type-bug
    theme-reliability
    complexity-low
    on Aug 4, 2026
  2. added
    status-in-dev
    on Aug 6, 2026
  3. removed
    status-in-dev
    on Aug 17, 2026
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

    complexity-lowpriority-p2theme-reliabilitytype-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions