Skip to content

Commit 5f1fa84

Browse files
Merge branch 'main' into fix/blank-followup-suggestions
2 parents 60e92c5 + 5e8fcc8 commit 5f1fa84

22 files changed

Lines changed: 1868 additions & 132 deletions

‎.coderabbit.yaml‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ tone_instructions: >-
55
Prioritize correctness, security, data loss, lifecycle, and regressions; avoid speculative style
66
comments and unrelated refactors.
77
8+
knowledge_base:
9+
web_search:
10+
enabled: true
11+
812
reviews:
913
profile: assertive
1014
request_changes_workflow: true
@@ -36,13 +40,16 @@ reviews:
3640
path_instructions:
3741
- path: "**/*"
3842
instructions: >-
39-
Act as an adversarial second-opinion reviewer. Verify PR claims against implementation,
40-
contracts, and tests. Trace changed inputs through normal, boundary, error, cancellation,
41-
retry, and default paths and their consumers. Seek plausible counterexamples and regressions
42-
from removed safeguards. Report only concrete, actionable findings grounded in changed code
43-
and repository conventions. Prioritize correctness, security, data loss, lifecycle, and test
44-
gaps. Avoid speculative style comments and unrelated refactors. Search for existing helpers
45-
before suggesting abstractions, and distinguish actual defects from unsupported checks.
43+
Act as an adversarial second-opinion reviewer. Verify PR claims against implementation and
44+
contracts. Trace changed inputs through normal, boundary, error, cancellation, retry, and
45+
default paths and their consumers. Seek plausible counterexamples and regressions from removed
46+
safeguards. Identify assumptions in changed code that depend on facts outside the diff. First
47+
verify repository conventions, tests, and related implementations. When a potential finding
48+
depends on external behavior, use web search and prefer official documentation, specifications,
49+
or upstream repositories. Report only concrete, actionable conflicts or failure modes, citing
50+
the relevant repository location or external source. Prioritize correctness, security, data loss,
51+
lifecycle, and test gaps. Do not report generic best practices, unsupported concerns, speculative
52+
style comments, or unrelated refactors. Search for existing helpers before suggesting abstractions.
4653
4754
- path: "**/*.{ts,tsx,js,jsx,mts,mjs,cts,cjs}"
4855
instructions: >-

‎.github/workflows/code-qa.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ jobs:
9090
run: pnpm lint
9191
- name: Check types
9292
run: pnpm check-types
93+
- name: Model-check concurrent task lifecycle
94+
run: pnpm lifecycle:model-check
9395

9496
build-vsix:
9597
name: Build test VSIX

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,30 @@ jobs:
8888
} else if (context.payload.workflow_run?.pull_requests) {
8989
eventPrNumbers = context.payload.workflow_run.pull_requests.map(pr => pr.number);
9090
}
91+
if (context.eventName === 'workflow_run' && eventPrNumbers.length === 0) {
92+
const run = context.payload.workflow_run;
93+
const headOwner = run.head_repository?.owner?.login;
94+
if (headOwner && run.head_branch && run.head_sha) {
95+
const candidates = await github.paginate(github.rest.pulls.list, {
96+
owner,
97+
repo,
98+
state: 'open',
99+
head: `${headOwner}:${run.head_branch}`,
100+
per_page: 100,
101+
});
102+
const baseRepository = `${owner}/${repo}`.toLowerCase();
103+
eventPrNumbers = candidates
104+
.filter(pr =>
105+
pr.head?.sha === run.head_sha &&
106+
pr.base?.repo?.full_name?.toLowerCase() === baseRepository
107+
)
108+
.map(pr => pr.number);
109+
core.info(
110+
`Resolved workflow_run ${run.id ?? '(unknown)'} to ` +
111+
`${eventPrNumbers.length} PR(s) by exact head owner, branch, and SHA`
112+
);
113+
}
114+
}
91115
if (eventPrNumbers.length > 0) {
92116
prs = await Promise.all(eventPrNumbers.map(async pull_number => {
93117
const { data: pr } = await github.rest.pulls.get({ owner, repo, pull_number });

‎AGENTS.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ Prefer the narrowest test layer that proves the behavior. This follows standard
4545
- Keep e2e tests focused on high-value smoke coverage across boundaries. Avoid placing detailed protocol, parsing, storage, retry, or edge-case assertions in e2e when they can be covered reliably at a lower layer.
4646
- When fixing a regression, add the regression test at the lowest layer that would have failed for the bug. Add an e2e test only if lower-level tests cannot represent the failure mode.
4747

48+
## Task Lifecycle Changes
49+
50+
- Read `docs/architecture/task-lifecycle-model.md` before changing task status, delegation, interruption, completion, abandonment, persistence ownership, or scheduler fan-out behavior.
51+
- Keep lifecycle mutations in the shared reducers under `src/core/task-persistence/taskLifecycle.ts`. Update model actions, invariants, or named semantic landmarks for every new transition or concurrency bug class representable in the lifecycle model, then run `pnpm lifecycle:model-check`.
52+
- Add extension-host E2E coverage only for a boundary the reducer model cannot prove, such as restart visibility, real persistence/rehydration, delayed provider streams, scheduler permits, or webview task scoping. Do not duplicate reducer interleavings in E2E.
53+
- Run the focused lifecycle tests and `pnpm test` before completing a Zoo Code lifecycle change.
54+
4855
## Shared Test Utilities
4956

5057
- Use `src/test-utils/stream.ts` for mechanical async-stream setup and collection.

0 commit comments

Comments
 (0)