-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·458 lines (383 loc) · 18.5 KB
/
Makefile
File metadata and controls
executable file
·458 lines (383 loc) · 18.5 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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
.ONESHELL:
SHELL := bash
# Parallelism detection (fallback to 8 threads)
JOBS ?= $(shell \
if command -v nproc >/dev/null 2>&1; then nproc; \
elif command -v sysctl >/dev/null 2>&1; then sysctl -n hw.ncpu; \
else echo 8; fi )
# Propagate to cargo by default
export CARGO_BUILD_JOBS := $(JOBS)
# Package/binary names for CLI (override via env if needed)
# Keep binary name `devit`; package is the CLI crate name.
TAG ?= 0.1.0
DEVIT_PKG ?= devit-cli
DEVIT_BIN ?= devit
# Ensure cargo gets a binary NAME, not a path possibly set in env
DEVIT_BIN_NAME := $(notdir $(DEVIT_BIN))
PLUGINS_DIR ?= .devit/plugins
BUILD_GIT ?= $(shell git describe --tags --dirty --always 2>/dev/null || echo unknown)
BUILD_TIME ?= $(shell date -u +"%Y-%m-%d %H:%M:%S UTC")
BUILD_ID ?= $(BUILD_TIME) | $(BUILD_GIT)
export DEVIT_BUILD_ID_OVERRIDE := $(BUILD_ID)
CARGO ?= cargo
CARGO_DEFAULT_OPTS := -j $(JOBS)
.PHONY: fmt fmt-check fmt-fix clippy lint lint-all test test-cli build build-release smoke ci ci-local check verify help coverage \
build-cli run-cli release-cli check-cli ci-cli help-cli plugin-echo-sum plugin-echo-sum-run \
e2e e2e-plugin e2e-runner lint-flags test-impacted clean clean-reports clean-artifacts reports \
run-chat build-chat studio studio-ui studio-app studio-deps
help:
@echo "Targets: fmt | fmt-check | fmt-fix | clippy | lint | test | test-cli | build | build-release | smoke | check | verify | ci | coverage | e2e-runner"
@echo "Chat: build-chat | run-chat"
@echo "Studio: studio | studio-ui | studio-app | studio-deps | studio-fresh"
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all -- --check
fmt-fix: fmt
clippy:
cargo clippy --workspace --lib --bins -- -D warnings -A unused_variables -A unused_imports -A dead_code -A unused_mut -A clippy::derivable_impls -A clippy::manual_find -A clippy::manual_strip -A clippy::unnecessary_map_or -A clippy::collapsible_if -A clippy::ptr_arg -A clippy::manual_inspect -A clippy::new_without_default -A clippy::collapsible_else_if -A clippy::to_string_in_format_args -A clippy::unnecessary_cast -A clippy::io_other_error -A clippy::manual_ignore_case_cmp -A clippy::needless_borrow -A clippy::while_let_on_iterator
clippy-bins:
cargo clippy --workspace --bins -- -D warnings -A unused_variables -A unused_imports -A dead_code -A unused_mut -A clippy::derivable_impls -A clippy::manual_find -A clippy::manual_strip -A clippy::unnecessary_map_or -A clippy::collapsible_if -A clippy::ptr_arg -A clippy::manual_inspect -A clippy::new_without_default -A clippy::collapsible_else_if -A clippy::to_string_in_format_args -A clippy::unnecessary_cast -A clippy::io_other_error -A clippy::manual_ignore_case_cmp -A clippy::needless_borrow -A clippy::while_let_on_iterator
lint: clippy fmt-check
test:
cargo test --workspace --lib
test-cli:
cargo test -p devit-cli --tests
build:
cargo build --workspace --bins
build-release:
cargo build --workspace --release
mcp:
cargo build --release -p mcp-server
@echo "✅ MCP server rebuilt: target/release/mcp-server"
smoke:
./scripts/prepush-smoketest.sh
plan:
cargo run -p $(DEVIT_PKG) -- plan
watch:
cargo run -p $(DEVIT_PKG) -- watch
build-chat:
@echo "🔨 Building devit-chat (release)..."
cargo build --release -p devit-chat
run-chat: build-chat
@echo "🚀 Starting devit-chat..."
./target/release/devit-chat --model qwen2.5-coder:7b
# ===== Studio (Tauri IDE) =====
studio-ui:
@echo "🎨 Starting Vite dev server..."
cd studio-ui && npm run dev
studio-app:
@echo "🖥️ Starting Tauri app (vite must be running on :5173)..."
cd crates/studio && cargo tauri dev
# Install studio-ui npm dependencies (skips if node_modules up to date)
studio-deps:
@if ! command -v node >/dev/null 2>&1; then \
echo "Error: node not found. Install Node.js (>=18) first."; \
echo " curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -"; \
echo " sudo apt install -y nodejs"; \
exit 1; \
fi
@if [ ! -d studio-ui/node_modules ] || [ studio-ui/package.json -nt studio-ui/node_modules/.package-lock.json ]; then \
echo "Installing studio-ui npm dependencies..."; \
cd studio-ui && npm install; \
else \
echo "studio-ui dependencies up to date."; \
fi
# Pre-build backends before starting studio (ensures latest code)
studio-build: studio-deps
@echo "🔨 Building backends..."
cargo build --release -p devit-lmstudio -p devit-ollama -p devit-llama-cpp -p devit-backend-core
studio:
@echo "🚀 Starting devit-studio (UI + App)..."
@echo " Terminal 1: make studio-ui"
@echo " Terminal 2: make studio-app"
@echo ""
@echo "Or run in background:"
@cd studio-ui && npm run dev & sleep 3 && cd crates/studio && cargo tauri dev
# Watch mode: rebuild and restart on backend changes
studio-watch:
@echo "👀 Starting studio with backend watch..."
@echo " Watching: crates/backends/**/*.rs"
@cd studio-ui && npm run dev & \
sleep 2 && \
cargo watch -w crates/backends -w crates/studio/src -s 'cargo build -p devit-studio && cd crates/studio && cargo tauri dev' --ignore 'target/*'
# Rebuild backends then start studio (useful after editing backend code)
studio-fresh: studio-build
@echo "🚀 Starting freshly built studio..."
@cd studio-ui && npm run dev & sleep 3 && cd crates/studio && cargo tauri dev
check: fmt clippy
cargo check --workspace
verify: check build test
ci: verify
coverage:
@if command -v cargo-tarpaulin >/dev/null 2>&1; then \
cargo tarpaulin --workspace --out html --output-dir target/coverage; \
echo "Coverage report generated in target/coverage/"; \
else \
echo "cargo-tarpaulin not available, skipping coverage"; \
fi
reports:
@cargo run -p $(DEVIT_PKG) --bin $(DEVIT_BIN_NAME) -- report sarif >/dev/null
@cargo run -p $(DEVIT_PKG) --bin $(DEVIT_BIN_NAME) -- report junit >/dev/null
@ls -lah .devit/reports || true
lint-all: lint lint-flags
@bash scripts/lint_errors.sh
clean:
cargo clean
clean-reports:
rm -rf .devit/reports
clean-artifacts:
rm -rf .devit/reports .devit/merge_backups dist bench/workspaces bench/.venv bench/predictions.jsonl bench/bench_logs || true
ci-local: verify reports
@cargo run -p $(DEVIT_PKG) --bin $(DEVIT_BIN_NAME) -- quality gate --json \
--junit .devit/reports/junit.xml --sarif .devit/reports/sarif.json | tee .devit/reports/quality.json
@echo "ci-local: OK"
# Lint flags (kebab-case only + expected flags present)
lint-flags:
@rg --hidden --glob '!target' --glob '!.prompt_ignore_me' -- '--[a-z]+_[a-z]+' || echo 'OK: aucun flag snake_case'
# Vérifie la présence d'au moins un des flags attendus (tolère fallback fichier)
@( rg --hidden --glob '!target' --glob '!.prompt_ignore_me' -- '--timeout-secs|--policy-dump|--no-audit|--max-calls-per-min|--max-json-kb|--cooldown-ms|--context-head|--head-limit|--head-ext' \
|| rg -- '--timeout-secs|--policy-dump|--no-audit|--max-calls-per-min|--max-json-kb|--cooldown-ms|--context-head|--head-limit|--head-ext' scripts/flags_expected.txt ) >/dev/null \
|| (echo 'WARN: flags attendus manquants'; exit 1)
.PHONY: release-draft release-publish
release-draft:
@if ! command -v gh >/dev/null 2>&1; then \
echo "error: GitHub CLI 'gh' non trouvé. Installe-le puis authentifie-toi (gh auth login)"; exit 2; \
fi
chmod +x scripts/extract_release_notes.sh
scripts/extract_release_notes.sh "$(TAG)" > /tmp/devit_release_notes.md
gh release create "$(TAG)" --draft -F /tmp/devit_release_notes.md || \
gh release edit "$(TAG)" --draft -F /tmp/devit_release_notes.md
@echo "Draft créée/mise à jour pour $(TAG)"
release-publish:
@if ! command -v gh >/dev/null 2>&1; then \
echo "error: GitHub CLI 'gh' non trouvé. Installe-le puis authentifie-toi (gh auth login)"; exit 2; \
fi
gh release edit "$(TAG)" --draft=false
@echo "Release publiée pour $(TAG)"
# ===== CLI-focused targets (safe, no side effects) =====
build-cli:
cargo build -p $(DEVIT_PKG) --bin $(DEVIT_BIN_NAME) --verbose
run-cli:
cargo run -p $(DEVIT_PKG) --bin $(DEVIT_BIN_NAME) -- --help
release-cli:
cargo build -p $(DEVIT_PKG) --bin $(DEVIT_BIN_NAME) --release --verbose
cargo build -p devitd --release --verbose
# Static binary builds (target musl for static linking)
.PHONY: build-static release-static dist-static
build-static:
@echo "Building static binary using musl target..."
@if ! command -v musl-gcc >/dev/null 2>&1; then \
echo "Warning: musl-gcc not found. Install with: apt-get install musl-tools"; \
echo "Alternative: Use docker build or cross-compilation"; \
echo "Falling back to regular build..."; \
$(MAKE) build; \
exit 0; \
fi
@if ! rustup target list --installed | grep -q x86_64-unknown-linux-musl; then \
echo "Installing musl target..."; \
rustup target add x86_64-unknown-linux-musl; \
fi
cargo build -p $(DEVIT_PKG) --bin $(DEVIT_BIN_NAME) --target x86_64-unknown-linux-musl --verbose
cargo build -p devitd --target x86_64-unknown-linux-musl --verbose
release-static:
@echo "Building static release binary using musl target..."
@if ! command -v musl-gcc >/dev/null 2>&1; then \
echo "Warning: musl-gcc not found. Install with: apt-get install musl-tools"; \
echo "Alternative: Use docker build or cross-compilation"; \
echo "Falling back to regular release build..."; \
$(MAKE) release-cli; \
exit 0; \
fi
@if ! rustup target list --installed | grep -q x86_64-unknown-linux-musl; then \
echo "Installing musl target..."; \
rustup target add x86_64-unknown-linux-musl; \
fi
cargo build -p $(DEVIT_PKG) --bin $(DEVIT_BIN_NAME) --target x86_64-unknown-linux-musl --release --verbose
cargo build -p devitd --target x86_64-unknown-linux-musl --release --verbose
# Create static distribution package
dist-static: release-static
mkdir -p dist/pkg-static
cp target/x86_64-unknown-linux-musl/release/$(DEVIT_BIN_NAME) dist/pkg-static/
cp target/x86_64-unknown-linux-musl/release/mcp-server dist/pkg-static/ 2>/dev/null || echo "mcp-server (musl) not built, skipping"
[ -f LICENSE ] && cp LICENSE dist/pkg-static/ || true
[ -f README.md ] && cp README.md dist/pkg-static/ || true
tar -czf dist/$(DEVIT_BIN_NAME)-$(TAG)-linux-x86_64-static.tar.gz -C dist pkg-static
( cd dist && sha256sum $(DEVIT_BIN_NAME)-$(TAG)-linux-x86_64-static.tar.gz > $(DEVIT_BIN_NAME)-$(TAG)-linux-x86_64-static.sha256 )
@echo "Static binary distribution created:"
@ls -lah dist/*static* && echo "SHA256:" && cat dist/$(DEVIT_BIN_NAME)-$(TAG)-linux-x86_64-static.sha256
## Crée les artefacts de release (tar.gz + SHA256SUMS) selon directives.txt L1
.PHONY: dist
dist: release-cli release-static
@echo "Creating release artifacts for version $(TAG)..."
mkdir -p dist
# Build standard binary package
mkdir -p dist/pkg-gnu
cp target/release/$(DEVIT_BIN_NAME) dist/pkg-gnu/
cp target/release/mcp-server dist/pkg-gnu/ 2>/dev/null || echo "mcp-server not found, building..."
@if [ ! -f target/release/mcp-server ]; then \
cargo build --release -p mcp-server; \
cp target/release/mcp-server dist/pkg-gnu/; \
fi
cp target/release/devitd dist/pkg-gnu/ 2>/dev/null || echo "devitd not found, building..."
@if [ ! -f target/release/devitd ]; then \
cargo build --release -p devitd; \
cp target/release/devitd dist/pkg-gnu/; \
fi
[ -f LICENSE ] && cp LICENSE dist/pkg-gnu/ || true
[ -f README.md ] && cp README.md dist/pkg-gnu/ || true
[ -f CHANGELOG.md ] && cp CHANGELOG.md dist/pkg-gnu/ || true
tar -czf dist/devit-0.1.0-x86_64-unknown-linux-gnu.tar.gz -C dist pkg-gnu
# Build static binary package (musl)
mkdir -p dist/pkg-musl
@if [ -f target/x86_64-unknown-linux-musl/release/$(DEVIT_BIN_NAME) ]; then \
cp target/x86_64-unknown-linux-musl/release/$(DEVIT_BIN_NAME) dist/pkg-musl/; \
cp target/x86_64-unknown-linux-musl/release/mcp-server dist/pkg-musl/ 2>/dev/null || echo "mcp-server musl not found, using gnu version"; \
cp target/x86_64-unknown-linux-musl/release/devitd dist/pkg-musl/ 2>/dev/null || echo "devitd musl not found, using gnu version"; \
else \
echo "Using GNU binaries for musl package (musl build failed)"; \
cp target/release/$(DEVIT_BIN_NAME) dist/pkg-musl/; \
cp target/release/mcp-server dist/pkg-musl/ 2>/dev/null || true; \
cp target/release/devitd dist/pkg-musl/ 2>/dev/null || true; \
fi
[ -f LICENSE ] && cp LICENSE dist/pkg-musl/ || true
[ -f README.md ] && cp README.md dist/pkg-musl/ || true
[ -f CHANGELOG.md ] && cp CHANGELOG.md dist/pkg-musl/ || true
tar -czf dist/devit-0.1.0-x86_64-unknown-linux-musl.tar.gz -C dist pkg-musl
# Generate consolidated SHA256SUMS file
cd dist && sha256sum devit-0.1.0-*.tar.gz > SHA256SUMS
# Cleanup temporary directories
rm -rf dist/pkg-gnu dist/pkg-musl
@echo "Release artifacts created:"
@ls -lah dist/devit-0.1.0-*.tar.gz dist/SHA256SUMS || true
@echo "Checksums:"
@cat dist/SHA256SUMS || true
check-cli:
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --all-targets --no-fail-fast -- --nocapture
ci-cli: check-cli build-cli
help-cli:
@echo "build-cli : build $(DEVIT_BIN) from $(DEVIT_PKG)"
@echo "release-cli : build release of $(DEVIT_BIN)"
@echo "run-cli : run $(DEVIT_BIN) --help"
@echo "check-cli : fmt + clippy -D warnings + tests"
@echo "ci-cli : check-cli + build-cli"
@echo "dist : package tar.gz + sha256 (local)"
.PHONY: commit-dry-run
commit-dry-run:
@target/debug/devit fs_patch_apply --commit-dry-run >/dev/null && echo "OK" || echo "FAIL"
# ===== MCP helpers =====
.PHONY: build-exp run-mcp mcp-policy mcp-health mcp-stats e2e-mcp
build-exp:
@cargo build -p $(DEVIT_PKG) --features experimental --bins
run-mcp:
@target/debug/mcp-server --working-dir $(PWD)
mcp-policy:
@target/debug/devit-mcp --cmd "target/debug/mcp-server --working-dir $(PWD)" --policy | jq
mcp-health:
@target/debug/devit-mcp --cmd "target/debug/mcp-server --working-dir $(PWD)" --call server.health --json '{}' | jq
mcp-stats:
@target/debug/devit-mcp --cmd "target/debug/mcp-server --working-dir $(PWD)" --call server.stats --json '{}' | jq
e2e-mcp:
@set -e; \
cargo build -p $(DEVIT_PKG) --features experimental --bins; \
cargo build -p mcp-server; \
SRV="target/debug/mcp-server --working-dir $(PWD)"; \
( $$SRV & echo $$! > .devit/mcpd.pid ); \
sleep 0.5; \
target/debug/devit-mcp --cmd "$$SRV" --policy >/dev/null; \
target/debug/devit-mcp --cmd "$$SRV" --call server.health --json '{}' >/dev/null || true; \
target/debug/devit-mcp --cmd "$$SRV" --call server.stats --json '{}' >/dev/null || true; \
echo '{"tool":"echo","args":{"msg":"ok"}}' | target/debug/devit-mcp --cmd "$$SRV" --call devit.tool_call --json @- >/dev/null || true; \
kill $$(cat .devit/mcpd.pid) 2>/dev/null || true; \
rm -f .devit/mcpd.pid; \
echo "E2E MCP: OK"
e2e:
@echo "[e2e] Running mini set of e2e tests..."
@set -e; \
cargo build -p $(DEVIT_PKG) --bins; \
cargo build -p mcp-server; \
echo "[e2e] Test 1: mcp-server --help"; \
cargo run -p mcp-server -- --help >/dev/null && echo " ✓ mcp-server help works"; \
echo "[e2e] Test 2: devit help"; \
cargo run -p $(DEVIT_PKG) -- --help >/dev/null && echo " ✓ CLI help works"; \
echo "[e2e] Test 3: Core integration"; \
echo '{}' | timeout 5 cargo run -p mcp-server -- --working-dir $(PWD) || echo " ✓ mcp-server stdio mode starts (timeout expected)"; \
echo "[e2e] All mini e2e tests passed"
# R1-R3 E2E Tests: TestRunner + Auto-rollback integration
e2e-runner:
@echo "[e2e-runner] Running R1-R3 complete end-to-end tests..."
@echo "[e2e-runner] Order: 1) runner pass → 2) runner fail → 3) apply+autorevert → 4) apply+no-autorevert → 5) sandbox (optional)"
@echo "[e2e-runner] Note: Targeting specific test file to avoid compilation issues in other test files"
@set -e; \
echo "[e2e-runner] Step 1/4: Testing Cargo test execution (pass)"; \
cargo test --test e2e_runner_complete e2e_runner_cargo_pass -- --nocapture; \
echo " ✓ e2e_runner_cargo_pass completed"; \
echo "[e2e-runner] Step 2/4: Testing pytest execution (fail detection)"; \
if command -v python3 >/dev/null 2>&1 && python3 -c "import pytest" 2>/dev/null; then \
cargo test --test e2e_runner_complete e2e_runner_pytest_fail -- --nocapture; \
echo " ✓ e2e_runner_pytest_fail completed"; \
else \
echo " ⚠ pytest not available, skipping e2e_runner_pytest_fail"; \
fi; \
echo "[e2e-runner] Step 3/4: Testing apply+test+auto-revert workflow"; \
cargo test --test e2e_runner_complete e2e_apply_then_tests_fail_autorevert -- --nocapture; \
echo " ✓ e2e_apply_then_tests_fail_autorevert completed"; \
echo "[e2e-runner] Step 4/4: Testing apply+test+no-autorevert workflow"; \
cargo test --test e2e_runner_complete e2e_apply_then_tests_fail_no_autorevert -- --nocapture; \
echo " ✓ e2e_apply_then_tests_fail_no_autorevert completed"; \
echo "[e2e-runner] Note: e2e_sandbox_strict_disables_network is ignored (requires bwrap)"; \
echo "[e2e-runner] ✅ All R1-R3 E2E tests completed successfully!"
e2e-plugin:
@bash scripts/e2e_plugin.sh
test-impacted:
@cargo run -p $(DEVIT_PKG) -- test impacted --framework auto --timeout-secs 300
# ===== Plugins (WASM/WASI) helpers =====
plugin-echo-sum:
@echo "[plugin-echo-sum] ensure wasm32-wasip1 target (WASI Preview 1)"
rustup target add wasm32-wasip1 >/dev/null 2>&1 || true
@echo "[plugin-echo-sum] build example plugin (echo_sum)"
PL_EX=examples/plugins/echo_sum; \
cargo build --manifest-path $$PL_EX/Cargo.toml --target wasm32-wasip1 --release; \
ART=$$PL_EX/target/wasm32-wasip1/release/echo_sum.wasm; \
mkdir -p $(PLUGINS_DIR)/echo_sum; \
cp $$ART $(PLUGINS_DIR)/echo_sum/
@printf '%s\n' \
'id = "echo_sum"' \
'name = "Echo Sum"' \
'wasm = "echo_sum.wasm"' \
'version = "0.1.0"' \
'allowed_dirs = []' \
'env = []' \
> "$(PLUGINS_DIR)/echo_sum/devit-plugin.toml"
@echo "[plugin-echo-sum] done"
plugin-echo-sum-run: plugin-echo-sum
@echo "[plugin-echo-sum-run] invoking echo_sum with {a:1,b:2}"
@echo '{"a":1,"b":2}' | cargo run -p $(DEVIT_PKG) --features experimental --bin devit-plugin -- invoke --id echo_sum
# Generic IDs generator: N defaults to 50 (usage: make bench-ids N=50)
bench-ids:
set -e
N=${N:-50}
# ensure venv & deps
if [ ! -x bench/.venv/bin/python ]; then \
python3 -m venv bench/.venv; \
bench/.venv/bin/pip install -U pip; \
bench/.venv/bin/pip install -r bench/requirements.txt datasets gitpython tqdm; \
fi
# generate ids
bench/.venv/bin/python - <<-'PY'
import os
from datasets import load_dataset
N = int(os.environ.get('N','50'))
ds = load_dataset('princeton-nlp/SWE-bench_Lite', split='test')
ids = ds.select(range(min(N, len(ds))))['instance_id']
path = f'bench/instances_lite_{N}.txt'
open(path,'w').write('\n'.join(ids)+'\n')
print('OK ->', path, ':', len(ids), 'ids')
PY
mini-pipeline:
@./scripts/mini_patch_pipeline_verbose.sh
.PHONY: audit
audit:
@bash tools/devit_checkup.sh devit_audit