Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
0f079de
Delete unused LLM cache module
AlexanderOnischenko Dec 20, 2025
ff05569
Fix batch logging path and update CLI defaults
AlexanderOnischenko Dec 20, 2025
80b0239
Add regression-friendly batch controls and case helpers
AlexanderOnischenko Dec 20, 2025
f326869
Refactor batch CLI into module and tighten regression semantics
AlexanderOnischenko Dec 20, 2025
84451ea
Fix case command parser construction
AlexanderOnischenko Dec 20, 2025
b921779
Honor custom result paths when rerunning failed cases
AlexanderOnischenko Dec 20, 2025
1adb196
Keep errors failing when using --fail-on mismatch
AlexanderOnischenko Dec 20, 2025
9be87f2
Respect --require-assert when fail_on is mismatch/error
AlexanderOnischenko Dec 20, 2025
b96ec14
Keep plan-only runs from tripping expected checks
AlexanderOnischenko Dec 20, 2025
acf0dc7
Align rerun filtering with fail_on modes
AlexanderOnischenko Dec 20, 2025
6f18d39
Fallback to summary results path for latest reruns
AlexanderOnischenko Dec 20, 2025
b204997
Add run registry metadata and stats command
AlexanderOnischenko Dec 20, 2025
557be56
Add compare command with markdown and junit outputs
AlexanderOnischenko Dec 20, 2025
db65975
Add tags to results and summary by tag
AlexanderOnischenko Dec 20, 2025
549a1e0
Add tag filters, events logging, and comparison outputs
AlexanderOnischenko Dec 20, 2025
44c1328
Include tags on skipped results to avoid constructor errors
AlexanderOnischenko Dec 20, 2025
56af0ea
Persist summary_by_tag in batch outputs
AlexanderOnischenko Dec 20, 2025
806bd20
Exclude .runs/.cache from data fingerprint
AlexanderOnischenko Dec 20, 2025
ec567d6
Validate regexes and fix logging/reporting gaps
AlexanderOnischenko Dec 20, 2025
e47813e
Write summary and latest_results for case runs
AlexanderOnischenko Dec 20, 2025
b982b86
Fix pass-rate delta display in stats
AlexanderOnischenko Dec 20, 2025
87edddf
Provide bundled pydantic settings shim
AlexanderOnischenko Dec 20, 2025
69039cd
Centralize failure status handling
AlexanderOnischenko Dec 20, 2025
3f214d7
Allow pytest to import examples package
AlexanderOnischenko Dec 20, 2025
62e749c
Trim fail_on choices to supported modes
AlexanderOnischenko Dec 20, 2025
e280ee4
Slim run metadata and stabilize diffs
AlexanderOnischenko Dec 20, 2025
af2ce20
Honor fail_on in compare summary
AlexanderOnischenko Dec 20, 2025
c653240
Restore sensitive fingerprints with compact hash
AlexanderOnischenko Dec 20, 2025
ac9e0f0
Include new bad cases in diffs
AlexanderOnischenko Dec 20, 2025
9e485ca
Merge pull request #71 from AlexanderOnischenko/codex/unify-core-diff…
AlexanderOnischenko Dec 20, 2025
26de17f
Switch demo_qa schema output to JSON (#72)
AlexanderOnischenko Dec 20, 2025
804c659
Clean meta and stabilize results serialization
AlexanderOnischenko Dec 20, 2025
a6d8d2b
Merge pull request #73 from AlexanderOnischenko/codex/slim-run_meta-a…
AlexanderOnischenko Dec 20, 2025
31cef7c
Refine demo QA JSON handling and lint hygiene
AlexanderOnischenko Dec 20, 2025
f1fef4e
Merge pull request #74 from AlexanderOnischenko/codex/remove-dead-cod…
AlexanderOnischenko Dec 20, 2025
12afc2a
Harden results loading and emit batch completion event
AlexanderOnischenko Dec 20, 2025
1d9a05b
Merge pull request #75 from AlexanderOnischenko/codex/fix-pyright-err…
AlexanderOnischenko Dec 20, 2025
3c838a0
Version increase: добавлен функционал потокового запуска тестов
AlexanderOnischenko Dec 20, 2025
0c0a510
Remove pydantic-settings shim
AlexanderOnischenko Dec 20, 2025
5367571
Merge pull request #76 from AlexanderOnischenko/codex/remove-shim-fro…
AlexanderOnischenko Dec 20, 2025
5aceb93
Align batch reporting with policy failures
AlexanderOnischenko Dec 20, 2025
3341274
Merge pull request #77 from AlexanderOnischenko/codex/refactor-bad-ca…
AlexanderOnischenko Dec 20, 2025
92a297c
fixing tests
AlexanderOnischenko Dec 20, 2025
66c6dab
обновлены требованиня к pydantic settings из-за toml в demo
AlexanderOnischenko Dec 21, 2025
34d2c56
фикс путей импорта на публичные
AlexanderOnischenko Dec 21, 2025
d9184f1
Handle missing cases in demo QA compare
AlexanderOnischenko Dec 21, 2025
d76422a
тестовые данные
AlexanderOnischenko Dec 20, 2025
30e661e
Merge pull request #78 from AlexanderOnischenko/codex/fix-comparison-…
AlexanderOnischenko Dec 21, 2025
3882a70
Merge branch 'codex/add-batch-command-to-demo_qa-cli' of github.com:A…
AlexanderOnischenko Dec 21, 2025
a3d9d12
Fix REPL error artifacts to use run-specific directories
AlexanderOnischenko Dec 21, 2025
34675c1
исключаем логи из отслеживания в репозитории
AlexanderOnischenko Dec 21, 2025
9deaed7
Handle partial batch runs and missed case selection
AlexanderOnischenko Dec 21, 2025
9eb7178
Improve only-missed baseline resolution and interrupt handling
AlexanderOnischenko Dec 21, 2025
bfff2f6
Add only-missed from path and baseline metadata
AlexanderOnischenko Dec 21, 2025
5a5f1ee
Add effective tag baselines and baseline metadata
AlexanderOnischenko Dec 21, 2025
8582ae8
Stabilize effective scope and suite planning
AlexanderOnischenko Dec 21, 2025
4279c57
Differentiate suite and selected coverage
AlexanderOnischenko Dec 21, 2025
941a001
Add case history indexing and tag reports
AlexanderOnischenko Dec 21, 2025
7d7bb86
Clarify only-missed baseline requirement
AlexanderOnischenko Dec 21, 2025
303a601
Align report policy and clean helper imports
AlexanderOnischenko Dec 21, 2025
41e57f4
Merge pull request #81 from AlexanderOnischenko/codex/refactor-batch.…
AlexanderOnischenko Dec 21, 2025
a66f139
Merge pull request #80 from AlexanderOnischenko/codex/make-batch-runs…
AlexanderOnischenko Dec 21, 2025
881d11b
Merge pull request #82 from AlexanderOnischenko/add-run-tagging
AlexanderOnischenko Dec 21, 2025
cf9d33d
doc update
AlexanderOnischenko Dec 21, 2025
9a4a9f3
апгрейд версии для правильного мерджа с main
AlexanderOnischenko Dec 21, 2025
89a4e98
Merge branch 'demo-qa' into codex/add-batch-command-to-demo_qa-cli
AlexanderOnischenko Dec 22, 2025
aa62371
demo_aq (make) - алиасы для команд
AlexanderOnischenko Dec 25, 2025
4d6ac47
Merge pull request #79 from AlexanderOnischenko/codex/comment-lines-1…
AlexanderOnischenko Dec 26, 2025
daae6a3
Handle JSON array case files in demo QA runner
AlexanderOnischenko Dec 26, 2025
2161250
Merge pull request #84 from AlexanderOnischenko/codex/fix-batch-loade…
AlexanderOnischenko Dec 26, 2025
14d4e18
llm(fix) фиксим скрытый баг - если файл отсутствует
AlexanderOnischenko Dec 26, 2025
d425cc5
Improve demo QA typing and timestamps
AlexanderOnischenko Dec 26, 2025
15d6904
Merge pull request #85 from AlexanderOnischenko/codex/fix-type-assign…
AlexanderOnischenko Dec 26, 2025
902544b
Merge branch 'codex/add-batch-command-to-demo_qa-cli' of github.com:A…
AlexanderOnischenko Dec 26, 2025
7c3f753
Improve batch typing safety
AlexanderOnischenko Dec 26, 2025
5633775
Merge pull request #86 from AlexanderOnischenko/codex/fix-type-errors…
AlexanderOnischenko Dec 26, 2025
832edad
Improve typed diff structures for demo QA reports
AlexanderOnischenko Dec 26, 2025
db90d80
Merge pull request #87 from AlexanderOnischenko/codex/fix-type-assign…
AlexanderOnischenko Dec 26, 2025
c04903e
import fix
AlexanderOnischenko Dec 26, 2025
07cd3c0
Fix history case to honor artifacts dir
AlexanderOnischenko Dec 26, 2025
a40de94
Merge pull request #88 from AlexanderOnischenko/codex/fix-history-com…
AlexanderOnischenko Dec 26, 2025
d3b2863
Handle non-string expectations in demo QA runner
AlexanderOnischenko Jan 3, 2026
c3a200c
Merge pull request #89 from AlexanderOnischenko/codex/fix-crash-on-no…
AlexanderOnischenko Jan 3, 2026
e4b697e
Default batch history to artifacts directory
AlexanderOnischenko Jan 3, 2026
d51d07e
Merge pull request #90 from AlexanderOnischenko/codex/update-history-…
AlexanderOnischenko Jan 3, 2026
4f4aac0
Update quick-start aliases for schema.json, allow default model usage
AlexanderOnischenko Jan 3, 2026
f210d68
Merge branch 'codex/add-batch-command-to-demo_qa-cli' of github.com:A…
AlexanderOnischenko Jan 3, 2026
b565b7a
Handle baseline overlay selection for partial runs
AlexanderOnischenko Jan 3, 2026
958f2ae
Prevent partial runs from becoming latest baseline
AlexanderOnischenko Jan 3, 2026
2995f01
Fix overlay lookup and only-missed base selection
AlexanderOnischenko Jan 3, 2026
ce0d9c7
Add anti-flake passes and update messaging
AlexanderOnischenko Jan 3, 2026
6ec96a1
Improve overlay logging and baseline flag help
AlexanderOnischenko Jan 3, 2026
ef19330
Harden selection API defaults and stabilize only-missed logging
AlexanderOnischenko Jan 3, 2026
59c1a3f
Clarify scope handling and streamline overlay resolution
AlexanderOnischenko Jan 3, 2026
17e8154
Refine overlay logging and handling when disabled
AlexanderOnischenko Jan 3, 2026
5036908
Tighten anti-flake scope handling and marker coverage
AlexanderOnischenko Jan 3, 2026
b894f88
косметика: сообщение об ошибке
AlexanderOnischenko Jan 3, 2026
b27e9d0
Clean unused imports and tighten marker handling
AlexanderOnischenko Jan 3, 2026
1e14d10
Document scope migration and include run_dir in case summaries
AlexanderOnischenko Jan 3, 2026
9dfaec7
Avoid overlay logging when disabled and remove unused imports
AlexanderOnischenko Jan 3, 2026
b65f81b
Fix anti-flake double counting and respect baseline planned pool
AlexanderOnischenko Jan 3, 2026
be56c6b
Add planned-pool helper and anti-flake regression tests
AlexanderOnischenko Jan 3, 2026
9062c69
Improve anti-flake history handling (#92)
AlexanderOnischenko Jan 3, 2026
b58a4ce
ruff fixes
AlexanderOnischenko Jan 3, 2026
cdd6f35
Fix overlay scope handling for strict scope healing (#93)
AlexanderOnischenko Jan 3, 2026
b91be98
ruff fixes
AlexanderOnischenko Jan 3, 2026
9da728f
Handle only-missed overlay scope checks (#94)
AlexanderOnischenko Jan 3, 2026
1d8ce2e
Merge pull request #91 from AlexanderOnischenko/codex/implement-selec…
AlexanderOnischenko Jan 3, 2026
3381603
ruff fixes
AlexanderOnischenko Jan 3, 2026
b71662f
Capture resolved demo_qa config metadata
AlexanderOnischenko Jan 3, 2026
066228a
Fix demo QA batch test config inputs
AlexanderOnischenko Jan 3, 2026
98879f0
Write demo QA batch test case in jsonl format
AlexanderOnischenko Jan 3, 2026
b6796b8
Expect packaged default demo QA config
AlexanderOnischenko Jan 3, 2026
f5ad539
делаем api_key опциональным
AlexanderOnischenko Jan 3, 2026
a93bd7c
demo_qa.toml
AlexanderOnischenko Jan 3, 2026
24c02c9
Merge pull request #95 from AlexanderOnischenko/codex/preserve-effect…
AlexanderOnischenko Jan 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ __pycache__/
dist/
build/
.pytest_cache/
examples/demo_qa/demo_qa.toml
**/demo_qa.toml
.env.demo_qa
_demo_data/*/.runs/*
299 changes: 299 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,299 @@
# Makefile — алиасы для examples.demo_qa (без ~/.bashrc / ~/.zshrc)
#
# Быстрый старт:
# make init
# make chat
# make batch
# make help
#
# Примечание про venv:
# - Makefile НЕ "активирует" venv в текущем терминале (это невозможно из make).
# - Но он автоматически использует .venv/bin/python, если он существует.

SHELL := /bin/bash

# ==============================================================================
# 1) Локальный конфиг (не коммитить; удобно добавить в .gitignore)
# ==============================================================================
CONFIG ?= .demo_qa.mk
-include $(CONFIG)

# ==============================================================================
# 2) Значения по умолчанию (для make init)
# ==============================================================================
DEFAULT_DATA := _demo_data/shop
DEFAULT_SCHEMA := _demo_data/shop/schema.yaml
DEFAULT_CASES := examples/demo_qa/cases/retail_cases.json

# ==============================================================================
# 3) Python / CLI
# ==============================================================================
VENV ?= .venv
PYTHON ?= $(if $(wildcard $(VENV)/bin/python),$(VENV)/bin/python,python)
CLI := $(PYTHON) -m examples.demo_qa.cli

# ==============================================================================
# 4) Пути demo_qa (можно переопределять через CLI или в $(CONFIG))
# ==============================================================================
DATA ?=
SCHEMA ?=
CASES ?=
OUT ?= $(DATA)/.runs/results.jsonl

# ==============================================================================
# 5) Параметры команд
# ==============================================================================
TAG ?=
NOTE ?=
CASE ?=
LIMIT ?= 50

ONLY_FAILED_FROM ?=
ONLY_MISSED_FROM ?=

BASE ?=
NEW ?=
DIFF_OUT ?= $(DATA)/.runs/diff.md
JUNIT ?= $(DATA)/.runs/diff.junit.xml

MAX_FAILS ?= 5

# ==============================================================================
# 6) Настройки LLM-конфига (редактирование/просмотр)
# ==============================================================================
# Если у тебя конфиг лежит иначе — переопредели:
# make llm-edit LLM_TOML=path/to/demo_qa.toml
LLM_TOML ?= demo_qa.toml
LLM_TOML_EXAMPLE ?= demo_qa.toml.example

# macOS: открываем в TextEdit
OPEN ?= open
EDITOR_APP ?= TextEdit

# ==============================================================================
# 7) Вспомогательные флаги (не передавать пустые)
# ==============================================================================
TAG_FLAG := $(if $(strip $(TAG)),--tag "$(TAG)",)
NOTE_FLAG := $(if $(strip $(NOTE)),--note "$(NOTE)",)
LIMIT_FLAG := $(if $(strip $(LIMIT)),--limit $(LIMIT),)

# ==============================================================================
# 8) PHONY
# ==============================================================================
.PHONY: help init show-config check ensure-runs-dir venv-check \
llm-init llm-show llm-edit \
chat \
batch batch-tag batch-failed batch-failed-from \
batch-missed batch-missed-from batch-fail-fast batch-max-fails \
stats history-case report-tag case-run case-open compare

# ==============================================================================
# help (на русском)
# ==============================================================================
help:
@echo ""
@echo "DemoQA: Makefile-алиасы (без ~/.bashrc или ~/.zshrc)"
@echo "==================================================="
@echo ""
@echo "Быстрый старт:"
@echo " make init"
@echo " make chat"
@echo ""
@echo "Конфигурация:"
@echo " Настройки хранятся в: $(CONFIG)"
@echo " Можно переопределять переменные так:"
@echo " make chat DATA=_demo_data/shop SCHEMA=_demo_data/shop/schema.yaml"
@echo ""
@echo "Основные переменные:"
@echo " DATA - путь к датасету (например: _demo_data/shop)"
@echo " SCHEMA - путь к schema.yaml"
@echo " CASES - путь к cases.json"
@echo " OUT - куда писать results.jsonl (по умолчанию: \$$DATA/.runs/results.jsonl)"
@echo ""
@echo "Команды:"
@echo " make chat - интерактивный чат"
@echo " make batch - полный прогон всего набора"
@echo " make batch-tag TAG=... NOTE='...' - полный прогон с тегом и заметкой"
@echo " make batch-failed - перепрогон только упавших (baseline = latest)"
@echo " make batch-failed-from ONLY_FAILED_FROM=path/results.jsonl - only-failed от явного baseline"
@echo " make batch-missed [TAG=...] - добить missed (если TAG задан — относительно effective по тегу)"
@echo " make batch-missed-from ONLY_MISSED_FROM=path/results.jsonl - добить missed от явного baseline"
@echo " make batch-fail-fast - быстрый smoke (остановиться на первом фейле)"
@echo " make batch-max-fails MAX_FAILS=5 - остановиться после N фейлов"
@echo " make stats - stats по последним 10 прогонов"
@echo ""
@echo "Диагностика / анализ:"
@echo " make history-case CASE=case_42 [TAG=...] [LIMIT=50] - история по кейсу"
@echo " make report-tag TAG=... - сводка по тегу (effective snapshot)"
@echo " make case-run CASE=case_42 - прогнать один кейс"
@echo " make case-open CASE=case_42 - открыть артефакты кейса"
@echo ""
@echo "Сравнение результатов:"
@echo " make compare BASE=... NEW=... [DIFF_OUT=...] [JUNIT=...]"
@echo ""
@echo "LLM конфиг:"
@echo " make llm-init - создать $(LLM_TOML) из $(LLM_TOML_EXAMPLE)"
@echo " make llm-show - показать первые ~200 строк $(LLM_TOML)"
@echo " make llm-edit - открыть $(LLM_TOML) в TextEdit (macOS)"
@echo ""
@echo "Сервисные:"
@echo " make venv-check - показать, какой python будет использоваться"
@echo " make show-config - показать текущие значения переменных"
@echo ""

# ==============================================================================
# Конфиг проекта
# ==============================================================================
init:
@set -euo pipefail; \
if [ -f "$(CONFIG)" ] && [ "$${FORCE:-0}" != "1" ]; then \
echo "Файл $(CONFIG) уже существует. Чтобы перезаписать: FORCE=1 make init"; \
exit 1; \
fi; \
DATA="$${DATA:-$(DEFAULT_DATA)}"; \
SCHEMA="$${SCHEMA:-$(DEFAULT_SCHEMA)}"; \
CASES="$${CASES:-$(DEFAULT_CASES)}"; \
mkdir -p "$$DATA/.runs"; \
{ \
echo "# Локальные настройки demo_qa (генерируется командой: make init)"; \
echo "# Можно редактировать руками. Рекомендуется добавить в .gitignore."; \
echo "DATA=$$DATA"; \
echo "SCHEMA=$$SCHEMA"; \
echo "CASES=$$CASES"; \
echo "# OUT можно не задавать: по умолчанию OUT=\$${DATA}/.runs/results.jsonl"; \
echo "# OUT=$$DATA/.runs/results.jsonl"; \
} > "$(CONFIG)"; \
echo "Ок: создан $(CONFIG)"; \
echo "Создана папка: $$DATA/.runs"; \
echo "Дальше: make chat / make batch / make help"

show-config:
@echo "CONFIG = $(CONFIG)"
@echo "VENV = $(VENV)"
@echo "PYTHON = $(PYTHON)"
@echo "DATA = $(DATA)"
@echo "SCHEMA = $(SCHEMA)"
@echo "CASES = $(CASES)"
@echo "OUT = $(OUT)"
@echo "LLM_TOML= $(LLM_TOML)"
@echo "TAG = $(TAG)"
@echo "NOTE = $(NOTE)"
@echo "CASE = $(CASE)"
@echo "LIMIT = $(LIMIT)"

venv-check:
@if [ -x "$(VENV)/bin/python" ]; then \
echo "OK: venv найден: $(VENV) (использую $(VENV)/bin/python)"; \
else \
echo "INFO: venv не найден: $(VENV) (использую системный python: $$(command -v $(PYTHON) || echo 'python'))"; \
fi

check:
@test -n "$(strip $(DATA))" || (echo "DATA не задан. Запусти: make init (или передай DATA=...)" && exit 1)
@test -n "$(strip $(SCHEMA))" || (echo "SCHEMA не задан. Запусти: make init (или передай SCHEMA=...)" && exit 1)
@test -n "$(strip $(CASES))" || (echo "CASES не задан. Запусти: make init (или передай CASES=...)" && exit 1)

ensure-runs-dir: check
@mkdir -p "$(DATA)/.runs"

# ==============================================================================
# LLM конфиг (без проверок доступности — это задача приложения)
# ==============================================================================
llm-init:
@set -euo pipefail; \
if [ -f "$(LLM_TOML)" ]; then \
echo "Файл уже существует: $(LLM_TOML)"; \
exit 0; \
fi; \
if [ -f "$(LLM_TOML_EXAMPLE)" ]; then \
cp "$(LLM_TOML_EXAMPLE)" "$(LLM_TOML)"; \
echo "Ок: создан $(LLM_TOML) из $(LLM_TOML_EXAMPLE)"; \
else \
echo "Не найден пример: $(LLM_TOML_EXAMPLE). Создай $(LLM_TOML) вручную."; \
exit 1; \
fi

llm-show:
@echo "LLM config: $(LLM_TOML)"
@echo "----------------------------------------"
@sed -n '1,200p' "$(LLM_TOML)" 2>/dev/null || (echo "Файл не найден: $(LLM_TOML). Сделай: make llm-init" && exit 1)

llm-edit:
@$(OPEN) -a "$(EDITOR_APP)" "$(LLM_TOML)"

# ==============================================================================
# Алиасы под команды CLI
# ==============================================================================
chat: check
@$(CLI) chat --data "$(DATA)" --schema "$(SCHEMA)"

# 1) Полный прогон всего набора
batch: ensure-runs-dir
@$(CLI) batch --data "$(DATA)" --schema "$(SCHEMA)" --cases "$(CASES)" --out "$(OUT)"

# 2) Полный прогон с тегом + заметка
batch-tag: ensure-runs-dir
@test -n "$(strip $(TAG))" || (echo "TAG обязателен: make batch-tag TAG=..." && exit 1)
@$(CLI) batch --data "$(DATA)" --schema "$(SCHEMA)" --cases "$(CASES)" --out "$(OUT)" $(TAG_FLAG) $(NOTE_FLAG)

# 3) only-failed от latest
batch-failed: ensure-runs-dir
@$(CLI) batch --data "$(DATA)" --schema "$(SCHEMA)" --cases "$(CASES)" --out "$(OUT)" --only-failed

# 4) only-failed от явного baseline
batch-failed-from: ensure-runs-dir
@test -n "$(strip $(ONLY_FAILED_FROM))" || (echo "Нужно задать ONLY_FAILED_FROM=.../results.jsonl" && exit 1)
@$(CLI) batch --data "$(DATA)" --schema "$(SCHEMA)" --cases "$(CASES)" --out "$(OUT)" \
--only-failed-from "$(ONLY_FAILED_FROM)"

# 5) only-missed (relative to effective по TAG или latest)
batch-missed: ensure-runs-dir
@$(CLI) batch --data "$(DATA)" --schema "$(SCHEMA)" --cases "$(CASES)" --out "$(OUT)" \
$(TAG_FLAG) --only-missed

# 6) only-missed от явного baseline
batch-missed-from: ensure-runs-dir
@test -n "$(strip $(ONLY_MISSED_FROM))" || (echo "Нужно задать ONLY_MISSED_FROM=.../results.jsonl" && exit 1)
@$(CLI) batch --data "$(DATA)" --schema "$(SCHEMA)" --cases "$(CASES)" --out "$(OUT)" \
--only-missed --only-missed-from "$(ONLY_MISSED_FROM)"

# 7) fail-fast / max-fails
batch-fail-fast: ensure-runs-dir
@$(CLI) batch --data "$(DATA)" --schema "$(SCHEMA)" --cases "$(CASES)" --out "$(OUT)" --fail-fast

batch-max-fails: ensure-runs-dir
@$(CLI) batch --data "$(DATA)" --schema "$(SCHEMA)" --cases "$(CASES)" --out "$(OUT)" --max-fails "$(MAX_FAILS)"

# stats (последние 10)
stats: check
@$(CLI) stats --data "$(DATA)" --last 10

# 8) История по кейсу (TAG опционален)
history-case: check
@test -n "$(strip $(CASE))" || (echo "Нужно задать CASE=case_42" && exit 1)
@$(CLI) history case "$(CASE)" --data "$(DATA)" $(TAG_FLAG) $(LIMIT_FLAG)

# 9) Сводка по тегу
report-tag: check
@test -n "$(strip $(TAG))" || (echo "TAG обязателен: make report-tag TAG=..." && exit 1)
@$(CLI) report tag --data "$(DATA)" --tag "$(TAG)"

# 10) Дебаг 1 кейса
case-run: check
@test -n "$(strip $(CASE))" || (echo "Нужно задать CASE=case_42" && exit 1)
@$(CLI) case run "$(CASE)" --cases "$(CASES)" --data "$(DATA)" --schema "$(SCHEMA)"

case-open: check
@test -n "$(strip $(CASE))" || (echo "Нужно задать CASE=case_42" && exit 1)
@$(CLI) case open "$(CASE)" --data "$(DATA)"

# compare (diff.md + junit)
compare: check
@test -n "$(strip $(BASE))" || (echo "Нужно задать BASE=.../results_prev.jsonl" && exit 1)
@test -n "$(strip $(NEW))" || (echo "Нужно задать NEW=.../results.jsonl" && exit 1)
@mkdir -p "$(DATA)/.runs"
@$(CLI) compare \
--base "$(BASE)" \
--new "$(NEW)" \
--out "$(DIFF_OUT)" \
--junit "$(JUNIT)"
Loading