docs(deploy): document POST /deploy/new ?redeploy=true for in-place updates#152
Merged
Merged
Conversation
…pdates
Closes the agent-UX gap that makes /deploy/new repeatedly mint a fresh
app_id + URL when an agent ships v2 of an existing app. The api PR adds
a redeploy=true multipart form field; this PR documents it on every
agent-facing surface so an agent reading the docs discovers the flag
before falling back to "POST /deploy/new" twice and ending up with two
parallel deployments + two URLs (the customer complaint that triggered
this swarm).
Surfaces touched (rule 22 — contract changes touch all surfaces):
- public/llms.txt — inline redeploy note on the /deploy/new bullet
- public/llms-full.txt — new /deploy/new section with both curl flows
+ 404 no_matching_deployment shape +
/deploy/:id/redeploy deprecation note
- src/pages/ForAgentsPage — 5th reason card: "in-place app updates"
- scripts/fetch-content.mjs — preserve public/llms.txt when upstream
.content/llms.txt lacks the redeploy
markers (cross-repo lock-step guard)
- src/lib/llmsContract.test — registry-iterating regression test
(rule 18) asserting both files mention
redeploy=true + "redeployed": +
no_matching_deployment
Rule 17 coverage block:
Symptom: agent calls POST /deploy/new twice with same name and
ends up with two URLs, slot count + 1
Enumeration: rg -nF '/deploy/new' public/ src/pages/
rg -nF 'redeploy' public/ src/pages/
Sites found: 4 agent-facing surfaces in instanode-web
(llms.txt, llms-full.txt, ForAgentsPage.tsx, DocsPage.tsx)
Sites touched: 3 (llms.txt, llms-full.txt, ForAgentsPage.tsx)
DocsPage.tsx is a pure markdown renderer — its content
lives in InstaNode-dev/content/docs/deploy.md, which is
handled by the cross-repo follow-up (see PR body)
Coverage test: src/lib/llmsContract.test.ts — fails if either
llms file silently drops the redeploy guidance
Live verified: awaiting api-PR deploy. Docs are additive and safe to
land first; the flag itself returns 400 until the api
PR ships, so the docs do not lie about a working endpoint
until the matched-pair lands
Depends on:
- api PR adding redeploy=true to POST /deploy/new (parallel work)
- mcp PR adding redeploy: boolean to create_deploy tool (parallel work)
- InstaNode-dev/content PR mirroring the llms.txt edit (follow-up;
fetch-content.mjs preserves the local copy in the meantime)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
size-limit report 📦
|
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.
Summary
POST /deploy/newrepeatedly mint a freshapp_id+ URL when an agent ships v2 of an existing app. The parallel api PR adds aredeploy=truemultipart form field; this PR documents it on every agent-facing surface so an agent reading the docs discovers the flag before falling back to twoPOST /deploy/newcalls and ending up with two parallel deployments + two distinct URLs (the customer complaint that triggered this swarm).scripts/fetch-content.mjs) that preserves the committedpublic/llms.txtwhen the upstreamcontentrepo's copy still lacks the new markers — so the docs PR is safe to land first.src/lib/llmsContract.test.ts, CLAUDE.md rule 18) so a future content sync that silently drops the redeploy guidance fails CI by file + field name.Files changed (5)
public/llms.txtredeploy=truenote on thePOST /deploy/newbullet (sub-bullet under the existing endpoint description so it can't be skipped by agents grep-ing the file).public/llms-full.txt### POST /deploy/newsection with both first-deploy and redeploy curl flows, full 202 response withredeployedfield, 404no_matching_deploymentshape, and an explicit deprecation note steering agents AWAY from thePOST /deploy/:id/redeployendpoint (which is the dashboard internal).src/pages/ForAgentsPage.tsx05 · in-place app updatesso an agent landing on/for-agentssees the redeploy story at a glance.scripts/fetch-content.mjsrequireMarkersfield onSYNC_FILES. When the upstream.content/llms.txtis missing every listed marker (redeploy=true,"redeployed":), the script preserves the committedpublic/llms.txtinstead of overwriting it. Prints a WARNING that goes away once the content-repo PR lands.src/lib/llmsContract.test.tsCONTRACT_MARKERSlist, oneit()per (file, field) row, so a failure names the surface AND the field. Currently asserts bothllms.txtandllms-full.txtdocumentredeploy=true,"redeployed":, andno_matching_deployment.Coverage block (rule 17)
Cross-repo dependencies (NOT BLOCKING this PR — docs are additive)
InstaNode-dev/apiredeploybool multipart field onPOST /deploy/new, returnredeployed: boolin the response, 404no_matching_deploymentwhen no team-scoped match.InstaNode-dev/mcpredeploy: booleantocreate_deploytool input. Retire the broken standaloneredeploy(id)tool that sendsbody: undefinedagainst/deploy/:id/redeployand always 400s.InstaNode-dev/contentpublic/llms.txtedit incontent/llms.txt. The canonical/llms.txtlives in thecontentrepo (per CLAUDE.md memoryproject_repo_topology.md).scripts/fetch-content.mjspreserves the local copy until then. Open a follow-up issue + PR in thecontentrepo. Also mirror the.content/docs/deploy.mdupdate to surface the flag on the/docspage.InstaNode-dev/webweb/docs/api-reference.md(separate marketing docs repo) currently documents/stacks/:slug/redeployonly. Follow-up PR to add aPOST /deploy/newrequest-body table row forredeploy+ a "Redeploying an app" subsection.Discipline
docs/deploy-new-redeploy-param(cut fromorigin/main, notcoverage/raise-to-95).main(instanode-web, notmaster).npm run gategreen locally (tsc --noEmit && npm run build && vitest run): 78 test files, 1091 passed, 3 skipped, 45s.--admin, no--no-verify, no force-push.Test plan
src/lib/llmsContract.test.tsreports 3 passing test casesnpm run prebuildprints theWARNING — upstream .content/llms.txt is missing required markersline (proves the cross-repo guard is wired). Will go silent after thecontentrepo follow-up ships.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com