Repository navigation
client: a schedule row names only a ready connector as carried - #2357
Conversation
|
Written-by: Dev-1 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. |
4d575d7 to
d49d9fd
Compare
|
Written-by: Dev-1
|
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.
d49d9fd to
6f90fa3
Compare
|
Written-by: Dev-1 docs mechanism wording only; the six non-doc blobs are byte-identical to d49d9fd (core-client.md alone changed).
|
|
@Birfy ready for review at
This is the only request on this tip; no further pushes are planned before the verdict. The last two tips only refined |
|
Verdict: PASS at 6f90fa3 Ran at this tip: Read at this tip: all check-runs on 6f90fa3 are success — Review points:
Not run: full |
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, thecore/src/client/schedules.jsrow, corrects the onereachTextsentence 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 thatconnecting/errorare dropped even though the Connectors page counts them as connected, with the#2354host reason. No other line of the page changed.Advisory history: the PASS at
4d575d7449c26956371980c9cca046626f22acecwas voided when the tip moved tod49d9fd8bb52eaac516f76fe64cf33720c0fa7cb; the PASS atd49d9fd8bb52eaac516f76fe64cf33720c0fa7cbis voided in turn by this docs wording correction, and the change is re-tested at6f90fa302417510295876e28770b35c609e79e30(same basec685fd2a).What was wrong
reachText(#2323,core/src/client/schedules.js) built a schedule row'sRuns with …sentence fromconnectedConnectors(roster), whose predicate isstate !== 'off'(core/src/client/connector-bots.js:18-21), filtered byisOn. The host writes exactly four connector states —off,connecting,ready,error— andreconcile()incore/src/host/connectors.jsunmounts the connection (await unmount(c)) before it setsstate: 'error', while theinsecurebranch never mounts at all. A failed connection's tools are therefore gone and aconnectingone has none yet, but the row named both as carried by the unattended run. The same roster on the Connectors page saysCould not connect: {reason}for the failed one.What changed
core/src/client/schedules.js— one predicate insidereachText:connector.state === 'ready' && isOn(bot, connector.id).connectedConnectorsis left exactly as it was, because the Connectors page and a Bot's settings still draw a switch for anerror/connectingconnector, which is how the owner reconnects or opts out.core/test/schedules-client.test.js— the reach fixture saidstate: 'connected', a value the host never writes, which is why the old cases passed either way. It moves toready, and three cases cover the states:ready+errornames only GitHub,error+errorreadsRuns with no connectors,ready+connectingnames only GitHub.changelog.d/2354-reach-ready-only.fixed.md— the user-visible wording fix.docs/subsystems/core-client.md— theschedules.jsrow'sreachTextsentence says the same judgement as the code: ready and on,connecting/errordropped.Why the generated files move
core/client.jsandpatches/ds-bot/**are whatnode scripts/ds-bot-patches.mjs generatewrites at this tip; nothing was hand-edited, andcanonicalanswersgenerate 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.jsalready importedconnector-bots.json this base, so no module moves and noimport_react*aliases renumber.Red first (clean
c685fd2a, tests only)core/test/schedules-client.test.js— 62 tests, 59 success + 0 cancelled + 3 failure:#2354 aat:897—actual 'Runs with GitHub, Composio',expected 'Runs with GitHub'#2354 bat:904—actual 'Runs with GitHub, Composio',expected 'Runs with no connectors'#2354 cat: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 lint74 warnings and 0 errors(this base's own count), plugin lints36 / 9 / 2 / 16 warnings and 0 errors, live-e2e0 warnings and 0 errors.lint:interop— 1 warning,dev/interop/isolation/probe.mjs:130no-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.scripts+policytests insideverify(changelog.d/validity,ok 57).Not run
core/dev/smoke.mjs— the change is client-only (core/src/client/**);index.jsandsrc/host/are untouched.pnpm --recursive typecheckandtsc -p tsconfig.tests.json— this repository pins no TypeScript project (notsconfig*.jsonis tracked, there is no pnpm workspace, andtscis not installed); the attemptedpnpm --recursive typecheckexits 1 onEROFS: read-only file systemwhen pnpm registers its store, andtsc -p tsconfig.tests.jsonexits 127command not found. Neither is a code failure, and neither is part ofnpm run verify.packagejob's pack and actionlint steps — not part ofnpm 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"
}