You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(platform): label reserved workflow comment authors as automation - #4164
Resolve the reserved agent/workflow author before looking up project agents. Reuse isWorkflowSentinel and the existing timeline.unresolvedWorkflow translations: Automation, Automatisierung, Automatisation (de-CH inherits German). Real missing agents still resolve to the localized deleted-agent fallback; live agents and system retain their names.
The writer audit covers connector comment/status/upsert, overdue task notifications, the sandbox ask_human comment mirror and automation ask retractions. Those rows carry the generic sentinel, not a specific automation identity; this fix does not invent attribution, migrate identities, change writers, or rewrite historical comments. Activity already uses the same generic label when no workflow context is available.
Finding → test map
Finding / acceptance
Regression evidence
Reserved workflow incorrectly treated as a removed project agent
Actual useActorDirectory and TaskCommentView in task-comments.actors.test.tsx, with the live synthetic roster loaded
All shipped locales
Real platform catalogs for en/de/fr and de-CH fallback; expected localized names, not mocked translation keys
Live/deleted/system identities must remain distinct
Hook and rendered-comment controls for each identity in each locale
Roster loading must not erase reserved authors
Workflow hook regression before the roster loads
Preserve history and do not invent automation attribution
Render unchanged synthetic historical body; generic workflow name with no invented preview/link
Accessible name
Real avatar role=img, localized accessible name and tooltip; no new control or focus behavior
The platform manual automation register records this coverage. No permissions, schema, migration, keyboard controls or focus code changes. Product guides need no new instructions for this display-only correction.
Verification
Synthetic data only; no production experiments, local backend stack, browser, E2E or container build (fleet light-only constraint). Real comment DOM/component rendering is covered, not a full browser replay. Browser layout/focus inspection remains manual.
On current main aa2e73974a59efeb2b8fa6015be6b1f84e9b731c, before the fix:
Tests 12 failed | 26 passed (38)
workflow: expected "Automation", received "Deleted agent"
de: expected "Automatisierung", received "Gelöschter Agent"
fr: expected "Automatisation", received "Agent supprimé"
UI checks: bunx vitest run --config vitest.ui.config.ts --maxWorkers 1 <targeted files>; Node 24 on PATH.
Locale checks: bunx vitest run --project server --maxWorkers 1 --silent=false lib/i18n/messages.test.ts.
TypeScript API check uses the platform compiler options and test declarations, checks the changed hook/test plus comment and timeline consumers; no whole-workspace tsc.
Targeted lint and type-aware lint pass; oxfmt --check, git diff --check, and bun run lint:manual pass.
Pre-commit conflict-marker and format hooks pass. The local SAST hook skips because pinned Opengrep is not cached; CI's SAST check is the enforcing gate.
The unchanged repeat-dialog test exceeded its 5-second timeout in the broader run; the isolated full-file retry passes without a code/test change. Both results are retained in the delivery evidence.
Method: one read-only source reviewer, whose claims I cross-checked, plus my runs.
Tests (mine)
Negative control: against main's use-actor-directory.ts, the new task-comments.actors.test.tsx fails 12 of 24 tests: the three workflow cases in each of the 4 locales. At the head it passes 24/24.
Build, Checks, Commitlint, E2E and SAST all succeeded at attempt 1.
The check runs are 50 success, 1 neutral (Trivy) and 12 skipped by design.
Backend integration was skipped through Integration scope.
Source review, cross-checked
Only the server writes the workflow sentinel as an author:
connectors/task-store.ts:450,464
tasks/date-notifications.ts:178
automations/ask-retraction.ts:5,43
sandbox/workspace_tools_bridge.ts:1138
tasks/delegated-start.ts:333,517
No real agent can be named workflow:project_agents.id defaults to gen_random_uuid() (0008_projects.sql:68), and inserts never set it.
A user can't take the label:isWorkflowSentinel requires actorType === 'agent' (task-actor-preview.ts:70-75).
Branch order: workflow, then system, then live agent, then the deleted fallback (use-actor-directory.ts:183-213).
Locales: en "Automation", de "Automatisierung", fr "Automatisation". de-CH overrides no timeline.* key, so it inherits German.
Accessibility: the avatar is role=img with a matching aria-label and title.
Other places now also say Automation: the run-failure banner, the task modal and the timeline. This is consistent with what the timeline already did.
No browser render from me. The change picks a label and an avatar, and the PR's DOM tests cover it in four locales.
LOW: the new register row in tests/manual/reference/automation.md:17 is marked ✅ (fully automated), but the same row says "browser layout and focus remain manual", and no box in tasks.md holds that manual part. Either mark it 🔶 and name a box, or drop the clause.
INFO, from before this PR: while the agent roster loads, a live agent briefly reads Deleted agent, because resolveActor ignores agentsLoading (use-actor-directory.ts:207-211).
Merge note:#4164, #4172 and #4178 each insert a row at the top of the same table in automation.md. Whichever merges first, the other two need a one-line rebase. I'm merging this one first, in the manager's age order.
Merge: squash with --match-head-commit through my gate, which dry-runs first.
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
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 changed
Resolve the reserved
agent/workflowauthor before looking up project agents. ReuseisWorkflowSentineland the existingtimeline.unresolvedWorkflowtranslations: Automation, Automatisierung, Automatisation (de-CH inherits German). Real missing agents still resolve to the localized deleted-agent fallback; live agents andsystemretain their names.The writer audit covers connector comment/status/upsert, overdue task notifications, the sandbox
ask_humancomment mirror and automation ask retractions. Those rows carry the generic sentinel, not a specific automation identity; this fix does not invent attribution, migrate identities, change writers, or rewrite historical comments. Activity already uses the same generic label when no workflow context is available.Finding → test map
useActorDirectoryandTaskCommentViewintask-comments.actors.test.tsx, with the live synthetic roster loadedrole=img, localized accessible name and tooltip; no new control or focus behaviorThe platform manual automation register records this coverage. No permissions, schema, migration, keyboard controls or focus code changes. Product guides need no new instructions for this display-only correction.
Verification
Synthetic data only; no production experiments, local backend stack, browser, E2E or container build (fleet light-only constraint). Real comment DOM/component rendering is covered, not a full browser replay. Browser layout/focus inspection remains manual.
On current main
aa2e73974a59efeb2b8fa6015be6b1f84e9b731c, before the fix:After:
bunx vitest run --config vitest.ui.config.ts --maxWorkers 1 <targeted files>; Node 24 on PATH.bunx vitest run --project server --maxWorkers 1 --silent=false lib/i18n/messages.test.ts.tsc.oxfmt --check,git diff --check, andbun run lint:manualpass.Closes #4051