Skip to content

refactor(models): share control definition runtime fields#202

Merged
lan17 merged 2 commits intomainfrom
feature/issue-200-control-definition-base
Apr 28, 2026
Merged

refactor(models): share control definition runtime fields#202
lan17 merged 2 commits intomainfrom
feature/issue-200-control-definition-base

Conversation

@lan17
Copy link
Copy Markdown
Contributor

@lan17 lan17 commented Apr 26, 2026

Summary

  • Introduce ControlDefinitionBase for runtime-relevant control fields shared by authored and runtime control models.
  • Move legacy selector/evaluator canonicalization and common condition/action validation onto the shared base.
  • Keep template metadata and template pairing validation only on ControlDefinition, while ControlDefinitionRuntime keeps runtime parsing with extra="ignore".

Why

This addresses #200 by removing duplicated runtime fields and validators between ControlDefinition and ControlDefinitionRuntime, making future root-level runtime fields easier to add once.

Validation

  • make models-test
  • make lint
  • make typecheck
  • make check

Fixes #200

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
models/src/agent_control_models/controls.py 92.59% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@lan17 lan17 changed the title [codex] Refactor control definition runtime fields refactor: share control definition runtime fields Apr 26, 2026
@lan17 lan17 changed the title refactor: share control definition runtime fields refactor(models): share control definition runtime fields Apr 26, 2026
@lan17 lan17 marked this pull request as ready for review April 26, 2026 07:38
@lan17 lan17 enabled auto-merge (squash) April 26, 2026 07:59
@lan17 lan17 merged commit 09653e3 into main Apr 28, 2026
6 checks passed
@lan17 lan17 deleted the feature/issue-200-control-definition-base branch April 28, 2026 16:17
@galileo-automation
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor control definition models to share runtime fields

3 participants