Record who a coworker was opened to, not only where it was pointed - #356
Merged
davidmckayv merged 2 commits intoSep 4, 2026
Merged
Conversation
`visibility` is not a display preference. `accessFilter` admits a public coworker to every signed-in person, and `canRunAgent` is `canAccessAgent`, so public hands everybody in the deployment the right to act as that Bot and spend the connector grants, the tools and the browser it holds. Since the coworker dialogs landed it is one click, written on pick. bot.created and bot.updated recorded the name, the endpoint and whether a key was set, and said nothing about this. So an edit that opened a coworker to the whole deployment was byte-identical on the audit page to one that corrected its title, and "who made this Bot available to everybody, and when" had the same answer the endpoint question used to have: nothing. audit.ts already gives the reason for the endpoint - "the first question asked in an incident" - and it applies here word for word. Carried on every row rather than only the row that moved it, the way `name` already is. The route has no before to compare against, and recording the value on each row is what lets somebody read the trail forward and say what was reachable at any point, which is the question an incident actually asks. Nothing else changes: the payload is still what changed rather than the new values for the endpoint and the key, and the key is still never recorded. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kevin9327
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso and
tylerslaton
as code owners
September 3, 2026 22:34
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
# Conflicts: # CHANGELOG.md
davidmckayv
approved these changes
Sep 4, 2026
davidmckayv
left a comment
Contributor
There was a problem hiding this comment.
Reviewed diff against current main; resolved CHANGELOG keep-both; validated locally (format + composed test run). CI green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
visibilityis not a display preference.So
publicadmits every signed-in person to a coworker, and being admitted to a coworker is beingallowed to act as it — with the connectors, the tools and the browser it was granted
(
server/src/app.tsroutes "may this person act as this Bot" through the same read). Since thecoworker dialogs landed in #317 it is one click, saved on pick
(
app/src/components/agents/agent-dialog.tsx:299).bot.createdandbot.updatedrecord the name, the endpoint and whether a key was set. They saynothing about this. An edit that opened a coworker to the whole deployment was byte-identical on the
audit page to one that corrected its title, and the trail could not answer "who made this Bot
available to everybody, and when".
server/src/audit.ts:322-333already gives the reason these event types exist, and it applies hereword for word:
Both rows now carry
visibility.Why on every row and not only on the row that moved it. The route has no before to compare
against —
store.updateis handed the new input and returns the result — so recording only a changewould mean an extra read purely to shape a log line. Recording the value on each row is also the more
useful trail: read forward, it says what was reachable at every point, which is the question an
incident actually asks.
nameis already carried this way, so the shape is not new.Nothing else moves. The endpoint and the key are still recorded as what changed rather than as new
values, and the key itself is still never recorded.
Where it runs
writes.
record()writes through the samerecordAuditEventinto the same Postgres table from whichever replica served the edit.Boundary and audit
to reconstruct a decision it could not.
parsed.value.visibilityis the value the parseralready validated to
"public" | "private"before the store was allowed to write it, and it isthe same value the store applied — not a separate claim from the body.
visibilityis one of two enum words; it is not a secret and it isalready returned to every browser in the agent DTO.
Proof
Three tests in
server/tests/bot-lifecycle-audit.test.ts, which runs without a database. Fail-beforeconfirmed by removing the two
visibility:lines from the payloads:With the fix:
Gates:
Changelog
The trail says who a coworker was opened to, underUnreleased.