Skip to content

Commit 72156fd

Browse files
Merge branch 'main' into docs/agents-typed-test-guidance
2 parents 9c00ef4 + a1ca0c8 commit 72156fd

292 files changed

Lines changed: 11653 additions & 2456 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.

‎.coderabbit.yaml‎

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: en-US
3+
tone_instructions: >-
4+
Be direct and evidence-first. Report only concrete, actionable findings grounded in changed code.
5+
Prioritize correctness, security, data loss, lifecycle, and regressions; avoid speculative style
6+
comments and unrelated refactors.
7+
8+
knowledge_base:
9+
web_search:
10+
enabled: true
11+
12+
reviews:
13+
profile: assertive
14+
request_changes_workflow: true
15+
high_level_summary: true
16+
high_level_summary_in_walkthrough: true
17+
review_status: true
18+
review_details: true
19+
collapse_walkthrough: true
20+
changed_files_summary: true
21+
poem: false
22+
23+
auto_review:
24+
enabled: false
25+
drafts: false
26+
auto_incremental_review: true
27+
labels:
28+
- "coderabbit-review-active"
29+
30+
path_filters:
31+
- "!**/node_modules/**"
32+
- "!**/dist/**"
33+
- "!**/out/**"
34+
- "!**/coverage/**"
35+
- "!**/.turbo/**"
36+
- "!apps/vscode-e2e/.vscode-test/**"
37+
- "!bin/*.vsix"
38+
- "!webview-ui/**/__screenshots__/**"
39+
40+
path_instructions:
41+
- path: "**/*"
42+
instructions: >-
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.
53+
54+
- path: "**/*.{ts,tsx,js,jsx,mts,mjs,cts,cjs}"
55+
instructions: >-
56+
Check strict typing and exhaustive behavior across normal, boundary, error,
57+
cancellation, retry, and compatibility paths. Verify promises and errors are handled,
58+
existing helpers are reused, and new code introduces no `any`, unjustified double
59+
assertions, floating promises, duplicated helpers, or increased lint suppressions.
60+
61+
- path: "{**/*.{test,spec}.{ts,tsx,js,jsx},**/__tests__/**}"
62+
instructions: >-
63+
Require regression coverage at the lowest valid harness with behavior-focused
64+
assertions, including relevant negative, error, false/unset, and boundary cases.
65+
Check cleanup and deterministic async behavior and prefer shared typed test helpers.
66+
Visible webview changes require a durable Playwright component snapshot; behavior-only
67+
changes do not.
68+
Reject weak assertions on values that could take multiple forms: .toBeDefined() or
69+
.toHaveBeenCalled() alone are not sufficient when the actual type, value, or object
70+
identity is verifiable. For listener registration and removal, assert the same function
71+
reference was added and removed (not expect.any(Function)).
72+
Flag tests that assert in-flight behavior only after the call completes — these cannot
73+
prove the behavior fires during execution. Check that describe block names match the
74+
actual subjects of the tests they contain.
75+
76+
- path: "apps/vscode-e2e/**"
77+
instructions: >-
78+
Reserve end-to-end coverage for behavior that requires the real VS Code host, workspace
79+
APIs, extension activation, webview messaging, file watchers, or a full workflow. Keep
80+
detailed protocol, parsing, storage, retry, and edge cases at lower test layers.
81+
82+
- path: "{packages/types/src/**,webview-ui/src/components/settings/**,src/core/config/**,src/core/webview/**}"
83+
instructions: >-
84+
For persisted settings, verify the complete schema/storage/runtime/webview round trip,
85+
shared default semantics, and focused true plus false/unset tests. SettingsView controls
86+
must read and update local `cachedState`, include the value in the explicit save payload,
87+
and receive the persisted value back from extension state.
88+
89+
- path: "src/**"
90+
instructions: >-
91+
Verify extension/webview contracts, cancellation and error propagation, VS Code
92+
lifecycle correctness, and behavior under retries and partial failure. Check listeners,
93+
resources, and providers are disposed without stale state or duplicate work.
94+
95+
- path: "webview-ui/**"
96+
instructions: >-
97+
Check React state and effect dependencies, cleanup, accessibility, i18n, and light/dark
98+
theme behavior. New markup should use Tailwind; add VS Code CSS variables to
99+
`src/index.css` before Tailwind use. Use Vitest for behavior and Playwright component
100+
snapshots only for durable visible changes.
101+
102+
- path: "{src/api/**,src/core/prompts/**,src/core/tools/**,src/services/mcp/**,src/services/destructive-command-guard/**}"
103+
instructions: >-
104+
Treat model, provider, MCP, path, command, and tool data as untrusted. Check approval and
105+
allowlist bypasses, injection and traversal risks, secrets/PII exposure in logs, abort and
106+
stream behavior, retries, provider compatibility, and enforcement at execution time—not
107+
only at presentation or planning time.
108+
109+
- path: "{src/**/{state,history,task,tasks,service,services,cache,caches,worktree,worktrees}/**,packages/**/{state,history,task,tasks,service,services,cache,caches,worktree,worktrees}/**,webview-ui/src/**/{state,history,task,tasks,service,services,cache,caches,worktree,worktrees}/**}"
110+
instructions: >-
111+
Check persistence and lifecycle invariants: awaited atomic writes, rollback or explicit
112+
partial-failure behavior, cross-window state consistency, stale listeners/watchers,
113+
cancellation, idempotency, and safe restart/resume without lost or duplicated state.
114+
115+
- path: ".github/**"
116+
instructions: >-
117+
Require full commit SHA pins, least-privilege permissions, safe expression and shell
118+
interpolation, and trusted metadata handling. Privileged workflows must never check out,
119+
execute, install from, or otherwise trust a fork PR head.
120+
121+
- path: "{AGENTS.md,**/AGENTS.md,CONTRIBUTING.md,.changeset/**,CHANGELOG.md,src/CHANGELOG.md}"
122+
instructions: >-
123+
Enforce repository policy: routine PRs must not add changesets or edit changelogs except
124+
during release preparation. Verify documentation describes real behavior and contracts,
125+
and deprioritize prose-only nits that do not affect correctness or usability.
126+
127+
pre_merge_checks:
128+
custom_checks:
129+
- name: Regression evidence
130+
mode: warning
131+
instructions: >-
132+
Fail only when a concrete changed behavior lacks focused coverage at the lowest valid
133+
test layer, tests merely mirror implementation, an affected error/negative/unset branch
134+
is omitted, or a durable visible UI change lacks its required Playwright component
135+
snapshot. Do not demand tests for unchanged behavior, mechanical configuration, or every
136+
branch without a plausible regression scenario. Cite the changed behavior and missing
137+
evidence.
138+
- name: Trust and persistence invariants
139+
mode: error
140+
instructions: >-
141+
Fail only for a concrete changed path that leaks secrets or PII, trusts or executes
142+
unvalidated input, bypasses approval or allowlist controls, can lose persisted state due
143+
to a missing await, non-atomic write, or omitted default propagation, or leaks lifecycle
144+
resources. Cite the path and a plausible triggering scenario; pass when no such changed
145+
path exists.
146+
147+
tools:
148+
eslint:
149+
enabled: true
150+
actionlint:
151+
enabled: true
152+
shellcheck:
153+
enabled: true
154+
gitleaks:
155+
enabled: true
156+
semgrep:
157+
enabled: true

‎.github/pull_request_template.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Detail the steps to test your changes. This helps reviewers verify your work.
4646

4747
<!--
4848
For UI changes to static rendered state, the primary artifact is a committed
49-
Playwright CT snapshot (`*.visual.tsx` in `webview-ui/`) — that baseline
49+
Playwright Story Gallery snapshot (`*.visual.tsx` in `webview-ui/`) — that baseline
5050
becomes durable regression coverage for the surface. See
5151
`webview-ui/AGENTS.md` for what deserves a snapshot.
5252

‎.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

0 commit comments

Comments
 (0)