Skip to content

Bind required entity and nullable event in harness CEL environment (ADR 0098) #9582

Closed

Description

@fullsend-ai-triage

Context: part of implementing accepted ADR 0098 (entity-first harness evaluation), tracked by parent issue #8418 (spec: #9580). Relevant accepted ADRs under docs/ADRs/: 0098, 0133, 0144, 0147, 0148, 0149, 0151. Already complete and not to be redefined here: normalized-entity v1 contract (#8420), actor/entity caches (#9271, #9276), entity-context-snapshot contract (#9310/PR #9314). Event-only harnesses (no entity sources) must keep their current behavior unchanged. Unresolved, unsupported, or failed data must never become a false/empty CEL result and must never start a sandbox.

Blocked by: none strictly; integrates with the shared eligibility decision issue.

Extend the harness CEL environment so predicates for harnesses that declare entity sources are evaluated over a required normalized entity (per the v1 contract) and an optional event that is null for eventless evaluation. Harness authors must be able to guard event access when event may be null, and state-only predicates must still be able to match with a null event. Preserve the CEL unknown-value semantics from ADR 0147 and the distinctions among absent, empty, unsupported, not loaded, partial, unknown, and failed data.

Acceptance: tests for event present, event null, guarded and unguarded event access, unknown/partial propagation, and unchanged event-only harness evaluation.

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.11

  3. added
    feature
    triaged
    on Nov 17, 2026
  4. fullsend-ai-triage commented on Nov 17, 2026

    @fullsend-ai-triage
    Author

    Triage finds this ready for implementation. It is well scoped, and the work is confined to the CEL environment layer.

    Where the change lands: internal/celtrigger currently declares only a dynamically typed event variable and evaluates with only an event map; internal/harness/trigger.go wraps it. The entity-aware environment should be added alongside the existing event-only path so harnesses without entity sources keep identical behavior.

    Points to settle during implementation (resolvable from ADR 0098/0147 and the normalized-entity package):

    Proposed test cases:

    - entity+event present: predicate using both matches / does not match
    - event null + state-only predicate: matches
    - event null + guarded event access: evaluates, no error
    - event null + unguarded event access: error/unknown, not false
    - unknown/partial entity field: propagates as unknown, not false
    - event-only harness: existing Evaluate behavior and tests unchanged
    

    No open PR addresses this and no children exist. The only coordination point is the result shape shared with #9581.


    Next steps:

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

    @ifireball
    Member

    Superseded by #9581, which now combines the required entity/nullable-event CEL binding with the shared eligibility outcome. The acceptance criteria are carried forward there.

  6. removed
    triaged
    ready-for-triage
    on Nov 17, 2026
  7. added a commit that references this issue on Nov 20, 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

    feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions