forked from gsd-build/gsd-2
-
Notifications
You must be signed in to change notification settings - Fork 0
Audit log is permanently dead — setLogBasePath() never called #10
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
setLogBasePath() in workflow-logger.ts is never called from any production code path. The entire persistent audit log feature (.gsd/audit-log.jsonl) silently does nothing.
Impact
Critical — The S2-T3 objective from the Single-Writer Engine v3 plan ("audit entries survive context resets") is undelivered despite the code being written.
All logWarning()/logError() calls go to stderr and the in-memory _buffer only. After context reset, every warning and error is gone. The forensics story promised by the engine is broken.
Root Cause
setLogBasePath(basePath)atworkflow-logger.ts:56exists and works correctly, but is called from zero production files._auditBasePathstaysnullfor the entire process lifetime.- Every
_push()call atworkflow-logger.ts:233skips theif (_auditBasePath)branch — no entries are ever flushed to disk. _resetLogs()atworkflow-logger.ts:200-203nulls out_auditBasePatheven if it were somehow set, so the next unit start wipes the path. This field should be stable for the process lifetime.
Fix
- Call
setLogBasePath(basePath)in the engine init path — whereveropenDatabase()is called or abasePathis first established. - Change
_resetLogs()to only clear_buffer, not_auditBasePath.
Files
src/resources/extensions/gsd/workflow-logger.ts— lines 56, 200-203, 233
Confidence
97% — verified via codebase-wide search for setLogBasePath references.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working