Skip to content

docs(feature-divide): durable-turn ownership row (H23) - #929

Merged
btipling merged 2 commits into
mainfrom
plan/h23-feature-divide-durable-turn
Sep 3, 2026
Merged

docs(feature-divide): durable-turn ownership row (H23)#929
btipling merged 2 commits into
mainfrom
plan/h23-feature-divide-durable-turn

Conversation

@btipling

@btipling btipling commented Sep 3, 2026

Copy link
Copy Markdown
Owner

What

Living-doc update to docs/feature-divide.md only (plan issue #817, backend-agents H23).

Extends the Workflow run/step (backend-agents) ownership row to make the durable-turn ownership explicit and timeless:

  • The Workflow run owns the turn — the durable turn owner, independent of any attached viewport.
  • Tools are steps — one 'use step' = one model round or one tool execution or one persist; never a mega-step, never wrap runAgentStream in a single step.
  • The worker is the Blob writer — when the viewport is detached the worker persists the transcript/checkpoint segment to Blob itself (detach only closes a reader; it never stops the run).

DoD verification

DoD row Status
Workflow run/step row states Workflow-owns-turn + tools-as-steps + worker Blob writer ✅ added (this PR)
Stop/cancel row: unmount/switch/New/Clear/logout = detach only; Stop on attached run = server cancel (POST /api/turns/:runId/cancel) ✅ already present (G22 / PR #927) — no change needed
/api/agent restated as legacy test/JSON path; production uses POST /api/turns (D17 shipped), not a pending cutover ✅ already present — no change needed
Docs-only, no test gate, no application code
Timeless — no issue archaeology

The Stop/cancel and /api/agent rows already satisfied the DoD from prior work (G22 #816 / PR #927, D17 #811), so this PR only fills the genuine gap: the Workflow-row ownership/granularity/Blob-writer language.

Gates

Docs-only change (docs/, *.md) — no test gates per the repo scope table. No typecheck/vitest/build run (nothing to compile).

Links

Extend the Workflow run/step row to make the durable-turn ownership
explicit and timeless: the Workflow run owns the turn; tools are steps
(one 'use step' = one model round OR one tool execution OR one persist,
never a mega-step); the worker is the Blob writer (persist/checkpoint
segment) when the viewport is detached.

Stop/cancel (detach != cancel, cancel = G22) and the /api/agent legacy
truth (post-D17) were already present; no change needed there.

Docs-only; no test gate.

Fixes #817
Refs #794
@btipling btipling self-assigned this Sep 3, 2026
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
invincible Ignored Ignored Sep 3, 2026 4:48am UTC

Request Review

@btipling btipling left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Adversarial review — PR #929

Verdict: PASS WITH NOTES
Repo: btipling/invincible
Scope: main ← plan/h23-feature-divide-durable-turn · 1 file · docs-only living-doc (H23 / #817)
Lenses run: L7 L8 (skip: L1–L6 L9 — no application/UI/CI code; L2 — no secrets/workflows/auth change; L4 — no deploy paths)
AGENTS.md read: yes (plus docs/architecture.md, lib/workflows/toolExecuteStep.ts, lib/agent/turnWorkerPersist.ts, Stop/cancel + /api/agent rows on head)

Findings

Sev Lens Finding Break scenario Refutation attempt Confidence
Minor L8 Workflow row says one 'use step' = “one tool execution”. Code + docs/architecture.md define the tool boundary as toolExecuteStep: one step for one model round’s toolCalls (waves/Promise.all inside), not one step per tool call. An implementer following the new sentence 1:1 wraps each tool in its own 'use step', breaks in-step wave parallelism / maxRetries = 0 batch semantics, and diverges from modelGenerateStep · toolExecuteStep · persistStep. Defender: plan #817 DoD uses the same shorthand; “tools are steps” still bans mega-runAgentStream. Fails as living-doc accuracy: architecture already has the precise antonym table; feature-divide should not reintroduce the looser “one tool execution” reading. high

Residual risk

Stop/cancel (G22 await-ack) and /api/agent legacy (post-D17) rows are already correct on this branch — no gap there. Session-list row still says the DOM host drives client→Blob upload; that coexists with worker Blob turn-segment persist (turnWorkerPersist / persistStep) — complementary scopes, not a contradiction, but easy to conflate if someone skims only one cell.

Merge guidance

  • PASS WITH NOTES: safe to merge from this attack; optional wording fix below.
  • No Blockers/Majors. Docs-only; no test gate expected.

What was not attacked

Live Workflows Observability; full turnLoop runtime; browser harness.

Suggested fix punch list

File / area Expected behavior Acceptance criteria
docs/feature-divide.md Workflow run/step cell Replace “one tool execution” with the real step unit: one 'use step' = one model round or one toolExecuteStep (one model round’s toolCalls / waves) or one persist — still never a mega-step / never wrap runAgentStream. Sentence matches docs/architecture.md + toolExecuteStep.ts header; no “one tool call = one step” reading; timeless (no issue ids).

Align the Workflow run/step cell with architecture.md and toolExecuteStep:
one 'use step' is one model round, one toolExecuteStep (that round's
toolCalls / waves), or one persist — never one tool execution.

Co-authored-by: Bjorn <btipling@users.noreply.github.com>

@btipling btipling left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Adversarial re-review — PR #929 @ faa4146

Verdict: PASS WITH NOTES → clean enough (prior Minor closed)
Scope: Fixer round-1 docs wording only

Claim checklist

Claim Result
Step grain is toolExecuteStep (one round’s toolCalls / waves), not one tool call PASS — cell now reads one 'use step' = one model round or one toolExecuteStep (one model round's toolCalls / waves) or one persist; mega-step / runAgentStream ban retained
Keep Workflow-owns-turn + worker Blob writer; timeless PASS

No new findings. Optional residual (non-blocking): DOM-host Blob upload vs worker turn-segment Blob remains two scopes across rows — already accurate if both cells are read.

Merge guidance

Safe to merge from this attack, subject to Bjorn’s call. Not merging from Reviewer.

@btipling
btipling merged commit 67313fb into main Sep 3, 2026
3 checks passed
@btipling
btipling deleted the plan/h23-feature-divide-durable-turn branch September 3, 2026 04:53
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.

backend-agents H23: docs/feature-divide.md durable-turn ownership row

1 participant