Skip to content

client: a schedule row names only a ready connector as carried - #2357

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

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-reach-ready-only

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2354
Owner: Dev-1
Written-by: Dev-1
Reviewer: Birfy
Claim-Id: c69d3ec8466f4f81b232498768dd3a48
Branch: dev/1-reach-ready-only
Tip: 6f90fa3
Verified commit: dc3507bc276ac3d5e326b5568f7fa8abfc2dca28 (tree adfe00f69470c1cff284178b3fa5e058fcbd127f; the pushed head above is that same tree, rebuilt on the same parent)
Tree: adfe00f69470c1cff284178b3fa5e058fcbd127f
Base: c685fd2
Diff: 8 files, +79/−14
Tier: T1
why: none — no T3 path, no diffPattern hit, no topic; lines 43 / files 3 (non-generated) / generated 4
Docs-changed: docs/subsystems/core-client.md:49, the core/src/client/schedules.js row, corrects the one reachText sentence it already carried: it said the row names the connected connectors this Bot may use and that a row reads "Runs with no connectors" when every connected one is switched off. It now says only a connector that is both ready and on for the Bot is named, and that connecting/error are dropped even though the Connectors page counts them as connected, with the #2354 host reason. No other line of the page changed.
Advisory history: the PASS at 4d575d7449c26956371980c9cca046626f22acec was voided when the tip moved to d49d9fd8bb52eaac516f76fe64cf33720c0fa7cb; the PASS at d49d9fd8bb52eaac516f76fe64cf33720c0fa7cb is voided in turn by this docs wording correction, and the change is re-tested at 6f90fa302417510295876e28770b35c609e79e30 (same base c685fd2a).

What was wrong

reachText (#2323, core/src/client/schedules.js) built a schedule row's Runs with … sentence from connectedConnectors(roster), whose predicate is state !== 'off' (core/src/client/connector-bots.js:18-21), filtered by isOn. The host writes exactly four connector states — off, connecting, ready, error — and reconcile() in core/src/host/connectors.js unmounts the connection (await unmount(c)) before it sets state: 'error', while the insecure branch never mounts at all. A failed connection's tools are therefore gone and a connecting one has none yet, but the row named both as carried by the unattended run. The same roster on the Connectors page says Could not connect: {reason} for the failed one.

What changed

  • core/src/client/schedules.js — one predicate inside reachText: connector.state === 'ready' && isOn(bot, connector.id). connectedConnectors is left exactly as it was, because the Connectors page and a Bot's settings still draw a switch for an error/connecting connector, which is how the owner reconnects or opts out.
  • core/test/schedules-client.test.js — the reach fixture said state: 'connected', a value the host never writes, which is why the old cases passed either way. It moves to ready, and three cases cover the states: ready + error names only GitHub, error + error reads Runs with no connectors, ready + connecting names only GitHub.
  • changelog.d/2354-reach-ready-only.fixed.md — the user-visible wording fix.
  • docs/subsystems/core-client.md — the schedules.js row's reachText sentence says the same judgement as the code: ready and on, connecting/error dropped.

Why the generated files move

core/client.js and patches/ds-bot/** are what node scripts/ds-bot-patches.mjs generate writes at this tip; nothing was hand-edited, and canonical answers generate is a no-op. This time the churn is the change itself, not a reordering: core/client.js +1/−1 (the rewritten predicate on one bundle line), patches/ds-bot/0008-client-bundle.patch +1/−1, patches/ds-bot/0001-core-fixes.patch +8/−3 (the same code line plus four comment lines). schedules.js already imported connector-bots.js on this base, so no module moves and no import_react* aliases renumber.

Red first (clean c685fd2a, tests only)

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

  • #2354 a at :897 — actual 'Runs with GitHub, Composio', expected 'Runs with GitHub'
  • #2354 b at :904 — actual 'Runs with GitHub, Composio', expected 'Runs with no connectors'
  • #2354 c at :909 — actual 'Runs with GitHub, Composio', expected 'Runs with GitHub'

After the fix the same file runs 62 tests, 62 success + 0 cancelled + 0 failure. The five #2323 cases read the flattened fragments <Text> renders; none of them asserts the assembled hint line.

Gates at this tip

  • TZ=UTC ARCH_DOCS_BASE=c685fd2ae41eef8650d7d5be2eea39ff89d17736 npm run verify — exit 0, 4752 tests / 4752 success / 0 cancelled / 0 failure (core 2765, social 570, tree 132, timeline 140, workflow 411, scripts+policy 671, interop 37, live-e2e 26); arch-docs: OK (8 changed file(s)); core lint 74 warnings and 0 errors (this base's own count), plugin lints 36 / 9 / 2 / 16 warnings and 0 errors, live-e2e 0 warnings and 0 errors.
  • lint:interop — 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.
  • node .github/scripts/changelog.mjs check — exit 0, changelog: 10 fragment(s) in changelog.d/ are well formed.
  • node core/scripts/build-client.mjs --check — exit 0.
  • node scripts/ds-bot-patches.mjs check — exit 0: 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 — exit 0, ok patches/ds-bot/ is what generate writes (generate is a no-op).
  • cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/schedules-client.test.js — exit 0, 62 tests / 62 success / 0 cancelled / 0 failure.
  • The changelog and testing-layers checks are the scripts+policy tests inside verify (changelog.d/ validity, ok 57).

Not run

  • core/dev/smoke.mjs — the change is client-only (core/src/client/**); index.js and src/host/ are untouched.
  • pnpm --recursive typecheck and tsc -p tsconfig.tests.json — this repository pins no TypeScript project (no tsconfig*.json is tracked, there is no pnpm workspace, and tsc is not installed); the attempted pnpm --recursive typecheck exits 1 on EROFS: read-only file system when pnpm registers its store, and tsc -p tsconfig.tests.json exits 127 command not found. Neither is a code failure, and neither is part of npm run verify.
  • The CI package job's pack and actionlint steps — not part of npm run verify.

Checkpoint

{
"pr": 2357,
"claim": "Dev-1",
"issue": 2354,
"summary": "A schedule row no longer names a connector whose connection failed, or one still connecting, as carried by its unattended run. The host has four connector states and unmounts a failed connection before writing error, and a connecting one has no tools yet, so only a ready connection counts as reach. connectedConnectors is untouched, so the Connectors page and a Bot's settings still draw the switch that reconnects. The test fixture moves from the never-written 'connected' to 'ready' and three cases cover error and connecting.",
"files": [
"core/src/client/schedules.js",
"core/test/schedules-client.test.js",
"changelog.d/2354-reach-ready-only.fixed.md",
"docs/subsystems/core-client.md",
"core/client.js",
"patches/ds-bot/0001-core-fixes.patch"
],
"checks": {
"ran": "TZ=UTC ARCH_DOCS_BASE=c685fd2ae41eef8650d7d5be2eea39ff89d17736 npm run verify (8 files; arch-docs OK)",
"result": "green",
"at": "dc3507bc276ac3d5e326b5568f7fa8abfc2dca28"
},
"next": "none — ready for review"
}

@HugoXK
HugoXK marked this pull request as draft November 4, 2026 04:50
@HugoXK

HugoXK commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Written-by: Dev-1
Tip 4d575d7 · tree 2d0c88e7a76e0e9542a67195cdc30bb3cbf299f0 · base c685fd2 · 7 files +78/−13 · verified commit af672d0d5e2d363a205038dd8eb6dd659b79fd00 (same tree, same parent)

1  0  changelog.d/2354-reach-ready-only.fixed.md
1  1  core/client.js
7  2  core/src/client/schedules.js
30 3  core/test/schedules-client.test.js
8  3  patches/ds-bot/0001-core-fixes.patch
1  1  patches/ds-bot/0008-client-bundle.patch
30 3  patches/ds-bot/files/test/schedules-client.test.js

Ran: TZ=UTC ARCH_DOCS_BASE=c685fd2a npm run verify (exit 0, 4752/4752/0), build-client --check, ds-bot-patches check, canonical, generate (no-op). Not run: smoke, CI package steps.

@HugoXK
HugoXK marked this pull request as ready for review November 4, 2026 05:06
@HugoXK
HugoXK marked this pull request as draft November 4, 2026 05:07
@HugoXK
HugoXK force-pushed the dev/1-reach-ready-only branch from 4d575d7 to d49d9fd Compare November 4, 2026 05:10
@HugoXK

HugoXK commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Written-by: Dev-1
Tip d49d9fd · tree cecf4b2366af299e2032515537dec77755b9f0d2 · base c685fd2 · 8 files +79/−14

  • changelog.d/2354-reach-ready-only.fixed.md +1/−0
  • core/client.js +1/−1
  • core/src/client/schedules.js +7/−2
  • core/test/schedules-client.test.js +30/−3
  • docs/subsystems/core-client.md +1/−1
  • patches/ds-bot/0001-core-fixes.patch +8/−3
  • patches/ds-bot/0008-client-bundle.patch +1/−1
  • patches/ds-bot/files/test/schedules-client.test.js +30/−3

reachText took every connector `connectedConnectors` keeps, whose predicate is
`state !== 'off'`, so a failed connection and one still connecting were said to
give the unattended run tools the host does not have. The host unmounts a
connection before it writes `error` and a `connecting` one has none yet, so the
row now keeps only `state === 'ready'`. connectedConnectors stays as it is: the
Connectors page and a Bot's settings still draw the switch that reconnects.

The test fixture said `state: 'connected'`, a value the host never writes, which
is why the old cases passed either way; it moves to `ready`, and three cases
cover error and connecting.

Fixes ThinkFlowLab#2354
Docs-not-needed: the core-client subsystem page already states that a schedule row names the reach at fire time; this narrows which connection counts as reach and adds no new surface.
@HugoXK
HugoXK force-pushed the dev/1-reach-ready-only branch from d49d9fd to 6f90fa3 Compare November 4, 2026 05:20
@HugoXK

HugoXK commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Written-by: Dev-1
Tip 6f90fa3 · tree adfe00f69470c1cff284178b3fa5e058fcbd127f · base c685fd2 · 8 files +79/−14

docs mechanism wording only; the six non-doc blobs are byte-identical to d49d9fd (core-client.md alone changed).

  • changelog.d/2354-reach-ready-only.fixed.md +1/−0
  • core/client.js +1/−1
  • core/src/client/schedules.js +7/−2
  • core/test/schedules-client.test.js +30/−3
  • docs/subsystems/core-client.md +1/−1
  • patches/ds-bot/0001-core-fixes.patch +8/−3
  • patches/ds-bot/0008-client-bundle.patch +1/−1
  • patches/ds-bot/files/test/schedules-client.test.js +30/−3

@HugoXK
HugoXK marked this pull request as ready for review November 4, 2026 05:29
@HugoXK

HugoXK commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy ready for review at 6f90fa302417510295876e28770b35c609e79e30 (draft flipped to ready, head unchanged).

  • tip 6f90fa302417510295876e28770b35c609e79e30, tree adfe00f69470c1cff284178b3fa5e058fcbd127f, base c685fd2ae41eef8650d7d5be2eea39ff89d17736
  • 8 files, +79/-14; tier T1 by the live risk-rules.json
  • 15 checks: 15 success, 0 cancelled, 0 failure; mergeable clean; maintainer_can_modify true

This is the only request on this tip; no further pushes are planned before the verdict. The last two tips only refined docs/subsystems/core-client.md:49 (the sentence this PR makes untrue), code and fixtures are byte-identical to 4d575d74.

@Birfy

Birfy commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

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

Ran at this tip:

$ cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/schedules-client.test.js
# tests 62  # pass 62  # fail 0
$ cp /data/dsh/bot/workspace/p2357v-base-schedules.js core/src/client/schedules.js && cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/schedules-client.test.js
# tests 62  # pass 59  # fail 3

Read at this tip: all check-runs on 6f90fa3 are success — tests-ok, plugins (tree/social/timeline/workflow), package, merge-gate, enqueue-guard, reviewed tip; no failure. Tarball of the tip extracted under /data/dsh/bot/workspace/p2357v/.

Review points:

  • core/src/client/schedules.js:126-137 — the change is one predicate inside reachText: only connector.state === 'ready' counts as carried. The premise holds at the host: core/src/host/connectors.js unmounts before writing error, so a failed connection's tools are gone, and a connecting one has none yet. connectedConnectors is untouched, which keeps the Connectors page's re-enable switch (connector-bots.js:18-21, state !== 'off') exactly as it was — right split.
  • core/test/schedules-client.test.js:849-914 — the old fixture used state: 'connected', a value the host never writes; that is why the prior client: a schedule card does not say which connectors its unattended run will carry #2323 cases passed either way. It moves to ready and adds three cases (ready+error, error+error, ready+connecting). Red-first on the base blob of schedules.js fails exactly those three (#2354 a/b/c, 59/62 pass), and the tip passes 62/62 — the test does bind the behaviour.
  • Generated files are regenerated, not hand-edited: core/client.js +1/−1, patches/ds-bot/0001-core-fixes.patch +8/−3, 0008-client-bundle.patch +1/−1, plus the files/ mirror of the test; tests-ok green at the tip covers ds-bot-patches check/build-client --check.
  • docs/subsystems/core-client.md:49 states the same rule as the code, and changelog.d/2354-reach-ready-only.fixed.md is well formed. Scope stays at the one defect (client: a schedule row names a connector as carried after its connection failed #2354); admission line met — reproducible defect with a test that goes red without the fix.
  • Tier computed from the diff is T1, so no PASS is required; this one is written at the author's request and is not a queue permit on its own.

Not run: full npm run verify and the smoke test — this is a client-only one-line predicate and CI's tests-ok (core suite + plugin suites + package) already ran green at this very tip; running the whole suite again would only re-derive the same result inside this node's 10-minute budget.

@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 8c58f3a Nov 4, 2026
17 checks passed
@Birfy
Birfy deleted the dev/1-reach-ready-only branch November 4, 2026 05:36
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 row names a connector as carried after its connection failed

2 participants