Skip to content

entity-context-snapshot: align shape and coverage with normalized entity #9310

Closed

Description

@ifireball

What happens

Normalized Entity v1 defines the target entity model for GitHub and GitLab work items and change proposals, GitHub conversations, and Jira work items. Entity-context-snapshot v1 covers only GitHub, GitLab, and Forgejo work items and change proposals, so it cannot provide the model-facing field gate for Jira issues or GitHub Discussions.

The two contracts also make common data look different. Normalized Entity nests source under entity, uses a canonical entity.id and a separate provider source_id, and models author as an object. The snapshot puts source at the index root, uses entity.id for the provider ID, splits author identity and display name, and stages the entity body and comments as separate Markdown records.

What should happen

  • The model-facing snapshot contract covers the six provider/kind pairs in Normalized Entity v1.
  • Shared entity fields have the same names, semantic types, and meanings across both contracts wherever they are represented. Any required shape differences are explicit and documented.
  • The snapshot remains a filtered subset suitable for prompt context and preserves reuse of unchanged cached records when unrelated content or metadata changes.
  • Omitted, unavailable, or partial snapshot data is represented clearly enough that consumers do not mistake it for a complete empty value.
  • Authorization Contract v2 points to the applicable model-facing field gate for every supported pair before entity-first evaluation is enabled.

Context

Authorization Contract v2 already states that Jira issues and GitHub Discussions need an applicable prompt-field gate before entity-first execution. This complements #8420 (the CEL-facing normalized-entity contract), #8421 (discovery requirements), and #9276 (normalized-entity acquisition cache). GitHub Discussion runtime participation is tracked under #6402.

Done when

  • The snapshot schemas and contract describe all six target pairs.
  • A contributor can recognize common entity identity, source, author, state, timestamp, and label fields without learning a second set of names or meanings.
  • Snapshot-specific filtering, selection, and cache-reuse semantics remain explicit and distinguish an omitted field from a complete empty value.
  • Authorization Contract v2 and the entity-first completion criteria reference the resulting model-facing gate.

Activity

  1. fullsend-ai-triage commented on Nov 11, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 8:44 AM UTC · Completed 8:46 AM UTC

    Commit: 8ef5d3d · View workflow run →

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

  2. self-assigned this
    on Nov 11, 2026
  3. added
    triaged
    component/docs
    on Nov 11, 2026
  4. fullsend-ai-triage commented on Nov 11, 2026

    @fullsend-ai-triage

    Triage summary

    This is ready for a contributor to pick up; the work is confined to normative docs and JSON schemas (no Go code consumes the snapshot schemas today).

    Related work (none blocking): #8420 (normalized-entity v1) is closed; #9276 (acquisition cache) and #8421 (discovery requirements) are open sibling efforts that should be kept consistent. No open PR currently addresses this issue.

    Points for the implementer to settle from the repo/ADRs:

    • Whether the alignment is an amendment to snapshot v1 or needs a v2 bundle. The v1 README's version note already says a v2 contract is needed for the configurable human-role threshold from ADR 0151, so these may be combined or sequenced.
    • Which side's naming wins for each shared field (source, id vs source_id, author). Keep the snapshot's separate-record layout where it is needed for cache reuse, and document that as an explicit shape difference.
    • How Jira issues and Discussions replace the current host-only unsupported_entity path.

    Suggested test case:

    For each of the six provider/kind pairs:
      - a fixture snapshot validates against the updated schemas
      - shared fields map to Normalized Entity v1 fields by a documented rule
    Plus:
      - a fixture with an omitted/partial field is distinguishable from an explicit empty value
      - changing unrelated metadata leaves unchanged record files byte-identical
    

    This is a design-heavy change to a normative contract, so it is classified as other rather than documentation and is not auto-promoted to ready-to-code; a maintainer review of the approach is recommended first.


    Labels: This is a change to normative specs and schemas, so the docs component fits. It affects a design contract, so needs-design is appropriate until the v1-amendment vs v2 question is settled.


    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 11, 2026

    @ifireball
    MemberAuthor

    /fs-code

  6. fullsend-ai-coder commented on Nov 11, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 9:00 AM UTC · Completed 9:20 AM UTC

    Commit: 47b1f72 · View workflow run →

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

  7. added 3 commits that reference this issue on Nov 11, 2026
  8. added 2 commits that reference this issue on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component/docsneeds-designtriaged

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions