Skip to content

local: agent notes for bringing up a stack in a dev VM - #3293

Open
mdibaiee wants to merge 1 commit into
masterfrom
mahdi/local-stack-agent-doc
Open

local: agent notes for bringing up a stack in a dev VM#3293
mdibaiee wants to merge 1 commit into
masterfrom
mahdi/local-stack-agent-doc

Conversation

@mdibaiee

@mdibaiee mdibaiee commented Aug 1, 2026

Copy link
Copy Markdown
Member

Description:

Adds local/AGENTS.md: operational notes for bringing a local stack up in a dev VM — the order to do things in, and the failure modes whose symptom points somewhere other than their cause (half-bootstrapped VMs, supabase's start timeout, units holding stale env). Written from doing it end to end: VM up, stack up, tenant provisioned, task published. Root AGENTS.md gains a pointer.

It also recommends testing connectors through a local: endpoint rather than an image, since the runtime execs the binary directly — no image build, no flow-connector-init, and no amd64 to match on an arm64 VM.

Also has local:stack depend on build:flowctl, since local:stack-info prints flowctl commands to paste but nothing built it.

Workflow steps:

mise run local:stack additionally builds flowctl. Otherwise documentation only.

Documentation links affected:

None user-facing.

Notes for reviewers:

  • Every claim is checked against the source in this commit; one is marked as depending on in-flight runtime: forward the config-encryption endpoint to connectors #3291.
  • Nothing is specific to the machine I used — no VM sizing, no timings.
  • At local/AGENTS.md because root CLAUDE.md is already a symlink to AGENTS.md. Happy to fold it into local/README.md instead.

@mdibaiee
mdibaiee force-pushed the mahdi/local-stack-agent-doc branch 4 times, most recently from e67e132 to e26ad53 Compare August 1, 2026 20:29
@mdibaiee
mdibaiee requested a review from a team August 1, 2026 20:37
@mdibaiee
mdibaiee force-pushed the mahdi/local-stack-agent-doc branch from e26ad53 to b2eb1ab Compare August 1, 2026 22:56
local/README.md covers how the stack is wired. This is the operational companion:
the order to do things in, and the failure modes that cost the most time because
their symptom points somewhere other than their cause.

Written from bringing a stack up from scratch in a Lima VM and running a connector
in it. The expensive ones:

- If vm:create-post fails -- mise resolves github:* tools through the GitHub API,
  whose unauthenticated quota is per source IP and can be exhausted by concurrent
  runs -- it aborts after the VM already exists, leaving no docker group membership
  and three downstream errors that each point somewhere other than the cause.
- flow-supabase's TimeoutStartSec=300 may not cover a cold image pull, and
  pre-starting supabase by hand without the unit's env file silently creates a
  second, colliding project because project_id comes from FLOW_SUPABASE_PROJECT_ID.
- local:stack leaves an already-running unit alone, so a unit can hold a stale
  PATH or endpoint from a previous env file indefinitely.

Also have local:stack build flowctl, which local:stack-info already tells you to
use but which nothing built.
@mdibaiee
mdibaiee force-pushed the mahdi/local-stack-agent-doc branch from b2eb1ab to 1e514ed Compare August 1, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant