← Back to Pull requests

docs: verify the workflow state docs against main (#3522) #6055

Merged
BigDataDZ merged 2 files (16 lines) on Oct 11, 2026 12:30 UTC
View on GitHub
BigDataDZ BigDataDZ commented on Oct 10, 2026 13:21 UTC
Author

Summary

The Workflow state group of the #3522 docs-verification campaign — with the same kind of scope correction the Managed workspace pass needed: two of the group's four documents no longer exist.

  • session-task-ledger-lifecycle.md was removed by #4351 (SessionTodo Runtime Host authority cutover). The tracking issue's pointer is doubly stale: the workflow_task_ledger_events table it cited was itself dropped in #4400 (workflow schema 12), and the successor docs/session-todo-lifecycle.md already documents the removal. Nothing should be recreated.

  • deep-research-durable-workspace.md was removed by #5554 (Deep Research retirement). workflow_deep_research_events survives only as a read-only legacy table ("the research writer is retired, but its stored events must survive upgrades" — sqlite-workflow-schema.ts).
  • This PR therefore verifies the two surviving documents; the tracking issue's group checklist needs the same correction.

    Verification results

    Both surviving documents verified clean against main:

  • work-board-contract.md: PASS — the DDL in the doc matches sqlite-workflow-schema.ts field-for-field, the workflow schema 8→9 migration history is accurate, page-size constants (WORK_BOARD_DEFAULT_PAGE_SIZE=50/MAX=100), WORK_BOARD_MAX_LINKED_SESSIONS=1, the workBoard:linkSession mutation boundary, and both test paths all check out. One bullet referencing the retired task-ledger table now notes the removal (#4400).

  • scheduled-task-unified.md: PASS — all eight key files exist, HostScheduledTaskCoordinator, the workflow_scheduled_tasks/workflow_scheduled_task_fires tables (including the unique fire-claim constraint), both protocol methods and their preload allowlist entries, the four effect types, and the Desktop native-delivery path all check out against recent scheduled-task commits. The retired "separate Headless runtime" wording now describes standalone headless invocation as Host-owned execution — maka run dispatches through runRuntimeHostTextCli to a Runtime Host, and the Eval harness drives the same interactive composition (INTERACTIVE_RUNTIME_HOST_COMPOSITION_ID) from an isolated Eval state root; neither path has a separate execution authority.
  • Both documents gain translation_status/last_verified front matter per the campaign convention (license comment directly after the closing delimiter, per the ASF source-header policy — the same check that flagged #6038/#6043).

    Metadata-only plus two sentences; no code paths touched.

    Refs #3522

    AI use

    Select exactly one:

  • No generative tool made a substantive contribution

  • Generative tooling made a substantive contribution
  • Tool(s) and scope: ZCode (GLM). Ran the doc-vs-code verification pass and drafted the corrections; the human contributor reviewed the findings and owns the result. Commits carry Generated-by: ZCode.

    Diff: 16 lines (+14 / -2) across 2 files Reviewer: Astro-Han Review duration: 1389m
    All Vouch review confidence checks passed
    Residual risk 0.02 = Change Risk (0.21) × (1 − Review Confidence (0.93)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.21 · 16 lines diff across 2 files
    0.21
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.98 · 2 substantive comment(s)
    0.98
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    92%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.170
    Real PR Conversation Timeline
    6 items
    Astro-Han Astro-Han commented on code on Oct 10, 2026 13:37 UTC
    Code Review
    docs/architecture/scheduled-task-unified.md:1
    @@ -72,7 +76,8 @@ Scheduled tasks keep Runtime Host resident even when the initiating client exits
     requires no Desktop. Local and bot notifications wait durably for a native-effect provider before
     crossing the delivery boundary. Once invocation starts, an unknown outcome is recorded as failed
     and is never replayed. Other interactive clients can create and manage the global catalog through
    -the same Host protocol. The separate Headless runtime is outside this interactive authority boundary.
    +the same Host protocol. Standalone headless invocation (scripts and CI) runs through the minimal

    P2: Non-interactive invocation does not use a separate Eval kernel. maka run dispatches to runRuntimeHostTextCli and a Host session driver; the Eval Maka subject calls runHostedExecution, which selects INTERACTIVE_RUNTIME_HOST_COMPOSITION_ID and sends hosted.execution.start. Please describe these Host-owned execution paths and distinguish an isolated Eval State Root from independent execution authority before marking this document verified.

    Astro-Han Astro-Han commented on Oct 10, 2026 13:37 UTC
    Reviewer

    Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.

    P2 — Correct the headless execution authority before marking the scheduled-task document verified (docs/architecture/scheduled-task-unified.md:79–80). The replacement sentence says standalone scripts/CI run through a minimal Eval kernel outside the interactive Host boundary. Current maka run instead dispatches to runRuntimeHostTextCli (packages/cli/src/cli-core.ts:211–221), connects to a Runtime Host, and builds a Host session driver. The Eval Maka subject likewise calls runHostedExecution (packages/eval/src/harbor-maka-subject.ts:69); that client explicitly selects INTERACTIVE_RUNTIME_HOST_COMPOSITION_ID and sends hosted.execution.start (packages/runtime-host/src/client/hosted-execution.ts:75–85,163). Non-interactive presentation does not give either entry point a separate execution authority. Distinguish an isolated Eval State Root from an independent kernel, and describe the actual Host-owned execution paths.

    The Work Board schema/index definitions, semantic patches, pagination, link validation/CAS, and documented renderer-only retry limitation match the current implementation. The ScheduledTask claim identity, recovery, native-provider wait/no-replay behavior, protocol allowlist, and cited file paths also check out. The two retired documents remain absent; their removals and retained legacy research table do not justify recreating them.

    Verification: clean dependency installation and patches, normal build:test, 221 tests across 12 complete contract/storage/Host/CLI/Desktop files, and the source-header check passed. A targeted probe through the production hosted-execution client observed maka.interactive and hosted.execution.start; its connection was substituted, not a live provider. The docs-only diff changes no schema or protocol epoch. At f587fd8f10f68147b623387ecd546800c3b2d87b, CI test is successful and the PR merges cleanly with main 16a8f5b8.

    No real cloud model, native notification delivery, or full repository test suite was exercised. Passing CI does not validate the incorrect architecture statement above.

    BigDataDZ BigDataDZ commented on Oct 10, 2026 18:03 UTC
    Author

    Fixed in the follow-up commit — the sentence now says standalone headless invocation stays under the same Host-owned authority: maka run dispatches through runRuntimeHostTextCli to a Runtime Host, and the Eval harness drives the same interactive composition (INTERACTIVE_RUNTIME_HOST_COMPOSITION_ID) from an isolated Eval state root. The "minimal Eval kernel" wording is gone; the isolated-state-root vs separate-authority distinction is stated explicitly.

    Astro-Han Astro-Han commented on Oct 10, 2026 19:13 UTC
    Reviewer

    Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.

    The previous P2 is fixed at c2fb03c1d0aee34362ec19dde96af2c26113627a. docs/architecture/scheduled-task-unified.md:79–82 now correctly describes maka run as Runtime Host-owned execution and Eval as the same interactive composition operating from an isolated State Root. cli-core.ts:211–221 dispatches to runRuntimeHostTextCli, while harbor-maka-subject.ts:69–85 calls runHostedExecution; that client selects INTERACTIVE_RUNTIME_HOST_COMPOSITION_ID and sends hosted.execution.start. An isolated root is no longer incorrectly described as a separate execution authority.

    I found no new P0–P2 issue or documentation regression in this update. Relative to f587fd8f10f68147b623387ecd546800c3b2d87b, only this paragraph changed (+4/−2); the base, Work Board document, production code, dependency lockfile, and tests are unchanged.

    P3 — Update the PR description to match the correction. Its Summary/Verification wording still says the replacement points at a “minimal Eval kernel.” The final document instead describes Host-owned CLI/Eval execution. This is stale description text, not an unresolved implementation or document-authority defect.

    Validation on this head: fresh dependencies and patches, the normal clean build:test, 149 passing tests with no skips across 10 complete contract/storage/Host/CLI/Eval files, and the ASF header check. The hosted-execution probe observed maka.interactive and hosted.execution.start with a substituted connection; the Eval initialization test used a local fixture service, not a live cloud model. I did not run the whole repository suite or real native notification delivery.

    There is no schema or protocol change; epoch 215 is inherited from main. This head merges cleanly with main 16a8f5b8445ee0fca2c170aa02943d73fb73af6c, and CI run 38074227823 is successful for this exact head. GitHub reports MERGEABLE; its overall merge state is still BLOCKED.

    Astro-Han Astro-Han approved these changes on Oct 11, 2026 12:30 UTC
    Approved Reviewer

    Approved at @Astro-Han's explicit request: the automated review of this exact head found no blocking (P0–P2) issues, and CI is green.

    Reviewers
    Assignees
    BigDataDZ BigDataDZ
    Labels
    risk: low confidence: 92.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 21.4% (LOW) · Higher = larger blast radius
    21.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 92.7% · Lower = rushed or shallow review
    92.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 2% · Safe to merge
    2%
    Repository