Skip to content

Specify normalized entity v1 for ADR 0098 #8420

Closed

Description

@ifireball

Problem

ADR 0098 requires a versioned, field-level normalized entity before entity-first evaluation is enabled. NormalizedEvent.entity identifies an event target, while entity-context-snapshot v1 describes staged run input. Neither defines the logical entity value exposed to harness CEL. Candidate discovery and field acquisition may produce partial data, so the contract must not confuse “not loaded” with “absent.”

Scope

Author a forge-neutral normalized-entity v1 specification and schema covering:

  • Stable identity, kind, repository/source reference, current state, and the relationship to NormalizedEvent.entity.
  • Exact CEL-visible fields and types for entity, their coexistence with nullable event, and event-only harness compatibility.
  • Actor-attributed action-indicating history, provenance, supported entity-kind classifications, current authorization representation, and handled-state evidence under ADR 0098, ADR 0133, and Authorization Contract v1.
  • Presence and coverage semantics for scalar fields and collections: distinguish a value or successfully empty collection from absent, not requested/not loaded, unsupported, unknown, failed, or incomplete data where those states can arise. Specify which states, if any, CEL may observe. Unresolved or incomplete required data must never silently evaluate as absent or empty.
  • The evaluation boundary: ADR 0098 requires complete enumeration of the platform-defined action-indicating categories and per-harness current-permission filtering before CEL. Any field accessed by a predicate must resolve under the contract or evaluation fails closed.
  • Versioning, initial supported provider/entity-kind scope, and the boundary between CEL-visible data and model-facing context.

Specify the logical entity and partial-data invariants that Go representations must support. Do not choose a Go type layout, lazy-loading mechanism, or provider query strategy here; #8421 tracks the discovery requirements and the possible follow-up ADR for that choice.

Completion criteria

  • A normative v1 README, machine-readable schema, and representative conformance examples are merged under docs/normative/normalized-entity/v1/.
  • Examples distinguish a partial candidate from an evaluable entity, a genuinely empty history from an incomplete read, and event-backed from event == null evaluation. Missing actor provenance, unverifiable authorization, and a required field that cannot be resolved deny evaluation.
  • The specification is reconciled with Authorization Contract v1, ADR 0133, and entity-context-snapshot v1 where their scopes meet.
  • Living architecture documentation links to the new contract. Implementation remains in the parent issue.

Activity

  1. fullsend-ai-triage commented on Oct 14, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 11:49 AM UTC · Completed 11:51 AM UTC

    Commit: 9f18857 · View workflow run →

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

  2. fullsend-ai-triage commented on Oct 14, 2026

    @fullsend-ai-triage

    This remains ready to implement as a documentation/spec task. No open or merged PR addresses it yet; a code run was started but has not produced a PR.

    Related work (not blockers):

    Notes for whoever picks this up:

    • The initial provider/entity-kind scope is not pinned down. Choose a minimal first slice and record it explicitly, noting what is deferred.
    • Follow the structure of the existing normalized-event v1 and entity-context-snapshot v1 specs so reviewers can compare them directly.
    • Because the spec defines the safe-evaluation boundary (incomplete vs empty, actor provenance, authorization), it deserves careful maintainer review for consistency with ADR 0133 and Authorization Contract v1.
    • The docs site config may need a sidebar entry for the new folder. The /docs/normative/ search scope prefix already exists.

    Proposed conformance cases:

    valid:   event-backed entity (event != null)
    valid:   scheduled entity (event == null)
    valid:   entity with history explicitly marked incomplete/unknown
    valid:   genuinely empty history with complete coverage
    invalid: history entry without actor provenance
    invalid: unverifiable authorization evidence
    invalid: incomplete entity encoded as empty (history simply omitted)
    invalid: required field that cannot be resolved
    

    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 looks ready to implement as a documentation/spec task, and no open PR addresses it yet.

    Related work (not blockers):

    Notes for whoever picks this up:

    • The initial provider/entity-kind scope is not pinned down in the issue. Choose a minimal first slice and record it explicitly in the spec, noting what is deferred.
    • Follow the structure of the existing normalized-event v1 and entity-context-snapshot v1 specs, so reviewers can compare the pieces directly.
    • Because the spec defines the safe-evaluation boundary (incomplete versus empty, actor provenance, authorization), it deserves careful maintainer review for consistency with ADR 0133 and Authorization Contract v1.
    • A new docs folder also needs the sidebar and search-scope wiring in the docs site config.

    Proposed conformance cases:

    valid:   event-backed entity (event != null)
    valid:   scheduled entity (event == null)
    valid:   entity with history explicitly marked incomplete/unknown
    invalid: history entry without actor provenance
    invalid: unverifiable authorization evidence
    invalid: incomplete entity encoded as empty (history simply omitted)
    

    Next steps:

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

    @fullsend-ai-coder
    Contributor

    🤖 Code · ⚠️ Cancelled · Started 11:53 AM UTC · Ended 11:58 AM UTC

    Commit: 9f18857 · View workflow run →

  4. fullsend-ai-triage commented on Oct 14, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 11:54 AM UTC · Completed 11:56 AM UTC

    Commit: 9f18857 · View workflow run →

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

  5. added
    ready-to-code
    and removed
    ready-to-code
    on Oct 14, 2026
  6. fullsend-ai-coder commented on Oct 14, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 11:59 AM UTC · Completed 12:16 PM UTC

    Commit: 9f18857 · View workflow run →

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

  7. self-assigned this
    on Oct 14, 2026
  8. tpouyer commented on Oct 26, 2026

    @tpouyer
    Contributor

    A note for the CEL-visible field list, from the ADR 0112 overlay guard (#8829):

    The overlay trusted-field guard reads its trusted paths from the "Trusted fields" section of docs/normative/normalized-event/v1/README.md, and a test parses that section and prefixes every entry with event.. The section lists entity.source.system "in the entity context" of ADR 0098, so the guard's list carries event.entity.source.system. No v1 event has entity.source, so that path never matches; the docs say so.

    When this spec defines the entity root that harness CEL sees, the entity-context path should be trusted as entity.source.system on that root, and event.entity.source.system dropped from the event list (the "Trusted fields" section and trustedOverlayEventPaths in internal/harness/trigger.go change together).

  9. 11 remaining items

  10. added 12 commits that reference this issue on Nov 8, 2026
  11. added a commit that references this issue on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationready-to-code

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions