Skip to content

docs(#945): task-shape demotion map as pre-postcard work product - #991

Merged
vybe merged 1 commit into
devfrom
docs/945-task-demotion-map
Jun 2, 2026
Merged

vybe merged 1 commit into
devfrom
docs/945-task-demotion-map

Conversation

@obasilakis

Copy link
Copy Markdown
Contributor

Summary

Pre-postcard work product for #945 (actor-model envelope + journal spec). Walks each of the 15 fields on ParallelTaskRequest and decides where it should live under the actor model — session attribute, envelope header, out-of-band reference, or quarantined task_overrides sub-object — and sequences the work into 6 small reversible PRs.

The premise: #945 can't fit on a postcard while the task payload 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

  • New: docs/planning/ACTOR_MODEL_TASK_DEMOTION_MAP.md — field-by-field demotion table, 6-PR sequence (cheap → medium → hard), decision gate criteria.
  • Cross-link from TARGET_ARCHITECTURE.md §Key Open Questions Fix: Add missing Docker labels to system agent container #1.
  • Cross-link from 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-task model (→ session attribute), move files to out-of-band reference (FILES-001 volume already exists).

Medium (feature decision): collapse async_mode (→ ?wait=true edge adapter), quarantine allowed_tools/system_prompt/max_turns into task_overrides sub-object (audit max_turns for 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 envelope session_id field 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

  • Review cross-links resolve correctly in rendered markdown
  • Spot-check that each "current owner / feature" claim in the table matches a real call site (verified during draft against routers/chat.py, services/fan_out_service.py, services/task_execution_service.py, services/backlog_service.py)
  • No code changes — purely a design document

Refs #945, #946, #927

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.
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

⚠️ Nightly unit-suite check skipped — merge conflict against dev.

Resolve by running git merge dev locally and pushing the result. The next nightly run will re-test once the conflict is gone.

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@vybe
vybe merged commit 7627b9b into dev Jun 2, 2026
13 checks passed
obasilakis added a commit that referenced this pull request Jun 4, 2026
…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.
vybe pushed a commit that referenced this pull request Jun 8, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants