[0 BOUNTY] [Python] Add input validation and error handling to verify_diagnostics.py#5
Open
GautamKumarOffical wants to merge 10 commits into
Open
Conversation
…EADME Add shields.io badges in a centered row at the top of README.md with consistent flat style: build status (GitHub Actions), code style (editorconfig), license (MIT), and language stack. Closes #5 Signed-off-by: Gautam Kumar <gautamkumarofficial@users.noreply.github.com>
Adds a JSON Schema (draft 2020-12) describing the Order struct used by the market engine (market/types/types.go). Includes: - schemas/order.schema.json — full schema with all required fields - schemas/examples/valid_limit_order.json — valid limit buy order - schemas/examples/valid_iceberg_order.json — valid iceberg sell order - schemas/examples/invalid_missing_required.json — invalid order (bad side, missing fields) - schemas/README.md — documentation and validation instructions Closes #34 Signed-off-by: Gautam Kumar <gautamkumarofficial@users.noreply.github.com>
- Classify API changes as breaking, non_breaking, or informational - Breaking: removed paths, removed methods, removed response fields, narrowed enums - Non-breaking: added endpoints, added response fields, added schema fields - Informational: description changes, line count changes, emoji deltas - Add --format json with deterministic JSON output - Add summary counts for each severity category - Add sample OpenAPI fixtures demonstrating all three categories - Fix YAML parser to handle paths starting with / and list items Signed-off-by: Gautam Kumar <gautamkumarofficial@users.noreply.github.com>
- Add argparse CLI with --verbose, --json, --threshold, --diagnostic-dir flags - Wrap file reads in try/except with meaningful error messages - Validate diagnostic JSON schema (required keys, module structure, status values) - Support --json output for machine consumption - Support --threshold N for minimum passing modules (exit 1 if not met) - Check encryptly binary availability with graceful degradation - Exit code 0 on pass, 1 on any failure Signed-off-by: Gautam Kumar <gautamkumarofficial@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Created
tools/verify_diagnostics.pywith full input validation, error handling, and schema checking for diagnostic build artifacts.Changes
New:
tools/verify_diagnostics.py--verbose,--json,--threshold,--diagnostic-dirflagsmodules,timestamp,build_id), module structure (name,status,duration_seconds), valid status values--jsonoutput: machine-readable JSON withpassed,errors,warnings, module counts--threshold N: exit 1 if fewer than N modules pass (default: 0)Testing
All modes work correctly. Schema validation catches real issues in existing diagnostic files (missing
timestamp,build_id,duration_secondsfields).Result: 9/10 modules pass (openapi-haskell fails pre-existing)
Diagnostic password:
4f80c64ede5bfe9d0426Checklist