Repository navigation
chore(pre-commit): add yamlfmt hook [OMN-4862] - #39
Merged
Merged
Conversation
Add yamlfmt pre-commit hook (v0.21.0) with ecosystem-standard .yamlfmt config. Auto-formatted existing YAML files (contracts/, drift/) to match the canonical style. Excludes .github/ and templates/ directories.
jonahgabriel
enabled auto-merge (squash)
March 13, 2026 01:10
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThe pull request introduces yamlfmt configuration for YAML formatting, adds schema_version and ticket_id metadata to contract files, appends schema_version and date headers to drift tracking files, and applies line-wrapping formatting adjustments across multiple YAML documents for consistency. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
jonahgabriel
added a commit
that referenced
this pull request
Apr 11, 2026
Module 'onex_change_control.overseer' was imported with both 'import X as pkg' and 'from X import Y' in two separate test methods of TestCRFinding6. Consolidate both methods to use 'import onex_change_control.overseer as pkg' so CodeQL alert #39 (py/mixed-import-style) is resolved.
jonahgabriel
added a commit
that referenced
this pull request
Apr 11, 2026
…r wire types from omnibase_compat (#157) * feat(OMN-8431): add onex_change_control/overseer — migrate 28 files from omnibase_compat Moves the entire overseer wire-type module (14 enums + 12 models + __init__) from omnibase_compat to its canonical home in onex_change_control. All internal imports rewritten from omnibase_compat.overseer.* to onex_change_control.overseer.*. Additive only — no consumer imports changed yet (PR2/omnimarket follows). 968 existing tests pass; 14 new overseer module-presence tests added TDD-first. * fix(OMN-8431): restore runtime imports in overseer models — fix Pydantic forward-ref errors Ruff TC003/TC001 auto-fixes incorrectly moved datetime and ModelDispatchItem into TYPE_CHECKING blocks. Pydantic cannot resolve forward references at runtime without these imports at module level. Reverted with noqa suppressions. Also relaxes omnibase-core==0.36.0 pin to >=0.36.0 to allow omnimarket (which requires 0.39.0) to resolve the dep tree successfully. * test(OMN-8431): reproduce CR findings #1-#7 from PR #157 12 failing tests covering: - CR#1 (Critical): ModelTaskDeltaEnvelope Pydantic runtime failure (TYPE_CHECKING) - CR#2 (Critical): ModelVerifierOutput Pydantic schema failure (TYPE_CHECKING) - CR#3 (Major): ModelOvernightContract halt threshold hardcoded to 5.0 - CR#4 (Major): ModelSessionContract phases accepts empty tuple - CR#5 (Major): ModelTaskStateEnvelope task_id auto-generated - CR#6 (Minor): ModelContextBundle missing from overseer __init__ exports - CR#7 (Minor): load_worker_contract rejects Mapping subclasses * fix(OMN-8431): address CR findings #1-#7 from PR #157 CR#1 (Critical): move Mapping+EnumTaskStatus out of TYPE_CHECKING in model_task_delta_envelope — Pydantic cannot resolve TYPE_CHECKING-only imports at runtime with `from __future__ import annotations`. CR#2 (Critical): move EnumFailureClass out of TYPE_CHECKING in model_verifier_output — same Pydantic get_type_hints() failure pattern affecting ModelVerifierCheckResult and ModelVerifierOutput. CR#3 (Major): derive default halt_conditions cost threshold from max_cost_usd via model_validator in ModelOvernightContract instead of hardcoding 5.0. CR#4 (Major): make phases required with Field(..., min_length=1) in ModelSessionContract — matches documented invariant "No default". CR#5 (Major): remove uuid4 default_factory from task_id in ModelTaskStateEnvelope — callers must supply explicit task identity to prevent orphan envelopes. CR#6 (Minor): add ModelContextBundle to overseer/__init__.py import and __all__ — the union type alias was defined but not re-exported. CR#7 (Minor): change load_worker_contract to accept Mapping[str, Any] and isinstance(data, Mapping) — dict-only check rejected valid read-only mappings. * fix(OMN-8431): add type: ignore to intentional missing-arg test calls mypy pre-push hook flags the two test calls that intentionally omit required fields (phases and task_id) to verify Pydantic raises ValidationError. These are correct test patterns — suppress mypy with type: ignore[call-arg]. * fix(overseer): deduplicate import pattern to satisfy CodeQL (OMN-8431) Module 'onex_change_control.overseer' was imported with both 'import X as pkg' and 'from X import Y' in two separate test methods of TestCRFinding6. Consolidate both methods to use 'import onex_change_control.overseer as pkg' so CodeQL alert #39 (py/mixed-import-style) is resolved. * ci(auto-merge): fix workflow — add --repo flag to gh pr merge (OMN-8431) The Enable Auto-Merge workflow ran without a checkout step, causing 'gh pr merge --auto --squash' to fail with 'not a git repository'. Adding --repo to the gh pr merge call allows the command to run without a local git context. * fix(overseer): enforce conditional field invariants in ModelOvernightHaltCondition (OMN-8431) CR#8 (Major): ModelOvernightHaltCondition documented field dependencies (skill/pr/threshold_minutes/outcome) were unenforced. Add model_validator to raise ValueError when on_halt='dispatch_skill' without skill, or check_type='pr_blocked_too_long' without pr+threshold_minutes, or check_type='required_outcome_missing' without outcome. Add regression tests in TestCRFinding8MajorOvernightHaltConditionConditionalFields.
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
yamlfmtpre-commit hook (v0.21.0) with ecosystem-standard.yamlfmtconfig.github/andtemplates/directories from yamlfmtTest plan
pre-commit run yamlfmt --all-filesexits 0pre-commit run --all-filesexits 0Part of Epic 6: Pre-commit Hook Parity (OMN-4833)
Summary by CodeRabbit