Recover host-owned subagent deadline policy on current main #221

Merged
lost-rob0t merged 2 commits from rage/175-deadline-policy-recovery into main 2026-08-27 02:28:33 +00:00
lost-rob0t commented 2026-08-26 07:19:07 +00:00 (Migrated from github.com)

Advances #175. Supersedes the stale implementation transaction in #212 without rewriting shared history.

RAGE result

Recovered from canonical main 267697bef10a3fffff7c093e1435ece770e7444b; current exact candidate head is 1dc3fc0f4f8b4e6dd51819e744e57af0cb70c63d.

The stale #212 implementation predated #172's compiler-authenticated delegation semantics and also had a timeout-default precedence regression. #221 ports the deadline policy onto the current authenticated rlm_subagent path and preserves existing role/skill/source provenance.

Runtime contract

  • optional model timeout_seconds on the existing rlm_subagent tool;
  • host-owned default / maximum / cleanup grace;
  • omitted request uses the trusted default;
  • explicit positive request may narrow/extend only up to the host maximum;
  • zero/negative and over-maximum values fail through structured timeout-policy results before child creation;
  • non-number timeout and model attempts to set host policy/budget keys are rejected by the closed tool schema;
  • only child completion_budget.time_limit is replaced; token/model/tool/context/depth/concurrency/cost/output ceilings remain host-owned;
  • outer tool/supervised-call limits are host safety envelopes sized from approved maximum + cleanup grace;
  • timeout provenance is additive in the typed subagent envelope;
  • Future await timeout and cancellation remain distinct from task execution deadline;
  • timeout cleanup leaves no normal child work running indefinitely.

No second scheduler, authority path, delegation implementation, or downstream product logic was introduced.

TDD / adversarial evidence

The new deadline-specific suite is part of the canonical deterministic corpus. Its first exact-head run exposed two incorrect test assumptions for zero/negative values: #175 explicitly requires the structured subagent_error{phase:timeout_policy,kind:invalid_timeout} result before spawn, not an outer schema error. The tests were corrected to assert that exact expected failure while remaining green; non-number and closed-schema policy injection still require schema rejection. Production behavior was not weakened to satisfy the test.

The acceptance matrix covers omitted/default, explicit override, over-max, zero, negative, non-number, schema shape, host-policy ownership, non-time budget preservation, structured completion timeout, capability non-widening, waiter-vs-task timeout separation, and child cleanup. Required public behavior is documented in docs/agent-runtime.md, docs/completion-runtime.md, and docs/async-runtime.md; design/research remains in research/RLM-RESEARCH-026-task-deadlines.org.

Exact-head verification

Exact head 1dc3fc0f4f8b4e6dd51819e744e57af0cb70c63d is green for every returned required workflow:

  • canonical CI deterministic suite: 79 suites / 900 discovered / 900 passed / 0 failed / 0 timeout / 0 blocked / 0 fixme;
  • deterministic benchmark/conformance: 16/16 passed;
  • deterministic deep-recursion experiment: 15/15 passed;
  • credential-free CLI/trace + fresh-process graph/artifact restart + whitespace gates;
  • credential-backed REAL OpenRouter core, structured repair, benchmark, depth 0/1/2, and CLI smoke;
  • pinned Paid OpenRouter;
  • Nix flake;
  • clean SWI pack install;
  • Tree-sitter FFI.

GitHub currently reports this PR mergeable. It is based directly on current main with behind_by:0. There are no submitted reviews, PR conversation comments, or unresolved review threads.

Non-goals / follow-up

A separate generic tool-schema gap was observed: rlm_tool does not currently enforce numeric exclusiveMinimum during invocation validation even when it is present in declarative schema data. #175 does not require zero/negative values to fail specifically at schema phase because it already mandates the host-owned timeout-policy rejection before spawn. That generic schema-feature gap should be scoped/TDD'd separately rather than smuggled into this deadline transaction.

This PR does not close broader supervised parent resume/replan work and does not touch Agent Zero or AgentProlog product composition.

