Skip to content

Specify entity discovery completeness and recovery guarantees (ADR 0149) #9586

Done

Description

@fullsend-ai-triage

Parent

#8418 — Implement ADR 0098 entity-first harness evaluation

Purpose and boundary

This issue is about runtime entity discovery: enumerating candidate entities for already-configured source queries, primarily for broad fullsend poll scans. Entity sources are declared in configuration; Fullsend does not discover source declarations.

ADR 0079 and entity-source configuration v1 own source declarations, bindings, provider-specific query syntax, effective selections, trusted scopes, and current source-membership semantics. This contract consumes those definitions. It must not add another source configuration model or query language.

PR #9199 is still open. Drafting may proceed against it, but finalizing this contract must wait for the accepted ADR 0079/entity-source configuration v1, so this specification does not duplicate or conflict with a proposal that may still change.

ADR 0149 requires combined discovery to avoid silently missing candidates. This issue should specify the runtime guarantees needed by the coordinator in #9587. It is separate from selectively acquiring facts for an already-identified candidate (#9583) and must not gate the one-cycle fullsend run path for a candidate whose identity is already known.

The protocol/spec may be a focused companion contract or a section in an existing versioned contract. It should define observable behavior, not prescribe a storage backend or implementation architecture.

Questions the contract must answer

  1. What counts as a complete scan? Define the unit of coverage and the evidence an adapter must provide before a scan can report complete, including a complete scan that found no candidates. How are incomplete, unsupported, and failed scans represented? A last page, empty page, or provider result cap must not by itself prove completeness.

  2. When is progress safe to commit? Define what checkpoint or covered range means and when it may advance. How must an adapter account for pagination limits, unstable ordering, delayed indexing, and entities that change while a scan is running? When is partitioning or overlap reconciliation required, and what evidence shows that it closed possible gaps?

  3. How is uncovered work recovered? Define which incomplete ranges and unresolved candidates remain retryable across process restarts, how retries coexist with new scans, and what fairness, age, or exhaustion guarantees are required. An exhausted retry must not turn missing coverage into a complete scan or an unresolved candidate into a non-match.

  4. What invalidates prior coverage? Define how changes to the effective source query, trusted scope, credential scope, provider query behavior, or time-dependent selection affect checkpoints and what rediscovery is required to regain coverage.

  5. What must adapter conformance prove? Give observable cases for complete-empty versus incomplete results, caps and pagination, concurrent changes and delayed indexing, failures and restart/retry, and changed query plans. Identify which evidence each case requires from the adapter.

Acceptance criteria

  • A versioned normative contract answers the questions above and composes with ADR 0149, the accepted ADR 0079/entity-source configuration v1, and the applicable entity and authorization contracts.
  • The contract distinguishes complete-empty from incomplete, unsupported, failed, and retryable outcomes; uncertain coverage cannot be treated as absence.
  • Numbered conformance cases map each coverage, progress, recovery, and invalidation requirement to observable adapter behavior.
  • Provider-specific limits are recorded only where they affect those guarantees; query-language and source-membership semantics remain owned by ADR 0079/entity-source configuration v1.
  • The contract does not claim to enable scheduled execution or entity-driven dispatch without their separate authorization, scope, runtime, and implementation gates.

