Skip to content

feat(controlplane): add publish improvements to subgraph check - #3439

Draft
wilsonrivera wants to merge 3 commits into
mainfrom
wilson/cosmo-506-controlplane-add-publish-improvements-to-subgraph-check
Draft

wilsonrivera wants to merge 3 commits into
mainfrom
wilson/cosmo-506-controlplane-add-publish-improvements-to-subgraph-check

Conversation

@wilsonrivera

@wilsonrivera wilsonrivera commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Performance

    • Schema validation and composition now process multiple federated graphs concurrently, which can reduce waiting time when checking larger sets of graphs.
  • Reliability

    • A failure in one graph’s composition no longer prevents other graphs from completing their checks. Results remain in the same order as the graphs submitted.

Checklist

Open Source AI Manifesto

This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: f2156b3d-555e-4074-8a6b-e602bb89ec5d
Commits

Reviewing files that changed from the base of the PR and between 2af5927 and 9954d57.

Files selected for processing: 3
  • controlplane/src/core/composition/composer.ts
  • controlplane/src/core/constants.ts
  • controlplane/src/core/repositories/SubgraphRepository.ts

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

Composition and repository schema checks now use a shared concurrency limit of five. The code processes graphs and composition entries concurrently, resolves matching graphs before loading subgraphs, and collects inspection results locally before merging them in composition order.

Changes

Schema check concurrency

Layer / File(s) Summary
Proposed-schema composition
controlplane/src/core/constants.ts, controlplane/src/core/composition/composer.ts
The new concurrency limit is set to five. Proposed-schema composition processes graphs and their base or feature-flag entries concurrently. Results retain input order, and errors are recorded per graph.
Check records and composition plans
controlplane/src/core/repositories/SubgraphRepository.ts
Checked graph records and associations are created concurrently. For applicable new-subgraph checks, matching graph IDs are resolved before subgraph loading. Composition plans are built concurrently.
Result inspection and aggregation
controlplane/src/core/repositories/SubgraphRepository.ts
Each composed graph is inspected concurrently into a local result. The results are merged in composition order. Linting and graph pruning run together; pruning returns empty warning and error arrays when no existing subgraph is present.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: Minimal · up to 9954d

No merge-blocking issue was identified in the changed schema-check paths; the PR is mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Title check Warning The title "feat(controlplane): add publish improvements to subgraph check" is partially related to the changeset. The changes add concurrency (p-limit, schemaCheckConcurrency) to composition and schem… Shorten the title to under about 50 characters and name the main change. For example: "feat(controlplane): parallelize subgraph schema checks". Remove the vague term "publish improvements" and state that the change adds concurrency to compo…
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files.

Full details: Title check

Explanation

The title "feat(controlplane): add publish improvements to subgraph check" is partially related to the changeset. The changes add concurrency (p-limit, schemaCheckConcurrency) to composition and schema-check code paths in the control plane, which is a performance improvement to subgraph checks. However, the title says "publish improvements" and does not mention concurrency or performance, so it does not name the main change. The title is also 62 characters, above the roughly 50-character guideline, and it uses the conventional-commit prefix style.

Resolution

Shorten the title to under about 50 characters and name the main change. For example: "feat(controlplane): parallelize subgraph schema checks". Remove the vague term "publish improvements" and state that the change adds concurrency to composition and schema checks.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.36620% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.74%. Comparing base (c7a1722) to head (9954d57).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
controlplane/src/core/composition/composer.ts 93.75% 2 Missing ⚠️
...lplane/src/core/repositories/SubgraphRepository.ts 94.73% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3439      +/-   ##
==========================================
+ Coverage   64.65%   73.74%   +9.09%     
==========================================
  Files         289      330      +41     
  Lines       33697    17698   -15999     
  Branches        0     4411    +4411     
==========================================
- Hits        21787    13052    -8735     
+ Misses      10311     4145    -6166     
+ Partials     1599      501    -1098     
Files with missing lines Coverage Δ
controlplane/src/core/constants.ts 100.00% <100.00%> (ø)
controlplane/src/core/composition/composer.ts 65.36% <93.75%> (ø)
...lplane/src/core/repositories/SubgraphRepository.ts 92.47% <94.73%> (ø)

... and 616 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant