From b038e676fccee19ab7339306867c32ba3270f242 Mon Sep 17 00:00:00 2001 From: NagyVikt Date: Wed, 22 Apr 2026 12:04:41 +0200 Subject: [PATCH] Keep lock-registry coverage aligned with the current agents tree Rebasing the lock-decoration branch onto current main pulled in the newer grouped CHANGES tree and idle-session naming. The lock-decoration regression stayed real, but its test still expected the older direct child shape, so this follow-up updates the assertions to match the nested Repo root group and the current activation timing. Constraint: The finish flow requires a clean source worktree before it will rebase, open the PR, and clean up the branch Rejected: Re-run finish against the stale rebase worktree | agent-branch-finish.sh stops on dirty or conflicted source worktrees Confidence: high Scope-risk: narrow Directive: When rebasing Active Agents coverage onto newer main, check whether repo-root CHANGES grouping or session activity labels moved before trusting old assertions Tested: node --test test/vscode-active-agents-session-state.test.js; openspec validate agent-codex-vscode-tree-lock-decorations-clean-2026-04-22-11-09 --type change --strict Not-tested: Interactive VS Code rendering --- test/vscode-active-agents-session-state.test.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/vscode-active-agents-session-state.test.js b/test/vscode-active-agents-session-state.test.js index 2463301..24da325 100644 --- a/test/vscode-active-agents-session-state.test.js +++ b/test/vscode-active-agents-session-state.test.js @@ -1514,16 +1514,18 @@ test('active-agents extension decorates sessions and repo changes from the lock const context = { subscriptions: [] }; extension.activate(context); + await flushAsyncWork(); const provider = registrations.providers[0].provider; const [repoItem] = await provider.getChildren(); const [agentsSection, changesSection] = await provider.getChildren(repoItem); - const [thinkingSection] = await provider.getChildren(agentsSection); - const [sessionItem] = await provider.getChildren(thinkingSection); + const [idleSection] = await provider.getChildren(agentsSection); + const [sessionItem] = await provider.getChildren(idleSection); assert.equal(sessionItem.label, `${path.basename(worktreePath)} 🔒 1`); assert.match(sessionItem.tooltip, /Locks 1/); - const [changeItem] = await provider.getChildren(changesSection); + const [repoRootGroup] = await provider.getChildren(changesSection); + const [changeItem] = await provider.getChildren(repoRootGroup); assert.equal(changeItem.label, 'root-file.txt'); assert.equal(changeItem.iconPath.id, 'warning'); assert.match(changeItem.tooltip, /Locked by agent\/codex\/other-task/);