Skip to content

docs(#9586): add entity-source discovery v1 normative protocol - #9590

Closed
fullsend-ai-coder[bot] wants to merge 4 commits into
mainfrom
agent/9586-discovery-query-protocol
Closed

fullsend-ai-coder[bot] wants to merge 4 commits into
mainfrom
agent/9586-discovery-query-protocol

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Adds the versioned normative discovery/query protocol that ADR 0149 requires before entity-source discovery can be enabled: docs/normative/entity-source-discovery/v1/README.md (protocol version entity-source-discovery/v1). It records only decisions already accepted in ADRs 0098, 0133, 0144, 0147, 0148, 0149, and 0151, and reuses the Normalized entity v1 and Authorization Contract v2 contracts rather than redefining them.

Related Issue

Part of #8418 (spec #9580).

Changes

  • New spec docs/normative/entity-source-discovery/v1/README.md:
    • Enablement gates. This spec meets ADR 0149's protocol precondition for discovery. Entity-driven execution still needs the new major authorization contract, which ADR 0149 also requires.
    • Trusted source declarations and stable source IDs. Unsupported sources are rejected visibly: they are never silently dropped and never searched separately.
    • Source scopes: provider, tenant, immutable container ID, kind, and credential scope. The scope guard is separate from queries. Each result's canonical scope is verified before routing.
    • A closed set of routing facts, each classed as structural, source state, or actor-originated, following Authorization v2's causal rule and ADR 0151 minimums.
    • Logical query model: eq, in, has, before, at_or_after, and, or, not, evaluated three-valued, with coverage-aware has. Admission rules forbid provider-only, ranking, and top-N semantics, and forbid pushing negated actor-originated conditions into provider filters.
    • One combined plan per scope, a plan-identity digest, and a full rescan when the plan changes.
    • Local routing: deduplication by canonical entity.id. unknown is never treated as non_match.
    • Bound-run membership check, using an authoritative read, before every entity-driven sandbox cycle, including event-backed cycles.
    • Coverage evidence records and rules for complete: reaching the last page is not completeness; result caps, indexing delay, and overlap reconciliation are covered; checkpoints advance only across complete ranges.
    • Time-dependent queries need periodic full rediscovery or durable due records.
    • Durable retry records. A provisional handoff and an exhausted retry never become handled or non_match.
    • Provider mappings and limit profiles for GitHub, GitLab, Forgejo, and Jira. Forgejo stays disabled until a normalized-entity contract covers it. The Jira --jql poll override stays under ADR 0063.
    • States explicitly that event-only harnesses are unaffected.
    • Conformance cases ESD-01 through ESD-64, with a rule-to-case map.
  • docs/architecture.md: links the new protocol. The open question now says only that a concrete harness-configuration syntax remains open.
  • ADR 0149 (Accepted) — minor annotation: adds a three-line "Living contract" cross-reference to the new spec in its Status section, the same pattern ADR 0098 uses. This is allowed under docs/contributing/adrs.md. Context, Decision, and Consequences are unchanged.

Scope notes for reviewers

  • ADR 0149 leaves query syntax open. The spec therefore defines a logical query model that any configuration syntax must lower to losslessly. It does not invent harness YAML syntax.
  • The v1 operator set and routing-fact list are kept small on purpose. Additions are non-breaking within v1 only if they come with complete mappings and conformance cases.
  • Provider endpoint details are given as example mechanisms. Concrete limits are required through a per-adapter limit profile. Missing values default to the most conservative choice.
  • The sidebar under docs/normative/ is auto-discovered, so no .vitepress/config.ts change is needed.

Testing

  • Secret scan (scan-secrets) passed on the changed files and on the staged index.
  • lychee --offline --include-fragments passed on all changed files: 0 errors, including anchors.
  • pre-commit run could not fetch hook repositories (TLS failure in the sandbox). The applicable pre-commit-hooks v6.0.0 hooks were run directly and passed: end-of-file, trailing-whitespace, private-key, merge-conflict, mixed-line-ending, large-files. Gitleaks was covered by the secret scan. The other hooks do not apply to Markdown.
  • Tests: none needed. This is a documentation-only change.

🤖 Generated with Claude Code


Closes #9586

Post-script verification

  • Branch is not main/master (agent/9586-discovery-query-protocol)
  • Secret scan passed (gitleaks — 4c8159050583a928a261d720f32ce8b53608922e..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Final PR description secret scan passed (gitleaks — no-git)

ADR 0149 forbids enabling entity-source discovery until a versioned
normative query protocol exists. Add it under
docs/normative/entity-source-discovery/v1/ (protocol version
entity-source-discovery/v1), recording only decisions accepted in
ADRs 0098, 0133, 0144, 0147, 0148, 0149, and 0151.

The spec defines trusted source declarations, source scopes, a closed
set of routing facts with actor-gating classes, a logical query model
with three-valued operators and admission rules, combined-plan
identity and plan-change rescans, local routing and deduplication,
bound-run membership checks, coverage evidence (the last page is not
completeness), time-dependent rediscovery, durable retry records,
provider mappings and limit profiles for GitHub, GitLab, Forgejo, and
Jira, and numbered conformance cases (ESD-01..ESD-64) with a
rule-to-case map. Event-only harnesses are explicitly unaffected.

ADR 0149 leaves query syntax open, so the spec defines a logical model
that any harness-configuration syntax must lower to, not a syntax.
Forgejo stays disabled until a normalized-entity contract covers it.

Also link the protocol from architecture.md and add a "Living
contract" cross-reference annotation to accepted ADR 0149.

Note: pre-commit could not fetch hook repos (TLS failure in sandbox);
the applicable pre-commit-hooks v6.0.0 hooks were run directly and
passed, gitleaks ran via scan-secrets, and lychee offline link and
fragment checks passed.

Closes #9586

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:21 AM UTC · Completed 9:30 AM UTC

Commit: b0b6a9c · View workflow run →

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

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Site preview

Preview: https://6bce1804-site.fullsend-ai.workers.dev

Commit: 9e29e2172a72ec5c1edbc482e369522683592e17

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Nov 17, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Documentation-only PR by a bot touching no protected paths, but elevated to moderate risk by a large diff size and high recent commit churn and author contention on docs/architecture.md.

Previous run

Risk Assessment: moderate (2/5)

Details

Documentation-only PR by a bot touching no protected paths, but elevated to moderate risk by a large diff size and high recent commit churn and author contention on docs/architecture.md.

Previous run (2)

Risk Assessment: moderate (2/5)

Details

Documentation-only PR by a bot touching no protected paths, but elevated to moderate risk by a large line count and high recent commit churn and author contention on docs/architecture.md.

Previous run (3)

Risk Assessment: moderate (2/5)

Details

Documentation-only PR by a bot touching no protected paths, but elevated to moderate risk by a large line count and high recent commit churn and author contention on docs/architecture.md.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Looks good to me

Earlier findings

  • docs/normative/entity-source-discovery/v1/README.md:415, logic-error, resolved: overlap_reconciliation now requires a deterministic total order with a unique tie-breaker, and ESD-65 covers identical-ID-set passes with unstable ties.
  • docs/normative/entity-source-discovery/v1/README.md:633, test-inadequate, resolved: ESD-59 now states ascending order, departure timing, returned pages, and the differing ID sets, so the expected result is reproducible.
Previous run

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJkb2Mtc3R5bGUiLCJmaWxlIjoiZG9jcy9ub3JtYXRpdmUvZW50aXR5LXNvdXJjZS1kaXNjb3ZlcnkvdjEvUkVBRE1FLm1kIiwiaWQiOiJmXzlmOWM2ZmU3NjRhMmRiODkiLCJsaW5lIjo4MCwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoic3R5bGUtY29udmVudGlvbnMifSx7InNldmVyaXR5IjoibWVkaXVtIiwiY2F0ZWdvcnkiOiJsb2dpYy1lcnJvciIsImZpbGUiOiJkb2NzL25vcm1hdGl2ZS9lbnRpdHktc291cmNlLWRpc2NvdmVyeS92MS9SRUFETUUubWQiLCJpZCI6ImZfY2M0OTAwZjM5NGI0NTUxYSIsImxpbmUiOjQxNCwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJsb2dpYy1lcnJvciIsImZpbGUiOiJkb2NzL25vcm1hdGl2ZS9lbnRpdHktc291cmNlLWRpc2NvdmVyeS92MS9SRUFETUUubWQiLCJpZCI6ImZfYzMyMThjZTJmZTM1MWRhYiIsImxpbmUiOjQxNiwiY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ieV9jaGFuZ2UifSx7ImlkIjoiZl9jYzQ5MDBmMzk0YjQ1NTFhIiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn0seyJpZCI6ImZfYzMyMThjZTJmZTM1MWRhYiIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9LHsiaWQiOiJmXzJiY2MwZDVkZTdjOWZjYmQiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifV19 -->

Looks good to me

Earlier findings

  • docs/normative/entity-source-discovery/v1/README.md:415, logic-error, resolved: overlap_reconciliation now requires a deterministic total order with a unique tie-breaker, and ESD-65 covers identical-ID-set passes with unstable ties.
  • docs/normative/entity-source-discovery/v1/README.md:633, test-inadequate, resolved: ESD-59 now states ascending order, departure timing, returned pages, and the differing ID sets, so the expected result is reproducible.
Previous run (2)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImRvY3Mvbm9ybWF0aXZlL2VudGl0eS1zb3VyY2UtZGlzY292ZXJ5L3YxL1JFQURNRS5tZCIsImlkIjoiZl9mNjYyZjg3MGRkNjdkZmZjIiwibGluZSI6NDE1LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6InRlc3QtaW5hZGVxdWF0ZSIsImZpbGUiOiJkb2NzL25vcm1hdGl2ZS9lbnRpdHktc291cmNlLWRpc2NvdmVyeS92MS9SRUFETUUubWQiLCJpZCI6ImZfZmE0N2EwMzc4ZDY4MWM3MiIsImxpbmUiOjYzMywiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifS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F0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifSx7ImlkIjoiZl9jMzIxOGNlMmZlMzUxZGFiIiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn0seyJpZCI6ImZfMmJjYzBkNWRlN2M5ZmNiZCIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9LHsiaWQiOiJmXzlmOWM2ZmU3NjRhMmRiODkiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifV19 -->

Review

Findings

Medium

  • [logic-error] docs/normative/entity-source-discovery/v1/README.md:415 — Identical ID sets across two passes do not establish completeness unless pagination also has a deterministic total ordering. The overlap_reconciliation method does not require a stable tie-breaker. For example, four unchanged entities with the same updated_at can yield A,B on page one and A,B again on page two when the provider resolves ties differently between requests. Both passes then return the identical set {A,B} and satisfy the validation rule, while C,D stay missing outside the next range's overlap. The only tie-break key in the document is the Jira row; the GitHub, GitLab and Forgejo rows sort by update time only.
    Remediation: Require an adapter guarantee of deterministic pagination ordering, including a unique stable tie-breaker, before this method can establish completeness. Otherwise keep the range incomplete or use a different proven enumeration method. Add a conformance case with tied sort values across page boundaries.

Low

  • [test-inadequate] docs/normative/entity-source-discovery/v1/README.md:633 — ESD-59's trace does not reproduce its claimed miss. With A–F and page size two, page one returns A,B; once A departs, page two returns D,E and page three returns F, so C is skipped, not E. In the validating pass B and C depart after page one, which skips D and E. The expected outcome (different ID sets, range not validated) still holds, so the error is in the case text, not the rule.
    Remediation: Give an explicit initial ordering, page responses and mutation timing that actually skip the same unchanged entity in both passes, then assert that the differing ID sets prevent validation.

Earlier findings

  • docs/normative/entity-source-discovery/v1/README.md:414, logic-error — resolved: the rule now requires the validating pass and its baseline to return exactly the same canonical-ID set, so departures during either pass are caught. ESD-59 was added for that scenario.
  • docs/normative/entity-source-discovery/v1/README.md:416, logic-error — resolved: the text now says the later pass becomes the baseline when the full read repeats, and a durable retry starts a new first pass.
  • docs/normative/entity-source-discovery/v1/README.md:406, logic-error — resolved: the single-departure skip is now covered by the multi-pass identical-set requirement and ESD-58.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (3)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImRvY3Mvbm9ybWF0aXZlL2VudGl0eS1zb3VyY2UtZGlzY292ZXJ5L3YxL1JFQURNRS5tZCIsImlkIjoiZl9jYzQ5MDBmMzk0YjQ1NTFhIiwibGluZSI6NDE0LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImRvY3Mvbm9ybWF0aXZlL2VudGl0eS1zb3VyY2UtZGlzY292ZXJ5L3YxL1JFQURNRS5tZCIsImlkIjoiZl9jMzIxOGNlMmZlMzUxZGFiIiwibGluZSI6NDE2LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImRvY3Mvbm9ybWF0aXZlL2VudGl0eS1zb3VyY2UtZGlzY292ZXJ5L3YxL1JFQURNRS5tZCIsImlkIjoiZl8yYmNjMGQ1ZGU3YzlmY2JkIiwibGluZSI6NDA2LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImRvYy1zdHlsZSIsImZpbGUiOiJkb2NzL25vcm1hdGl2ZS9lbnRpdHktc291cmNlLWRpc2NvdmVyeS92MS9SRUFETUUubWQiLCJpZCI6ImZfOWY5YzZmZTc2NGEyZGI4OSIsImxpbmUiOjgwLCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJzdHlsZS1jb252ZW50aW9ucyJ9XSwiZGlzcG9zaXRpb25zIjpbeyJpZCI6ImZfMmJjYzBkNWRlN2M5ZmNiZCIsInN0YXR1cyI6Im9wZW4ifSx7ImlkIjoiZl85ZjljNmZlNzY0YTJkYjg5Iiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn1dfQ== -->

Review

Findings

Medium

  • [logic-error] docs/normative/entity-source-discovery/v1/README.md:414 — The pagination-completeness defect is not fully resolved by the second-full-read rule. Concurrent departures can skip the same unchanged entity in both passes: with ascending results A–F and page size two, pass one reads AB and CD; A then updates beyond the range, so the last page returns F and skips E. Pass two reads BC; B and C then update beyond the range, so its next page returns F, again skipping E. Every ID returned by pass two appeared in pass one and none need show a newer revision, so the check passes and the range can be marked complete although E was never discovered. ESD-58 covers only a single departure followed by a stable reread.
    Remediation: Require reconciliation evidence that also detects departures during the validating pass, or use provider-backed snapshot/change-generation evidence or another demonstrably complete traversal. Add a conformance case with departures during both passes and require the range to remain incomplete unless coverage is proven.

Low

  • [logic-error] docs/normative/entity-source-discovery/v1/README.md:416 — The retry loop never says whether the comparison baseline moves forward. The success condition compares the reread with "the first pass"; once a reread discovers C (ESD-58), a literal reading keeps comparing later in-loop rereads against the original first pass, which lacks C, so the in-loop repeat cannot succeed even after the provider goes quiet. The incomplete + durable-retry fallback still lets a later retry start a fresh first pass, so this is ambiguity causing wasted scans and delay rather than a permanent liveness failure.
    Remediation: State which pass becomes the baseline when the full read repeats (e.g., the previous pass, keeping discovered IDs), and that a durable retry starts a new first pass. Optionally set a bounded scan budget.

Earlier findings

  • docs/normative/entity-source-discovery/v1/README.md:80, doc-style — resolved: "Fullsend" lowercased to "fullsend" in running prose.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (4)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImRvY3Mvbm9ybWF0aXZlL2VudGl0eS1zb3VyY2UtZGlzY292ZXJ5L3YxL1JFQURNRS5tZCIsImlkIjoiZl8yYmNjMGQ1ZGU3YzlmY2JkIiwibGluZSI6NDA2LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImRvYy1zdHlsZSIsImZpbGUiOiJkb2NzL25vcm1hdGl2ZS9lbnRpdHktc291cmNlLWRpc2NvdmVyeS92MS9SRUFETUUubWQiLCJpZCI6ImZfOWY5YzZmZTc2NGEyZGI4OSIsImxpbmUiOjgwLCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJzdHlsZS1jb252ZW50aW9ucyJ9XX0= -->

Review

Findings

Medium

  • [logic-error] docs/normative/entity-source-discovery/v1/README.md:406 — Overlapping successive time ranges (overlap_reconciliation) does not establish completeness for mutable offset pagination. Example: a range holds [A, B, C, D] with page size two. After page one returns A and B, A is updated past the range's upper bound and leaves the result set. Page two then returns D and skips the unchanged C. If C's timestamp is outside the next range's boundary overlap, C is never rediscovered, yet this rule lets the original range be marked complete. Reconciling by canonical ID recovers the entity that moved, not the unchanged entities skipped because its movement shifted offsets. The GitHub and GitLab mappings rely on this method for mutable page/offset listings, and ESD-50 only tests that the moved entity is found.
    Remediation: Require reconciliation that demonstrably covers the entire potentially affected range, or require a provider-supported snapshot/keyset mechanism; otherwise keep the range incomplete with a durable retry. Add a conformance case where one entity leaves an already-read page and causes a different, unchanged entity outside the next boundary overlap to be skipped.

Low

  • [doc-style] docs/normative/entity-source-discovery/v1/README.md:80 — The product name is capitalized mid-sentence in running prose ("trusted Fullsend invocation provenance"). docs/contributing/documentation.md § Product name casing requires lowercase "fullsend" in running prose.
    Remediation: Change "trusted Fullsend invocation provenance" to "trusted fullsend invocation provenance" on line 80.

Labels: Documentation-only change adding a normative spec and architecture/ADR cross-references.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added the component/docs User-facing documentation label Nov 17, 2026
@fullsend-ai-coder

fullsend-ai-coder Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 9:32 AM UTC · Completed 9:36 AM UTC

Commit: b0b6a9c · View workflow run →

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

Require a second full read of the range for overlap_reconciliation so
unchanged entities skipped by shifted page offsets are detected, add
conformance case ESD-58, and lowercase the product name in running prose.

Note: pre-commit could not fetch hook repositories (TLS failure in the
sandbox); applicable hook checks (trailing whitespace, EOF, line endings,
secret scan) were verified manually.

Addresses #9590

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (bot-triggered)

Addressed both review findings in the normative protocol README. Pre-commit could not fetch hook repositories in the sandbox, so applicable checks were verified manually; the offline link check and secret scan passed.

Fixed (2):

  1. overlap_reconciliation does not establish completeness for mutable offset pagination (docs/normative/entity-source-discovery/v1/README.md): Required a second full read of the range to detect entities skipped by shifted offsets (repeat on difference, otherwise keep the range incomplete with a durable retry), and added conformance case ESD-58 plus its rule-to-case map entry.
  2. Product name capitalized in running prose (docs/normative/entity-source-discovery/v1/README.md): Lowercased 'Fullsend' to 'fullsend' in 'trusted fullsend invocation provenance'.

Tests: passed

CI inspections (5):

  1. test (pending, in_progress): Still running when inspected; this PR changes documentation only.
  2. commit-lint (passing, success)
  3. semgrep (passing, success)
  4. gateway-doc-configs (passing, success)
  5. pr-title-lint (passing, success)

Conflict update: skipped; strategy none; forge MERGEABLE; target main

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push

Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:38 AM UTC · Completed 9:49 AM UTC

Commit: 39319b4 · View workflow run →

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

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 9:51 AM UTC · Completed 9:55 AM UTC

Commit: 39319b4 · View workflow run →

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

Require validating passes for overlap_reconciliation to return identical
canonical ID sets, so departures during either pass are detected. State
that the previous pass becomes the baseline when a full read repeats and
that a durable retry starts a new first pass. Add conformance case ESD-59
for departures during both passes.

Note: pre-commit could not fetch hook repositories (certificate failure)
and lychee could not run via make (operation not permitted); no links were
changed and the edit adds no trailing whitespace.

Addresses #9590

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 2 (bot-triggered)

Addressed both findings from the second review round by strengthening the overlap_reconciliation validation rule (identical ID sets across consecutive passes, moving baseline, bounded scan budget) and adding conformance case ESD-59.

Fixed (2):

  1. Pagination completeness: two full reads can both miss the same unchanged entity when departures occur during both passes (docs/normative/entity-source-discovery/v1/README.md): Reworked the overlap_reconciliation rule: a pass is validated only when it and the baseline pass before it return identical canonical ID sets and no returned entity was updated after the baseline began. Mismatches keep the range incomplete with a durable retry. Added conformance case ESD-59 for departures during both passes and extended the rule-to-case map.
  2. Retry loop does not say whether the comparison baseline moves forward (docs/normative/entity-source-discovery/v1/README.md): Stated that when passes differ the later pass becomes the baseline, discovered entities are kept, a bounded scan budget applies, and a durable retry starts a new first pass with no baseline. Updated ESD-58 to match.

Tests: passed

CI inspections (1):

  1. DCO (passing, success): DCO check passed.

Conflict update: skipped; strategy none; forge MERGEABLE; target main@17f01392505481a95b0e777bed9ee4bff5e45b93

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push

Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:57 AM UTC · Completed 10:04 AM UTC

Commit: 1b98667 · View workflow run →

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

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 10:06 AM UTC · Completed 10:10 AM UTC

Commit: 1b98667 · View workflow run →

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

Require a unique stable tie-breaker for overlap_reconciliation, state the
provider mapping implications, add conformance case ESD-65 for tied sort
values, and correct the ESD-59 page-by-page trace.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 3 (bot-triggered)

Addressed both open findings with a documentation-only change: a deterministic-ordering requirement for overlap_reconciliation (with provider mapping updates and new case ESD-65), and a corrected ESD-59 trace. The findings marked resolved needed no further change.

Fixed (2):

  1. Identical ID sets need deterministic pagination order (docs/normative/entity-source-discovery/v1/README.md): overlap_reconciliation now requires a total pagination order with a unique stable tie-breaker on every request of every pass, and otherwise the range stays incomplete unless stable_view applies. The GitHub, GitLab and Forgejo Limits rows state the same requirement. Added conformance case ESD-65 for tied sort values across page boundaries and listed it in the rule-to-case map.
  2. ESD-59 trace does not reproduce the claimed miss (docs/normative/entity-source-discovery/v1/README.md): Rewrote ESD-59 with an explicit ascending order, page responses and departure timing. E is skipped in both passes, the first pass returns {A,B,C,D,F} and the validating pass returns {B,C,F}, so the sets differ and the range is not validated.

Tests: passed

CI inspections (2):

  1. CI / test (pending, in_progress): Still running at inspection time; this PR changes documentation only.
  2. CI / semgrep, commit-lint, web, gateway-doc-configs, test-sandbox-darwin; E2E; Build Site; PR Title Lint; DCO (passing, success): All completed project checks passed.

Conflict update: skipped; strategy none; forge MERGEABLE; target main

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push

Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:12 AM UTC · Completed 10:19 AM UTC

Commit: 9e29e21 · View workflow run →

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

@fullsend-ai-review
fullsend-ai-review Bot dismissed stale reviews from themself November 17, 2026 10:19

Superseded by updated review

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Nov 17, 2026
@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jwm4 jwm4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read this protocol for what it means for Jira polling. I did not review the query model, the routing facts or the paging proofs in detail, and the existing threads already cover the paging rules.

The direction is right for Jira. A checkpoint that advances only across complete ranges, and retry records that never turn an unresolved candidate into "handled", are properties the shipped Jira driver does not have.

I have two inline questions, both about state and load. I think the protocol should answer them before an adapter is built on it: where its records are kept, and in what order waiting work is served and with what bounds.

Written by Bill Murdock with assistance from Claude Code.

Comment on lines +462 to +467
## Retry behavior

Partial scans and uncertain results stay visible and retryable. They cannot
silently drop candidates or start a sandbox.

A durable retry record holds:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are these records kept? The protocol relies on state that survives between cycles: the checkpoint or watermark, which "MUST advance only across complete ranges", the durable retry records in this section, and the due records for time-dependent queries. The Terms table calls a retry record "persisted state", and I could not find where it persists.

For the managed poll job the options are thin. The job has contents: read only (job template), so it cannot write to the repository. The GitHub Actions cache removes entries that go unused for 7 days. For a Jira source, anyone with Edit Issues can write issue properties, which is why the shipped driver clamps its per-issue checkpoint (the clamp).

One store does fit a Jira source, and I tested it: a property on the polling account's own Jira user record (/rest/api/3/user/properties/{propertyKey}). Against a Jira Cloud site I set, read, overwrote and deleted a value with an ordinary API token and no admin rights. Atlassian's API reference says writing another user's record needs Administer Jira, and a value can hold up to 32,768 bytes. It needs no operator setup and no repository write access. Limits I know of: the value is lost if a deployment switches to a different Jira account, and I have not tested an OAuth service account or two writers at once.

I am not asking for that store to be written in. I am asking that the protocol either name where each adapter keeps this state or say which contract does, and say what happens when the state is lost. The answer decides whether a long poller outage loses work.

One related point. A retry record is created for every candidate handed to a bound run and kept until the run reports back, so the number of records grows with the amount of waiting work. A single 32 KB value would not hold that, so the size of this state seems worth a sentence too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR was made up by a bot before I created #9199 I would pay noo heed to it until that one is merged. This PR is likely to be closed and the work, if any is needed, re-done from scratch.

Notably, there shouldn't be something like a retry record - an agent needs to mark an entity as one that does not need further work, and its trigger CEL expression needs to be shaped in a way that takes that into account. Otherwise, it gets triggered.

Comment on lines +479 to +489
- Create a retry record whenever a candidate's membership stays `unknown`, a
range is not `complete`, or a candidate is handed to a bound `run`.
- Retry with bounded backoff that respects provider rate limits and
`Retry-After` or equivalent signals. Rate limiting defers work; it never
advances a checkpoint.
- A handoff to a bound `run` is provisional. Scheduling a run, delivering a
wakeup, or receiving a process-start receipt is not completion. The record
stays until the bound run reports a definitive non-match with any
cache-dependent recheck arranged, completes actionable work, or safely
defers it under ADR 0144, or until rediscovery after checkpoint advancement
is proven.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when discovery keeps finding more eligible entities than can be run? A candidate handed to a bound run gets a retry record that stays until the run reports back, and ADR 0144 says resource limits "cannot mark a true CEL result as already handled". So waiting work is not dropped, which is right. But I could not find three things:

  • In what order waiting candidates are handed off, and that each one is reached eventually.
  • That the work done in one discovery cycle stays bounded as the set of waiting candidates grows.
  • That the number of hand-offs in one cycle is bounded.

The first two are exactly where the shipped Jira driver fails. It takes the 50 most recently updated issues and picks 5 of them at random, so under load most requests are never picked. The third has a concrete failure on GitHub: the existing poll workflow turns each hand-off record into one job of a job matrix (harness-run), and GitHub documents a maximum of 256 jobs per matrix. A batch larger than that can fail as a whole.

Could the protocol state a service order (for example, longest waiting first), a bound on work and on hand-offs per cycle, and that a candidate not handed off in one cycle stays eligible for the next? A conformance case for "more eligible candidates than one cycle can hand off" would pin it down.

@ifireball

Copy link
Copy Markdown
Member

closing this, this work is irrelevant given it was done before a key piece #9199 was made.

@ifireball ifireball closed this Nov 20, 2026

This branch was successfully deployed

1 active and 1 inactive deployments
site-preview — 9e29e217 Deployed Nov 17, 2026 by github-actions[bot]
dev — 9e29e217 Deployed Nov 17, 2026 by fullsend-ai-coder[bot] via playback #20457
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/docs User-facing documentation ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specify entity discovery completeness and recovery guarantees (ADR 0149)

2 participants