[PR #248] [CLOSED] feat: add funded execution policy and independent process watchdog #289

Closed
opened 2026-10-29 14:21:51 +00:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • bb64fa1 feat: add portable funded execution policy and independent watchdog
  • 0bd7865 Check 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-policy crate 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-policy and cargo fmt -p runtime-policy -- --check pass 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.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/248 **Author:** [@ethe](https://github.com/ethe) **Created:** 9/5/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/funded-execution-policy` --- ### 📝 Commits (2) - [`bb64fa1`](https://github.com/kvcache-ai/AgentENV/commit/bb64fa18065899dc68ca2f685b3963876ce7812c) feat: add portable funded execution policy and independent watchdog - [`0bd7865`](https://github.com/kvcache-ai/AgentENV/commit/0bd7865be04fa4ab9396effad2d99ca8f2c2ab91) Check concurrent checkpoint disk reservation growth ### 📊 Changes **9 files changed** (+749 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.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) </details> ### 📄 Description Add a small `runtime-policy` crate 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-policy` and `cargo fmt -p runtime-policy -- --check` pass locally. A focused Linux CI job runs the process tests without KVM or privileged host setup. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:21:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#289
No description provided.