Repository navigation
feat(projects): add CLI and MCP install onboarding stages - #13717
Conversation
Track first successful CLI and MCP usage on the project onboarding document using the existing shutdown persist path, keyed off x-sdk-name and x-sdk-language rather than a dedicated API method. Co-authored-by: Eldad A. Fux <[email protected]>
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Skip header matching when SDK headers are absent, skip the lock when the cached project already has the stage, and re-read under the lock so a later request never rewrites a completed row. Co-authored-by: Eldad A. Fux <[email protected]>
Co-authored-by: Eldad A. Fux <[email protected]>
Reuse the same x-sdk-name matching as Cloud SDK access tracking, keep the existing onboarding shutdown write path, and drop the lock re-read layer. Co-authored-by: Cursor <[email protected]>
|
Comments Outside DiffThese findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.
|
What does this PR do?
Adds CLI install (
cli.install) and MCP install (mcp.install) as project onboarding stages.There is no dedicated install API for these tools. First successful usage is detected from
x-sdk-name(mcp,cli,command line) orx-sdk-language(cli/mcp), then written ontoproject.onboardingthrough the existing API shutdown persist path (same JSON, status, timestamp, actor type, and lock as other stages).A request can complete more than one stage at once (for example CLI creating a function records both
functions.createandcli.install).Writes happen once per stage:
completedorskipped, the hook returns without taking the Redis lock or writing.at/actorTypeor clobber other keys.Test Plan
cli.installandmcp.install.GET /v1/pingwithx-sdk-name: mcpmarksmcp.installcompleted on the project.GET /v1/pingwithx-sdk-name: cliorx-sdk-language: climarkscli.installcompleted.atandactorTypeunchanged.E2E coverage is in
tests/e2e/Services/Project/StagesBase.php.Related PRs and Issues
project.onboarding) instead of a separatemcpLastAccessAtattribute.Checklist