blitz-cli 0.16.1__tar.gz → 0.17.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- blitz_cli-0.17.1/.claude/settings.json +41 -0
- blitz_cli-0.17.1/.github/workflows/secret-scan.yml +72 -0
- blitz_cli-0.17.1/.github/workflows/tests.yml +41 -0
- blitz_cli-0.17.1/.github/workflows/vuln-scan.yml +141 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/.gitignore +3 -2
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/PKG-INFO +54 -9
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/README.md +48 -7
- blitz_cli-0.17.1/blitz.toml +13 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_collect.py +218 -143
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_collect_http.py +51 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_collect_server.py +46 -2
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_execute.py +121 -7
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_ontology.py +28 -1
- blitz_cli-0.17.1/blitz_cli/_secrets.py +182 -0
- blitz_cli-0.17.1/blitz_cli/_secretscan.py +758 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/cli.py +375 -86
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/commands/implement.md +13 -8
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/workspace/huddle.md +6 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/templates/locker_room_compose.yml.tmpl +2 -2
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/pyproject.toml +12 -2
- blitz_cli-0.17.1/specs/008-secrets-scan/checklists/requirements.md +35 -0
- blitz_cli-0.17.1/specs/008-secrets-scan/contracts/cli-secrets-install-hook.md +53 -0
- blitz_cli-0.17.1/specs/008-secrets-scan/contracts/cli-secrets-scan.md +72 -0
- blitz_cli-0.17.1/specs/008-secrets-scan/data-model.md +100 -0
- blitz_cli-0.17.1/specs/008-secrets-scan/plan.md +129 -0
- blitz_cli-0.17.1/specs/008-secrets-scan/quickstart.md +100 -0
- blitz_cli-0.17.1/specs/008-secrets-scan/research.md +167 -0
- blitz_cli-0.17.1/specs/008-secrets-scan/spec.md +147 -0
- blitz_cli-0.17.1/specs/008-secrets-scan/tasks.md +459 -0
- blitz_cli-0.17.1/specs/009-ci-secret-scan-workflow/checklists/requirements.md +35 -0
- blitz_cli-0.17.1/specs/009-ci-secret-scan-workflow/contracts/secret-scan-workflow.md +62 -0
- blitz_cli-0.17.1/specs/009-ci-secret-scan-workflow/data-model.md +61 -0
- blitz_cli-0.17.1/specs/009-ci-secret-scan-workflow/plan.md +114 -0
- blitz_cli-0.17.1/specs/009-ci-secret-scan-workflow/quickstart.md +79 -0
- blitz_cli-0.17.1/specs/009-ci-secret-scan-workflow/research.md +87 -0
- blitz_cli-0.17.1/specs/009-ci-secret-scan-workflow/spec.md +122 -0
- blitz_cli-0.17.1/specs/009-ci-secret-scan-workflow/tasks.md +201 -0
- blitz_cli-0.17.1/specs/010-collect-by-default/checklists/requirements.md +37 -0
- blitz_cli-0.17.1/specs/010-collect-by-default/contracts/cli-execute.md +75 -0
- blitz_cli-0.17.1/specs/010-collect-by-default/data-model.md +54 -0
- blitz_cli-0.17.1/specs/010-collect-by-default/plan.md +120 -0
- blitz_cli-0.17.1/specs/010-collect-by-default/quickstart.md +99 -0
- blitz_cli-0.17.1/specs/010-collect-by-default/research.md +119 -0
- blitz_cli-0.17.1/specs/010-collect-by-default/spec.md +142 -0
- blitz_cli-0.17.1/specs/010-collect-by-default/tasks.md +268 -0
- blitz_cli-0.17.1/specs/011-huddle-status-normalization/checklists/requirements.md +35 -0
- blitz_cli-0.17.1/specs/011-huddle-status-normalization/contracts/normalize_status.md +40 -0
- blitz_cli-0.17.1/specs/011-huddle-status-normalization/data-model.md +60 -0
- blitz_cli-0.17.1/specs/011-huddle-status-normalization/plan.md +78 -0
- blitz_cli-0.17.1/specs/011-huddle-status-normalization/quickstart.md +72 -0
- blitz_cli-0.17.1/specs/011-huddle-status-normalization/research.md +39 -0
- blitz_cli-0.17.1/specs/011-huddle-status-normalization/spec.md +95 -0
- blitz_cli-0.17.1/specs/011-huddle-status-normalization/tasks.md +127 -0
- blitz_cli-0.17.1/specs/011-sft-solution-loop/checklists/requirements.md +37 -0
- blitz_cli-0.17.1/specs/011-sft-solution-loop/contracts/cli-sft.md +138 -0
- blitz_cli-0.17.1/specs/011-sft-solution-loop/contracts/ingest-attempt.md +72 -0
- blitz_cli-0.17.1/specs/011-sft-solution-loop/data-model.md +110 -0
- blitz_cli-0.17.1/specs/011-sft-solution-loop/plan.md +123 -0
- blitz_cli-0.17.1/specs/011-sft-solution-loop/quickstart.md +146 -0
- blitz_cli-0.17.1/specs/011-sft-solution-loop/research.md +175 -0
- blitz_cli-0.17.1/specs/011-sft-solution-loop/spec.md +233 -0
- blitz_cli-0.17.1/specs/011-sft-solution-loop/tasks.md +314 -0
- blitz_cli-0.17.1/tests/conftest.py +42 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_cli.py +182 -35
- blitz_cli-0.17.1/tests/test_collect.py +201 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_collect_http.py +46 -2
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_collect_server.py +49 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_execute.py +173 -0
- blitz_cli-0.17.1/tests/test_execute_collect_default.py +288 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_ontology.py +69 -0
- blitz_cli-0.17.1/tests/test_secrets.py +199 -0
- blitz_cli-0.17.1/tests/test_secretscan.py +472 -0
- blitz_cli-0.17.1/tests/test_sft_endpoint.py +140 -0
- blitz_cli-0.17.1/tests/test_sft_queue.py +404 -0
- blitz_cli-0.16.1/tests/test_collect.py +0 -358
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/.blitz/memory/playbook.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/.github/workflows/homebrew.yml +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/.github/workflows/publish.yml +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/.mcp.json +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/LICENSE +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/__init__.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_activity.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_code_graph.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_corpus.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_dataset.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_git.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_gitignore.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_make.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_playbooks.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_redact.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_scaffold.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_tool_schemas.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/_train.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/__init__.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/commands/__init__.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/commands/analyze.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/commands/clarify.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/commands/plan.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/commands/playbook.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/commands/specify.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/commands/tasks.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/scaffold/.blitz/memory/playbook.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/scaffold/.blitz/scripts/bash/check-prerequisites.sh +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/scaffold/.blitz/scripts/bash/common.sh +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/scaffold/.blitz/scripts/bash/create-new-feature.sh +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/scaffold/.blitz/scripts/bash/setup-plan.sh +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/scaffold/.blitz/scripts/bash/setup-tasks.sh +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/scaffold/.blitz/templates/plan-template.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/scaffold/.blitz/templates/spec-template.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/scaffold/.blitz/templates/tasks-template.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/playbooks/workspace/__init__.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/templates/__init__.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/templates/locker_room_Makefile.tmpl +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/templates/locker_room_README.md.tmpl +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/blitz_cli/templates/workspace_playbook.md.tmpl +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/001-cli-model-namespace/checklists/requirements.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/001-cli-model-namespace/contracts/cli-commands.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/001-cli-model-namespace/plan.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/001-cli-model-namespace/quickstart.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/001-cli-model-namespace/research.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/001-cli-model-namespace/spec.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/001-cli-model-namespace/tasks.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/002-label-experimental-surfaces/checklists/requirements.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/002-label-experimental-surfaces/contracts/experimental-labels.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/002-label-experimental-surfaces/data-model.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/002-label-experimental-surfaces/plan.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/002-label-experimental-surfaces/quickstart.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/002-label-experimental-surfaces/research.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/002-label-experimental-surfaces/spec.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/002-label-experimental-surfaces/tasks.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/003-init-gitignore-rules/checklists/requirements.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/003-init-gitignore-rules/contracts/cli-output.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/003-init-gitignore-rules/contracts/ensure-rules.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/003-init-gitignore-rules/contracts/gitignore-block.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/003-init-gitignore-rules/data-model.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/003-init-gitignore-rules/plan.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/003-init-gitignore-rules/quickstart.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/003-init-gitignore-rules/research.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/003-init-gitignore-rules/spec.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/003-init-gitignore-rules/tasks.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/004-dpo-collect-pairs/checklists/requirements.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/004-dpo-collect-pairs/contracts/cli.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/004-dpo-collect-pairs/contracts/export-format.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/004-dpo-collect-pairs/data-model.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/004-dpo-collect-pairs/plan.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/004-dpo-collect-pairs/quickstart.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/004-dpo-collect-pairs/research.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/004-dpo-collect-pairs/spec.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/004-dpo-collect-pairs/tasks.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/005-collect-ingest-endpoint/checklists/requirements.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/005-collect-ingest-endpoint/contracts/client-sink.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/005-collect-ingest-endpoint/contracts/ingest-api.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/005-collect-ingest-endpoint/data-model.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/005-collect-ingest-endpoint/plan.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/005-collect-ingest-endpoint/quickstart.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/005-collect-ingest-endpoint/research.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/005-collect-ingest-endpoint/spec.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/005-collect-ingest-endpoint/tasks.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/006-init-ignore-generated/checklists/requirements.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/006-init-ignore-generated/contracts/gitignore-block.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/006-init-ignore-generated/data-model.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/006-init-ignore-generated/plan.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/006-init-ignore-generated/quickstart.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/006-init-ignore-generated/research.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/006-init-ignore-generated/spec.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/006-init-ignore-generated/tasks.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/007-usage-data-layer/checklists/requirements.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/007-usage-data-layer/contracts/activity-db-v2.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/007-usage-data-layer/data-model.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/007-usage-data-layer/plan.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/007-usage-data-layer/quickstart.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/007-usage-data-layer/research.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/007-usage-data-layer/spec.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/specs/007-usage-data-layer/tasks.md +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_activity.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_corpus.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_gitignore.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_make.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_playbooks.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_redact.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_scaffold.py +0 -0
- {blitz_cli-0.16.1 → blitz_cli-0.17.1}/tests/test_tool_schemas.py +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"ask": [
|
|
4
|
+
"Bash(aws secretsmanager:*)",
|
|
5
|
+
"Bash(blitz secrets:*)",
|
|
6
|
+
"Bash(python -m blitz_cli.cli secrets:*)",
|
|
7
|
+
"Bash(python3 -m blitz_cli.cli secrets:*)"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"hooks": {
|
|
11
|
+
"PreToolUse": [
|
|
12
|
+
{
|
|
13
|
+
"matcher": "Bash",
|
|
14
|
+
"hooks": [
|
|
15
|
+
{
|
|
16
|
+
"type": "command",
|
|
17
|
+
"command": "cmd=$(jq -r '.tool_input.command // \"\"'); if printf '%s' \"$cmd\" | grep -qiE 'secretsmanager|blitz +secrets|blitz_cli\\.cli +secrets'; then printf '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"ask\",\"permissionDecisionReason\":\"Command accesses AWS Secrets Manager \u2014 confirm before running.\"}}'; fi"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"matcher": "Bash",
|
|
23
|
+
"hooks": [
|
|
24
|
+
{
|
|
25
|
+
"type": "command",
|
|
26
|
+
"command": "cmd=$(jq -r '.tool_input.command // \"\"')\nprintf '%s' \"$cmd\" | grep -qE '(^|[^[:alnum:]_-])git([^[:alnum:]_-]|$)' || exit 0\nis_commit=$(printf '%s' \"$cmd\" | grep -qE 'git[^|;&]*\\bcommit\\b' && echo 1)\nis_push=$(printf '%s' \"$cmd\" | grep -qE 'git[^|;&]*\\bpush\\b' && echo 1)\n[ -z \"$is_commit$is_push\" ] && exit 0\ndir=$(printf '%s' \"$cmd\" | grep -oE 'cd +[^&|;]+' | tail -1 | sed -E 's/^cd +//; s/ +$//; s/^[\"'\"'\"']//; s/[\"'\"'\"']$//')\n[ -z \"$dir\" ] && dir=\".\"\nbranch=$(git -C \"$dir\" rev-parse --abbrev-ref HEAD 2>/dev/null)\nask=\"\"\n[ -n \"$is_push\" ] && printf '%s' \"$cmd\" | grep -qE '\\bpush\\b[^|;]*(\\b|:)(main|master)\\b' && ask=1\ncase \"$branch\" in main|master) [ -n \"$is_commit$is_push\" ] && ask=1 ;; esac\n[ -n \"$ask\" ] && printf '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"ask\",\"permissionDecisionReason\":\"This commits or pushes to main/master \u2014 confirm.\"}}'\nexit 0"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"matcher": "Bash",
|
|
32
|
+
"hooks": [
|
|
33
|
+
{
|
|
34
|
+
"type": "command",
|
|
35
|
+
"command": "cmd=$(jq -r '.tool_input.command // \"\"')\nprintf '%s' \"$cmd\" | grep -qi docker || exit 0\nask=\"\"\nprintf '%s' \"$cmd\" | grep -qE 'compose[^|;&]*\\bdown\\b' && printf '%s' \"$cmd\" | grep -qwE '\\-v|--volumes' && ask=1\nprintf '%s' \"$cmd\" | grep -qE '\\bvolume\\b[^|;&]*\\b(rm|prune)\\b' && ask=1\nprintf '%s' \"$cmd\" | grep -qE '\\bsystem\\b[^|;&]*\\bprune\\b' && printf '%s' \"$cmd\" | grep -qwE '\\-a|--all|--volumes|-[a-zA-Z]*a' && ask=1\nprintf '%s' \"$cmd\" | grep -qE 'docker[^|;&]*(\\bpush\\b|--push)' && ask=1\nprintf '%s' \"$cmd\" | grep -qE 'docker([- ]compose)?[[:space:]]+(container[[:space:]]+)?rm([[:space:]]|$)' && printf '%s' \"$cmd\" | grep -qwE '\\-f|--force' && ask=1\nprintf '%s' \"$cmd\" | grep -qE 'docker[[:space:]]+(rmi([[:space:]]|$)|image[[:space:]]+rm([[:space:]]|$))' && ask=1\nprintf '%s' \"$cmd\" | grep -qE 'docker([- ]compose)?[[:space:]]+(container[[:space:]]+)?kill([[:space:]]|$)' && ask=1\n[ -n \"$ask\" ] && printf '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"ask\",\"permissionDecisionReason\":\"Destructive Docker action (volume/data loss, container/image removal, kill, or registry push) \u2014 confirm.\"}}'\nexit 0"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Secret scan
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
blitz-version:
|
|
7
|
+
description: "Pinned blitz-cli version to install. Empty installs the latest release."
|
|
8
|
+
type: string
|
|
9
|
+
required: false
|
|
10
|
+
default: ""
|
|
11
|
+
python-version:
|
|
12
|
+
description: "Python runtime version for the scanner."
|
|
13
|
+
type: string
|
|
14
|
+
required: false
|
|
15
|
+
default: "3.12"
|
|
16
|
+
pull_request:
|
|
17
|
+
push:
|
|
18
|
+
branches: [main]
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
secrets:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
permissions:
|
|
24
|
+
contents: read
|
|
25
|
+
steps:
|
|
26
|
+
- name: Check out full history
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
|
|
31
|
+
- name: Set up Python
|
|
32
|
+
uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ inputs.python-version || '3.12' }}
|
|
35
|
+
|
|
36
|
+
- name: Install blitz-cli
|
|
37
|
+
env:
|
|
38
|
+
BLITZ_VERSION: ${{ inputs.blitz-version }}
|
|
39
|
+
run: |
|
|
40
|
+
# Dogfood: when the checked-out repo IS blitz-cli, scan with its own
|
|
41
|
+
# current source rather than the published release, so a PR that
|
|
42
|
+
# changes the scanner is checked by the code it ships.
|
|
43
|
+
if grep -q '^name = "blitz-cli"' pyproject.toml 2>/dev/null; then
|
|
44
|
+
pip install -e .
|
|
45
|
+
elif [ -n "$BLITZ_VERSION" ]; then
|
|
46
|
+
pip install "blitz-cli==$BLITZ_VERSION"
|
|
47
|
+
else
|
|
48
|
+
pip install blitz-cli
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
- name: Resolve commit range
|
|
52
|
+
id: range
|
|
53
|
+
env:
|
|
54
|
+
EVENT_NAME: ${{ github.event_name }}
|
|
55
|
+
PR_BASE: ${{ github.event.pull_request.base.sha }}
|
|
56
|
+
PR_HEAD: ${{ github.event.pull_request.head.sha }}
|
|
57
|
+
PUSH_BEFORE: ${{ github.event.before }}
|
|
58
|
+
PUSH_AFTER: ${{ github.event.after }}
|
|
59
|
+
run: |
|
|
60
|
+
if [ "$EVENT_NAME" = "pull_request" ]; then
|
|
61
|
+
echo "range=${PR_BASE}..${PR_HEAD}" >> "$GITHUB_OUTPUT"
|
|
62
|
+
elif [ "$PUSH_BEFORE" = "0000000000000000000000000000000000000000" ]; then
|
|
63
|
+
echo "range=${PUSH_AFTER}" >> "$GITHUB_OUTPUT"
|
|
64
|
+
else
|
|
65
|
+
echo "range=${PUSH_BEFORE}..${PUSH_AFTER}" >> "$GITHUB_OUTPUT"
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
- name: Scan range for secrets
|
|
69
|
+
env:
|
|
70
|
+
RANGE: ${{ steps.range.outputs.range }}
|
|
71
|
+
run: |
|
|
72
|
+
blitz secrets scan --range "$RANGE"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
# Run the unit suite on every pull request and on main.
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
# A newer push to the same branch makes an in-flight run redundant.
|
|
10
|
+
concurrency:
|
|
11
|
+
group: tests-${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
pytest:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
strategy:
|
|
18
|
+
# Report every version's result; one failure should not mask the others.
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
# 3.11 is the floor declared by requires-python and the runtime the
|
|
22
|
+
# locker-room core image ships, so it is the version a change has to
|
|
23
|
+
# keep working. Add versions here to widen coverage.
|
|
24
|
+
python-version: ["3.11"]
|
|
25
|
+
steps:
|
|
26
|
+
- name: Check out
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
|
|
29
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.python-version }}
|
|
33
|
+
|
|
34
|
+
- name: Install
|
|
35
|
+
# pytest is not a package dependency, so it is installed explicitly.
|
|
36
|
+
run: |
|
|
37
|
+
python -m pip install --upgrade pip
|
|
38
|
+
pip install -e . pytest
|
|
39
|
+
|
|
40
|
+
- name: Run tests
|
|
41
|
+
run: pytest -q
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
name: Vulnerability scan
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
python-extras:
|
|
7
|
+
description: "Extras to install for the blocking scan, e.g. \"secrets\". Empty installs the base dependencies only."
|
|
8
|
+
type: string
|
|
9
|
+
required: false
|
|
10
|
+
default: ""
|
|
11
|
+
python-extras-advisory:
|
|
12
|
+
description: "Extras scanned for visibility only -- findings are reported but never fail the build."
|
|
13
|
+
type: string
|
|
14
|
+
required: false
|
|
15
|
+
default: ""
|
|
16
|
+
python-version:
|
|
17
|
+
description: "Python runtime used to resolve the dependency tree."
|
|
18
|
+
type: string
|
|
19
|
+
required: false
|
|
20
|
+
default: "3.12"
|
|
21
|
+
severity:
|
|
22
|
+
description: "Comma-separated severities that fail the build."
|
|
23
|
+
type: string
|
|
24
|
+
required: false
|
|
25
|
+
default: "HIGH,CRITICAL"
|
|
26
|
+
pull_request:
|
|
27
|
+
push:
|
|
28
|
+
branches: [main]
|
|
29
|
+
|
|
30
|
+
permissions:
|
|
31
|
+
contents: read
|
|
32
|
+
|
|
33
|
+
jobs:
|
|
34
|
+
scan:
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
|
|
39
|
+
- uses: actions/setup-python@v5
|
|
40
|
+
with:
|
|
41
|
+
python-version: ${{ inputs.python-version || '3.12' }}
|
|
42
|
+
|
|
43
|
+
# A PEP 621 project with no lockfile has no dependency tree Trivy can read:
|
|
44
|
+
# it does not parse pyproject.toml, and its installed-package analyzer runs
|
|
45
|
+
# only on image/rootfs targets, never on a filesystem scan. So resolve the
|
|
46
|
+
# deps into a venv and freeze them to a pinned requirements.txt, which the
|
|
47
|
+
# filesystem scan does parse. This also gets the transitive deps scanned,
|
|
48
|
+
# which is where most advisories actually land. Repos with no pyproject (the
|
|
49
|
+
# locker-room node pip-installs inside its Dockerfile) skip this and are
|
|
50
|
+
# covered by their own image scan.
|
|
51
|
+
- name: Resolve Python dependencies
|
|
52
|
+
env:
|
|
53
|
+
EXTRAS: ${{ inputs.python-extras }}
|
|
54
|
+
run: |
|
|
55
|
+
if [ ! -f pyproject.toml ]; then
|
|
56
|
+
echo "No pyproject.toml -- nothing to resolve; lockfile scanning still applies."
|
|
57
|
+
exit 0
|
|
58
|
+
fi
|
|
59
|
+
# Dogfood: when the checked-out repo IS blitz-cli, `secrets` is the only
|
|
60
|
+
# extra that belongs in the blocking set. `train` is handled below.
|
|
61
|
+
if [ -z "$EXTRAS" ] && grep -q '^name = "blitz-cli"' pyproject.toml; then
|
|
62
|
+
EXTRAS="secrets"
|
|
63
|
+
fi
|
|
64
|
+
python -m venv /tmp/vulnscan-venv
|
|
65
|
+
if [ -n "$EXTRAS" ]; then
|
|
66
|
+
echo "Installing .[$EXTRAS]"
|
|
67
|
+
/tmp/vulnscan-venv/bin/pip install -q ".[$EXTRAS]"
|
|
68
|
+
else
|
|
69
|
+
/tmp/vulnscan-venv/bin/pip install -q .
|
|
70
|
+
fi
|
|
71
|
+
# Written into the workspace so the single fs scan below picks it up
|
|
72
|
+
# alongside any committed lockfiles. CI-only; never committed.
|
|
73
|
+
mkdir -p .vulnscan
|
|
74
|
+
/tmp/vulnscan-venv/bin/pip freeze --exclude-editable > .vulnscan/requirements.txt
|
|
75
|
+
echo "Resolved $(wc -l < .vulnscan/requirements.txt) packages for scanning."
|
|
76
|
+
|
|
77
|
+
# One filesystem scan covers the resolved requirements above and any
|
|
78
|
+
# committed lockfiles (package-lock.json in the locker-room UI).
|
|
79
|
+
# --ignore-unfixed keeps the gate actionable: an advisory with no released
|
|
80
|
+
# fix is not something a PR author can resolve, so it stays out of the way.
|
|
81
|
+
- name: Scan dependencies
|
|
82
|
+
uses: aquasecurity/trivy-action@v0.36.0
|
|
83
|
+
with:
|
|
84
|
+
scan-type: fs
|
|
85
|
+
scan-ref: .
|
|
86
|
+
scanners: vuln
|
|
87
|
+
severity: ${{ inputs.severity || 'HIGH,CRITICAL' }}
|
|
88
|
+
ignore-unfixed: true
|
|
89
|
+
exit-code: "1"
|
|
90
|
+
format: table
|
|
91
|
+
|
|
92
|
+
# The heavy ML extras get their own check so their findings are visible at a
|
|
93
|
+
# glance in the PR rather than buried in another job's log. It reports but never
|
|
94
|
+
# blocks: the current pins carry known HIGH/CRITICAL advisories (mostly mlflow
|
|
95
|
+
# tracking-server RCE/traversal issues) whose fixes are major breaking upgrades
|
|
96
|
+
# -- mlflow 2.x->3.x and transformers 4.x->5.x -- so gating on them would mean a
|
|
97
|
+
# permanently red CI that no individual PR can turn green.
|
|
98
|
+
advisory:
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
continue-on-error: true
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v4
|
|
103
|
+
|
|
104
|
+
- uses: actions/setup-python@v5
|
|
105
|
+
with:
|
|
106
|
+
python-version: ${{ inputs.python-version || '3.12' }}
|
|
107
|
+
|
|
108
|
+
- name: Resolve advisory extras
|
|
109
|
+
id: advisory
|
|
110
|
+
env:
|
|
111
|
+
EXTRAS: ${{ inputs.python-extras-advisory }}
|
|
112
|
+
run: |
|
|
113
|
+
if [ ! -f pyproject.toml ]; then exit 0; fi
|
|
114
|
+
if [ -z "$EXTRAS" ] && grep -q '^name = "blitz-cli"' pyproject.toml; then
|
|
115
|
+
EXTRAS="train"
|
|
116
|
+
fi
|
|
117
|
+
if [ -z "$EXTRAS" ]; then
|
|
118
|
+
echo "No advisory extras configured."
|
|
119
|
+
exit 0
|
|
120
|
+
fi
|
|
121
|
+
python -m venv /tmp/vulnscan-advisory-venv
|
|
122
|
+
echo "Installing .[$EXTRAS]"
|
|
123
|
+
/tmp/vulnscan-advisory-venv/bin/pip install -q ".[$EXTRAS]"
|
|
124
|
+
# Scanned from its own directory so this job shares no state with the
|
|
125
|
+
# blocking scan and cannot affect its result.
|
|
126
|
+
mkdir -p .vulnscan-advisory
|
|
127
|
+
/tmp/vulnscan-advisory-venv/bin/pip freeze --exclude-editable \
|
|
128
|
+
> .vulnscan-advisory/requirements.txt
|
|
129
|
+
echo "present=true" >> "$GITHUB_OUTPUT"
|
|
130
|
+
|
|
131
|
+
- name: Scan advisory extras
|
|
132
|
+
if: steps.advisory.outputs.present == 'true'
|
|
133
|
+
uses: aquasecurity/trivy-action@v0.36.0
|
|
134
|
+
with:
|
|
135
|
+
scan-type: fs
|
|
136
|
+
scan-ref: .vulnscan-advisory
|
|
137
|
+
scanners: vuln
|
|
138
|
+
severity: ${{ inputs.severity || 'HIGH,CRITICAL' }}
|
|
139
|
+
ignore-unfixed: true
|
|
140
|
+
exit-code: "1"
|
|
141
|
+
format: table
|
|
@@ -6,8 +6,9 @@ dist/
|
|
|
6
6
|
.venv/
|
|
7
7
|
.pytest_cache/
|
|
8
8
|
|
|
9
|
-
# stray test artifacts from running the CLI in-repo
|
|
10
|
-
/.claude
|
|
9
|
+
# stray test artifacts from running the CLI in-repo, but keep committed settings
|
|
10
|
+
/.claude/*
|
|
11
|
+
!/.claude/settings.json
|
|
11
12
|
|
|
12
13
|
# The .blitz/ working area is governed content, not an artifact: memory/ holds
|
|
13
14
|
# the repo's playbook (seeded once, never overwritten even by `init --force`),
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: blitz-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.17.1
|
|
4
4
|
Summary: Developer CLI for Blitz locker-room: spec-driven playbooks, a codebase/huddle ontology graph with an MCP tool, and the composable watcher/trainer/graph containers.
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
7
|
-
Requires-Python: >=3.
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
8
|
Requires-Dist: rich>=13
|
|
9
|
+
Provides-Extra: secrets
|
|
10
|
+
Requires-Dist: boto3>=1.34; extra == 'secrets'
|
|
11
|
+
Provides-Extra: toml
|
|
12
|
+
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'toml'
|
|
9
13
|
Provides-Extra: train
|
|
10
14
|
Requires-Dist: accelerate==1.2.1; extra == 'train'
|
|
11
15
|
Requires-Dist: datasets==3.2.0; extra == 'train'
|
|
@@ -77,8 +81,10 @@ Ollama endpoint comes from `--ollama-url` or `OLLAMA_HOST`; the model from
|
|
|
77
81
|
|
|
78
82
|
### Collection over the ingest endpoint
|
|
79
83
|
|
|
80
|
-
`blitz model execute
|
|
81
|
-
|
|
84
|
+
`blitz model execute` records every generation attempt as SFT training data.
|
|
85
|
+
Collection is on by default; pass `--no-collect` to turn it off, in which case
|
|
86
|
+
no database is opened at all. By default it writes straight to the activity
|
|
87
|
+
SQLite database
|
|
82
88
|
(`BLITZ_ACTIVITY_DB_PATH`, else `data/activity.db`). With `BLITZ_COLLECT_ENDPOINT` set,
|
|
83
89
|
the same writes go over HTTP JSON to a collect ingest server instead, so the
|
|
84
90
|
collector needs no filesystem access to the database:
|
|
@@ -88,12 +94,13 @@ collector needs no filesystem access to the database:
|
|
|
88
94
|
BLITZ_ACTIVITY_DB_PATH=data/activity.db blitz locker-room collect-serve
|
|
89
95
|
|
|
90
96
|
# on the collecting machine:
|
|
91
|
-
BLITZ_COLLECT_ENDPOINT=http://locker-room-host:1739 blitz model execute
|
|
97
|
+
BLITZ_COLLECT_ENDPOINT=http://locker-room-host:1739 blitz model execute
|
|
92
98
|
```
|
|
93
99
|
|
|
94
100
|
Each attempt is acknowledged by the endpoint before the next model call
|
|
95
|
-
starts. If the endpoint is unreachable when the run starts, the run
|
|
96
|
-
|
|
101
|
+
starts. If the endpoint is unreachable when the run starts, the run warns on
|
|
102
|
+
stderr and continues without collection, same as an unwritable database. If it
|
|
103
|
+
fails mid-run, the run keeps
|
|
97
104
|
going: undelivered payloads are buffered to `collect-buffer.jsonl` in the run
|
|
98
105
|
directory and the final output names the file. Deliver them later with
|
|
99
106
|
|
|
@@ -103,8 +110,46 @@ blitz model collect flush .blitz/execute/runs/<stamp>/collect-buffer.jsonl
|
|
|
103
110
|
|
|
104
111
|
Flushing is idempotent (the server deduplicates attempts on their
|
|
105
112
|
run/task/sample/attempt identity), so re-running a flush, or flushing rows the
|
|
106
|
-
server already received, never duplicates data. `
|
|
107
|
-
|
|
113
|
+
server already received, never duplicates data. `blitz model sft` reads the
|
|
114
|
+
database directly, unaffected by the endpoint.
|
|
115
|
+
|
|
116
|
+
`blitz model execute` exits 0 when the run completes, 1 when it completes with
|
|
117
|
+
unsolved tasks, and 2 when it aborts on an environment failure: the model
|
|
118
|
+
endpoint became unreachable, everything collected before the failure was saved,
|
|
119
|
+
and the remaining tasks were not attempted. An outage is recorded as an
|
|
120
|
+
environment failure on the attempt and never queues a task for repair.
|
|
121
|
+
|
|
122
|
+
### The repair queue: `blitz model sft`
|
|
123
|
+
|
|
124
|
+
A task the local model does not solve leaves a placeholder in the repair queue,
|
|
125
|
+
awaiting a reference solution. Attaching the frontier's repair to that
|
|
126
|
+
placeholder is what turns a failed run into supervised training data.
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
blitz model sft stats [--run RUN_ID] # attempt counts, pass rates, queue depth
|
|
130
|
+
blitz model sft solve --run RUN_ID --task T014 --solution-file repair.patch
|
|
131
|
+
blitz model sft queue --run RUN_ID --task T009
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
`sft stats` reports, per run, the attempt count, per-task pass rates with the
|
|
135
|
+
20 to 80 percent band marked, and the repair-queue depth.
|
|
136
|
+
|
|
137
|
+
`sft solve` attaches a reference solution to a queued task, setting it to
|
|
138
|
+
`has_solution` and attributing it to `frontier`. Give the solution with
|
|
139
|
+
`--solution TEXT`, `--solution-file PATH`, or `--solution-stdin`. A task that
|
|
140
|
+
already has a solution is left alone unless you pass `--force`. The solution
|
|
141
|
+
lands on the queue row only: the collected attempt record holds local-model
|
|
142
|
+
output and never receives frontier text.
|
|
143
|
+
|
|
144
|
+
`sft queue` queues a task after the fact, for the case where the local model
|
|
145
|
+
reported a task complete and the work was not done. The default reason is
|
|
146
|
+
`false_success`, which keeps it distinguishable from a task that honestly
|
|
147
|
+
exhausted its retries. The prompt is reused from the run's earliest recorded
|
|
148
|
+
attempt for that task; pass `--prompt-file PATH` when the run recorded none. A
|
|
149
|
+
row that already carries a solution is left unchanged.
|
|
150
|
+
|
|
151
|
+
Every subcommand takes `--db PATH` (default: `BLITZ_ACTIVITY_DB_PATH`, else
|
|
152
|
+
`data/activity.db`).
|
|
108
153
|
|
|
109
154
|
## Locker-room: ontology graph, watcher, trainer, MCP
|
|
110
155
|
|
|
@@ -58,8 +58,10 @@ Ollama endpoint comes from `--ollama-url` or `OLLAMA_HOST`; the model from
|
|
|
58
58
|
|
|
59
59
|
### Collection over the ingest endpoint
|
|
60
60
|
|
|
61
|
-
`blitz model execute
|
|
62
|
-
|
|
61
|
+
`blitz model execute` records every generation attempt as SFT training data.
|
|
62
|
+
Collection is on by default; pass `--no-collect` to turn it off, in which case
|
|
63
|
+
no database is opened at all. By default it writes straight to the activity
|
|
64
|
+
SQLite database
|
|
63
65
|
(`BLITZ_ACTIVITY_DB_PATH`, else `data/activity.db`). With `BLITZ_COLLECT_ENDPOINT` set,
|
|
64
66
|
the same writes go over HTTP JSON to a collect ingest server instead, so the
|
|
65
67
|
collector needs no filesystem access to the database:
|
|
@@ -69,12 +71,13 @@ collector needs no filesystem access to the database:
|
|
|
69
71
|
BLITZ_ACTIVITY_DB_PATH=data/activity.db blitz locker-room collect-serve
|
|
70
72
|
|
|
71
73
|
# on the collecting machine:
|
|
72
|
-
BLITZ_COLLECT_ENDPOINT=http://locker-room-host:1739 blitz model execute
|
|
74
|
+
BLITZ_COLLECT_ENDPOINT=http://locker-room-host:1739 blitz model execute
|
|
73
75
|
```
|
|
74
76
|
|
|
75
77
|
Each attempt is acknowledged by the endpoint before the next model call
|
|
76
|
-
starts. If the endpoint is unreachable when the run starts, the run
|
|
77
|
-
|
|
78
|
+
starts. If the endpoint is unreachable when the run starts, the run warns on
|
|
79
|
+
stderr and continues without collection, same as an unwritable database. If it
|
|
80
|
+
fails mid-run, the run keeps
|
|
78
81
|
going: undelivered payloads are buffered to `collect-buffer.jsonl` in the run
|
|
79
82
|
directory and the final output names the file. Deliver them later with
|
|
80
83
|
|
|
@@ -84,8 +87,46 @@ blitz model collect flush .blitz/execute/runs/<stamp>/collect-buffer.jsonl
|
|
|
84
87
|
|
|
85
88
|
Flushing is idempotent (the server deduplicates attempts on their
|
|
86
89
|
run/task/sample/attempt identity), so re-running a flush, or flushing rows the
|
|
87
|
-
server already received, never duplicates data. `
|
|
88
|
-
|
|
90
|
+
server already received, never duplicates data. `blitz model sft` reads the
|
|
91
|
+
database directly, unaffected by the endpoint.
|
|
92
|
+
|
|
93
|
+
`blitz model execute` exits 0 when the run completes, 1 when it completes with
|
|
94
|
+
unsolved tasks, and 2 when it aborts on an environment failure: the model
|
|
95
|
+
endpoint became unreachable, everything collected before the failure was saved,
|
|
96
|
+
and the remaining tasks were not attempted. An outage is recorded as an
|
|
97
|
+
environment failure on the attempt and never queues a task for repair.
|
|
98
|
+
|
|
99
|
+
### The repair queue: `blitz model sft`
|
|
100
|
+
|
|
101
|
+
A task the local model does not solve leaves a placeholder in the repair queue,
|
|
102
|
+
awaiting a reference solution. Attaching the frontier's repair to that
|
|
103
|
+
placeholder is what turns a failed run into supervised training data.
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
blitz model sft stats [--run RUN_ID] # attempt counts, pass rates, queue depth
|
|
107
|
+
blitz model sft solve --run RUN_ID --task T014 --solution-file repair.patch
|
|
108
|
+
blitz model sft queue --run RUN_ID --task T009
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`sft stats` reports, per run, the attempt count, per-task pass rates with the
|
|
112
|
+
20 to 80 percent band marked, and the repair-queue depth.
|
|
113
|
+
|
|
114
|
+
`sft solve` attaches a reference solution to a queued task, setting it to
|
|
115
|
+
`has_solution` and attributing it to `frontier`. Give the solution with
|
|
116
|
+
`--solution TEXT`, `--solution-file PATH`, or `--solution-stdin`. A task that
|
|
117
|
+
already has a solution is left alone unless you pass `--force`. The solution
|
|
118
|
+
lands on the queue row only: the collected attempt record holds local-model
|
|
119
|
+
output and never receives frontier text.
|
|
120
|
+
|
|
121
|
+
`sft queue` queues a task after the fact, for the case where the local model
|
|
122
|
+
reported a task complete and the work was not done. The default reason is
|
|
123
|
+
`false_success`, which keeps it distinguishable from a task that honestly
|
|
124
|
+
exhausted its retries. The prompt is reused from the run's earliest recorded
|
|
125
|
+
attempt for that task; pass `--prompt-file PATH` when the run recorded none. A
|
|
126
|
+
row that already carries a solution is left unchanged.
|
|
127
|
+
|
|
128
|
+
Every subcommand takes `--db PATH` (default: `BLITZ_ACTIVITY_DB_PATH`, else
|
|
129
|
+
`data/activity.db`).
|
|
89
130
|
|
|
90
131
|
## Locker-room: ontology graph, watcher, trainer, MCP
|
|
91
132
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# blitz secret-scan allowlist for this repo (the scanner's own source).
|
|
2
|
+
# Entries match a repo-relative `path` exactly or a glob `pattern`.
|
|
3
|
+
[secrets]
|
|
4
|
+
allowlist = [
|
|
5
|
+
# The scanner's test suite deliberately contains secret-shaped fixtures
|
|
6
|
+
# (fake API keys, `SECRET_KEY = "..."`, etc.) to exercise the detectors.
|
|
7
|
+
# They are not real credentials.
|
|
8
|
+
{ path = "tests/test_secretscan.py" },
|
|
9
|
+
# Spec quickstart guides are example env-var assignments and path tokens
|
|
10
|
+
# (BLITZ_ACTIVITY_DB_PATH=/tmp/..., etc.) that the high-entropy detector
|
|
11
|
+
# mistakes for base64 credentials.
|
|
12
|
+
{ pattern = "*quickstart.md" },
|
|
13
|
+
]
|