Repository navigation
docs(#945): task-shape demotion map as pre-postcard work product - #991
Conversation
The actor-model postcard (#945) can't fit honestly while ParallelTaskRequest carries 15 fields with 12 mutually-conditional optionals. This document walks each field and decides where it should live — session attribute, envelope header, out-of-band storage, or quarantined task_overrides sub-object — and sequences the work into 6 small reversible PRs. If PRs 1-5 land cleanly and PR 6's session-id unification survives review, the postcard becomes a 30-minute writeup. If PR 6 turns up irreducible session/causation complexity, the fit-test has failed honestly and the incremental Sprint D' path remains the best direction. Cross-linked from TARGET_ARCHITECTURE.md §Key Open Questions #1 and ORCHESTRATION_RELIABILITY_2026-04.md §Pre-experiment artifact.
|
Resolve by running |
vybe
left a comment
There was a problem hiding this comment.
Approved via /validate-pr. Docs-only, targets dev, security-clean, CI green, and the models.py:84-99 anchor is accurate. Aligns with the orchestration-simplification direction as an additive design instrument.
Non-blocking nit (no need to hold the merge): the doc says "15 fields / 12 of 15 optional," but current ParallelTaskRequest has 14 fields, 13 optional (message is the lone required one). Since the doc's value is a complete per-field demotion table, worth reconciling the count (or noting which field changed since drafting) in a later edit.
…demotion PR 1) First of the six task-shape demotions from docs/planning/ACTOR_MODEL_TASK_DEMOTION_MAP.md. The per-task ParallelTaskRequest.timeout_seconds override is deprecated — the agent's execution_timeout_seconds (#665) / schedule cap (#913, clamped to the agent cap by #929) is the authoritative deadline. - routers/chat.py: _resolve_deprecated_task_timeout() normalizes the override once at /task entry — clamps it to the agent cap (closing the prior unclamped escape around the #929 invariant that schedules already respect) and emits a deprecation warning on any use. The common no-override path is unchanged and skips the cap lookup. - models.py / MCP chat_with_agent: mark the field DEPRECATED in its surface. - tests: hermetic unit coverage of the clamp / warn / pass-through branches (AST-extracts the pure helper to avoid the router's heavy import graph). Honored-but-clamped this release; field removed in a follow-up after one release of soak (additive-first). Refs #945, #991.
…demotion PR 1) (#1070) Deprecates the per-task `timeout_seconds` override on `ParallelTaskRequest` — the agent's `execution_timeout_seconds` (#665) / schedule cap (clamped by #929) is the authoritative deadline. Additive-first: honored-but-clamped this release (closing the pre-#1068 unclamped escape around the #929 agent-cap invariant), field removed in a follow-up after one release of soak. Durable Redis day-counter backs the deletion soak gate. First of the six task-shape demotions (ACTOR_MODEL_TASK_DEMOTION_MAP.md, #991). Rebased onto dev and conflict in routers/chat.py resolved (both sides added independent module-level helpers; kept both). Unit suite green (5 passed). Closes #1068. Part of #945.
Summary
Pre-postcard work product for #945 (actor-model envelope + journal spec). Walks each of the 15 fields on
ParallelTaskRequestand decides where it should live under the actor model — session attribute, envelope header, out-of-band reference, or quarantinedtask_overridessub-object — and sequences the work into 6 small reversible PRs.The premise: #945 can't fit on a postcard while the
taskpayload carries 12 mutually-conditional optionals. Either we demote them first and #945 becomes a 30-minute writeup of what shipped, or we surface that the model genuinely can't fit — both are valid outcomes, but we should learn empirically rather than hand-wave.What's in here
docs/planning/ACTOR_MODEL_TASK_DEMOTION_MAP.md— field-by-field demotion table, 6-PR sequence (cheap → medium → hard), decision gate criteria.TARGET_ARCHITECTURE.md§Key Open Questions Fix: Add missing Docker labels to system agent container #1.ORCHESTRATION_RELIABILITY_2026-04.md§Pre-experiment artifact.The 6-PR sequence
Cheap (new home already exists): drop per-task
timeout_seconds(→deadline), drop per-taskmodel(→ session attribute), movefilesto out-of-band reference (FILES-001 volume already exists).Medium (feature decision): collapse
async_mode(→?wait=trueedge adapter), quarantineallowed_tools/system_prompt/max_turnsintotask_overridessub-object (auditmax_turnsfor dead-field deletion during this PR).Hard (touches every chat call site): unify the six session fields (
save_to_session,chat_session_id,resume_session_id,create_new_session,user_message,inject_result) under a single envelopesession_idfield plus causation_id semantics for self-execute injection.Decision gate
If PRs 1–5 land cleanly and PR 6's session-id unification survives review, the actor model is real and #945 ships. If PR 6 surfaces irreducible session/causation complexity the envelope can't absorb, the fit-test has failed honestly and Sprint D′ + the planned incremental path remains the best direction.
Test plan
routers/chat.py,services/fan_out_service.py,services/task_execution_service.py,services/backlog_service.py)Refs #945, #946, #927