docs(delegation): describe the terminal background lifetime honestly instead of promising restart durability #136143
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.55) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 550 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.378
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #136143"
general
weight: 0.35
PRATHAMESH75
What does this PR do?
The "Lifetime and Durability" section of the delegation guide listed
terminal(background=True, notify_on_complete=True)under "durable execution that must survive session closure or process restart". That promise contradicts the actual lifecycle:process_registry.kill_all(source="gateway_shutdown")(gateway/run_shutdown.py), andgateway_shutdownis not in_LIFECYCLE_KILL_SOURCES(tools/process_registry.py), so every tracked process is killed — evenpersist_on_release=Truesessions that survive session close.tools/process_registry_checkpoint.py), i.e. stdout cannot be reconnected.The docs now keep
cronjobas the single durable-execution option and describe honestly what the terminal background path survives: past the turn that started it always; session close/reset, compression and error recovery only withpersist_on_release=True; never a gateway shutdown. Code is unchanged — this is a documentation-only correction aligning the guide with the implementation.Related Issue
Fixes #136133
Type of Change
Changes Made
website/docs/user-guide/features/delegation.md— removedterminal(background=True, notify_on_complete=True)from the "durable execution" list and replaced it with a paragraph stating its real lifetime (turn end always; owner close/compression/error recovery only withpersist_on_release=True; graceful gateway shutdown kills every tracked process; crash adoption is detached with no stdout) and pointing restart-proof work atcronjob.How to Test
1. Read the rendered "Lifetime and Durability" section (
website/docs/user-guide/features/delegation.md) —:::container pairing is intact (4 opens / 4 closes) and the section renders as before with the corrected wording.2. Cross-check each claim against code on
main:gateway/run_shutdown.py(kill_all withsource="gateway_shutdown"),tools/process_registry.py_LIFECYCLE_KILL_SOURCES(nogateway_shutdownmember),tools/terminal_tool.pypersist_on_releasesemantics,tools/process_registry_checkpoint.pydetached recovery.3. Observed result:
python scripts/checkpasses — "11 checks, ok" (docs-only diff; no Python path touched).Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass — N/A: documentation-only change, no code path affectedpython scripts/checkpasses (the blocking lint and code-health checks CI runs)Documentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A