Skip to content

fix(policy): bound OPA validation input and output by its deadline - #3110

Merged
sabbour merged 1 commit into
v1from
squad/2655-opa-validation-deadline
Dec 1, 2026
Merged

sabbour merged 1 commit into
v1from
squad/2655-opa-validation-deadline

Conversation

@sabbour

@sabbour sabbour commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Summary

Keep Policy validation responsive when its parser input or output stalls. The existing five-second parse budget now covers input writes, process exit, and bounded output reads. Cleanup waits at most another 500 ms. Early syntax errors keep their existing error result.

Fixes #3109, a v1.1.0 blocker for #2655. Public signatures, artifact limits, executable pinning, and the native package remain unchanged.

Design and release

Validation

The new regressions produced three failures on the baseline: blocked input exceeded the deadline, an inherited output pipe blocked completion, and an early syntax error returned a dependency error. All pass with the repair.

Linux x64 with .NET 10 and checksum-verified OPA 0.70.0:

dotnet test tests\Agentweaver.Policy.Acs.Tests\Agentweaver.Policy.Acs.Tests.csproj --no-restore --configuration Release --runtime linux-x64 -p:AgentweaverUseLinuxX64LockFile=true
dotnet test tests\Agentweaver.Projects.Config.Tests\Agentweaver.Projects.Config.Tests.csproj --no-restore --no-build --configuration Release --filter "FullyQualifiedName~NativeAcs"

Results: 59 native ACS tests and 130 Projects native tests passed with no skips. The focused owner-slot checks also passed: a timed-out request returns the dependency error, and the same owner accepts the next validation request.

Repository checks passed:

npm run release:validate
npm run docs:build
npm run docs:check-links
npm run docs:check-drift -- --base origin/v1
npm run docs:check-diagrams
npm run docs:check-flagship-diagrams
npm run test:docs-diagrams
git diff --check

The exact repaired-image probes for Projects & Config, Orchestrator, and AgentHost will be recorded before merge. The merged-image results will be linked before #2655 closes. Network activation remains under #2659.

Fixes #3109. Resolves the validation deadline blocker for #2655.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sabbour

sabbour commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

Exact repaired-image results

All three linux/amd64 native probes passed for reviewed commit cd02def0f072bad3f0ac85fda17f661ccb993e04, tree b53fbc666f35f82890bea9c631dd7cfb98d58087. The source worktree was clean before and after the builds.

Image Local image ID
Projects & Config sha256:114bd8d597337a838d299c2bdd52c23248143456cdd3e784c68b6e9d50da876b
Orchestrator sha256:6beeed2c9318b1b5515939ab378dc3028f38c658c3122416f29ed9c1f853cd71
AgentHost sha256:da1c594c229b627beeb8798a00d4aa44f35eebff2557c7b991295462feac194c

Each build printed:

ACS image probe passed: native load, shared validation, OPA allow, deny, error deny, and timeout deny.

The local Podman engine used its supported classic Docker build path with DOCKER_BUILDKIT=0. OPA 0.70.0 matched SHA-256 00d114b94fdb1606a48cccdfc73c9ccdc62c38721150131ae578d5ff3df5c084. The three temporary tagged images were removed after recording their identities.

Linux command syntax

The test results in the pull request were produced inside the Linux SDK container. These are the commands with Linux paths:

dotnet test tests/Agentweaver.Policy.Acs.Tests/Agentweaver.Policy.Acs.Tests.csproj --no-restore --configuration Release --runtime linux-x64 -p:AgentweaverUseLinuxX64LockFile=true
dotnet test tests/Agentweaver.Projects.Config.Tests/Agentweaver.Projects.Config.Tests.csproj --no-restore --no-build --configuration Release --filter "FullyQualifiedName~NativeAcs"

Results: 59 and 130 passed, respectively, with no skips. After merge, the normal v1 image workflow will provide the merged-commit image digests and native-probe results for #2655 closure.

@sabbour
sabbour merged commit e393665 into v1 Dec 1, 2026
35 checks passed
@sabbour
sabbour deleted the squad/2655-opa-validation-deadline branch December 1, 2026 08:14
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