Skip to content

Extract post-verdict processing helper#147

Open
scottscott wants to merge 1 commit intonomoticai:mainfrom
scottscott:feat/runtime-record-verdict-slice-7
Open

Extract post-verdict processing helper#147
scottscott wants to merge 1 commit intonomoticai:mainfrom
scottscott:feat/runtime-record-verdict-slice-7

Conversation

@scottscott
Copy link
Collaborator

Summary

Seventh runtime decomposition implementation slice: extract post-verdict side-effect orchestration from _record_verdict.

Key Changes

  • Added GovernanceRuntime._run_post_verdict_processing(action, context, verdict) in src/nomotic/runtime.py.
  • Moved listener notification, UAHS post-evaluation call, and lifecycle transition checks into the helper.
  • Replaced inline block in _record_verdict(...) with a helper call.

Test Updates

  • Added focused tests in tests/test_runtime.py:
    • test_run_post_verdict_processing_calls_listener_uahs_and_lifecycle
    • test_run_post_verdict_processing_respects_disabled_flags

Validation

  • pytest -q tests/test_runtime.py tests/test_contract.py -> 48 passed

Scope

  • Internal refactor only
  • No API/config changes
  • No CI/workflow changes

Refactor GovernanceRuntime._record_verdict by moving listener, UAHS, and lifecycle post-processing into _run_post_verdict_processing.

Adds focused tests for enabled and disabled flag paths.

assisted-by: GitHub Copilot
@codecov
Copy link

codecov bot commented Mar 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant