Skip to content

fix: validation module hardening — false negatives, crash, silent fallbacks#703

Merged
Muizzkolapo merged 2 commits into
mainfrom
fix/validation-hardening
Jun 18, 2026
Merged

fix: validation module hardening — false negatives, crash, silent fallbacks#703
Muizzkolapo merged 2 commits into
mainfrom
fix/validation-hardening

Conversation

@Muizzkolapo

Copy link
Copy Markdown
Owner

Summary

  • schema_extractor (P0): Remove wrong top-level observe/drops reads that produced empty sets — context_scope reads already handle this correctly. Warn if user misplaces keys.
  • key_verifier (P0): Catch TimeoutError from as_completed() — collect completed-but-unconsumed futures, mark timed-out vendors as skipped
  • resolution_service (P1): Narrow except Exception to specific types, escalate to warning. Fix false docstring promise.
  • workflow_static_analyzer (P1): Wire check_missing_dependencies() into analyze() — implicit dependency bugs now caught
  • granularity_output_field_validator (P3): Improve error message UX

Verification

  • ruff check — clean
  • ruff format --check — clean
  • pytest — 7494 passed, 2 skipped
  • Smoke test — passed
  • Pi consensus — 3 rounds, addressed all substantive feedback (warning message fix, lost futures fix, yaml.YAMLError added)

…lbacks

Static analysis (P0):
- schema_extractor: remove wrong top-level observe/drops reads that
  produced empty sets — context_scope reads below already handle this.
  Add warning if user puts these keys at top level instead of under
  context_scope.

Crash fix (P0):
- key_verifier: catch TimeoutError from as_completed() and collect
  completed-but-unconsumed futures instead of crashing preflight

Silent fallback (P1):
- resolution_service: narrow except Exception to specific types
  (FileNotFoundError, OSError, ValueError, YAMLError), escalate to
  warning. Remove false docstring promise about format-mismatch
  warnings.

Dead validator (P1):
- workflow_static_analyzer: wire check_missing_dependencies() into
  analyze() — implicit dependency bugs now caught statically

UX (P3):
- granularity_output_field_validator: improve error message to tell
  user to add json_mode: false
…cept clause

- schema_extractor: remove spurious warning for top-level observe/drops
  keys — these are valid ActionConfig fields, not misplaced context_scope
- resolution_service: restore except Exception for _resolve_prompt_for_extraction
  because PromptFormatter.get_raw_prompt wraps all errors in PromptValidationError
  which the narrowed tuple didn't catch
@Muizzkolapo Muizzkolapo merged commit c5335b6 into main Jun 18, 2026
5 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant