fix(runtime): exclude stale process resources during authority intersection

Catch ResourceIdentityError during intersection so that normal process exit
or background job termination does not crash child authority creation.
Stale or unverifiable observations are conservatively excluded from the
resulting authority while maintaining identity verification and preventing
PID reuse or renewal.
This commit is contained in:
Alexandre Teixeira
2026-10-02 18:54:09 +01:00
parent 525ae76df3
commit ab89e3274a
4 changed files with 145 additions and 7 deletions
+1 -2
View File
@@ -132,8 +132,7 @@ def test_child_cannot_target_sibling_or_replaced_job(store):
with pytest.raises(ResourceIdentityError):
resources.resolve_process_operation(inherited, ExactOperation.normalize("manage_bg_jobs", '{"action":"kill","job_id":"second"}'), NativeBackendResource("manage_bg_jobs"))
seed(store, "first")
with pytest.raises(ResourceIdentityError):
parent.intersect(child)
assert parent.intersect(child).job_resources == ()
@pytest.mark.parametrize("field,value", [("generation", "f" * 32), ("owner", "bob"), ("request_id", "other"), ("thread_id", "other")])