Activity

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

    @fullsend-ai-triage
    Author

    🤖 Finished Triage · ✅ Success · Started 9:05 AM UTC · Completed 9:07 AM UTC

    Commit: 4c81590 · View workflow run →

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

  3. fullsend-ai-triage commented on Nov 17, 2026

    @fullsend-ai-triage
    Author

    The earlier blocker (the ADR 0079 / entity-source configuration PR) has merged, and the earlier implementation PR was closed without merging. No open PR addresses this issue now, so it is unblocked and ready for implementation, superseding the earlier blocked triage. The issue body still describes the old blocked state. Treat the maintainer decisions in the latest comment as authoritative.

    Summary of what to implement:

    • Create the contract at docs/normative/entity-discovery/v1/README.md (this directory does not exist yet), following ADR 0015. It should link to ADR 0079, ADR 0149 and the entity-source configuration v1 contract and must not define a second source model or query language.
    • Define complete, incomplete/interrupted, failed and unsupported poll outcomes. Complete-empty means the configured search plan finished with no candidates. Caps, last pages and empty pages are never proof of completeness, and uncertain discovery is never treated as absence.
    • Use in-memory retry only (no durable checkpoint or persistent inventory), freshness-first ordering where supported, and recurring older-candidate backfill so older candidates are not starved.
    • Replan on changed query, scope or provider plan without invalidating the normalized-entity cache; time-dependent queries need recurring rediscovery.
    • State that one-cycle fullsend run with a known entity and event-only harnesses are unaffected.
    • Cover GitHub, GitLab, Forgejo and Jira where provider limits affect the guarantees, and map each rule to a numbered conformance case.
    • Do not reuse the closed PR docs(#9586): add entity-source discovery v1 normative protocol #9590. Follow the AGENTS.md doc conventions (sidebar/search config if needed, stage changes before make lint).

    Proposed conformance coverage:

    complete-empty vs incomplete/failed
    result cap and pagination
    concurrent change / delayed indexing
    freshness-first ordering
    rate-limit interruption
    restart with in-memory retry only
    recurring older-candidate backfill
    query/scope/plan change without entity-cache invalidation
    time-dependent query rediscovery
    

    Proposed changes to siblings #9587–#9589 are left for the maintainer to apply; they were not edited in this run.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
    Previous run

    This is ready to implement as a documentation change. ADR 0149 already enumerates the required contents, and existing versioned specs under docs/normative/ (per ADR 0015) show the layout to follow (a versioned directory with a README).

    Points for the implementer:

    • Record only decisions already accepted in the listed ADRs. ADR 0149 explicitly leaves query syntax open, so avoid inventing syntax beyond what is accepted.
    • Make the completeness rules testable. Reaching the last page is not proof of completeness, and unresolved data must trigger retry and never count as a non-match. Each rule should map to at least one numbered conformance case.
    • Cover all four forges (GitHub, GitLab, Forgejo, Jira) in provider mappings and limits, and state that event-only harnesses are unaffected.
    • Follow AGENTS.md doc conventions: sidebar/search config if the path is not auto-discovered, and stage changes before make lint.

    No open PR addresses this issue and there are no blockers. The related implementation issue (scheduled discovery, routing, dedup, retry state) should consume this spec once merged.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  4. fullsend-ai-coder commented on Nov 17, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 9:09 AM UTC · Completed 9:19 AM UTC

    Commit: 4c81590 · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $2.42

  5. added a commit that references this issue on Nov 17, 2026
  6. fullsend-ai-triage commented on Nov 17, 2026

    @fullsend-ai-triage
    Author

    🤖 Finished Triage · ✅ Success · Started 9:38 AM UTC · Completed 9:40 AM UTC

    Commit: 4c81590 · View workflow run →

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

  7. removed
    ready-to-code
    on Nov 17, 2026
  8. 19 remaining items

  9. fullsend-ai-triage commented on Nov 20, 2026

    @fullsend-ai-triage
    Author

    This issue is blocked on the ADR 0079 / entity-source configuration v1 proposal, which is still open. That proposal owns source declarations, bindings, query syntax and source-membership semantics, and this discovery-completeness contract must consume those definitions rather than duplicate them. The issue itself says the contract can only be finalized after that proposal is accepted.

    The earlier implementation PR for this issue was closed without merging. The maintainer's reason was that it was written before the ADR 0079 work existed, so it is no longer in flight. Any new implementation should start from the accepted ADR 0079 contract instead of reviving it. Drafting alongside the proposal is possible, but it should not merge ahead of it.

    Once the prerequisite merges, this issue can be re-triaged and implemented. The earlier guidance still applies:

    • Make each completeness rule testable, and map each one to a numbered conformance case.
    • Cover all four forges (GitHub, GitLab, Forgejo, Jira).
    • State that event-only harnesses are unaffected.
    • Record only decisions already accepted in the ADRs.

    Blocked by:

  10. ifireball commented on Nov 24, 2026

    @ifireball
    Member

    /fs-triage

    Please re-triage this issue against the current repository state and incorporate the maintainer decisions below. Keep this run focused on #9586; propose any changes to #9587–#9589 in your report, but do not edit those sibling issues as part of this run.

    Prerequisite and contract home

    • PR docs(adr): define entity source bindings and execution integration #9199 has merged as ADR 0079. Remove the stale statement that it is open and remove it as a blocker. Use the accepted ADR 0079 and docs/normative/entity-source-configuration/v1/README.md for source declarations, bindings, native provider query semantics, effective selections, trusted scopes, and current membership. Do not define a second source model or query language.
    • Put the runtime discovery contract at docs/normative/entity-discovery/v1/README.md, following ADR 0015. The entity-source configuration v1 contract explicitly says it is not the complete discovery/query protocol. The new contract should link to it and to ADRs 0079 and 0149.
    • “Entity discovery” here means a fullsend poll run enumerating candidates for configured sources. It does not mean discovering source declarations or keeping a persistent inventory of every entity. Keep it separate from normalized-entity field acquisition and cache freshness.
    • Do not reuse the earlier closed PR docs(#9586): add entity-source discovery v1 normative protocol #9590; it predates the accepted source-configuration contract and was explicitly set aside.

    Poll behavior and recovery

    • Optimize for time-to-useful-candidate under provider API limits. Where provider behavior and source-query semantics allow, return fresher or recently updated candidates first, process candidates as pages arrive, and respect page/result caps and rate-limit/backoff guidance. Preserve the effective source's membership semantics.
    • Represent a poll pass as complete, incomplete/interrupted, failed, or unsupported. “Complete-empty” means the configured provider search plan finished and returned no candidates; an interrupted, capped, or rate-limited pass may still process candidates already found but cannot be reported as complete-empty. A complete pass is not a globally consistent point-in-time snapshot.
    • Retry unresolved candidates in memory during the poll process. Do not require a shared durable checkpoint or persistent candidate inventory. A later scheduled poll may start a fresh scan.
    • Give older candidates recurring opportunities through provider-specific backfill, safe query partitions, or reconciliation. There is no global catch-up deadline, but a freshness-first pass must not permanently starve older candidates. Record partial results honestly and preserve ADR 0149's rule that uncertain discovery is not treated as absence.
    • A changed query, trusted/credential scope, or provider plan requires the active scan to be replanned and later scans to use the new plan. It does not invalidate cached normalized entities; those have an independent freshness/revision policy. Time-dependent source queries need recurring rediscovery.

    Boundaries and conformance

    • This contract does not gate one-cycle fullsend run when the entity identity is already known. Every entity-driven sandbox cycle still rechecks current source membership and the shared CEL eligibility decision.
    • Conformance cases should distinguish complete-empty from incomplete results and cover result caps, pagination, concurrent changes/delayed indexing, freshness-first ordering where supported, rate-limit interruption, process restart with only in-memory retry state, recurring older-candidate backfill, and query-plan changes without entity-cache invalidation.
  11. fullsend-ai-triage commented on Nov 24, 2026

    @fullsend-ai-triage
    Author

    🤖 Finished Triage · ✅ Success · Started 9:52 AM UTC · Completed 9:54 AM UTC

    Commit: ff203b9 · View workflow run →

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

  12. added
    ready-to-code
    and removed
    blocked
    on Nov 24, 2026
  13. fullsend-ai-coder commented on Nov 24, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Code · ⚠️ Cancelled · Started 9:56 AM UTC · Ended 9:59 AM UTC

    Commit: ff203b9 · View workflow run →

  14. ifireball commented on Nov 24, 2026

    @ifireball
    Member

    /fs-code

  15. fullsend-ai-coder commented on Nov 24, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ⚠️ Cancelled · Started 9:56 AM UTC · Completed 9:59 AM UTC

    Commit: ff203b9 · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high

  16. fullsend-ai-coder commented on Nov 24, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 10:01 AM UTC · Completed 10:10 AM UTC

    Commit: ff203b9 · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $2.14

  17. added a commit that references this issue on Nov 24, 2026
  18. added a commit that references this issue on Nov 24, 2026
  19. added 2 commits that reference this issue on Nov 24, 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

    documentationready-for-agentready-to-code

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions