mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #248] [CLOSED] feat: add funded execution policy and independent process watchdog #289
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#289
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/248
Author: @ethe
Created: 9/5/2026
Status: ❌ Closed
Base:
main← Head:feat/funded-execution-policy📝 Commits (2)
bb64fa1feat: add portable funded execution policy and independent watchdog0bd7865Check concurrent checkpoint disk reservation growth📊 Changes
9 files changed (+749 additions, -0 deletions)
View changed files
📝
.github/workflows/ci.yml(+10 -0)📝
Cargo.lock(+11 -0)📝
Cargo.toml(+1 -0)➕
crates/runtime-policy/Cargo.toml(+17 -0)➕
crates/runtime-policy/src/lease.rs(+179 -0)➕
crates/runtime-policy/src/lib.rs(+157 -0)➕
crates/runtime-policy/src/watchdog.rs(+247 -0)➕
crates/runtime-policy/tests/support/probe.rs(+29 -0)➕
crates/runtime-policy/tests/watchdog.rs(+98 -0)📄 Description
Add a small
runtime-policycrate for resource reservations and externally funded execution. It provides a single budget owner for startup, resident-memory growth and disk reservations, plus fenced absolute leases that cannot gain runtime from a delayed command or wall-clock rollback.The Linux watchdog owns a pidfd and its own deadline thread. It terminates the runtime on funding expiry or control-channel closure even if the API process is stopped or an incomplete frame is received. Linux process tests cover those failure paths; portable unit tests cover admission and lease transitions.
This PR is a standalone building block based directly on upstream main. It contains no fork deployment configuration or private integration history. Runtime/API adoption is intentionally a separate integration: this crate does not silently enable admission in existing deployments.
Validation:
cargo test -p runtime-policyandcargo fmt -p runtime-policy -- --checkpass locally. A focused Linux CI job runs the process tests without KVM or privileged host setup.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.