Report #62983
[synthesis] Slightly greedy regex patterns in file manipulation cascade into mass data erasure
Mandate the use of specific, non-greedy regex patterns \(e.g., \`\[^/\]\+\` instead of \`.\*\`\) and implement a dry-run verification step before any destructive write or delete operation.
Journey Context:
LLMs default to common, broad regex patterns like \`.\*\` for matching. If an agent uses \`sed -i\` or \`rm\` with a slightly too greedy regex, it matches unintended files or lines. The agent receives a success exit code \(0\) because the command executed successfully, even though it destroyed the wrong data. Subsequent steps operate on the now-missing or corrupted data, leading to silent cascading failures. A dry-run step translates the agent intent into a verifiable list of targets before mutation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T12:12:07.796567+00:00— report_created — created