Skip to content

Improve frailbox logger error handling (#20)#21

Open
Soengkit wants to merge 2 commits into
GautamKumarOffical:mainfrom
Soengkit:codex/frailbox-logger-error-handling
Open

Improve frailbox logger error handling (#20)#21
Soengkit wants to merge 2 commits into
GautamKumarOffical:mainfrom
Soengkit:codex/frailbox-logger-error-handling

Conversation

@Soengkit

Copy link
Copy Markdown

Summary

Improves frailbox legacy logger error handling for issue #20.

/claim #20

Changes

  • Tracks the configured LOG_FILE path for clearer diagnostics.
  • Falls back to stderr when the configured log file cannot be opened, written, or flushed.
  • Preserves the current log message by retrying it on stderr after a file write failure.
  • Adds a small C logger error-handling harness and make test-logger-error target.
  • Documents the stderr fallback behavior in operations troubleshooting.
  • Keeps frailbox validation portable on non-Linux hosts while preserving Linux hardening flags and Linux-specific behavior.
  • Fixes two build diagnostic hygiene issues: Python 3.9 parsing for build.py and password-like stdout being stored as an encryptly error.

Testing

  • python3 -m py_compile build.py - PASS.
  • make -C frailbox test-logger-error - PASS. The open-failure fallback path is verified; /dev/full write-failure coverage is skipped on macOS because /dev/full is unavailable.
  • make -C frailbox - PASS.
  • python3 build.py --module frailbox - PASS and generated committed metadata at diagnostic/build-81f3e49f.json.
  • git diff --check - PASS.

Note: encryptly pack on this macOS runner exits 1 after writing 20 bytes to stdout and does not create diagnostic/build-81f3e49f.logd; the committed JSON records the frailbox PASS result and the .logd creation failure.

Checklist

  • Relevant modules affected by these changes build locally
  • Tests pass locally
  • Diagnostic build log is committed in this PR (encryptly pack did not create a .logd; metadata is committed)
  • Documentation has been updated, if applicable
  • Configuration or schema changes are documented, if applicable
  • No generated build artifacts are committed, except the required diagnostic metadata
  • Changes are scoped to the PR purpose and avoid unrelated cleanup
  • Security, privacy, and error-handling implications have been considered

  • I would like to request that my diagnostic build log is removed before merging

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