Skip to content

Add bounded per-entity polling to entity-bound fullsend run #9599

Open

Description

@ifireball

Parent

#8418 — Implement ADR 0098 entity-first harness evaluation

What to build

Add ADR 0144's bounded per-entity poll lifecycle to entity-bound fullsend run. The resident run checks only its canonical entity, re-resolving current state, source membership, authorization, and CEL before every cycle. An event supplied at entry is retained for the first check; later eventless checks use event == null. Respect the idle window, hard platform/configured deadline, first-cycle reserve, and final-result semantics. The run never polls the platform's pending-work list or performs repository-wide discovery.

Relationship to fullsend poll

This run work can be implemented and delivered independently of #9588. The event-backed, one-cycle fullsend run path enables entity-based harnesses on the GHA event path without repository-wide discovery. #9588 separately adds entity discovery for fullsend poll, enabling eventless invocations.

Keep ADR 0144's existing runtime eligibility rule: eventless resident/timed execution requires trusted invocation provenance, effective platform policy, and recurring fullsend poll coverage for the source. Without that coverage, timed default behavior falls back to once and an explicitly selected resident lifecycle fails closed, as ADR 0144 specifies. This gate does not block delivery of the event-backed one-cycle run path. Discovery and recovery after a run exits belong to fullsend poll, not this issue.

Acceptance criteria

  • Once, resident/poll, and timed behavior follow the CLI contract in Choose first entity scope and define compatible run/poll CLI behavior #9589 and ADR 0144.
  • Each cycle checks only the bound canonical entity and refreshes the required current evidence.
  • The first event is used only for the initial event-backed check; later eventless checks use a null event.
  • Idle and deadline limits stop the run predictably, and a selected cycle starts only when enough budget remains to complete and publish it.
  • Eventless resident/timed execution honors ADR 0144's trusted-provenance, policy, and source-coverage gate; absent coverage, timed default uses once and explicit resident mode fails closed.
  • Event-backed one-cycle run delivery does not depend on Integrate entity discovery into fullsend poll alongside existing event drivers #9588; the run does not provide repository-wide discovery or recovery after exit.
  • Multi-cycle run status and validated output follow ADR 0144's latest-cycle semantics.

Activity

  1. added
    feature
    ready-for-agent
    on Nov 17, 2026
  2. fullsend-ai-triage commented on Nov 17, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 1:58 PM UTC · Completed 2:00 PM UTC

    Commit: 1cc7728 · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.09

  3. added
    blocked
    and removed
    feature
    on Nov 17, 2026
  4. fullsend-ai-triage commented on Nov 17, 2026

    @fullsend-ai-triage

    The scope here is clear and ADR 0144 already defines the lifecycle semantics, but implementation can't start until three open items land:

    • The CLI contract for entity-bound run/poll and --watch vs --mode is still being decided. The first acceptance criterion depends on it, so building polling now would risk guessing the flag surface. That issue is itself waiting on the entity-source ADR and the discovery/query protocol work.
    • Each poll cycle must re-evaluate eligibility for the bound entity and return one of eligible, proven non-match, deferred/unresolved or denied, with only eligible starting a sandbox. That shared evaluation boundary is tracked separately and is not implemented yet.
    • The entity-source configuration and binding baseline is in an unmerged ADR pull request. Resident checks need it to determine source membership and poll coverage.

    What can be prepared in the meantime: the timing logic (idle window, hard deadline, first-cycle reserve and the "start a cycle only if budget remains to complete and publish" rule) can be written as a pure function over clocks and budgets, with no dependency on the CLI surface.

    Proposed test case:

    Given idle=W, deadline=D, reserve=R, injected clock:
      - first cycle runs immediately with the entry event; later cycles use event == null
      - remaining budget < cost to complete+publish a cycle -> no new cycle, clean exit
      - idle window elapsed since entry or last sandbox cycle -> exit
      - hard deadline reached -> exit with latest-cycle status/output
      - no poll coverage / untrusted provenance for eventless check -> fail closed
      - each cycle re-resolves the one bound entity; pending-work list is never queried
    

    This issue should be re-triaged once the prerequisites are merged or closed. The ready-for-agent label should not be treated as a go-ahead until then.

    Blocked by:

  5. fullsend-ai-triage commented on Nov 30, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 1:39 PM UTC · Completed 1:41 PM UTC

    Commit: cca0379 · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.18

  6. fullsend-ai-triage commented on Nov 30, 2026

    @fullsend-ai-triage

    The three blockers named in the earlier triage are now resolved: the CLI contract issue (#9589) and the shared CEL eligibility evaluation (#9581) are closed, and the entity-source configuration ADR PR (#9199) has merged. They no longer block this work.

    A new blocker has surfaced, though. This issue adds a bounded poll lifecycle around an entity-bound fullsend run cycle: bind the entity, re-resolve its current state, source membership and authorization, evaluate CEL, then start at most one sandbox. That single-cycle behavior is tracked in #9598, which is still open, blocked, and has no implementing pull request. The repository has no entity-bound run path yet, so the idle window, deadline and first-cycle reserve logic would have nothing to drive. This issue should be re-triaged once #9598 lands.

    The ready-for-agent label should not be treated as a go-ahead until then.

    In the meantime, the timing logic (idle window, hard deadline, first-cycle reserve, and the rule to start a cycle only when enough budget remains to complete and publish it) can be written as a pure function over an injected clock and budgets. The proposed test case from the earlier triage still applies:

    Given idle=W, deadline=D, reserve=R, injected clock:
      - first cycle runs immediately with the entry event; later cycles use event == null
      - remaining budget < cost to complete+publish a cycle -> no new cycle, clean exit
      - idle window elapsed since entry or last sandbox cycle -> exit
      - hard deadline reached -> exit with latest-cycle status/output
      - no poll coverage / untrusted provenance for eventless check -> fail closed
      - each cycle re-resolves the one bound entity; pending-work list is never queried
    

    Blocked by:

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

    blockedready-for-agent

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions