Repository navigation
Description
Parent
This spec is a child of Implement ADR 0098 entity-first harness evaluation.
Problem Statement
ADR 0098 adopts one harness predicate over a required normalized entity and an optional event. The shipped CEL dispatch path still evaluates event data only, while poll reconstructs events instead of evaluating current entity state. Eventless scheduled discovery, progressive entity acquisition, and the final authorization and source-membership checks are not implemented.
The entity and authorization contracts, acquisition strategy, actor cache, entity cache, and model-facing snapshot contract have since been specified or implemented. What remains is a buildable implementation plan that applies those contracts consistently across event-backed and scheduled candidates. The earlier broad event and discovery split issues (#9551 and #9552) were closed as not planned because their slices were too coarse.
Solution
Implement entity-first harness evaluation around one shared eligibility decision before sandbox launch. Both event-backed and scheduled candidates use it; the event is present for the former and null for the latter. The decision verifies current source membership, selectively acquires the normalized entity facts needed by the harness predicate, applies the current authorization and coverage rules, and launches only when the result is conclusively eligible.
Scheduled discovery uses a versioned normative discovery/query protocol and combined provider searches. It locally routes results to harnesses, preserves completeness and retry state, and rechecks current source membership and CEL before every sandbox cycle. Existing event-only harnesses remain compatible.
User Stories
- As a harness author, I can write one CEL predicate against a required entity and optional event, so the same rule can cover event-driven and scheduled evaluation.
- As a harness author using event fields, I can guard event access when the event may be null, while state-based predicates can still match during scheduled discovery.
- As an event-driven caller, after the event actor is authorized, Fullsend resolves the current entity, confirms the harness source still matches, and evaluates the shared predicate with both entity and event.
- As an operator, a verified Fullsend-controlled poll can discover entities without fabricating events, and it evaluates them only when invocation provenance and effective platform eligibility policy permit it.
- As a harness author, I can declare entity sources and their local matching conditions, so a candidate is routed only to harnesses whose sources match.
- As a harness author, a predicate fetches only the fields and history that can affect its result, avoiding unrelated provider reads while retaining sound results.
- As a harness author, I can distinguish absent, empty, unsupported, not loaded, partial, unknown, and failed data; incomplete evidence never becomes false or empty.
- As an operator, a known authorized witness can establish a positive predicate result before unrelated history is fetched, while negative or aggregate results wait for sufficient coverage.
- As a security owner, actor-attributed facts enter CEL only with current-revision provenance and authorization under the harness's effective human minimum and bot rules.
- As a security owner, event authorization, trusted eventless invocation provenance, and model-bound content authorization remain separate gates; passing CEL does not grant authority to stage or act on content.
- As an operator, one compatible combined discovery search runs per provider, tenant, repository or project, entity kind, and effective credential scope, rather than a separate full search for every harness.
- As an operator, pagination, result caps, delayed indexing, and concurrent changes cannot silently drop candidates; uncertain coverage leaves work retryable.
- As an operator, duplicate provider results are collapsed by canonical entity identity and each relevant harness query is checked locally before routing.
- As an operator, each entity-driven sandbox cycle, including an event-supplied candidate, rechecks current source membership and CEL; a stale candidate cannot start work.
- As an operator, handled-state evidence and run coordination prevent recurring discovery from repeatedly launching work already handled by the harness.
- As a maintainer, an unsupported query, provider/kind, authorization source, or incomplete contract cannot look like a successful empty result or enable a sandbox.
- As a maintainer, I can select and document the first provider/kind scope during implementation planning, and configuration, CLI behavior, and user documentation describe the scope actually implemented.
- As a user of an event-only harness, existing event-trigger behavior continues unchanged unless the harness opts into entity sources.
Implementation Decisions
- Follow accepted ADR 0098, ADR 0133, ADR 0144, ADR 0147, ADR 0148, ADR 0149, and ADR 0151. This work does not need a new acquisition-strategy ADR.
- Before scheduled discovery is enabled, complete a versioned normative discovery/query protocol as required by ADR 0149. It defines trusted source declarations, supported operators, routing facts, provider mappings and limits, scope boundaries, pagination and completeness evidence, retry behavior, and conformance cases. The protocol records accepted decisions; it does not reopen them.
- Use one shared final eligibility decision for both candidate paths. It distinguishes eligible, proven non-match, unresolved/deferred, and denied outcomes. Only an eligible result reaches sandbox launch; unresolved data or membership remains retryable and never becomes a false CEL result.
- Bind a required normalized entity and nullable event for entity-source predicates. A candidate event does not replace current source-membership checking. Event authorization remains before the event-backed decision; eventless evaluation requires trusted Fullsend invocation provenance and effective platform policy.
- Derive a conservative, per-harness acquisition plan from CEL dependencies and the normalized-entity contract. Preserve independent collection coverage, source revision consistency, actor attribution, and the CEL unknown value semantics required by ADR 0147 and the normalized-entity v1 contract.
- Apply Authorization Contract v2 and ADR 0151's effective human_min_role to decisive actor-attributed facts. Apply ADR 0148's bounded verified actor-role reuse only where its scoped key, age, invalidation, and audit rules permit. Model-bound admission remains a separate gate under ADR 0133 and the applicable entity-context-snapshot contract.
- For discovery, use one combined logical search per ADR 0149 source scope, locally verify every harness's source match, deduplicate by canonical entity ID, and retain retry/reconciliation state whenever completeness cannot be proved. Before every entity-driven sandbox cycle, recheck both source membership and CEL.
- Reuse the completed normalized-entity v1 contract (Specify normalized entity v1 for ADR 0098 #8420), cache work (Implement the ADR 0148 actor cache interface and in-memory backend #9271 and Add a revisioned cache for partially acquired normalized entities #9276), and entity-context-snapshot work (entity-context-snapshot: align shape and coverage with normalized entity #9310; PR docs(#9310): align entity-context-snapshot v2 with normalized entity #9314) rather than redefining them here. The parent issue's older reference to Authorization Contract v1 and observation/mutation thresholds is superseded for entity CEL by Authorization Contract v2 and ADR 0151.
- Select the first provider/kind scope during implementation planning and record it. The ADRs describe target coverage across GitHub, GitLab, Forgejo, and Jira, but a source/kind is enabled only when its normalized-entity and model-facing contracts and provider adapter can satisfy the required semantics. In particular, do not treat unsupported scope as empty or claim it is enabled before those gates are met.
- Keep event-only behavior unchanged for harnesses without entity sources. Configuration, poll/dispatch behavior, CLI surfaces, and user documentation must accurately describe the selected scope.
Testing Decisions
- Primary acceptance seam: the shared final eligibility decision used by both event-backed and scheduled candidates. Drive it with controlled source, authorization, policy, and provenance dependencies; assert whether a sandbox may start, is skipped as a proven non-match, is deferred as unresolved, or is denied.
- Cover event present and event null, current source membership and stale candidates, CEL true/false/unknown, known positive witnesses over partial collections, incomplete negative/aggregate evidence, unsupported or failed reads, missing provenance, insufficient actor role, and event-only compatibility.
- Exercise the discovery protocol with reusable provider-adapter conformance cases for combined queries, source-scope isolation, local routing, canonical deduplication, unsupported operators, pagination, provider limits, incomplete coverage, and retry/reconciliation.
- Add behavior-level scenarios for an authorized event-backed run, a trusted eventless scheduled run, an already-handled candidate, and fail-closed cases that prove no sandbox starts. Tests assert externally visible outcomes and retained retry behavior, not internal helper call sequences.
- Follow existing dispatch authorization/CEL tests, poller tests, and behavior-test dispatch and authorization scenarios as prior art. Keep provider conformance fixtures deterministic; use live-forge behavior runs only for the end-to-end paths they can demonstrate.
Out of Scope
- Replacing the accepted acquisition, actor-admission, or query-sharing decisions with a new ADR.
- Redefining the normalized-entity or authorization contract, or redesigning the completed actor/entity caches and snapshot contract.
- Changing event-only harness behavior or forcing harnesses without entity sources onto scheduled evaluation.
- Enabling a provider/kind whose normalized-entity, model-facing, authorization, or adapter contract cannot establish the required evidence.
- Selecting the first provider/kind scope in this spec; that selection belongs to implementation planning as stated in Implement ADR 0098 entity-first harness evaluation #8418.
Further Notes
- The parent remains #8418. Its normalized-entity, actor-cache, entity-cache, and snapshot sub-issues are complete; the discovery/query protocol and the shared implementation remain to be delivered.
- The spec deliberately defines the full behavior and acceptance boundary before finer-grained implementation tickets are created. The next planning step can split it into small, independently verifiable issues with explicit blocking relationships.
- The scheduled-run use cases in #313 are related context.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fullsend-ai-triage commentedon Nov 17, 2026
🤖 Finished Triage · ✅ Success · Started 9:01 AM UTC · Completed 9:03 AM UTC
Commit:
4c81590· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.22
fullsend-ai-triage commentedon Nov 17, 2026
This spec has been decomposed into finer-grained, independently verifiable issues, as its own notes anticipate and as earlier coarse event-backed/discovery splits were too large. The slices are: (1) the shared pre-sandbox eligibility decision; (2) the entity and nullable-event CEL binding; (3) selective acquisition planning; (4) Authorization v2 and human-minimum-role handling for actor-attributed facts; (5) the event-backed path with membership and CEL recheck; (6) the versioned discovery/query protocol document; (7) combined scheduled discovery, routing, dedup and retry state; (8) trusted eventless poll evaluation with handled-state dedup; and (9) first provider/kind scope selection with config, CLI and user docs. Each sub-issue states its blockers and acceptance tests; the discovery protocol is a prerequisite for enabling scheduled discovery. Note that these are not fully independent: they form a dependency chain, so please treat the stated blocking relationships as the ordering. The parent issue remains the umbrella for overall ADR 0098 completion.
Split into:
ifireball commentedon Nov 24, 2026
/fs-triage
Please carry these maintainer decisions into #9586 and align the related discovery implementation issues (#9587, #9588, and #9589).
Contract boundary
docs/normative/entity-discovery/v1/README.md, following ADR 0015. The existing entity-source-configuration v1 contract explicitly says it is not the complete discovery/query protocol. The new contract should link to that configuration contract and ADRs 0079 and 0149.fullsend pollrun enumerating candidates for already-configured entity sources. It does not imply a lasting list of every entity seen. Keep this separate from normalized-entity field acquisition and the entity cache.Poll behavior under provider limits
Boundaries and conformance
fullsend runwhen the entity identity is already known. The shared eligibility decision still rechecks current source membership and CEL before each entity-driven sandbox cycle.fullsend-ai-triage commentedon Nov 24, 2026
🤖 Finished Triage · ✅ Success · Started 9:48 AM UTC · Completed 9:50 AM UTC
Commit:
ff203b9· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.22
fullsend-ai-triage commentedon Nov 24, 2026
Thanks for the maintainer decisions. This umbrella spec was already decomposed, and it is not an implementation target itself. Its remaining work is tracked in the open child issues listed below. The three child issues already closed are #9581, #9582 and #9584.
What this triage verified and how it affects the children:
docs/normative/entity-discovery/v1/, which does not exist yet. It should consume the entity-source configuration v1 contract and ADRs 0079 and 0149, without a second source model or query language.fullsend runfor an already-known entity is not gated by discovery completeness, but it still rechecks membership and CEL before each sandbox cycle.This triage cannot edit sibling issues. Each of #9587, #9588 and #9589 needs its own
/fs-triagerun or a maintainer edit to pick up these decisions. This issue stays as the umbrella and can be closed as completed once all the children above are closed.Blocked by: