upstream(sync): shared agent access + archive-aware profile selector (#6086, #5706) - #313
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
E2E verification — archive-aware profile selector + shared access seedingDriven manually through the desktop E2E mock bridge ( Archive-aware library + profile selectionAgents library drops the archived standalone instance — "Custom agents (1)", Custom Live only: Negative control with Clicking the Scout definition card opens Scout Live ( Shared access seedingDefinition policy is Customize AI configuration: named block reasonsEmpty → Regressions checkedArchived identity absent from the composer mention picker and from the channel agent picker (archived stay behind the separate collapsed "Archived (2)" section); Hermes archived-profiles panel still renders its empty state with no error banner. Acceptance gates DONE
IN PROGRESS
TODO / NEXT
|
324a613 to
1bb36ae
Compare
CI note:
|
…lock#6086, block#5706) Port the two Tier 2 agent/Hermes behaviours from upstream Buzz: - Archive-aware selector: buildUnifiedGroups/pickProfileAgent take the useIsArchivedPredicate() predicate, drop archived standalone and unknown-definition instances, and resolve a definition card's target to a live sibling (undefined when all are archived). Matched definition groups keep their full instance list so the card still renders. - Shared access: a definition's respondTo/respondToAllowlist now syncs down to its linked managed-agent instances, edit dialogs seed from the instance actually enforcing the policy, and EditRespondToDialog surfaces a profileSyncError through the existing warning helper. - Config validation names the field a user still has to fill instead of silently disabling Save, and never names a hidden provider/model field. Crew archive/restore/delete backend, the Agents archive browser, owner-only access and channel-first IA are unchanged. Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-Authored-By: Oscar Le <oscar.lehuu@gmail.com>
1bb36ae to
d3fae0d
Compare
Post-rebase E2E evidence (full-window)Rebased onto Adversarial seed: archived Scout instance is Agents library hides archived standalone instancesCustom agents (1) — Custom Live only. Custom Archived is omitted from the library. Negative control (
|
|
Durable copy of the post-rebase recording (same file as the artifact in the previous comment): |
















Summary
Ports the two Tier 2 agent/Hermes behaviours from upstream Buzz (block#6086, block#5706) onto Crew's existing structures. Desktop-frontend only — no Rust, no backend, no navigation changes.
1. Archive-aware selection (block#5706). Upstream added a dedicated
pickProfileAgentmodule; Crew already had the equivalent inunifiedAgentGroups.ts, so the archive awareness went there instead of copying a file that doesn't exist in this fork. Both entry points now take Crew's existinguseIsArchivedPredicate():The ordering matters: previously an archived-but-
activeinstance could win the ranking and a definition-card click would then navigate to (and persist) a stale archived pubkey. A matched definition group deliberately keeps its archived instances so the card itself still renders — only the target is required to be live. The predicate's fail-open-while-loading and self-exempt behaviour is load-bearing and reused as-is, so a slow archive snapshot degrades to today's behaviour rather than hiding live agents.2. Shared access (block#6086), scoped. Only the access-propagation slice was ported, not the 5.4k-line upstream diff:
editPersonaDialogState(persona, linkedAccess?)now seeds behaviour from the instance actually enforcing the policy (the profile panel and the definition actions menu pass it), so a definition edit can't silently re-widen access the owner narrowed on the instance.EditRespondToDialoginspects the mutation result and routes a non-fatalprofileSyncErrorthrough the existingshowAgentProfileSyncWarninghelper instead of dropping it.3. Config submit validation.
agentAiConfigurationSubmitBlockReasonderives the disabled-Save copy from the same visibility inputs the fields render from, so a disabled Save names the field the user still has to fill and a runtime-hidden provider/model field can never block saving. No new frontend capability table — visibility still comes from Rust runtime metadata.Divergences from upstream, deliberately kept
pickProfileAgent.tsfile; behaviour lives in Crew'sunifiedAgentGroups.ts.desktop/src/features/agents/AGENTS.mdgains rules 13–15 plus the enforcing tests, per its "keep this file true" requirement.Related issue
Fixes #291. Parent: #285 (Buzz
0.5.18sync). Guardrail: #278. Adjacent Hermes work: #119, #243.Testing
TDD: tests written first and observed failing, then implemented.
pnpm --filter buzz checkpnpm --filter buzz typecheckpnpm --filter buzz testjust test-unitbuzz-cli(3) +buzz-db(1) fail identically on the base commit in a clean worktree — pre-existing, unrelated to this TS-only diff (command-inventory / migration-hash pins)just check-compilehermes-profile-binding.spec.ts+onboarding-agent-defaults.spec.tsNew/extended unit coverage:
ui/unifiedAgentGroups.test.mjs(archive ranking, all-archived →undefined, fail-open predicate, standalone/unknown omission, matched-group retention),ui/personaDialogState.test.mjs(instance-seeded access),profile/ui/UserProfilePanelUtils.test.mjs(owner-only + allowlist sync, null-policy no-op),ui/agentAiConfigurationPolicy.test.mjs(block reasons vs hidden fields).E2E evidence (full-window, desktop E2E mock bridge)
Adversarial seed: the archived linked instance ("Scout Archived") is
runningand first in seed order, so on the base commit it would win active/name ranking and become the definition card's navigation target. The archived standalone agent ("Custom Archived") is identical to the live one except for archive state.Agents library drops the archived standalone instance — "Custom agents (1)", Custom Live only:
Negative control with
archivedIdentities: []on the same build → "Custom agents (2)" including Custom Archived, so the assertion above is real:Clicking the Scout definition card opens Scout Live (
bb22a529…f260), not the running-but-archived instance:Definition policy is
owner-onlywhile the linked instance isallowlist— the Edit dialog seeds "Selected people" plus the instance's allowlist chip:Customize AI configuration names the missing field, then enables Save; a runtime-hidden provider (Claude Code) never blocks Save:
Regressions: archived identity absent from the composer mention picker and the channel agent picker; Hermes archived-profiles panel still renders (empty state, no error banner):
DONE
unifiedAgentGroups.ts, wired inUnifiedAgentsSection.tsx), definition→instance access sync (UserProfilePanelUtils.ts), instance-seeded edit state (personaDialogState.ts, passed fromUserProfilePanel.tsxandusePersonaActions.openEdit),profileSyncErrorsurfacing inEditRespondToDialog.tsx, named submit-block reasons (agentAiConfigurationPolicy.ts→AgentDefinitionDialog.tsx), scopeddesktop/src/features/agents/AGENTS.mdrules 13–15 (renumbered during the rebase, sincemainadded its own rule 12).ui/unifiedAgentGroups.test.mjs(new),ui/personaDialogState.test.mjs,ui/agentAiConfigurationPolicy.test.mjs,profile/ui/UserProfilePanelUtils.test.mjs.main@165a3b814. The only conflict was a rule-number collision indesktop/src/features/agents/AGENTS.md— both sides appended a rule 12;main's is kept and this PR's three rules became 13–15. No code conflicts.pnpm --filter buzz checkpass,pnpm --filter buzz typecheckpass,pnpm --filter buzz testpass (5607/5608, 1 skipped), acceptance specshermes-profile-binding+onboarding-agent-defaults47/47 pass.just test-unit'sbuzz-cli(3) +buzz-db(1) failures reproduce identically on base2c26b74bfin a clean worktree — pre-existing.just check-compileN/A (no Rust)./home/ubuntu/screencasts/pr313/pr313-edited.mp4; logs/tmp/gate-check.log,/tmp/gate-typecheck.log,/tmp/gate-test.log,/tmp/gate-test-unit.log,/tmp/evidence-red-unit.log,/tmp/accept.log,/tmp/control.log.IN PROGRESS
/tmp/full.logholds two earlier aborted attempts — one hung on a temp drive spec, one hitAddress already in useon port 4173; both were environment issues, since cleaned up).TODO / NEXT
cd desktop && xvfb-run -a pnpm exec playwright test(confirm nothing is listening on port 4173 first) and classify any failure against base2c26b74bf. This is the single stated requirement left unverified.NuncioCrew CIrun was cancelled by the repo owner (the org's Actions pool is being serialized across the sync stack), soNuncioCrew Gatefailed withdesktop-fast must be success when desktop=true, got cancelled. Not a code failure; needs a re-run. Nothing under.github/was touched.UserProfilePanel.tsxsits at the 1000-line ratchet ceiling (check:file-sizes), so a sibling PR adding lines there will collide;desktop/src/features/agents/AGENTS.mdandunifiedAgentGroups.tsare the other likely overlap points with parallel upstream(sync): Meta — Buzz desktop-v0.5.18 pin (Tier 1 + Tier 2/3 children) #285 work.Link to Devin session: https://app.devin.ai/sessions/fdadf46495e14ea0a0ca042c7efc5f57
Requested by: @oscarlehuu