Skip to content

Expose GitHub entity text facts (title, body, comment and review text, commands) through the content-safety pipeline #9908

Done

Description

@fullsend-ai-triage

Parent

Continues #9583 (parent #8418, ADR 0147). Split out of #9583 so the parent can be driven to completion.

Problem

The GitHub entity adapter (internal/forge/github/entity_adapter.go) returns the following as unknown with reason unsupported, so a CEL predicate that reads them can never settle and always defers:

  • entity.title
  • entity.body, including the current editor's provenance
  • comment and review text and command tokens

The normalized-entity v1 contract (docs/normative/normalized-entity/v1/README.md, text section) says concrete text becomes known only after it passes the versioned content-safety pipeline on an authorized, verified revision. Command tokens must be derived from the same filtered source. The adapter must not expose raw text.

What to build

  • Use or introduce the versioned content-safety pipeline for entity text. The contract defines it, but the repository has no implementation; check first whether an existing sanitizer or scan package can host it, and record the choice.
  • Populate title, body, and comment and review text and commands in the GitHub adapter only when the complete filtered value is available within the applicable bound. Otherwise keep them unknown with a reason that is not empty.
  • Read these facts selectively, only when the predicate's plan needs them, like other fact groups. Keep the @include-gated query shape.
  • Keep actor authorization and role resolution in the authorized entity view (Build a harness-specific authorized entity view for CEL #9584). Do not duplicate them here.

Acceptance criteria

  • Predicates over title, body, comment text, or commands settle against filtered text through entityacquire.Acquire.
  • Text that fails the filter, exceeds its bound, or cannot be read stays unknown and defers retryably. It is never an empty string.
  • A predicate that does not use text does not read it, which a query-shape test covers.
  • Tests cover filtered, rejected, oversized, and revision-changed-between-reads text.

Activity

  1. self-assigned this
    on Nov 30, 2026
  2. ifireball commented on Nov 30, 2026

    @ifireball
    Member

    /fs-triage

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

    @fullsend-ai-triage
    Author

    🤖 Finished Triage · ✅ Success · Started 8:55 AM UTC · Completed 8:57 AM UTC

    Commit: 0947e43 · View workflow run →

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

  4. added
    feature
    triaged
    type/feature
    on Nov 30, 2026
  5. fullsend-ai-triage commented on Nov 30, 2026

    @fullsend-ai-triage
    Author

    Triage found this issue ready for implementation. It is a well-scoped split from #9583, and the prerequisite authorized entity view (#9584) is already closed. No open PR addresses it.

    Verified against the repo

    • The text facts are currently stubbed as unsupported in internal/forge/github/entity_adapter.go (title and body in ReadBase, comment/review text and command in textAction).
    • The normative rules (filter the complete source before any size bound, never bind a truncated prefix as a complete CEL string, derive commands from the same filtered revision) are in the "Filtered text" section of the normalized-entity v1 README.

    Notes for the implementer

    • The "where does the content-safety pipeline live" question is left to the implementer, as the issue says. internal/security has Unicode, redaction, injection and scanner code. internal/normentity/document.go already refers to filter_version. Record the choice.
    • Keep known vs. unknown distinct for edge cases: known titles are nonempty, empty action text is a valid known string, and anything rejected, oversized, unreadable or revision-shifted is unknown with a reason other than empty.
    • This is a new capability rather than a regression, so it will await human prioritization before automatic code dispatch.

    Proposed test case

    - clean title/body/comment/review text -> known via entityacquire.Acquire; commands derived from filtered text
    - filter rejection or detector unavailable -> unknown (reason != empty), retryable defer
    - text over the bound -> unknown, never truncated or empty
    - revision changes between reads -> not bound as known
    - query shape: a predicate with no text fields requests no text; a title-only predicate omits body and comment text
    - empty comment text -> known ""; unresolved text -> unknown
    

    Labels: This requests a new capability that does not exist today, matching the repo's type/feature label.


    Next steps:

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

    @ifireball
    Member

    /fs-code

  7. fullsend-ai-coder commented on Nov 30, 2026

    @fullsend-ai-coder
    Contributor

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

    Commit: 0947e43 · View workflow run →

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

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

Metadata

Metadata

Assignees

Labels

featuretriagedtype/feature

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions