DUNIN7 · LOOMWORKS · RECORD
record.dunin7.com
Status Current
Path queued-directions/loomworks-dev-production-config-split-work-item-v0_1.md

Loomworks — dev/production configuration split — work item — v0.1

Version. 0.1 Date. 2026-07-19 Author. Claude Code on DUNIN7-M4, on Operator direction. Status. QUEUED. Not started. Reads with. security/loomworks-security-incident-2026-07-19-dev-endpoint-exposure-v0_1 — this is that incident's root cause.


Plain-language summary

One machine is both the daily development box and the interim production perimeter origin. One .env serves both. A single environment value cannot describe two postures, and on 2026-07-19 that produced an authentication bypass reachable from the public internet for about a day.

The immediate fix was to set the value to production, which closed the bypass and cost three development affordances. This item is the real fix: let the two postures coexist without either compromising the other.

The tension, stated plainly

LOOMWORKS_ENV decides three things at once:

  1. Whether /auth/dev/issue-session is mounted — the dev session minter.
  2. Whether localhost:3000 / localhost:3001 are added to the CORS allowlist.
  3. Whether request-validation failures log verbose diagnostics.

Development wants all three. Production must not have the first at any price. There is currently no way to say so.

This is the third time the single-.env shape has forced a decision:

Each was resolved locally and correctly. The pattern is that the shape keeps producing these, and the third one had teeth.

Options, none chosen

(c) is the most robust and (d) is the status quo. The choice depends on how much longer this machine is the perimeter origin — the VPS cutover recorded in the perimeter handoff (§5B) dissolves the tension entirely by separating the machines, and may arrive before any of this is worth building.

The property any answer must preserve

A deployment that is misconfigured, or that forgets to configure anything, must land in production posture. The current default already does this and it is the right way round. Whatever replaces it must keep that direction: the failure mode of forgetting must be "too strict," never "wide open."


DUNIN7 — Done In Seven LLC — Miami, Florida Loomworks — dev/production configuration split — work item — v0_1 — 2026-07-19