feat(v4): hand off coding-agent upgrades to the canonical skill - #15527
Conversation
🟢 AWS preview image pushedArgo CD is rolling it out — the environment is usually ready within a URL: https://pr-15527.preview.langfuse.com URL not loading / 404? Full debug guide — deploy allowlist, Logs (needs preview-cluster kubectl -n langfuse-pr-15527 logs -f deploy/langfuse-pr-15527-web # web
kubectl -n langfuse-pr-15527 logs -f deploy/langfuse-pr-15527-worker # workerAdd Synthetic preview data only. Never add production data to public accounts. |
|
@claude review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a93f0e2a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| If the Langfuse skill is installed, use it and read references/v4-project-migration.md. | ||
| Otherwise, fetch and follow the canonical migration workflow: | ||
| ${V4_MIGRATION_SKILL_URL} |
There was a problem hiding this comment.
Fall back when the installed migration reference is missing
When a user installed the Langfuse skill before references/v4-project-migration.md was added, this branch is taken solely because the skill is installed, but the requested file does not exist and the Otherwise fallback does not apply. Because this change also removes the previous inline migration checklist, the coding agent can stop without performing any upgrade. Make the local branch conditional on the reference being readable, or explicitly direct the agent to fetch the canonical URL whenever the local reference is missing.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Looks good, straightforward prompt/copy change.
Extended reasoning...
Overview
The PR only touches useV4UpgradeAssistantSupport.ts: it replaces the hardcoded three-step v4 migration checklist string with a shorter prompt that hands off to a canonical external skill reference (a raw GitHub URL) and instructs code-only behavior with a required readiness report. A new client test asserts the new prompt contains the expected substrings. No control flow, hooks, or API surface changed — V4_CODING_AGENT_PROMPT is still exported and consumed identically by V4MigrationContent.tsx (copy-to-clipboard) and embedded into the other two prompt templates in the same file.
Security risks
None of substance. The new URL is a static, hardcoded raw GitHub content URL under the langfuse/skills org, not user-controlled input, so there's no injection or SSRF concern. The prompt text is just guidance handed to external coding agents (Cursor, Codex, Claude Code) — it doesn't grant any new permissions or bypass any auth/credential flow; if anything it explicitly tells agents not to request credentials.
Level of scrutiny
Low. This is a copy/prompt-text change in a non-critical, user-facing assistant helper — it doesn't affect data integrity, auth, or billing paths. The existing test coverage for the string contract and the trivial diff size support light scrutiny.
Other factors
Confirmed via grep that no other files reference the removed V4_SDK_UPGRADE_URL constant, so nothing was left dangling. The PR description's stated validation (lint and the new client test) matches what's expected for a change of this scope.
What changed
references/v4-project-migration.mdlangfuse/skillsURL as a fallbackWhy
The copied prompt should stay aligned with the tested canonical migration workflow instead of duplicating SDK, evaluator, and API guidance in the product repository. Explicit code-only behavior also lets Codex, Claude Code, Cursor, and similar agents make all verifiable repository changes without needing access to the user's Langfuse project.
Linear: LFE-14553
The stable URL is intended to pick up the hardened workflow from langfuse/skills#88.
Validation
pnpm run lint—Tasks: 7 successful, 7 totalpnpm --filter web run test-client src/features/v4-migration/useV4UpgradeAssistantSupport.clienttest.ts—Test Files 1 passed (1),Tests 1 passed (1)git diff --checkScope
This does not install the Langfuse skill or CLI, configure credentials, change migration detection, or duplicate the migration workflow in this repository.