Skip to content

Add frailbox self-test JSON summary#12

Closed
9904099 wants to merge 2 commits into
Soengkit:mainfrom
9904099:codex/frailbox-selftest-json-5-clean
Closed

Add frailbox self-test JSON summary#12
9904099 wants to merge 2 commits into
Soengkit:mainfrom
9904099:codex/frailbox-selftest-json-5-clean

Conversation

@9904099

@9904099 9904099 commented Jun 20, 2026

Copy link
Copy Markdown

Summary

Adds a machine-readable JSON summary mode for the frailbox self-test command while keeping the existing text output as the default operator-facing behavior.

This targets #5.

Changes

  • Added --self-test-format text|json for frailbox --self-test; default remains text.
  • Added deterministic self-test result tracking with per-test name, status, duration_ms, and failure_reason on failed tests.
  • Added a non-networked failure fixture flag, --self-test-inject-failure, so the JSON failure path can be tested without introducing flaky external dependencies.
  • Added make test-selftest-json and frailbox/tests/test_selftest_json.sh to cover both a clean self-test run and an injected failing result.
  • Documented the JSON summary workflow in docs/OPERATIONS.md.
  • Included the required diagnostic artifacts from python3 build.py:
    • diagnostic/build-f522e200.json
    • diagnostic/build-f522e200-part001.logd
    • diagnostic/build-f522e200-part002.logd
    • diagnostic/build-f522e200-part003.logd
    • diagnostic/build-f522e200-part004.logd
    • diagnostic/build-f522e200-part005.logd

Testing

Ran locally:

make -C frailbox clean test-selftest-json
git diff --check HEAD~2..HEAD
python3 build.py

Results:

  • make -C frailbox clean test-selftest-json passed. The compiler still emits pre-existing warnings in arena.c and logger.c, but the self-test binary builds and the JSON fixture assertions pass.
  • git diff --check HEAD~2..HEAD passed.
  • python3 build.py passed all 10 modules:
    • backend
    • frontend
    • market
    • frailbox
    • engine
    • compliance
    • v2-market-stream
    • nfc-scanner
    • openapi-haskell
    • openapi-tools

Diagnostic log reassembly/decryption:

cat diagnostic/build-f522e200-part001.logd \
    diagnostic/build-f522e200-part002.logd \
    diagnostic/build-f522e200-part003.logd \
    diagnostic/build-f522e200-part004.logd \
    diagnostic/build-f522e200-part005.logd \
    > diagnostic/build-f522e200.logd

encryptly unpack diagnostic/build-f522e200.logd <outdir> --password 20d5231d891aa69f4476

Payout/contact: 50889616@qq.com.

Checklist

  • Relevant modules affected by these changes build locally
  • Tests pass locally
  • Diagnostic build log is committed in this PR
  • Documentation has been updated, if applicable
  • Configuration or schema changes are documented, if applicable
  • No generated build artifacts are committed, except the required diagnostic build log
  • 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

@9904099 9904099 force-pushed the codex/frailbox-selftest-json-5-clean branch from 6c22cb4 to 9bd88e1 Compare June 20, 2026 21:43
@Soengkit

Copy link
Copy Markdown
Owner

Closing this PR because the linked fork issue is only a closed payout tracker for an already submitted upstream PR. This fork is not an active bounty intake or payment authority, and it is not accepting external submissions or payment details here.

@Soengkit Soengkit closed this Jun 23, 2026
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.

2 participants