Skip to content

docs(#4781): add entity provider conventions to AGENTS.md - #4782

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/4781-entity-provider-conventions
Open

fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/4781-entity-provider-conventions

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Add an "Entity Provider Conventions" section to the ai-integrations workspace AGENTS.md documenting seven patterns that new entity providers must follow:

  1. Source-location annotation format — must use Backstage
    location-ref url: prefix (e.g. url:oci://), as enforced
    by collectOciErrors.ts in the extensions module.
  2. Full-mutation error handling — guard against replacing
    catalog entities with an empty set when all item fetches
    fail but the index succeeds.
  3. Per-request timeout — use AbortController with a 30-second
    timeout on individual HTTP requests.
  4. Response size limits — buffer and check body size against
    MAX_ARTIFACT_BYTES before JSON parsing.
  5. Pagination — list endpoints must handle pagination tokens. 6. Shared patterns — common helpers belong in
    catalog-ai-skills-common to stay under the SonarQube 3%
    duplication threshold.
  6. Reference implementation — points to
    catalog-backend-module-model-catalog and its config.d.ts
    as the convention model.

These conventions address the root causes of the bugs and review findings from PR #4779: the OCI source-location format mismatch, unsafe full-mutation semantics, and cross-provider inconsistencies in timeout/size-limit/pagination handling.


Closes #4781

Post-script verification

  • Branch is not main/master (agent/4781-entity-provider-conventions)
  • Secret scan passed (gitleaks — 2b31f6c223117b5865461ce7f12c976983ef1a49..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

Add an "Entity Provider Conventions" section to the
ai-integrations workspace AGENTS.md documenting seven patterns
that new entity providers must follow:

1. Source-location annotation format — must use Backstage
   location-ref url: prefix (e.g. url:oci://), as enforced
   by collectOciErrors.ts in the extensions module.
2. Full-mutation error handling — guard against replacing
   catalog entities with an empty set when all item fetches
   fail but the index succeeds.
3. Per-request timeout — use AbortController with a 30-second
   timeout on individual HTTP requests.
4. Response size limits — buffer and check body size against
   MAX_ARTIFACT_BYTES before JSON parsing.
5. Pagination — list endpoints must handle pagination tokens.
6. Shared patterns — common helpers belong in
   catalog-ai-skills-common to stay under the SonarQube 3%
   duplication threshold.
7. Reference implementation — points to
   catalog-backend-module-model-catalog and its config.d.ts
   as the convention model.

These conventions address the root causes of the bugs and
review findings from PR #4779: the OCI source-location format
mismatch, unsafe full-mutation semantics, and cross-provider
inconsistencies in timeout/size-limit/pagination handling.

Closes #4781
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 15, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:29 PM UTC · Completed 7:34 PM UTC

Commit: c1f4ae2 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $0.81

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.02%. Comparing base (2b31f6c) to head (c1f4ae2).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4782   +/-   ##
=======================================
  Coverage   63.02%   63.02%           
=======================================
  Files        2642     2642           
  Lines      105660   105660           
  Branches    29592    29592           
=======================================
  Hits        66588    66588           
  Misses      37256    37256           
  Partials     1816     1816           
Flag Coverage Δ *Carryforward flag
adoption-insights 84.77% <ø> (ø) Carriedforward from 2b31f6c
ai-integrations 78.80% <ø> (ø)
app-defaults 54.82% <ø> (ø) Carriedforward from 2b31f6c
augment 46.67% <ø> (ø) Carriedforward from 2b31f6c
boost 83.46% <ø> (ø) Carriedforward from 2b31f6c
bulk-import 73.12% <ø> (ø) Carriedforward from 2b31f6c
cost-management 13.53% <ø> (ø) Carriedforward from 2b31f6c
dcm 73.47% <ø> (ø) Carriedforward from 2b31f6c
e2e-adoption-insights 60.00% <ø> (ø) Carriedforward from 2b31f6c
e2e-extensions 62.31% <ø> (ø) Carriedforward from 2b31f6c
e2e-global-header 49.71% <ø> (ø) Carriedforward from 2b31f6c
e2e-homepage 61.11% <ø> (ø) Carriedforward from 2b31f6c
e2e-intelligent-assistant 46.08% <ø> (ø) Carriedforward from 2b31f6c
e2e-orchestrator 49.49% <ø> (ø) Carriedforward from 2b31f6c
e2e-orchestrator-plugin 49.48% <ø> (ø) Carriedforward from 2b31f6c
e2e-quickstart 55.21% <ø> (ø) Carriedforward from 2b31f6c
e2e-scorecard 50.05% <ø> (ø) Carriedforward from 2b31f6c
e2e-theme 16.36% <ø> (ø) Carriedforward from 2b31f6c
extensions 58.30% <ø> (ø) Carriedforward from 2b31f6c
global-floating-action-button 71.18% <ø> (ø) Carriedforward from 2b31f6c
global-header 67.88% <ø> (ø) Carriedforward from 2b31f6c
homepage 48.48% <ø> (ø) Carriedforward from 2b31f6c
install-dynamic-plugins 71.77% <ø> (ø) Carriedforward from 2b31f6c
intelligent-assistant 77.16% <ø> (ø) Carriedforward from 2b31f6c
konflux 91.98% <ø> (ø) Carriedforward from 2b31f6c
lightspeed 69.02% <ø> (ø) Carriedforward from 2b31f6c
mcp-integrations 84.46% <ø> (ø) Carriedforward from 2b31f6c
orchestrator 77.32% <ø> (ø) Carriedforward from 2b31f6c
quickstart 63.74% <ø> (ø) Carriedforward from 2b31f6c
sandbox 79.56% <ø> (ø) Carriedforward from 2b31f6c
scorecard 88.48% <ø> (ø) Carriedforward from 2b31f6c
theme 87.91% <ø> (ø) Carriedforward from 2b31f6c
translations 5.12% <ø> (ø) Carriedforward from 2b31f6c
x2a 78.44% <ø> (ø) Carriedforward from 2b31f6c

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b31f6c...c1f4ae2. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fullsend-ai-review

Copy link
Copy Markdown

Review — approve

Scope: Documentation-only change — adds 163 lines to workspaces/ai-integrations/AGENTS.md documenting entity provider conventions. No code, config, or test changes.

Verified claims

Claim in docs Verification
collectOciErrors.ts uses parseLocationRef to enforce url: prefix Confirmed — imports parseLocationRef from @backstage/catalog-model and rejects bare oci:// URIs (line 56)
Reference impl is catalog-backend-module-model-catalog Confirmed — plugin exists with config.d.ts, src/providers/, src/clients/, src/module.ts matching the documented structure
config.d.ts uses @visibility backend on backend-only fields Confirmed — all fields use @visibility backend or @visibility secret
catalog-backend-module-ai-resource-extensions contains the validator Confirmed — collectOciErrors.ts lives in this module
catalog-ai-skills-common shared package Package does not exist yet — docs use aspirational language ("should live in"), which is appropriate for a conventions guide

Assessment

The documentation is well-structured, accurate, and properly scoped:

  • Correctness: All references to existing code (collectOciErrors.ts, reference implementation structure, parseLocationRef behavior) are verified against the source. Code examples are syntactically correct and demonstrate the intended patterns.
  • Security: No code changes to evaluate. The documented conventions (timeouts, response size limits, backend visibility annotations) actively promote security best practices.
  • Intent and coherence: The change matches the stated intent (closes Add entity provider implementation conventions to ai-integrations AGENTS.md #4781), is appropriately scoped to a single documentation file, and fits naturally into the existing AGENTS.md structure between "Upstream-Tracking Packages" and "PR Conventions."
  • Style: Follows the established documentation style — markdown headings, code blocks with correct/incorrect annotations, consistent voice and formatting.
  • Documentation currency: N/A — this PR is the documentation addition.
  • Cross-repo contracts: No impact — internal documentation only.

No blocking findings. The conventions provide clear, verifiable guidance grounded in existing codebase patterns.


Labels: PR is a documentation-only change adding conventions to AGENTS.md

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge documentation Improvements or additions to documentation labels Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ready-for-merge All reviewers approved — ready to merge ready-for-review Agent PR ready for human review workspace/ai-integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add entity provider implementation conventions to ai-integrations AGENTS.md

0 participants