Skip to content

[codex] Handle malformed CLI JSON state - #20

Draft
rushillshah wants to merge 1 commit into
mainfrom
codex/clear-malformed-json-handling
Draft

[codex] Handle malformed CLI JSON state#20
rushillshah wants to merge 1 commit into
mainfrom
codex/clear-malformed-json-handling

Conversation

@rushillshah

Copy link
Copy Markdown
Owner

Closes #19

Scope

  • Report malformed digital-brain.config.json with a clear file-specific error and setup guidance.
  • Keep WhatsApp pause/resume/status commands usable when auto-reply-pause.json is malformed by warning and falling back to an empty pause state.
  • Add CLI regression tests for both malformed JSON paths.

Validation

  • npm run check
  • npm test
  • targeted smoke: initialize a temp vault, corrupt auto-reply-pause.json, run digital-brain whatsapp-status --vault <temp>

Risk

Low. The config path still fails closed; only pause-state JSON gets a warning fallback so users can recover via pause/resume commands.

@rushillshah rushillshah added the bug Something isn't working label Jul 4, 2026
@rushillshah

Copy link
Copy Markdown
Owner Author

Maintenance reconciliation note (2026-07-07): CI is passing and the branch is mergeable, but this PR is still draft and review-required. Next action: mark ready/request review before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI should handle malformed vault and pause JSON clearly

1 participant