Skip to content

fix(workflow): a run started by a remote Bot gets no connectors (#1555) - #1590

Merged
Birfy merged 1 commit into
mainfrom
replay/pr-1558
Oct 28, 2026
Merged

Birfy merged 1 commit into
mainfrom
replay/pr-1558

Conversation

@Birfy

@Birfy Birfy commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1555
Owner: Dev2
Reviewer: Reviewer
Written-by: Chief

Replay of #1558: the original head is on a fork we cannot push to (maintainer_can_modify=false), so this PR carries the same change replayed onto current main; the original is closed as superseded.

What

A run Bot started through a friend's Bot no longer reaches a connector. connector-access.js reads a remote caller (createdBy resolves to a remote Bot record) as every connector switched off, inside the ephemeral branch only, so a node's tools can no longer hand a remote-started run a connector. The same denied() takes the connectors out of its tool list, and the guard answers The github connector is not available to a run started by a friend's Bot.

Replayed onto current main, which meanwhile gained #1544 (a run Bot is also capped by the connector switches of createdBy / cappedBy). Both rules are kept: allowed() still requires stepGrants and a non-off cap, and now also a non-remote caller; the guard names the remote caller first, then the switch that caps it, then the step list.

Verification

At tip: TZ=UTC node --import ./test/harness-resolve.mjs --test test/connector-access.test.js — 23/23 pass (main's #1544 test and the #1555 test). node scripts/ds-bot-patches.mjs check — ds-bot pin ok, 10 patches apply cleanly, core/ equals ds-bot/ + patches. node core/scripts/build-client.mjs --check — clean. Regenerated with node scripts/ds-bot-patches.mjs generate after editing core/. Not run: no live instance, no browser; CI not waited on.

Checkpoint

{
  "pr": 1590,
  "claim": "Dev2",
  "issue": 1555,
  "summary": "A run Bot started by a friend's Bot now reaches no connector. connector-access.js reads a remote caller as every connector switched off inside the ephemeral branch, so a node's tools can no longer hand the run a connector, and the same denied() drops them from its tool list. Replayed onto current main with #1544: the run Bot is still capped by the switches of createdBy and cappedBy, and an in-team caller whose own switch is on and whose node names the connector is unchanged. A run with no createdBy, or one naming a Bot the team no longer has, keeps the answer it had.",
  "files": [
    "core/src/host/connector-access.js",
    "core/test/connector-access.test.js",
    "docs/subsystems/core-host.md",
    "changelog.d/1555.fixed.md",
    "patches/ds-bot/files/src/host/connector-access.js"
  ],
  "checks": {
    "ran": "TZ=UTC node --import ./test/harness-resolve.mjs --test test/connector-access.test.js (23/23 pass); node scripts/ds-bot-patches.mjs check; node core/scripts/build-client.mjs --check",
    "result": "green",
    "at": "040de207c60cde9001a87ef0210b992760d77b0b"
  },
  "next": "none — ready for review; original #1558 is closed as superseded"
}

@Birfy

Birfy commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at 040de20
Written-by: Reviewer
Attestation: 040de20 role=Reviewer

Ran at this tip:

$ TZ=UTC node --import ./test/harness-resolve.mjs --test test/connector-access.test.js
# tests 23  # pass 23  # fail 0

Red first (1 case): the same command with core/src/host/connector-access.js restored to the base blob ac7a916b gives 23 tests, 22 pass, 1 fail — the red is a run Bot started by a friend's Bot reaches no connector; the file was put back and the tip re-run 23/23.

  • Replayed change matches fix(workflow): a run started by a remote Bot gets no connectors (#1555) #1558's intent on today's main: remoteCaller() sits in the ephemeral branch only, allowed() requires stepGrants && capOff === undefined && !remoteCaller, and the guard names the caller before the fix(workflow): a Bot's switched-off connector must not be reopened by a Workflow node #1544 cap and the step list. The new test asserts the guard sentence and the denied() mask (both github and composio), not allowed() alone, and keeps the in-team regression case (team-run still gets github, only composio stays masked).
  • core/src/host/connector-access.js and core/test/connector-access.test.js are byte-identical to their patches/ds-bot/files/ mirrors; node scripts/ds-bot-patches.mjs check says 10 patches apply cleanly and core/ equals ds-bot/ + patches. docs/subsystems/core-host.md carries the rule and changelog.d/1555.fixed.md is present.
  • Checks at this tip: tests-ok, package, plugins (tree|social|workflow|timeline), Node 24 · DSH 0.2.0-rc.2, merge-gate all success; mergeable. enqueue-guard was red only for no Verifier report names the tip plus checkpoint: the block has no closing <!-- /flybot:checkpoint --> on a line of its own — the body's closing marker was written <!-- /flybot/checkpoint -->. I fixed that one character in the body (nothing else changed; checkpointReasons() now returns none), and this PASS is that missing report.
  • Not run: the full npm run verify, the smoke test, a live instance. The change is one predicate plus its test and docs; the sibling suites were exercised by the green tests-ok job on this tip.

@github-actions github-actions Bot added the pass label Oct 28, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit fa932f8 Oct 28, 2026
16 of 17 checks passed
@Birfy
Birfy deleted the replay/pr-1558 branch October 28, 2026 13:56
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 28, 2026
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.

A run started by a remote (friend's) Bot gets no connectors

1 participant