Skip to content

refactor(server, sdk, ui): collapse advisory control actions to observe - #161

Merged
lan17 merged 7 commits into
mainfrom
lev/consolidate_actions
Apr 2, 2026
Merged

lan17 merged 7 commits into
mainfrom
lev/consolidate_actions

Conversation

@lan17

@lan17 lan17 commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • collapse public control actions to deny | steer | observe
  • normalize legacy allow|warn|log inputs to observe and expand observability filters so historical event rows still query correctly
  • replace per-action observability counts with observe_count and regenerate the OpenAPI, TypeScript SDK, and UI API types
  • update the UI action selector/monitor plus examples/docs/tests to use observe
  • add an alembic data migration to rewrite stored control definitions from allow|warn|log to observe

Validation

  • make check
  • make sdk-ts-typecheck
  • make sdk-ts-lint
  • make ui-typecheck
  • make ui-lint (passes with pre-existing Next.js <img> warnings in ui/src/core/layouts/app-layout.tsx)

@codecov

codecov Bot commented Apr 2, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
models/src/agent_control_models/actions.py 96.87% 1 Missing ⚠️
models/src/agent_control_models/observability.py 92.85% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@lan17 lan17 changed the title refactor: collapse advisory control actions to observe refactor(server, sdk, ui): collapse advisory control actions to observe Apr 2, 2026
@lan17 lan17 changed the title refactor(server, sdk, ui): collapse advisory control actions to observe refactor!(server, sdk, ui): collapse advisory control actions to observe Apr 2, 2026
@lan17 lan17 changed the title refactor!(server, sdk, ui): collapse advisory control actions to observe refactor(server, sdk, ui): collapse advisory control actions to observe Apr 2, 2026
@lan17
lan17 enabled auto-merge (squash) April 2, 2026 06:06
@lan17
lan17 merged commit 8c25090 into main Apr 2, 2026
6 checks passed
@lan17
lan17 deleted the lev/consolidate_actions branch April 2, 2026 13:22
@galileo-automation

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

lan17 added a commit that referenced this pull request Apr 10, 2026
## Summary
- Split action validation into strict (`validate_action`) for API input
boundaries and lenient (`normalize_action`) for internal read paths
- `ControlAction.decision` now rejects `allow`/`warn`/`log` with a clear
error — only `deny`, `steer`, `observe` are accepted when creating or
updating controls
- `EventQueryRequest.actions` now rejects legacy values in query filters
- `ControlMatch` and `ControlExecutionEvent` still normalize legacy
values from historical DB rows via `normalize_action`
- `expand_action_filter` unchanged — still expands `observe` to include
legacy values for SQL queries against old event data

Follows #161 which introduced the `observe` action and normalization
layer.

## Test plan
- [x] `models/tests/test_actions.py` — 43 tests covering strict
validation, lenient normalization, Pydantic model boundaries, and query
expansion
- [x] `server/tests/test_observability_models.py` — updated to verify
legacy rejection in query filters
- [x] `engine/tests/test_core.py` — 49 tests pass (unchanged)
- [x] `sdks/python/tests/test_control_decorators.py` — 35 tests pass
(unchanged)
- [x] `make lint` and `make typecheck` pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

3 participants