Skip to content

Commit d227620

Browse files
committed
Merge origin/main into 1615-model-catalog-fetcher-abort
2 parents 6a37f3f + 08d05eb commit d227620

61 files changed

Lines changed: 9355 additions & 776 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/label-pr-review-state.yml‎

Lines changed: 90 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
# This workflow only reads PR metadata and never checks out or executes PR code.
1515
# pull_request_target gives fork PRs a token that can update labels and comments.
1616
pull_request_target:
17-
types: [opened, reopened, ready_for_review, synchronize, review_requested, labeled, unlabeled]
17+
types: [opened, reopened, ready_for_review, synchronize, review_requested, review_request_removed, labeled, unlabeled]
1818
pull_request_review:
1919
types: [submitted, dismissed]
2020
# Fork review events have a read-only token. CodeRabbit's status-comment update
@@ -316,14 +316,24 @@ jobs:
316316
return match?.[1] ?? null;
317317
}
318318
319+
// Collaborator permissions are repository-level, so memoize them for
320+
// the whole run: a maintainer's current-head CHANGES_REQUESTED reaches
321+
// both review loops, and scheduled sweeps reconcile every open PR.
322+
const permissionCache = new Map();
319323
async function permissionFor(username) {
324+
const key = username.toLowerCase();
325+
if (permissionCache.has(key)) return permissionCache.get(key);
320326
try {
321327
const result = await github.rest.repos.getCollaboratorPermissionLevel({
322328
owner, repo, username,
323329
});
330+
permissionCache.set(key, result.data.permission);
324331
return result.data.permission;
325332
} catch (error) {
326-
if (error.status === 404) return 'none';
333+
if (error.status === 404) {
334+
permissionCache.set(key, 'none');
335+
return 'none';
336+
}
327337
throw error;
328338
}
329339
}
@@ -339,7 +349,7 @@ jobs:
339349
'coderabbit-changes': 'Address automated review findings and push fixes.',
340350
coderabbit: 'Required CI passed. Waiting for automated review of the latest commit.',
341351
'draft-approved': 'Automated review complete for the latest commit. Mark the draft ready.',
342-
'maintainer-changes': 'Address maintainer or CODEOWNER feedback, then push an update.',
352+
'maintainer-changes': 'Address maintainer or CODEOWNER feedback, push an update, then re-request review from the blocking maintainer.',
343353
maintainer: 'Awaiting fresh human maintainer or CODEOWNER approval.',
344354
approved: 'The required review sequence passed. Remaining merge requirements apply.',
345355
};
@@ -641,6 +651,81 @@ jobs:
641651
}
642652
}
643653
654+
// Durable per-maintainer change-request blockers (issue #1671).
655+
// Unlike approvals and CodeRabbit reviews, a human maintainer's
656+
// CHANGES_REQUESTED stays binding across author pushes, base-branch
657+
// merges, CI runs, and CodeRabbit reviews until that same
658+
// maintainer's blocker is cleared by one of:
659+
// 1. the PR author explicitly re-requesting review from them,
660+
// 2. a newer review from that maintainer (its state decides), or
661+
// 3. GitHub dismissing the blocking review.
662+
// Latest state per reviewer is keyed by review id (monotonically
663+
// increasing) so reordered or duplicate history cannot change the
664+
// result. COMMENTED reviews are neutral and never clear a blocker;
665+
// a DISMISSED latest review clears it.
666+
const latestHumanReview = new Map();
667+
for (const r of reviews) {
668+
const reviewer = r.user?.login?.toLowerCase();
669+
if (!reviewer ||
670+
r.user?.type === 'Bot' ||
671+
codeRabbitLogins.has(reviewer) ||
672+
reviewer === pr.user?.login?.toLowerCase() ||
673+
r.state === 'COMMENTED') {
674+
continue;
675+
}
676+
const previous = latestHumanReview.get(reviewer);
677+
if (!previous || r.id > previous.id) {
678+
latestHumanReview.set(reviewer, r);
679+
}
680+
}
681+
const maintainerBlockers = new Map();
682+
for (const [reviewer, review] of latestHumanReview) {
683+
if (review.state !== 'CHANGES_REQUESTED') continue;
684+
if (['admin', 'maintain', 'write'].includes(await permissionFor(review.user.login))) {
685+
maintainerBlockers.set(reviewer, review);
686+
}
687+
}
688+
689+
// Clear blockers the author explicitly re-requested. Only a
690+
// review_requested timeline event whose actor is the PR author and
691+
// whose requested reviewer is the blocking maintainer clears that
692+
// maintainer's blocker. Team requests carry no requested_reviewer
693+
// and never clear an individual blocker; review_request_removed
694+
// events only trigger reconciliation and are not clearing evidence.
695+
// If the timeline cannot be reconstructed, fail closed: keep every
696+
// blocker so awaiting-author is preserved.
697+
if (maintainerBlockers.size > 0) {
698+
let timelineEvents = null;
699+
try {
700+
timelineEvents = await github.paginate(github.rest.issues.listEventsForTimeline, {
701+
owner, repo, issue_number: pr.number, per_page: 100,
702+
});
703+
} catch (error) {
704+
core.warning(
705+
`PR #${pr.number}: could not reconstruct review-request history; ` +
706+
`preserving maintainer blockers: ${error.message}`
707+
);
708+
}
709+
if (timelineEvents) {
710+
const authorLogin = pr.user?.login?.toLowerCase();
711+
for (const event of timelineEvents) {
712+
if (event.event !== 'review_requested') continue;
713+
if (event.actor?.login?.toLowerCase() !== authorLogin) continue;
714+
const requested = event.requested_reviewer?.login?.toLowerCase();
715+
if (!requested) continue;
716+
const blocker = maintainerBlockers.get(requested);
717+
if (!blocker) continue;
718+
const requestedAt = Date.parse(event.created_at ?? '');
719+
const blockedAt = Date.parse(blocker.submitted_at ?? '');
720+
// A re-request only clears blockers it follows; missing or
721+
// unparsable timestamps fail closed and keep the blocker.
722+
if (!Number.isNaN(requestedAt) && !Number.isNaN(blockedAt) && requestedAt >= blockedAt) {
723+
maintainerBlockers.delete(requested);
724+
}
725+
}
726+
}
727+
}
728+
644729
const codeRabbitReview = latest.get(codeRabbitLogin);
645730
const freshCodeRabbitReview = codeRabbitReview?.commit_id === pr.head.sha
646731
? codeRabbitReview
@@ -657,9 +742,6 @@ jobs:
657742
freshMaintainerReviews.push(review);
658743
}
659744
}
660-
const maintainerChangeRequest = freshMaintainerReviews.find(
661-
review => review.state === 'CHANGES_REQUESTED'
662-
);
663745
const automatedAuthor = pr.user?.type === 'Bot';
664746
const codeRabbitEligibleAuthor = !automatedAuthor ||
665747
codeRabbitEligibleBotLogins.has(pr.user?.login.toLowerCase());
@@ -676,7 +758,7 @@ jobs:
676758
let phase;
677759
let activateCodeRabbit = false;
678760
let recycleCodeRabbitLabel = false;
679-
if (codeRabbitChangesRequested || maintainerChangeRequest) {
761+
if (codeRabbitChangesRequested || maintainerBlockers.size > 0) {
680762
desiredLabel = 'awaiting-author';
681763
phase = codeRabbitChangesRequested ? 'coderabbit-changes' : 'maintainer-changes';
682764
} else if (!codeRabbitEligibleAuthor) {
@@ -740,7 +822,7 @@ jobs:
740822
core.info(
741823
`PR #${pr.number}: CI passing, reviews=${latest.size}, ` +
742824
`coderabbit=${freshCodeRabbitReview?.state ?? (codeRabbitEligibleAuthor ? 'pending' : 'optional')}, ` +
743-
`maintainer=${maintainerApproval?.state ?? 'pending'} → ${desiredLabel ?? '(none)'}`
825+
`maintainer=${maintainerApproval?.state ?? 'pending'}, blockers=${maintainerBlockers.size} → ${desiredLabel ?? '(none)'}`
744826
);
745827
746828
const readyForMaintainer = phase === 'maintainer' || phase === 'approved';

‎.github/workflows/release-reminder.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
DISCORD_RELEASE_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
2727
run: |
2828
set -euo pipefail
29-
owners=("Elliott" "Navad" "Toray")
29+
owners=("Elliott" "James" "Toray")
3030
anchor_date="2026-07-17"
3131
seconds_since_anchor=$(($(date -u +%s) - $(date -u -d "$anchor_date" +%s)))
3232
weeks_since_anchor=$((seconds_since_anchor / 604800))

‎CHANGELOG.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Zoo Code Changelog
22

3+
## [3.82.2]
4+
5+
### Patch Changes
6+
7+
- Prevent unavailable tools from appearing in system prompts (#505 by @DScoNOIZ, #1240 by @JunyongParkDev, PR #1505 by @DaubnerF)
8+
- Fix DeepSeek Flash image input by adding the new deepseek-flash model ID (PR #1618 by @app/zoomote)
9+
- Fix token usage tracking for Grok and xAI-compatible endpoints whose domains contain "x.ai" (#1483 by @BambinoSK, PR #1484 by @BambinoSK)
10+
- Apply the configured reasoning effort consistently across OpenAI-compatible requests (#993 by @Gringo675, PR #1604 by @JunyongParkDev)
11+
- Preserve the configured LiteLLM model ID in the model picker (#1367 by @easonLiangWorldedtech, PR #1368 by @easonLiangWorldedtech)
12+
- Fix delegated subtasks reading the parent mode in environment details and tool validation (#1623 by @edelauna, PR #1625 by @edelauna)
13+
- Add a file version token to the guarded-write path to prevent stale overwrites (PR #1383 by @easonLiangWorldedtech)
14+
- Extract the code-index manager registry for clearer ownership (PR #1622 by @WebMad)
15+
- Route Roomote pull requests through the CodeRabbit review path (PR #1598 by @app/zoomote)
16+
- Make mutation-testing findings advisory instead of blocking (PR #1610 by @app/zoomote)
17+
- Group mutation warnings by source location to remove duplicate warnings (PR #1619 by @app/zoomote)
18+
- Skip mutation testing while pull requests are in draft (PR #1645 by @app/zoomote)
19+
- Scope the mutation diff against the exact merge base so unrelated changes on main stop inflating the scope (PR #1655 by @app/zoomote)
20+
- Model test bundle dependencies in Turbo so caching stays correct (#114 by @edelauna, PR #1611 by @app/zoomote)
21+
- Separate extension unit tests from bundle smoke tests (PR #1614 by @app/zoomote)
22+
- Move extension source coverage to cacheable test lanes (#118 by @edelauna, PR #1620 by @app/zoomote)
23+
- Cache extension coverage by ownership lanes (#115 by @edelauna, PR #1631 by @app/zoomote)
24+
- Keep coverage caches valid when only verification scripts change (PR #1649 by @app/zoomote)
25+
- Union ownership-lane coverage reports before uploading to Codecov (#1647 by @DaubnerF, PR #1650 by @app/zoomote)
26+
- Validate coverage lanes dynamically in the merge queue (PR #1644 by @app/zoomote)
27+
- Stabilize the accessibility contrast audit during theme changes (#1612 by @edelauna, PR #1613 by @app/zoomote)
28+
- Make CodeRabbit completeness checks advisory (PR #1621 by @app/zoomote)
29+
330
## [3.82.1]
431

532
### Patch Changes

‎apps/vscode-e2e/src/suite/restart-persistence.test.ts‎

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ async function quitGracefully(): Promise<void> {
2525
await vscode.commands.executeCommand("workbench.action.quit")
2626
}
2727

28+
async function waitForMarkedCompletion(api: RooCodeAPI, taskId: string): Promise<void> {
29+
await waitFor(() =>
30+
api.hasTaskApiConversationHistorySequence(taskId, {
31+
userText: "RESTART_PERSISTENCE_SMOKE",
32+
assistantToolName: "attempt_completion",
33+
assistantToolInputText: MARKER,
34+
}),
35+
)
36+
}
37+
2838
async function runCreate(api: RooCodeAPI): Promise<void> {
2939
let taskId: string | undefined
3040
let createPhasePassed = false
@@ -86,16 +96,7 @@ async function runVerify(api: RooCodeAPI): Promise<void> {
8696
const historyItem = await api.getTaskHistoryItem(taskId)
8797
assert.ok(historyItem, "Task history item should be available after restart")
8898
assert.ok(historyItem.task.includes("RESTART_PERSISTENCE_SMOKE"), "History title should persist after restart")
89-
const restoredCompletion = await api.hasTaskApiConversationHistorySequence(taskId, {
90-
userText: "RESTART_PERSISTENCE_SMOKE",
91-
assistantToolName: "attempt_completion",
92-
assistantToolInputText: MARKER,
93-
})
94-
assert.strictEqual(
95-
restoredCompletion,
96-
true,
97-
"Fresh-host history should restore the marked user turn followed by its assistant completion",
98-
)
99+
await waitForMarkedCompletion(api, taskId)
99100

100101
await api.resumeTask(taskId)
101102
await waitFor(() => taskMessages.some(({ type, ask }) => type === "ask" && ask === "resume_completed_task"))
@@ -106,16 +107,7 @@ async function runVerify(api: RooCodeAPI): Promise<void> {
106107
reopenedHistoryItem.task.includes("RESTART_PERSISTENCE_SMOKE"),
107108
"Reopened task should retain its persisted history title",
108109
)
109-
const reopenedCompletion = await api.hasTaskApiConversationHistorySequence(taskId, {
110-
userText: "RESTART_PERSISTENCE_SMOKE",
111-
assistantToolName: "attempt_completion",
112-
assistantToolInputText: MARKER,
113-
})
114-
assert.strictEqual(
115-
reopenedCompletion,
116-
true,
117-
"Reopened-host history should restore the marked user turn followed by its assistant completion",
118-
)
110+
await waitForMarkedCompletion(api, taskId)
119111

120112
await writePhaseResult(getResultsDir(), {
121113
version: PHASE_RESULT_VERSION,
-546 Bytes
Loading

‎apps/vscode-e2e/src/visual/electron.visual.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,16 @@ for (const scenario of scenarios) {
238238

239239
const sidebar = running.page.locator(".part.sidebar")
240240
await expect(sidebar).toBeVisible()
241-
await expect(sidebar).toHaveScreenshot(`electron-${scenario.name}-sidebar.png`)
241+
242+
// Mask the dynamic token counter so system-prompt changes that alter
243+
// token counts do not cause pixel diffs when layout is unchanged.
244+
const webviewFrame = running.page.frameLocator('iframe[src*="extensionId=ZooCodeOrganization.zoo-code"]')
245+
const tokenCountMask = webviewFrame
246+
.frameLocator("iframe")
247+
.locator('[data-testid="context-tokens-count"],[data-testid="context-window-size"]')
248+
await expect(sidebar).toHaveScreenshot(`electron-${scenario.name}-sidebar.png`, {
249+
mask: [tokenCountMask],
250+
})
242251

243252
if (scenario.webviewSnapshot) {
244253
const webview = running.page.locator('iframe[src*="extensionId=ZooCodeOrganization.zoo-code"]')

‎docs/architecture/native-tool-call-parser-scoping-model.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For focused debugging, run this submodel directly with:
1212
pnpm parser-scope:model-check
1313
```
1414

15-
The command is composed into the same verification suite, but this remains a separate protocol and state space from the persisted task lifecycle model and shared-store concurrency model. It owns its parser-scoping invariants and adds no parser state to `HistoryItem` or `taskLifecycle.ts`; instead, it replays the public production `NativeToolCallParser` APIs using two independent scope objects.
15+
The command runs this check sequentially with the other lifecycle checks, but this remains a separate protocol and state space from the persisted task lifecycle model and shared-store concurrency model. It owns its parser-scoping invariants and adds no parser state to `HistoryItem` or `taskLifecycle.ts`; instead, it replays the public production `NativeToolCallParser` APIs using two independent scope objects. The authoritative [lifecycle coverage audit and issue tracker](./task-lifecycle-model.md#coverage-audit) records its evidence class and cross-model limits.
1616

1717
## Bounds and replay
1818

‎docs/architecture/task-cleanup-protocol-model.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ pnpm cleanup-protocol:model-check
1414

1515
This is a separate child model from the persisted task lifecycle and shared-store concurrency models. It follows the native tool-call parser model pattern: keep an independent bounded state space for an independent protocol, require every action and semantic landmark to remain reachable, and connect the abstract claims to focused production tests.
1616

17+
The authoritative [lifecycle coverage audit and issue tracker](./task-lifecycle-model.md#coverage-audit) classifies how this abstract model relates to production and other submodels.
18+
1719
## Bounds and environment actions
1820

1921
The model uses two tasks and explores every reachable interleaving through depth 20, with an explicit 100,000-state budget. Abort, disposal, final-save, provider abort/drain phases, and shutdown-cursor state are modeled directly. Independent abort and disposal calls may interleave freely, while provider-initiated calls are gated to the current shutdown task. Cleanup and editor-reversion settlement or rejection are environment actions, so the explorer does not assume they eventually occur.

0 commit comments

Comments
 (0)