Skip to content

test: distinguish kill-switch admission from delegated worker completion - #823

Merged
rajnisht7 merged 2 commits into
agentrust-io:mainfrom
dinakarjs:test/worker-drain-boundary-20261025
Oct 29, 2026
Merged

rajnisht7 merged 2 commits into
agentrust-io:mainfrom
dinakarjs:test/worker-drain-boundary-20261025

Conversation

@dinakarjs

@dinakarjs dinakarjs commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What

Add deterministic paired observations for #820: one delegated worker finishes before the operator trip, and another is released only after the trip response. Both check that later gateway admission is blocked. Correct the handler documentation and LIMITATIONS.md to distinguish stopped admission, coroutine cancellation and the independently observed side effect.

Security impact

Documentation and synthetic regression tests only. No kill-switch response code, audit schema, permission, cancellation mechanism or runtime enforcement changes. A successful trip does not prove a delegated thread or remote effect was prevented. Complete mediation at the effect commit point remains a separate #736/#820 design decision. This does not close #820's larger enforcement work or revive closed reproducer #821 as a runtime fix.

Validation

Linux/Python 3.11.17 with repository hash-locked dev dependencies: full unit suite 2,541 passed / 6 skipped. Both new cases pass with an event-controlled worker and a short test-only drain deadline, without outcome-dependent xfail/skip. Ruff src/tests, mypy runtime/verify (76 files), configured Bandit and whitespace pass. Upper/lowercase proxy variables are cleared for local test traffic as in prior validation. Worker completion is joined during cleanup. Marker-file effects are synthetic and do not establish external-service or hardware behavior.

DCO

Signed-off-by: Srinivasa Dinakar Jainti dinakarjs@gmail.com. Prepared with OpenAI Codex. Independent review and hosted checks remain required.

Published tree 46b7b434211b5f01bb0f7b26b6da04db869a4c3b equals the locally tested tree.

Hosted status: CodeQL, limitations parity, confinement reference and Docker checks pass. CI run 40203248152 is blocked before lint/type/test by unchanged dependency audit findings: certifi 2026.7.22, filelock 3.32.5 and setuptools 84.0.0. This PR changes no dependency locks and does not suppress the gate. Filelock/setuptools remediation is already proposed separately in #822; certifi remains an inherited blocker. The local 2,541-test result above is not a hosted matrix pass.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 25, 2026

@carloshvp carloshvp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head e77ad0d0c4fce113c2b5c96ac05df9aa342035f3 in an isolated checkout.

The event-controlled paired tests distinguish admission being stopped from a delegated thread's observed completion, including completion deliberately released after the trip response. Cleanup joins the worker. The handler and LIMITATIONS text accurately preserve that boundary without claiming that cancellation prevents an already admitted external effect. No blocking finding in the changed documentation/tests.

Independent validation in a fresh repository-hash-locked Python 3.12.10 environment: 2,527 tests passed, 20 skipped; pip check, configured Ruff, mypy, Bandit and diff whitespace checks passed. Commit sign-offs are present. Hosted CI and applicable independent maintainer/security gates remain separate prerequisites to merge.

Reviewed with OpenAI Codex.

@rajnisht7
rajnisht7 enabled auto-merge (squash) October 29, 2026 22:05
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rajnisht7
rajnisht7 merged commit 1fbc1b2 into agentrust-io:main Oct 29, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kill switch trip returns success before a delegated worker thread's protected side effect commits (drain does not stop worker threads)

4 participants