Add MySQL and MongoDB service commands - #100
Conversation
jwfing
left a comment
There was a problem hiding this comment.
Review: Add MySQL and MongoDB service commands
Summary: Cleanly extends the CLI's service-type surface to mysql/mongodb (validation set, interactive picker kinds, and a TCP-port render in services list), with matching test updates — the code is correct and idiomatic; the one blocker is merge ordering against the platform PR it depends on.
⚠️ Verdict note: this review is posted as a COMMENT rather thanREQUEST_CHANGESonly because the PR author and this review bot share a GitHub identity (jwfing), and GitHub rejects a change-request on a self-authored PR (422). The finding below is nonetheless a Critical / request_changes-severity item — please treat it as blocking.
Requirements context: No /docs/superpowers/ or docs/specs/ directory exists in this repo — assessed against the PR description, AGENTS.md, the developing-insta-cli skill, and the declared dependency InsForge/insta-platform#236.
Critical
Functionality — merge/release ordering vs. unmerged insta-platform#236 — src/commands/services.ts:5, src/resolve-service.ts:22-30
The PR states "Depends on InsForge/insta-platform#236," and that PR ("Add MySQL and MongoDB service types") is currently open / not merged. This client change adds mysql/mongodb to SERVICE_TYPES and to the interactive SERVICE_KINDS menu. If this merges and — more importantly — ships in a CLI release before #236 is merged and deployed, a user who picks MySQL/MongoDB from insta services add (or runs insta services add mysql <name>) passes local validation and then hits the platform, which rejects the unknown type (rawRequest throws on the non-2xx). The result is a released client advertising two service kinds that cannot be provisioned — a user-facing broken feature.
The code itself is correct; this is purely a sequencing gate. Please hold the merge until #236 is merged, and do not cut a CLI release (tag/npm) until the platform change is deployed. This mirrors how sibling client PRs that ran ahead of their platform PR have been gated.
Suggestion
(none)
Information
- Software engineering — cli-reference.md mirror —
AGENTS.mdnon-negotiable #4 requires command/flag surface changes to be mirrored inskills/insta/cli-reference.md(the superprojectskills/submodule). That file isn't in this repo, so I can't verify it here — just confirm the new service types and the reworded--regionhelp ("postgres/compute/managed databases") land in that reference in the same change set. - Functionality — dashboard-parity ordering —
src/resolve-service.ts:3claims the kind list "mirrors the dashboard's Add Service menu (add-service-button.tsx)," and the ordering test now pinsRedis, MySQL, MongoDBbetween Postgres and Storage. That's a cross-repo assertion I can't verify from here; worth a glance that the frontend menu actually places MySQL/MongoDB in the same slots, so the "mirrors" comment and the pinned test order stay true. - Functionality — managed-DB volume knob (parity with redis) —
src/commands/services.ts:109-110rejects--volumefor everything butcompute, and there's noinsta db volume-style grow path formysql/mongodb.serviceListLinewill render a platform-assignedvol NGi, so these appear fully platform-managed (same as redis) — this reads as intentional; just confirming there's no expectation of a CLI-side volume-size control for them. - Security / Performance — no security-relevant changes (no new user input reaching SQL/shell, no secrets logged, no auth changes) and no performance-relevant changes (no new queries, loops, or hot-path work) in this PR.
Test coverage
Good. New tests cover serviceListLine default TCP ports for mysql/mongodb (3306/27017) alongside redis, the kind ordering, the new default names, and the no-TTY message; the previous mysql-as-unknown-type test was correctly re-pointed to lambda now that mysql is a known type. defaultDatabasePort's redis fallback (6379) is only reached for the three guarded types, so it's safe.
Verdict
request_changes — one Critical merge-ordering item (hold until insta-platform#236 is merged and deployed). No code defects; the implementation is correct and well-tested. Posted as COMMENT due to the self-authored-PR constraint above.
Summary
Depends on InsForge/insta-platform#236.
Validation
Summary by cubic
Adds MySQL and MongoDB as first-class
insta servicestypes and shows their default TCP ports in service listings. Previously only Postgres, Storage, Compute, and Redis were supported; now MySQL and MongoDB can be validated, created interactively, and listed with correct defaults.mysqlandmongodbkinds with default names (mysql-db,mongo-db); type validation accepts both.insta services listrenderstcp/<port>for managed databases (Redis 6379, MySQL 3306, MongoDB 27017).--regionoption text updated to include managed databases; usage examples include the new types.Written for commit 74a3c80. Summary will update on new commits.