Repository navigation
264 lines (214 loc) · 8.15 KB
/
Copy pathprcheck.yml
File metadata and controls
264 lines (214 loc) · 8.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
name: PR Check
on:
pull_request:
branches:
- dev
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
CI: 'true'
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
jobs:
static:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.22.1'
package-manager-cache: false
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint
- name: Check formatting
run: pnpm run format:check
- name: Check translations
run: pnpm run i18n
- name: Check renderer architecture baseline
run: pnpm run architecture:renderer-baseline:check
- name: Check generated icon collections
run: pnpm run icons:check
- name: Typecheck
run: pnpm run typecheck
test-main:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.22.1'
package-manager-cache: false
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Test main process
run: pnpm run test:main
- name: Verify standalone Node Harness
run: pnpm run test:harness:node
test-renderer:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.22.1'
package-manager-cache: false
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Test renderer
run: pnpm run test:renderer
env:
# Reused jsdom workers accumulate heap across suites and breach the
# 4GB Node default on 16GB runners; 6GB keeps two workers in budget.
NODE_OPTIONS: --max-old-space-size=6144
build:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.22.1'
package-manager-cache: false
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
test-native-memory:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.22.1'
package-manager-cache: false
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install and verify DuckDB VSS
run: |
pnpm run installRuntime:duckdb:vss:linux:x64
pnpm run smoke:duckdb:vss -- --platform linux --arch x64
- name: Validate portable memory behavior
run: pnpm run test:memory
# better-sqlite3-multiple-ciphers 13+ ships N-API prebuilds and no longer
# has an `install` script; the shipped prebuild already runs on the CI
# Node ABI (validated by test:memory above).
- name: Smoke native SQLite
run: node scripts/smoke-memory-native-sqlite.js
- name: Validate native Tape storage
env:
DEEPCHAT_REQUIRE_NATIVE_SQLITE: '1'
run: >-
pnpm exec vitest --config vitest.config.ts --run
test/main/tape/compactionUsage.test.ts
test/main/tape/skillMaterialization.test.ts
test/main/tape/executionJournal.test.ts
test/main/tape/taskContractPersistence.test.ts
test/main/tape/traceInspector.test.ts
test/main/session/data/tapeLifecycle.test.ts
test/main/session/data/tapeLineage.test.ts
test/main/session/data/tapeRecall.test.ts
test/main/session/data/tapeTableMockContract.test.ts
test/main/session/data/tapeToolSurfacePersistence.test.ts
test/main/session/data/tapeViewReplay.test.ts
test/main/session/data/tables/deepchatTapeEntriesTable.test.ts
test/main/session/data/tables/deepchatPendingInputsTable.test.ts
test/main/session/data/messageContent.test.ts
test/main/session/data/transcriptAtomicity.test.ts
test/main/session/data/transcriptProjection.test.ts
- name: Validate encrypted OCR artifact storage
env:
DEEPCHAT_REQUIRE_NATIVE_SQLITE: '1'
run: pnpm exec vitest --config vitest.config.ts --run test/main/ocr/ocrArtifactStore.test.ts test/main/ocr/documentOcrArtifactStore.test.ts
- name: Validate native memory storage
env:
DEEPCHAT_REQUIRE_NATIVE_SQLITE: '1'
DEEPCHAT_REQUIRE_NATIVE_DUCKDB_VSS: '1'
run: pnpm exec vitest --config vitest.config.memory-native.ts --run
- name: Validate memory retrieval quality
env:
DEEPCHAT_REQUIRE_NATIVE_SQLITE: '1'
run: pnpm run test:memory:eval
- name: Validate memory performance bounds
env:
DEEPCHAT_REQUIRE_NATIVE_SQLITE: '1'
run: pnpm run test:main:memory-perf
- name: Upload memory retrieval report
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: memory-retrieval-v1
path: test-results/memory/retrieval-v1.json
if-no-files-found: error
pr-required:
if: always()
needs:
- static
- test-main
- test-renderer
- test-native-memory
- build
runs-on: ubuntu-24.04
timeout-minutes: 2
steps:
- name: Verify required PR checks
shell: bash
env:
STATIC_RESULT: ${{ needs.static.result }}
TEST_MAIN_RESULT: ${{ needs.test-main.result }}
TEST_RENDERER_RESULT: ${{ needs.test-renderer.result }}
TEST_NATIVE_MEMORY_RESULT: ${{ needs.test-native-memory.result }}
BUILD_RESULT: ${{ needs.build.result }}
run: |
set -euo pipefail
failures=()
require_success() {
local job_name="$1"
local result="$2"
if [[ "${result}" != "success" ]]; then
failures+=("${job_name}=${result}")
fi
}
require_success "static" "${STATIC_RESULT}"
require_success "test-main" "${TEST_MAIN_RESULT}"
require_success "test-renderer" "${TEST_RENDERER_RESULT}"
require_success "test-native-memory" "${TEST_NATIVE_MEMORY_RESULT}"
require_success "build" "${BUILD_RESULT}"
if (( ${#failures[@]} > 0 )); then
printf 'Required PR checks did not pass:\n' >&2
printf ' - %s\n' "${failures[@]}" >&2
exit 1
fi
echo "All required PR checks passed."