Skip to content

Tell operators from participants on every connect request - #843

Merged
jeremy merged 20 commits into
mainfrom
connect-role
Oct 7, 2026
Merged

jeremy merged 20 commits into
mainfrom
connect-role

Conversation

@jeremy

@jeremy jeremy commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Ports basecamp-local-agent-connector#57 to basecamp connect.

Opening a project to its members is how a colleague's question reaches the agent at all. But a project's membership is not a list of people whose word should authorize a merge or a deploy. So each "type":"request" line now carries role, with the key and values the local connector emits:

  • "operator": the operator, or someone named with --allow.
  • "participant": a member admitted only by --trust project.

What changes

  • --allow combines with --trust project. connect setup --trust project --allow 111 names operators and opens the agent to the project's members as participants. connect.json keeps trust.mode: "project" with allowlist_ids, and Policy.Validate now accepts that pairing with the same per-id checks as allowlist mode. --allow on its own still implies allowlist. A run that passes --allow replaces the list, a run that passes none keeps it, and --trust operator clears it. --trust operator --allow is refused.
  • Participants trigger by mention, by comment on a followed thread, and by completion. A member's *.completed is admitted as context, with no acknowledgement and role: participant, the same as a followed-thread comment. Assignments were already the operator's alone in every mode, and they still are.
  • The role is settled on everyone whose trust admitted the event. It's the lesser of the performer's role and, for mentioned and subscribed, the author's. So when the operator moves a member's to-do in, the request is still a participant's, and the other way round.
  • Old records fail closed. A record admitted without a role (before this build, inside the one-minute handoff grace), or with an unknown value, is handed off as participant.
  • The skill gets the participant policy, tightened since Migrate messages commands to use SDK #57. A participant's request is a request, not authority. It never leads the agent to open a pull request or push a branch for one. Anything irreversible or outward-facing waits for an operator. The agent asks the operator privately, in a ping from the agent's account (POST /circles.json find-or-create, then a line in it), and tells the participant only that it's been passed on. The go-ahead is still an operator's @mention of the agent on the thread, since the connector doesn't watch pings. A line without role gets the participant rules. Setup's phrase table and trust explanation cover the combination. The same wording is in basecamp-local-agent-connector#58.

Not ported

  • --allow-domain. It's email-keyed, and Basecamp masks colleagues' addresses for non-admins, so the domain rule matches nobody unless the operator is an account admin. basecamp connect keys all trust on Person id, and project trust covers the use.
  • --allow-assignments-from-authorized: ported separately, in Let named operators assign the agent work, when the operator opts them in #847.
  • The local connector's STDERR ignored … by a participant line. A member's assignment is already logged as a "type":"event" line with reason assignment_not_operator, Event lines carry pointers, never names, by design.

Tests

Each of these fails without the change:

  • TestOperatorsAndParticipants (admission): the roles, the combination, a member's completion as participant context, and author-versus-performer.
  • TestTheLineSaysWhoseRequestItIs (handoff): the operator value, the participant value, a missing role, and an unknown role.
  • TestApplyTrust/allow_names_operators_alongside_project_trust and TestConnectSetupNamesOperatorsAlongsideProjectTrust (setup).

The two assignment subtests are regression guards that also pass on main's behavior. make check is green on linux. On darwin, golangci-lint reports two existing issues in driver/proctime_darwin.go, which this PR doesn't touch.


Summary by cubic

Opening a project to its members lets a colleague's question reach the agent, but membership shouldn't authorize merges or deploys. Each request line now carries role — "operator" for the operator and anyone named with --allow, "participant" for a member admitted only by --trust project.

What changes

  • --allow now works with --trust project to name operators beside the project's members; alone it implies allowlist, --trust operator --allow is refused, a run with --allow replaces the list, one without keeps it, and --trust operator clears it.
  • Participants reach the agent by mention, by comment on a followed thread, and by completing something the agent has a stake in — completion is context, not a request, so it's never acknowledged. Assignments stay the operator's alone.
  • The role is the lesser of the performer's and, for mentioned and subscribed, the author's: words a participant wrote stay a participant's request whoever brings them in, and the requester the line names is the person who wrote them.
  • Records admitted without a role, or with a value this build doesn't know, hand off as participant.
  • A participant's request is a request, not authority: it never opens a pull request or pushes a branch (for those, the agent commits locally and asks), and it can't choose a local repo — a mapping in a project document, which any member may edit, counts only when it agrees with the mapping the operator confirmed. Anything irreversible or outward-facing waits for an operator's word: the agent says in the thread what's ready, names the work (the repo, branch and commit, or the action itself), and mentions the operator. Only a role operator, mentioned request whose content is "go" approves — an operator's reply without the mention is context, not the word — and a member-editable AGENTS.md shapes the work without lifting any of these rules. A line without role gets the participant rules.

Not ported: --allow-domain (Basecamp masks colleagues' addresses for non-admins) and --allow-assignments-from-authorized (assignments remain the operator's alone in every mode).

Written for commit 164bb78. Summary will update on new commits.

