Repository navigation
refactor(server, sdk, ui): collapse advisory control actions to observe - #161
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
lan17
enabled auto-merge (squash)
April 2, 2026 06:06
abhinav-galileo
approved these changes
Apr 2, 2026
This was referenced Apr 2, 2026
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)
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
deny | steer | observeallow|warn|loginputs toobserveand expand observability filters so historical event rows still query correctlyobserve_countand regenerate the OpenAPI, TypeScript SDK, and UI API typesobserveallow|warn|logtoobserveValidation
make checkmake sdk-ts-typecheckmake sdk-ts-lintmake ui-typecheckmake ui-lint(passes with pre-existing Next.js<img>warnings inui/src/core/layouts/app-layout.tsx)