Advances #175. Supersedes the stale implementation transaction in #212 without rewriting shared history. ## RAGE result Recovered from canonical `main` `267697bef10a3fffff7c093e1435ece770e7444b`; current exact candidate head is `1dc3fc0f4f8b4e6dd51819e744e57af0cb70c63d`. The stale #212 implementation predated #172's compiler-authenticated delegation semantics and also had a timeout-default precedence regression. #221 ports the deadline policy onto the current authenticated `rlm_subagent` path and preserves existing role/skill/source provenance. ## Runtime contract - optional model `timeout_seconds` on the existing `rlm_subagent` tool; - host-owned default / maximum / cleanup grace; - omitted request uses the trusted default; - explicit positive request may narrow/extend only up to the host maximum; - zero/negative and over-maximum values fail through structured timeout-policy results before child creation; - non-number timeout and model attempts to set host policy/budget keys are rejected by the closed tool schema; - only child `completion_budget.time_limit` is replaced; token/model/tool/context/depth/concurrency/cost/output ceilings remain host-owned; - outer tool/supervised-call limits are host safety envelopes sized from approved maximum + cleanup grace; - timeout provenance is additive in the typed subagent envelope; - Future await timeout and cancellation remain distinct from task execution deadline; - timeout cleanup leaves no normal child work running indefinitely. No second scheduler, authority path, delegation implementation, or downstream product logic was introduced. ## TDD / adversarial evidence The new deadline-specific suite is part of the canonical deterministic corpus. Its first exact-head run exposed two incorrect test assumptions for zero/negative values: #175 explicitly requires the structured `subagent_error{phase:timeout_policy,kind:invalid_timeout}` result before spawn, not an outer schema error. The tests were corrected to assert that exact expected failure while remaining green; non-number and closed-schema policy injection still require schema rejection. Production behavior was not weakened to satisfy the test. The acceptance matrix covers omitted/default, explicit override, over-max, zero, negative, non-number, schema shape, host-policy ownership, non-time budget preservation, structured completion timeout, capability non-widening, waiter-vs-task timeout separation, and child cleanup. Required public behavior is documented in `docs/agent-runtime.md`, `docs/completion-runtime.md`, and `docs/async-runtime.md`; design/research remains in `research/RLM-RESEARCH-026-task-deadlines.org`. ## Exact-head verification Exact head `1dc3fc0f4f8b4e6dd51819e744e57af0cb70c63d` is green for every returned required workflow: - canonical CI deterministic suite: **79 suites / 900 discovered / 900 passed / 0 failed / 0 timeout / 0 blocked / 0 fixme**; - deterministic benchmark/conformance: 16/16 passed; - deterministic deep-recursion experiment: 15/15 passed; - credential-free CLI/trace + fresh-process graph/artifact restart + whitespace gates; - credential-backed REAL OpenRouter core, structured repair, benchmark, depth 0/1/2, and CLI smoke; - pinned Paid OpenRouter; - Nix flake; - clean SWI pack install; - Tree-sitter FFI. GitHub currently reports this PR mergeable. It is based directly on current `main` with `behind_by:0`. There are no submitted reviews, PR conversation comments, or unresolved review threads. ## Non-goals / follow-up A separate generic tool-schema gap was observed: `rlm_tool` does not currently enforce numeric `exclusiveMinimum` during invocation validation even when it is present in declarative schema data. #175 does not require zero/negative values to fail specifically at schema phase because it already mandates the host-owned timeout-policy rejection before spawn. That generic schema-feature gap should be scoped/TDD'd separately rather than smuggled into this deadline transaction. This PR does not close broader supervised parent resume/replan work and does not touch Agent Zero or AgentProlog product composition.
lost-rob0t commented 2026-08-27 02:28:10 +00:00 (Migrated from github.com)

Backlog merge reconciliation on current main found a real cross-PR interaction with merged #237. Replayed candidate 57effae551d183b205cb86ec4837960141ac5e77 failed only two deterministic assertions: zero/negative timeout_seconds now fail earlier at schema preflight because #237 enforces numeric exclusiveMinimum, so the old tests expecting the host timeout_policy phase were stale. Runtime/live OpenRouter passed. I updated only those two expectations to assert malformed/schema rejection before spawn; new exact candidate is 34c769885eb970dfbf0bda68438e37a4b497b6f6. Fresh exact-head workflows are running; do not merge unless the complete matrix is green.

Backlog merge reconciliation on current `main` found a real cross-PR interaction with merged #237. Replayed candidate `57effae551d183b205cb86ec4837960141ac5e77` failed only two deterministic assertions: zero/negative `timeout_seconds` now fail earlier at schema preflight because #237 enforces numeric `exclusiveMinimum`, so the old tests expecting the host `timeout_policy` phase were stale. Runtime/live OpenRouter passed. I updated only those two expectations to assert malformed/schema rejection before spawn; new exact candidate is `34c769885eb970dfbf0bda68438e37a4b497b6f6`. Fresh exact-head workflows are running; do not merge unless the complete matrix is green.
Sign in to join this conversation.
No description provided.