feat(seo-gap-analysis): add public SEO competitor gap analysis endpoint - #3262
Draft
shrotia wants to merge 2 commits into
Draft
feat(seo-gap-analysis): add public SEO competitor gap analysis endpoint#3262shrotia wants to merge 2 commits into
shrotia wants to merge 2 commits into
Conversation
shrotia
marked this pull request as draft
September 11, 2026 11:42
|
This PR will trigger a minor release when merged. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Adds the public async HTTP surface for the SEO/GEO/AEO competitor gap
analysis feature:
- POST /seo-gap-analysis: validates { keyword, targetUrl, filterDomains?,
currentRanking?, locale? }, creates an AsyncJob (jobType seo-gap-analysis),
enqueues a message on AUDIT_JOBS_QUEUE_URL for the audit worker, and returns
202 + { jobId, pollUrl }. Modeled on the site-detection async controller.
- GET /seo-gap-analysis/jobs/:jobId: returns status + gap report, scoped to
the seo-gap-analysis jobType via loadJobScopedToCaller (IDOR-safe).
- Route wiring in routes/index.js + controller instantiation in index.js.
- IMS + entitlement enforced declaratively: classified in required-capabilities
(site:write / site:read) and facs-capabilities (llmo + aso, can_configure /
can_view). jobId already lives in FACS_NON_RESOURCE_PARAMS.
- OpenAPI: docs/openapi/seo-gap-analysis-api.yaml + registration in api.yaml.
- Unit tests: 100% coverage on the controller (20 tests); all 3585 route
drift tests pass with the new entries.
Companion branches of the same name in spacecat-audit-worker (SERP + scrape +
diff handlers) and spacecat-content-scraper (seo-comparison scrape handler).
Follow-up: integration tests under test/it/ (Docker/postgres seed harness).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s test getRouteHandlers is called positionally; adding the seoGapAnalysisController parameter shifted every subsequent controller in the route-segregation test, which passed controllers by position. Add the mock controller in the matching position and register the two new routes in the expected static/dynamic sets. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shrotia
force-pushed
the
feat/seo-gap-analysis
branch
from
September 11, 2026 13:04
8b52474 to
082b117
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the public async HTTP surface for the SEO/GEO/AEO competitor gap analysis feature:
Companion branches of the same name in spacecat-audit-worker (SERP + scrape + diff handlers) and spacecat-content-scraper (seo-comparison scrape handler). Follow-up: integration tests under test/it/ (Docker/postgres seed harness).
Please ensure your pull request adheres to the following guidelines:
describe here the problem you're solving.
If the PR is changing the API specification:
yet. Ideally, return a 501 status code with a message explaining the feature is not implemented yet.
If the PR is changing the API implementation or an entity exposed through the API:
If the PR is introducing a new audit type:
Related Issues
Thanks for contributing!