You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7eed4b1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,6 @@
6
6
***Retry wraps download + verify**: `downloadAndVerify` retries the entire `downloadWithHash` + SHA-256 check as a unit. Do not retry at the HTTP layer alone — a corrupted transfer must re-download from scratch.
7
7
***Timeouts use native mechanisms**: HTTP uses `HttpClient`'s `socketTimeout` (idle detection). Git uses `GIT_HTTP_LOW_SPEED_LIMIT`/`GIT_HTTP_LOW_SPEED_TIME` env vars (git-native idle detection) plus `execWithTimeout` (total command timeout). Do not replace with custom polling.
8
8
***Cache keys include OS**: Both SDK and pub cache keys include the OS name for easier cache management in the GitHub Actions UI, even though `@actions/cache` internally scopes by runner OS.
9
-
***ESM mocking**: Use `vi.mock()` + `Mocked<typeof>`, not `vi.spyOn()` on module namespaces. Class mocks must use class fields (`get = vi.fn()...`), not prototype methods.
9
+
***ESM mocking**: Use `vi.mock()` + `Mocked<typeof>`, not `vi.spyOn()` on module namespaces. A class passed to `mockImplementation()`must define its members as class fields (`get = vi.fn()...`); prototype methods on it are not reachable from the created instance. Automocked classes (bare `vi.mock()`) do expose prototype methods as mocks.
10
10
***Timeout tests require handler-first ordering**: When testing `execWithTimeout` with fake timers, set up the rejection handler (`expect(promise).rejects`) before advancing timers to avoid unhandled rejections.
11
11
***Test coverage must stay at 100%**: Statements, branches, functions, and lines are all 100%. Run `npx vitest run --coverage` to verify after any change.
0 commit comments