Skip to content

client: a schedule card says which connectors its unattended run carries - #2344

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-schedule-connector-reach
Nov 4, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-schedule-connector-reach

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2323
Owner: Dev-1
Written-by: Dev-1
Reviewer: Birfy
Claim-Id: 29ebb349d6f74c4b9ebd5e3eb224ac6a
Branch: dev/1-schedule-connector-reach
Tip: 6ede482
Verified commit: 7d0ebca547b96c8b59b9812d8f3ee2755d1af178 (tree 03a8cd7604be0b15f75bfbb9a6bd160169d07bb1; the pushed head above is that same tree)
Tree: 03a8cd7604be0b15f75bfbb9a6bd160169d07bb1
Base: 7226d74
Diff: 9 files, +7946/−7455
Tier: T1
why: none — no T3 path, no diffPattern hit, no topic; lines 70 / files 5 (non-generated) / generated 4

What was wrong

A scheduled task fires with the reach its Bot has at that moment: turning Composio on for a Bot today changes what a task written weeks ago will use. No surface said so. The schedule row drew the timing and the room (timingText, in {name}) and stopped there, so the owner learned which connectors an unattended run carried only after the fact — or not at all, since a scheduled turn is not watched.

What changed

  • core/src/client/schedules.js — a new exported reachText(task, roster) answers what an unattended run would carry for that task: the Bot this task belongs to, looked up in the roster (byId first, then bots), then every connectedConnectors(roster) entry this Bot may use (isOn). A room task has no single Bot's switch and a Bot the roster no longer carries has no switch to read, so both answer '' rather than guessing. The row's hint is now built as one line from its parts (timing, room, reach) instead of filter(Boolean).join(' · ') on a fixed pair, so the timing half stays exactly what timingText answers (schedules: a repeat of 90s is shown and saved as 2 minutes, so editing a title silently rewrites it #1651).
  • core/src/client/i18n.js — Runs with {names} and Runs with no connectors, in English and Chinese.
  • core/test/schedules-client.test.js — five cases: two connected connectors with no per-Bot record read as both; a connector switched off for this Bot drops out; every connected connector off reads "Runs with no connectors"; a sender never appears; a room task says nothing.
  • docs/subsystems/core-client.md carries one sentence for the rule in the schedules.js row, and changelog.d/2323-schedule-connector-reach.added.md is the fragment.

Why the generated bundle moves so far

core/client.js and patches/ds-bot/** are what node scripts/ds-bot-patches.mjs generate writes at this tip; nothing here was hand-edited. canonical answers generate is a no-op, so the bytes are the generator's output.

The +1434/−1424 churn is not the size of the source change, and core/src/client/connector-bots.js is not tree-shaken away on the base: it is already imported by core/src/client/connectors.js:6 and core/src/client/bot-settings.js:13, and its block sits in the base core/client.js at about line 14060 (alias import_react27, 10 references). This change adds one import edge from schedules.js, and esbuild then emits that module ahead of schedules.js (tip: about line 5427, alias import_react6), so every alias from import_react6 through import_react27 shifts by exactly +1: 865 one-for-one hunks, +1434/−1424. All 22 aliases move by +1 and their reference counts are conserved (3398 = 3398 on both sides); no other alias family changes. Normalising the aliases and putting the connector-bots block back where it was leaves 4 hunks: the two i18n strings, reachText, and the two lines of the row's hint.

Red first (clean 7226d745, tests only)

core/test/schedules-client.test.js — 59 tests, 54 success + 0 cancelled + 5 failure:

  • #2323 a at :861 — expected 'Runs with GitHub, Composio', actual ''
  • #2323 b at :866 — expected 'Runs with GitHub', actual ''
  • #2323 c at :871 — expected 'Runs with no connectors', actual ''
  • #2323 d at :877 — expected 'Runs with GitHub, Composio', actual ''
  • #2323 e at :883 — reachText is not a function

After the fix the same file runs 59 tests, 59 success + 0 cancelled + 0 failure.

The five cases read the flattened fragments <Text> renders; none of them asserts the assembled hint line. That the timing half still answers exactly what timingText answers (#1651) is measured by a probe on this tip — the line reads … · Runs with …, and a missing part leaves no dangling separator — not by a case in this file.

Gates at this tip

  • TZ=UTC ARCH_DOCS_BASE=7226d7455ff10ecfcf6dd99e7d41ffd25f1b0133 npm run verify — exit 0, 4747 tests / 4747 success / 0 cancelled / 0 failure (core 2760, social 570, tree 132, timeline 140, workflow 411, scripts+policy 671, interop 37, live-e2e 26); arch-docs: OK (9 changed file(s)); core lint 74 warnings and 0 errors (74 is this base's own count — the same tree without this change reports it too), plugin lints 36 / 9 / 2 / 16 warnings and 0 errors, live-e2e 0 warnings and 0 errors.
  • node core/scripts/build-client.mjs --check — exit 0.
  • node scripts/ds-bot-patches.mjs check — ok ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5), ok 10 patches apply cleanly in order, ok core/ equals ds-bot/ + patches/ds-bot/.
  • node scripts/ds-bot-patches.mjs canonical — ok patches/ds-bot/ is what generate writes (generate is a no-op).
  • The changelog and testing-layers checks are the scripts+policy tests inside verify (changelog.d validity, ok 57).
  • lint:interop reports 1 warning — dev/interop/isolation/probe.mjs:130 no-unsafe-finally. The same warning is on the base tree, so it is pre-existing and does not block this change.

Not run

  • core/dev/smoke.mjs — the change is client-only (core/src/client/**); index.js and src/host/ are untouched.
  • The CI package job's pack, typecheck and actionlint steps — not part of npm run verify.

Checkpoint

{
"pr": 2344,
"claim": "Dev-1",
"issue": 2323,
"summary": "A scheduled task's row now names the connectors its unattended run will carry, read from the Bot's own switches at the moment the task fires rather than a copy stored with the task. A room task has no single Bot's switch and says nothing, and neither does a Bot the roster no longer carries. The reach reads connectedConnectors and isOn from connector-bots.js, so a sender and a webhook-only channel never appear and a missing per-Bot record means on. When every connected connector is off for that Bot the row reads "Runs with no connectors".",
"files": [
"core/src/client/schedules.js",
"core/test/schedules-client.test.js",
"core/src/client/i18n.js",
"docs/subsystems/core-client.md",
"changelog.d/2323-schedule-connector-reach.added.md"
],
"checks": {
"ran": "TZ=UTC ARCH_DOCS_BASE=7226d7455ff10ecfcf6dd99e7d41ffd25f1b0133 npm run verify",
"result": "green",
"at": "7d0ebca547b96c8b59b9812d8f3ee2755d1af178"
},
"next": "none \u2014 ready for review"
}

@HugoXK
HugoXK marked this pull request as draft November 4, 2026 03:24
@HugoXK

HugoXK commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Written-by: Dev-1

Tip 6ede482 · tree 03a8cd7604be0b15f75bfbb9a6bd160169d07bb1 · base 7226d74 · 9 files, +7946/−7455 · draft (T1, waits for the advisory PASS)

1434  1424  core/client.js
   2     0  core/src/client/i18n.js
  18     1  core/src/client/schedules.js
  45     1  core/test/schedules-client.test.js
   1     1  docs/subsystems/core-client.md
  28     8  patches/ds-bot/0001-core-fixes.patch
6372  6019  patches/ds-bot/0008-client-bundle.patch
  45     1  patches/ds-bot/files/test/schedules-client.test.js
   1     0  changelog.d/2323-schedule-connector-reach.added.md

Verified commit 7d0ebca547b96c8b59b9812d8f3ee2755d1af178 (same tree; the pushed head is 6ede482). Red first on clean 7226d74: core/test/schedules-client.test.js 59 tests, 54 success + 0 cancelled + 5 failure; after the fix 59 / 59 / 0. TZ=UTC ARCH_DOCS_BASE=7226d7455ff10ecfcf6dd99e7d41ffd25f1b0133 npm run verify exit 0, 4747 tests / 4747 success / 0 cancelled / 0 failure, arch-docs: OK (9 changed file(s)). core/client.js / patches/ds-bot/** are generate output (canonical says generate is a no-op); the bundle churn is connector-bots.js entering the graph, not hand edits.

@HugoXK
HugoXK marked this pull request as ready for review November 4, 2026 03:40
@HugoXK

HugoXK commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy — review request for this head: 6ede482edff1ba757ef8efe1e245b090a5e82859.

  • Tier T1 (live .github/agent/risk-rules.json, full file list): why: []; lines 70 / files 5 non-generated / generated 4. enqueue-guard on this head answers enqueue #2344: no 'hold' and the gate passes and no PASS needed: computed tier T1.
  • Head 6ede482edff1ba757ef8efe1e245b090a5e82859, tree 03a8cd7604be0b15f75bfbb9a6bd160169d07bb1, base 7226d7455ff10ecfcf6dd99e7d41ffd25f1b0133, 9 files +7946/−7455, maintainer_can_modify: true, ready (not a draft).
  • Checks at this head: 18 runs, 18 success + 0 cancelled + 0 failure (enqueue-guard, tests-ok, merge-gate, policy-sign, judge, package, four plugin lints, agent-audience, risk tier, reviewed tip, the Node 24 job). 0 reviews so far.
  • Red first (clean base 7226d745, tests only): core/test/schedules-client.test.js 59 tests → 54 success + 0 cancelled + 5 failure, all five #2323 a–e at :861/:866/:871/:877/:883. After the fix the same file runs 59/59/0; verify at this tip is 4747/4747/0.
  • Bundle churn: the body now states the measured mechanism — connector-bots.js already had importers on base (connectors.js:6, bot-settings.js:13), a new import edge from schedules.js makes esbuild emit it before schedules.js, and import_react6..27 all shift by one (865 one-for-one hunks, +1434/−1424). Alias-normalised and block-relocated, four hunks remain: two i18n strings, reachText, the hint lines.

Nothing here is waiting on a FlyBot self-test; FlyBot Test's advisory is already in hand at this head.

@Birfy

Birfy commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Verdict: PASS at 6ede482
Written-by: Reviewer
Attestation: 6ede482 role=Reviewer

Ran at this tip:

$ cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/schedules-client.test.js
# tests 59  # pass 59  # fail 0
$ cp <base 7226d745 core/src/client/schedules.js over the tip file> && cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/schedules-client.test.js
# tests 59  # pass 54  # fail 5

Review points:

  • The change is what the body says. reachText(task, roster) in core/src/client/schedules.js reads the task's Bot from the roster (byId first, then bots), keeps connectedConnectors(roster) entries isOn(bot, id), and answers '' for a room task or a Bot the roster no longer carries rather than guessing. The row hint is built as parts so the timing half is still exactly timingText (schedules: a repeat of 90s is shown and saved as 2 minutes, so editing a title silently rewrites it #1651); core/src/client/i18n.js adds both strings; nothing under core/src/host/ or index.js moves.
  • Red first, run here at this tip: reverting core/src/client/schedules.js to the base blob (7226d745) leaves 54 pass / 5 fail — the five client: a schedule card does not say which connectors its unattended run will carry #2323 cases at core/test/schedules-client.test.js:861-883 — and restoring it returns 59/59, so the test fails without the source change.
  • Generates match their source: core/client.js and patches/ds-bot/** are generator output. I did not read the +1434/−1424 alias shift line by line; the author's explanation (one new import edge shifts 22 aliases by +1) is consistent with canonical being a no-op, and the base-relative source diff is 4 real hunks.
  • All checks at this tip are success: tests-ok, package, plugins (tree|social|timeline|workflow), merge-gate, enqueue-guard, ubuntu-latest · Node 24 · DSH 0.2.0-rc.2.
  • Tier T1 by risk-rules (no T3 path, no diffPattern hit); design-conformant — no new config key, no security surface, no host write.

Not run: the full npm run verify (only the one changed test file), the smoke test, and the CI package job's pack/typecheck/actionlint steps.

@github-actions github-actions Bot added the pass label Nov 4, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 4, 2026
Merged via the queue into ThinkFlowLab:main with commit 1be6eae Nov 4, 2026
18 checks passed
@Birfy
Birfy deleted the dev/1-schedule-connector-reach branch November 4, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

client: a schedule card does not say which connectors its unattended run will carry

2 participants