Skip to content

DR-003: Where the MMDEP controller runs

Converted from docs/decisions/DR-003-controller-hosting.md to MADR (backlog B25). The text is unchanged; its sections are grouped under the MADR headings below, in their original order within each group.

Context

1. Question and trigger

MMDEP's controller (dispatcher, harness, ledger) runs only on Atul's desktop. When Atul steps away or the desktop is off, agents sit idle. Atul's target is to reduce his own time to 1–2 hours a day. Should the controller, or part of it, run in the cloud?

2. Evidence (AWS account, read-only profile mmdep-ro, September 2026)

Item Cost (USD/month)
Lightsail WordPress (bundle small_3_1: 2 GB RAM, 2 vCPU, ap-south-1a), running 13.69
Lightsail snapshots (4 manual × 40–60 GB + 7 rolling automatic) 9.40
EC2 snapshot (one 60 GB, Dec 2024, backing an AMI copy; no EC2 volumes exist) 2.39
S3, Secrets Manager, requests < 0.01
Lambda, SNS, SQS, CloudWatch, Glue, KMS 0 (free tier)
Tax (GST) 3.88
Total ≈ 25.50

Prices used (AWS pages, Oct 2026): Lightsail IPv4 bundles 2 GB $12, 4 GB $24, 8 GB $44 per month; snapshot storage $0.05 per GB-month; CodeBuild general1.small about $0.005 per build minute with 100 free minutes a month. Lightsail instances are billed while they exist (verify: stopped instances are believed to be billed).

First TEA finding: snapshots are ≈ 46% of the bill (≈ $11.80/month). See §6.

Options

3. Options

Option Extra cost/month incl. GST Assessment
A. Hybrid: desktop harness while Atul is around; hosted agents (ChatGPT scheduled/event tasks, Copilot coding agent, Claude routines) keep forge work moving through issues and PRs (DR-002) $0 Chosen now
B1. Second Lightsail VM, 2 GB ≈ $14 Too small for several agent CLIs plus git and tests
B2. Second Lightsail VM, 4 GB, always-on controller for forge work and synthetic data only ≈ $28 (≈ $18–23 net after snapshot clean-up) Adopt if A leaves agents idle (trigger in §5)
C. On-demand compute (CodeBuild, Fargate) for short scheduled AI jobs cents of compute + API tokens For scheduled jobs once API-key costs are known; each job starts cold
✗ MMDEP on the existing WordPress VM — Rejected: production web server, 2 GB, mixing forbidden (§15A)

Cross-cutting constraint for B and C: agent CLIs on a server need either subscription logins (vendor terms for automated/server use must be checked per vendor) or API keys (allowed, billed per token).

Decision

4. Decision

  1. Option A now. No new infrastructure. The forge bus (DR-002 stage 1) is how work continues while the desktop is off.
  2. B2 is pre-approved in principle, subject to the trigger in §5 and an approve item with: vendor-terms check, API-key cost estimate, scope (forge work and synthetic/sandbox data only; no client data; no deploy keys; local hub remains the place approvals happen), and a read-only/limited IAM setup.
  3. C is evaluated when a scheduled job is ready to move off the desktop (for example the weekly TEA report).
  4. The spec §3 rule "the orchestrator stays local" holds for approvals and the hub. A cloud controller, if adopted, handles forge work only; the change is recorded as a spec amendment with B2's approve item.

Consequences

5. Revisit triggers

  • After H1 and the stage 1 sandbox: agents idle more than 4 working hours a week because the desktop is off or busy → raise B2's approve item.
  • A scheduled job (TEA report, triage) needs to run while the desktop is off → evaluate C for that job.
  • Vendor terms or prices change for any CLI or API in use.
  • Team size grows, or client data needs processing (then §5B triggers and Bedrock ap-south-1 apply).

6. Estate actions from this review (people only; mmdep-ro cannot change anything)

Resource Size ≈ Cost/month Recommendation
Lightsail automatic snapshots (7 rolling days) incremental small Keep: operational backup
WordPress-1790310148 (25 Sep 2026) 60 GB ≈ 3.00 Keep: newest manual snapshot
WordPress-6.9-June-2026 (6 Jun 2026) 60 GB ≈ 3.00 Keep only if it is a known-good rollback point you would use; otherwise delete
WordPress-1787829152 (27 Aug 2026) 60 GB ≈ 3.00 Delete: superseded by 25 Sep and the automatic snapshots
WordPress-1-1732107959 (20 Nov 2024, from instance WordPress-1, which no longer exists) 40 GB ≈ 2.00 TEA classification needed first (possibly the only copy of an older site: Dormant/Recoverable). Decide: keep as archive, or delete
EC2 snapshot snap-0d43b7c74288eef19 (Dec 2024, backs an AMI copy) 60 GB ≈ 2.39 Check the AMI (aws ec2 describe-images --owners self). If unused: deregister the AMI, then delete the snapshot

Expected saving: ≈ $5.40/month certain (27 Aug snapshot + EC2 AMI/snapshot), up to ≈ $10.40 with the optional ones. Record the result in the estate register (GitLab governance repo).