Review in cubic Turn on auto-fix

Opening a project to its members is how a colleague's question reaches
the agent at all, but a project's membership is not a list of people
whose word should authorize a merge or a deploy. So each request line now
says which, as the local agent connector's lines do: `role` is
"operator" for the operator and anyone named with --allow, and
"participant" for a member admitted only by --trust project. --allow now
combines with --trust project, so one setup can name who operates the
agent and open it to the project at once.

Participants reach the agent by mention and by comment on a thread it
follows. Their completions are discarded as operators_only; an
assignment was already the operator's alone in every mode.

The role is the lesser of the performer's and, for mentioned and
subscribed, the author's: words a participant wrote stay a participant's
request whoever brought them in. A record admitted without a role, or
with one this build does not know, is handed off as a participant's.
What a participant's request may lead to is the session's policy, and
the skill gets that rule.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 01:00
@jeremy
jeremy requested a review from a team as a code owner October 6, 2026 01:00
@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T23:36:37.100642Z 164bb78 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added commands CLI command implementations tests Tests (unit and e2e) skills Agent skills labels Oct 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 15 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread skills/basecamp-connect/SKILL.md Outdated
Comment thread internal/commands/connect_setup_test.go
Comment thread internal/connector/handoff_test.go Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: c3710aaeca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI balanced review requested due to automatic review settings October 6, 2026 01:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jeremy
jeremy requested a balanced review from Copilot October 6, 2026 01:09
@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 339c48f779

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@jeremy I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 15 files

Re-trigger cubic

@jeremy

jeremy commented Oct 6, 2026 •

Copy link
Copy Markdown
Member Author

Review state at head 164bb78

  • CI: green. make check passes on linux.
  • Codex and cubic: no findings on 164bb78.
  • Copilot: not reviewed. On every head it answered that the requester's quota is exhausted.
  • Unresolved threads: 0.
  • Merge state: mergeable. Not merged.

Jeremy's decision: ask in the thread. b0015df drops the private-ping approval path: no ping, no ask or done records, no transcript scan. When a participant's request needs an operator's word, the agent says in the thread what's ready and mentions the operator. The go is the operator's mention of the agent there, as in local-connector #57. The five open ping threads are resolved on that decision.

Folded in after:

  • 0a0c734:
    • The PR step stops for a participant's request: commit locally, ask in the thread, push only on an operator's go.
    • "An operator's go" is handled outside the participant-only block.
    • A project AGENTS.md mapping decides a participant's repo only when it agrees with the operator-confirmed mapping.
  • 4294a69: says setup refuses --trust operator with --allow.
  • 164bb78:
    • Only a mentioned go approves.
    • Non-code actions are asked for by name.
    • AGENTS.md can't lift the participant rules.

Declined, with reasons in the threads:

  • Gating a participant's card move into In progress.
  • A durable per-ask claim, which is the machinery the decision removed.

Diff against main: 552+/79− across 14 files before the revert, 513+/79− just after it, and 537+/82− at this head.

Stacked: #847 (assignment opt-in) and #848 (request-line contract), both rebased onto 164bb78. Separate: #853 (stale ping comments).

Copilot AI balanced review requested due to automatic review settings October 6, 2026 05:15
A completion is context with no acknowledgement, like a comment on a
thread the agent follows, which a participant already reaches it by.
Dropping it at the gate kept the agent from hearing that a member
finished something it had a stake in; the role already tells the
session whose it was.
@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@cubic-dev-ai review

@jeremy
jeremy requested a balanced review from Copilot October 6, 2026 23:04
@cubic-dev-ai

cubic-dev-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@jeremy I have started the AI code review. It will take a few minutes to complete.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 14 files

Turn on auto-fix | Re-trigger cubic

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0015df22a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/basecamp-connect/SKILL.md
Comment thread skills/basecamp-connect/SKILL.md
…keep participants from mapping repos through AGENTS.md

The step that pushes and opens a pull request now stops for a
participant's request: commit locally and ask in the thread, push only
on an operator's go. The go is a role operator request whose content is
only go, so its handling moves out of the participant-only block. And a
project AGENTS.md mapping, which any member may be able to edit, decides
a participant's repo only when it agrees with the mapping the operator
confirmed.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 23:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@jeremy I have started the AI code review. It will take a few minutes to complete.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 14 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread skills/basecamp-connect/SKILL.md
Comment thread skills/basecamp-connect/SKILL.md Outdated
@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@jeremy I have started the AI code review. It will take a few minutes to complete.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 14 files

Turn on auto-fix | Re-trigger cubic

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4294a69c10

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/basecamp-connect/SKILL.md
Comment thread skills/basecamp-connect/SKILL.md Outdated
Comment thread skills/basecamp-connect/SKILL.md Outdated
Comment thread skills/basecamp-connect/SKILL.md Outdated
…e, and keep AGENTS.md from lifting the participant rules

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

@jeremy

jeremy commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@jeremy I have started the AI code review. It will take a few minutes to complete.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 164bb786fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 14 files

Turn on auto-fix | Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations skills Agent skills tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants