Skip to content

fix(telemetry): create log file before opening write handle#17

Merged
engmsaleh merged 1 commit into
developfrom
fix/telemetry-create-log-file
Jun 5, 2026
Merged

fix(telemetry): create log file before opening write handle#17
engmsaleh merged 1 commit into
developfrom
fix/telemetry-create-log-file

Conversation

@engmsaleh

Copy link
Copy Markdown
Collaborator

Small fix surfaced during the 8.2 validation run (and ironically by the v1.10 silent-failure instrumentation itself).

RealtimeTelemetry.openFile() created the parent skilly/ directory but then called FileHandle(forWritingTo:), which throws if the file itself doesn't exist. So on the very first run the console showed 📊 Telemetry: failed to open log file … skilly-telemetry.jsonl doesn't exist and telemetry was dropped until a file happened to exist.

Fix: create an empty log file when missing, before opening the write handle. Additive, ~4 lines.

Validated: swiftc -parse clean. (Full type-check needs an Xcode build — agents can't run xcodebuild/TCC — but this is an isolated FileManager change.)

RealtimeTelemetry created the parent skilly/ directory but then called
FileHandle(forWritingTo:), which throws if the file itself doesn't exist —
so the very first run logged 'failed to open log file … doesn't exist' and
dropped telemetry until a file happened to exist. Create an empty log file
when missing. Additive; surfaced by the v1.10 silent-failure instrumentation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@engmsaleh engmsaleh merged commit 508e127 into develop Jun 5, 2026
16 checks passed
@engmsaleh engmsaleh deleted the fix/telemetry-create-log-file branch June 5, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant