Problem
AMS's existing isolation (packages/loopover-engine/src/miner/worktree-pool.ts) is code/filesystem-level only — a git worktree per attempt. Nothing in this codebase gives an AMS attempt an isolated, disposable copy of a target application's data (a database). For APR specifically (auto-provisioned repos — #7589), AMS's own agent is effectively responsible for the generated app's data-layer correctness the same way Lovable and Bolt.new's agents are for their generated apps, and competitive research found that's exactly where the real-world incidents in this category cluster — not sandbox escapes. Lovable's CVE-2025-48757 (missing/misconfigured Supabase Row-Level-Security policies, ~170 generated apps exposing PII) and the industry's most-cited cautionary tale (Replit's Agent, explicitly told not to touch production, ran destructive commands against a live database and deleted 1,200+ real records) both trace to the agent operating against real, non-disposable data with no structural fallback.
Area
Platform / AMS execution safety — adjacent to but distinct from #7180's compute/network sandboxing, and distinct from the existing worktree-pool.ts code isolation.
Proposal
The industry's converged response to the Replit-class failure (per this research) is architectural, not instructional: give the agent a cheap, disposable, copy-on-write fork of both code and data, so a destructive action against the fork is reversible/discardable rather than relying on the agent correctly following an instruction not to touch production. loopover already does this for code (worktree-pool.ts); this issue is the data-side equivalent for APR, where loopover controls the provisioned database and can practically implement it (Postgres — see #7180's Neon+Hyperdrive decision — supports branch/fork-style copy-on-write natively via some providers, worth checking against the specific provider chosen).
Scope this to APR specifically for now — BYOR's target database (if any) belongs to the customer, not loopover, and forking a customer's own production data is a different, much larger consent/access problem not in scope here.
Deliverables
- A written decision: what "disposable fork" means concretely for the chosen Postgres provider (branch-per-attempt, snapshot/restore, or another mechanism), and when it gets created/discarded relative to an AMS attempt's lifecycle.
Resources
Boundaries
Design decision only — no reward/pricing figures, no implementation of the actual fork mechanism (downstream of this decision and #7180's provider choice).
maintainer-only — data-safety architecture decision, not a build task.
Problem
AMS's existing isolation (
packages/loopover-engine/src/miner/worktree-pool.ts) is code/filesystem-level only — a git worktree per attempt. Nothing in this codebase gives an AMS attempt an isolated, disposable copy of a target application's data (a database). For APR specifically (auto-provisioned repos — #7589), AMS's own agent is effectively responsible for the generated app's data-layer correctness the same way Lovable and Bolt.new's agents are for their generated apps, and competitive research found that's exactly where the real-world incidents in this category cluster — not sandbox escapes. Lovable's CVE-2025-48757 (missing/misconfigured Supabase Row-Level-Security policies, ~170 generated apps exposing PII) and the industry's most-cited cautionary tale (Replit's Agent, explicitly told not to touch production, ran destructive commands against a live database and deleted 1,200+ real records) both trace to the agent operating against real, non-disposable data with no structural fallback.Area
Platform / AMS execution safety — adjacent to but distinct from #7180's compute/network sandboxing, and distinct from the existing worktree-pool.ts code isolation.
Proposal
The industry's converged response to the Replit-class failure (per this research) is architectural, not instructional: give the agent a cheap, disposable, copy-on-write fork of both code and data, so a destructive action against the fork is reversible/discardable rather than relying on the agent correctly following an instruction not to touch production. loopover already does this for code (worktree-pool.ts); this issue is the data-side equivalent for APR, where loopover controls the provisioned database and can practically implement it (Postgres — see #7180's Neon+Hyperdrive decision — supports branch/fork-style copy-on-write natively via some providers, worth checking against the specific provider chosen).
Scope this to APR specifically for now — BYOR's target database (if any) belongs to the customer, not loopover, and forking a customer's own production data is a different, much larger consent/access problem not in scope here.
Deliverables
Resources
packages/loopover-engine/src/miner/worktree-pool.ts(the existing code-side precedent this mirrors)Boundaries
Design decision only — no reward/pricing figures, no implementation of the actual fork mechanism (downstream of this decision and #7180's provider choice).
maintainer-only — data-safety architecture decision, not a build task.