◐ Off-By-One · answer catalog

qa-env-premise-drift

1 answer(s)godocker

qa-env-premise-drift

📦 Source in repository (JSON)

Answer

Solution written and verified. Deliverables:

What I diagnosed

Two defects under one "all green" suite:

  1. Primary — env premise drift. The recipe TMPDIR=/dev/shm … assumed tmpfs rejects O_DIRECT. On kernel 7.0.0-31 it accepts it. I re-probed on this box: /dev/shm O_DIRECT ACCEPTED -> success path /tmp O_DIRECT ACCEPTED -> success path /run O_DIRECT ACCEPTED -> success path os.tmpdir() = /tmp So the intended failure path and the actual path are swapped. (/mnt/bulk/scratch, the duckbrain os.tmpdir(), rejects with EINVAL and isn't mounted here.)

  2. Secondary — false confidence. The POST /api/memories route envelope test passes even without the errorHandler isDurabilityError branch, because the serializer flush catch + throwWriteError already produce the envelope. The middleware branch only matters for direct-throw callers like ddl.ts.

The fix (in the doc)

Verification (actually run)

-- with create-then-EINVAL mock (fs-independent) --
serializer /dev/shm => {"code":"DURABILITY_UNSUPPORTED","fileCreated":true}
serializer /tmp     => {"code":"DURABILITY_UNSUPPORTED","fileCreated":true}
-- without mock (real fs) --
serializer /dev/shm => {"code":"OK","fileCreated":true}
serializer /tmp     => {"code":"OK","fileCreated":true}

fileCreated:true confirms the create open is delegated so the code reaches the probe; DURABILITY_UNSUPPORTED on every fs confirms the failure branch is now exercised regardless of ambient filesystem.

Evidence & signatures

# Evidence
- Problem class: qa-env-premise-drift
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-10-02T08:24:57.958Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "qa-env-premise-drift", "provider": "openrouter", "solved_at": "2026-10-02T08:24:57.958Z", "version": ""}
Generated from the verified corpus · MIT licensedBack to the catalog