Repository navigation
fix(cli): bind sim-setup's containers to loopback, fix reset and env quoting, retire the legacy simstudio CLI - #9830
Conversation
…quoting, retire the legacy simstudio CLI
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The PR appears safe to merge; both previous issues are addressed and no new blocking issue was found. SummaryThis PR binds newly created dev containers to loopback, fixes reset ordering and env quoting, checks published export targets, and removes the legacy CLI.
Reviews (3) · Last reviewed commit: "fix(setup): warn about containers an ear..." · Reviewed by Greptile |
There was a problem hiding this comment.
1 issue found across 18 files
Confidence score: 3/5
- In
packages/sim-setup/src/env-files.ts, values containing$can be expanded by Compose or Next and silently change secrets or URLs. Quote or escape dollar signs when writing values.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/sim-setup/src/env-files.ts">
<violation number="1" location="packages/sim-setup/src/env-files.ts:100">
P1: Values containing `$` are left unquoted, but Compose and Next env loading expand `$NAME` references. A user-entered secret or URL such as `api$UNSET` can therefore be silently rewritten; treat `$` as requiring literal quoting (or reject the unsupported quote combination).</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
… interface, and stop a dev reset that failed to tear down
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 18 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…d of replacing them
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
127.0.0.1and writes127.0.0.1URLs. Docker's default-p port:portlistens on every interface and bypasses host firewalls, and the official Redis image ships with protected mode off and no password, so dev-mode Redis was reachable from the network. Containers an earlier release published on every interface are flagged at the start of dev setup, with the steps to recreate them on loopback (sim-setup down, then re-run; data is kept). They are not replaced automatically: Redis holds live realtime sessions, and aDATABASE_URLmay name its own database.sim-setup resettears down before archiving.env. Compose interpolates the required${VAR:?}secrets even fordown -v, so archiving first made a Compose reset fail with the stack still running and the config moved aside. A failed teardown now leaves the env files in place, for dev and Kubernetes too.#(a#bread asa), and every reader trims edge whitespace and strips a leading quote. Those values are single-quoted, which dotenv, Bun, Compose and our own parser all read literally. Ordinary values (hex secrets, URLs, DSNs) are written byte-for-byte as before. A value with a line break is refused instead of spilling into a second line.THIRD_PARTY_LICENSESadds the five bundled MIT packages it was missing:fast-string-truncated-width,fast-string-width,fast-wrap-ansi,ipaddr.jsandsisteransi.simmanifest drops the source-only./embedexport and the#sim-cli/*imports. They point atsrc/*.ts, which the tarball doesn't ship, soimport 'sim/embed'from npm failed. The repo manifest is unchanged becauseapps/simconsumessim/embedfrom source through the workspace. The smoke test now fails if any export target is missing from the tarball.packages/cli(simstudio) and its publish workflow. It hasn't published since 0.1.19. That release starts Postgres aspostgres/postgreson all interfaces with a placeholder auth secret, and current realtime images refuse to start with that secret. Nothing in the repo or docs points at it, andsim-setupreplaces it. The npm package will be deprecated separately.sim's bundled runtime deps to devDependencies.apps/simimports the CLI source throughsim/embed, so its Docker build resolves them through those dependencies.Type of Change
Testing
env-files.test.tscases: round-trips for#, edge whitespace and quotes, and line-break refusal. All 5 fail against the staging source and pass with the fix. Plain values are checked to stay unquoted.@next/env, Bun's loader anddocker compose config: every value came back identical.down -vwithout.envfails on the required variables, and with it present succeeds.-pbinding was reachable on the LAN address, the new loopback binding was not, anddocker portstill parses.sim@2.2.23tarball: the export check fails on the current manifest and passes after the strip, andsim/runtimestill imports.sim-setupsuite (79 tests),test:scripts(739 tests),sim-setuptype-check,check:utils,check:file-names,check:comment-hygiene,check:boundaries,bun run lint, actionlint.bun install --frozen-lockfile --lockfile-onlyconfirms the lockfile edit.check:auditsand the full test suite run in CI.Checklist
test-auditauthoring gate)