Skip to content

Register taskDrive with Cordis provide - #1121

Merged
Birfy merged 1 commit into
mainfrom
cursor/task-drive-provide-deab
Oct 25, 2026
Merged

Birfy merged 1 commit into
mainfrom
cursor/task-drive-provide-deab

Conversation

@Birfy

@Birfy Birfy commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Written-by: Dev

Owner: Dev
Reviewer: Reviewer

Fixes #1120

What changed

Startup on a real Cordis host died in task-drive.js with cannot set property "taskDrive" without provide, before any Bot loaded, so the UI stayed on "Setting up your Main Bot…". The handle is now registered with provide (then reflect.provide, set, or a plain write), the same path as flybot. ctx.taskDrive.settled(), .consider(), and .now still work.

This unblocks live use of #1115 / #1109.

Verification at the tip

Tip SHA: e0df95180275484b2cc90cd2e88f72db8c48945d

Red at base a188fa2 (defect test, source still the bare assignment): TZ=UTC node --import ./test/harness-resolve.mjs --test --test-name-pattern 'Cordis context provides taskDrive' test/task-drive.test.js — 1 fail, cannot set property "taskDrive" without provide at task-drive.js:224.

Ran at the tip:

  • TZ=UTC node --import ./test/harness-resolve.mjs --test test/task-drive.test.js — 20 pass, 0 fail
  • TZ=UTC npm test in core/ — 1469 pass, 0 fail
  • TZ=UTC npm test in plugins/social, plugins/tree, plugins/timeline — 485, 125, and 125 pass, 0 fail
  • TZ=UTC npm run lint in core/ — oxlint warnings match the existing set; no new warning in the touched files
  • ARCH_DOCS_BASE=origin/main npm run arch-docs in core/ — OK (6 changed files)
  • node scripts/build-client.mjs --check in core/ — ok
  • node scripts/ds-bot-patches.mjs generate && node scripts/ds-bot-patches.mjs check — ok
  • node .github/scripts/changelog.mjs check — 31 fragments well formed
  • git diff origin/main...HEAD --stat lists only the six files in this change

Not run (and why):

  • Smoke bench (dev/bench.sh): no deepseek-harness checkout beside this repo
  • CI package extras (typecheck, actionlint, pack) and .github/scripts / interop / live-e2e tests: not part of this diff
Open in Web Open in Cursor 

A live context refuses the bare ctx.taskDrive write, so startup dies
before any Bot loads. Register the handle the same way as flybot.

Fixes #1120

Co-authored-by: Danyang Chen <birfychen@gmail.com>
@Birfy Birfy added agent-pr Pull request opened by an agent area:automation Scheduled tasks and automation bug Something isn't working labels Oct 25, 2026 — with Cursor
@Birfy Birfy self-assigned this Oct 25, 2026
@Birfy

Birfy commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at e0df951
Written-by: Reviewer

Ran:

  • node .github/scripts/risk-gate.mjs --pr 1121 --repo ThinkFlowLab/FlyBot → pass, risk-tier: T2; basis: core/src/host/task-drive.js=T2, changelog.d/1120.fixed.md=T1, core/test/task-drive.test.js=T1, patches/ds-bot/files/src/host/task-drive.js=T1, patches/ds-bot/files/test/task-drive.test.js=T1, docs/subsystems/core-host.md=T0
  • TZ=UTC node --import ./test/harness-resolve.mjs --test test/task-drive.test.js (core/, this tip, Node v22.23.4) → 20 pass, 0 fail
  • defect test on base a188fa2 (tip test file only; task-drive.js still the bare assignment): TZ=UTC node --import ./test/harness-resolve.mjs --test --test-name-pattern 'Cordis context provides taskDrive' test/task-drive.test.js → 1 fail, cannot set property "taskDrive" without provide at task-drive.js:224 inside createRuntime
  • TZ=UTC npm test (core/, this tip) → 1469 pass, 0 fail
  • TZ=UTC npm run lint (core/) → exit 0; oxlint warnings are the existing set, none in the files this pull request touches; arch-docs OK (6 changed files)
  • node scripts/build-client.mjs --check (core/) → exit 0
  • ARCH_DOCS_BASE=origin/main npm run arch-docs (core/) → OK (6 changed files)
  • node scripts/ds-bot-patches.mjs check → ok (core equals ds-bot + patches)
  • node .github/scripts/changelog.mjs check → 31 fragments well formed
  • git diff origin/main...HEAD --stat → only the six files in this change; merge-base a188fa2

Not run:

  • Smoke bench (dev/bench.sh) and a live dsh web start — no deepseek-harness checkout beside this repo. The Cordis test loads @deepseek-ai/cordis from the test harness and runs createRuntime inside root.plugin apply.
  • Plugin suites (plugins/social, plugins/tree, plugins/timeline) locally. CI at this tip reports them green; that CI result is not this review's Ran.
  • Node 24 locally (this run used Node v22.23.4). The CI job ubuntu-latest · Node 24 · DSH 0.2.0-rc.2 is green at this tip; not re-run here.
  • Package extras locally (typecheck, actionlint, pack).
  • Did not merge and did not enqueue.

Acceptance

  1. On a Cordis plugin fiber, createRuntime no longer throws cannot set property "taskDrive" without provide. The same test throws that error at task-drive.js:224 on base a188fa2 and passes at this tip.
  2. install registers with ctx.provide, then ctx.reflect.provide, then ctx.set, then a plain write — the same order as provideFlyBot in core/index.js.
  3. Existing tests still call ctx.taskDrive.settled(), .consider(), and set .now. The fake context has set, which assigns the property. The new test reads those three on pluginCtx.taskDrive after provide.
  4. The diff is six files: the host module, its test, the core-host subsystem note, the changelog fragment, and the two generated patch copies. git diff origin/main...HEAD --stat lists nothing else.

Risks

T2 (core/src/host/task-drive.js). enqueue-guard is red at this tip only because no Verifier report names it yet (do not enqueue #1121: no Verifier report names the tip e0df951). tests-ok is green on the pull request page. This report is not merge authority and does not enqueue.

Gaps

No actionable findings. reflect.provide and the plain property write are not separately asserted for taskDrive; they are the same ladder as provideFlyBot, and the fake context used by the rest of the file takes the set branch. Security fence and display-name checks are out of scope: the diff does not touch delivery, fencing, or model-visible remote strings.

This PASS is not a merge and not an enqueue.

@github-actions github-actions Bot added the pass label Oct 25, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit 55d0e6e Oct 25, 2026
12 of 13 checks passed
@Birfy
Birfy deleted the cursor/task-drive-provide-deab branch October 25, 2026 06:29
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:automation Scheduled tasks and automation bug Something isn't working pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Live startup fails: taskDrive is assigned without Cordis provide

2 participants