Skip to content

Report corrupt feedback history entries#327

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-feedback-history-corrupt-json
Open

Report corrupt feedback history entries#327
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-feedback-history-corrupt-json

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Fixes PlatformNetwork/bounty-challenge#53182.

Summary

  • Stop silently dropping unreadable or malformed *.json feedback history files.
  • Emit warnings for bad feedback entries in text and JSON modes.
  • Return structured { entries, errors } JSON when history contains corrupted files, so automation can detect the problem.
  • Add regression tests for mixed valid/corrupt history and corrupt-only history.

Validation

  • cargo +1.90.0 fmt --package cortex-cli --check
  • git diff --check
  • Isolated rustc +1.90.0 --edition=2024 --test harness covering corrupt JSON detection while preserving valid entries

Note: targeted cargo test -p cortex-cli test_load_feedback_history_reports_corrupt_json -- --nocapture is still blocked before running tests on this Windows/MSVC environment by the existing aws-lc-sys C build failure.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG] [v0.0.7] cortex feedback history hides corrupted *.json entries and reports "no history" (exit 0)

1 participant