claude-dev-env 1.94.0 → 2.0.0
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.
- package/_shared/advisor/CLAUDE.md +2 -2
- package/_shared/advisor/advisor-protocol.md +41 -33
- package/_shared/advisor/scripts/config/advisor_scripts_constants/model_tier_run_validator_constants.py +17 -13
- package/_shared/advisor/scripts/model_tier_run_validator.py +27 -18
- package/_shared/advisor/scripts/tests/test_model_tier_run_validator.py +95 -25
- package/_shared/advisor/scripts/tests/test_tier_model_ids.py +17 -17
- package/_shared/advisor/scripts/tier_model_ids.py +18 -18
- package/_shared/pr-loop/CLAUDE.md +1 -0
- package/_shared/pr-loop/scripts/CLAUDE.md +2 -1
- package/_shared/pr-loop/scripts/README.md +1 -0
- package/_shared/pr-loop/scripts/code_rules_gate.py +253 -1980
- package/_shared/pr-loop/scripts/code_rules_gate_parts/CLAUDE.md +32 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/__init__.py +7 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/added_line_maps.py +268 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/enforcer_loading.py +172 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/gate_arguments.py +70 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/gate_running.py +326 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/git_blob_readers.py +85 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/git_file_sets.py +331 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/staged_test_running.py +369 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/tests/conftest.py +14 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/tests/test_added_line_maps.py +118 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/tests/test_enforcer_loading.py +17 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/tests/test_gate_arguments.py +29 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/tests/test_gate_running.py +99 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/tests/test_git_blob_readers.py +69 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/tests/test_git_file_sets.py +137 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/tests/test_staged_test_running.py +116 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/tests/test_violation_scoping.py +75 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/tests/test_wrapper_plumb_check.py +49 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/violation_scoping.py +328 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/wrapper_plumb_check.py +206 -0
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/code_rules_gate_constants.py +24 -17
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/reviews_disabled_constants.py +1 -0
- package/_shared/pr-loop/scripts/reviews_disabled.py +19 -2
- package/_shared/pr-loop/scripts/test_code_rules_gate.py +278 -0
- package/_shared/pr-loop/scripts/tests/test_code_rules_gate_constants.py +6 -39
- package/_shared/pr-loop/scripts/tests/test_reviews_disabled.py +43 -0
- package/_shared/pr-loop/worker-spawn.md +186 -0
- package/agents/code-verifier.md +1 -1
- package/bin/CLAUDE.md +10 -1
- package/bin/ever-shipped-skills.mjs +73 -0
- package/bin/expand_home_directory_tokens.mjs +1 -1
- package/bin/install.mjs +140 -7
- package/bin/install.prune.test.mjs +457 -0
- package/docs/CODE_RULES.md +1 -1
- package/hooks/advisory/refactor_guard.py +3 -4
- package/hooks/blocking/CLAUDE.md +7 -1
- package/hooks/blocking/block_main_commit.py +2 -2
- package/hooks/blocking/claude_md_orphan_file_blocker.py +75 -699
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/CLAUDE.md +28 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/__init__.py +1 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/config/__init__.py +1 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/config/orphan_blocker_constants.py +18 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/decision.py +81 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/references.py +307 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/scan_plan.py +124 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/subtree_scan.py +179 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/tests/conftest.py +10 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/tests/test_decision.py +34 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/tests/test_references.py +42 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/tests/test_scan_plan.py +27 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/tests/test_subtree_scan.py +30 -0
- package/hooks/blocking/code_rules_boolean_mustcheck.py +1 -1
- package/hooks/blocking/code_rules_enforcer.py +4 -0
- package/hooks/blocking/code_rules_mock_completeness.py +1 -1
- package/hooks/blocking/code_rules_optional_params.py +2 -2
- package/hooks/blocking/code_rules_shared.py +83 -1
- package/hooks/blocking/code_rules_test_assertions.py +1 -1
- package/hooks/blocking/code_rules_test_layout.py +9 -3
- package/hooks/blocking/code_rules_typeddict_stub.py +1 -1
- package/hooks/blocking/gh_pr_author_enforcer.py +1 -1
- package/hooks/blocking/inventory_intent_records/CLAUDE.md +26 -0
- package/hooks/blocking/inventory_intent_records/__init__.py +1 -0
- package/hooks/blocking/inventory_intent_records/config/__init__.py +1 -0
- package/hooks/blocking/inventory_intent_records/config/intent_records_constants.py +20 -0
- package/hooks/blocking/inventory_intent_records/records.py +271 -0
- package/hooks/blocking/inventory_intent_records/tests/conftest.py +10 -0
- package/hooks/blocking/inventory_intent_records/tests/test_records.py +80 -0
- package/hooks/blocking/package_inventory_stale_blocker.py +54 -384
- package/hooks/blocking/package_inventory_stale_blocker_parts/CLAUDE.md +26 -0
- package/hooks/blocking/package_inventory_stale_blocker_parts/__init__.py +1 -0
- package/hooks/blocking/package_inventory_stale_blocker_parts/config/__init__.py +1 -0
- package/hooks/blocking/package_inventory_stale_blocker_parts/config/inventory_blocker_constants.py +16 -0
- package/hooks/blocking/package_inventory_stale_blocker_parts/decision.py +84 -0
- package/hooks/blocking/package_inventory_stale_blocker_parts/inventory_detection.py +307 -0
- package/hooks/blocking/package_inventory_stale_blocker_parts/tests/conftest.py +10 -0
- package/hooks/blocking/package_inventory_stale_blocker_parts/tests/test_decision.py +38 -0
- package/hooks/blocking/package_inventory_stale_blocker_parts/tests/test_inventory_detection.py +61 -0
- package/hooks/blocking/pii_payload_scan.py +138 -42
- package/hooks/blocking/pii_prevention_blocker.py +185 -291
- package/hooks/blocking/pii_prevention_blocker_parts/CLAUDE.md +24 -0
- package/hooks/blocking/pii_prevention_blocker_parts/__init__.py +1 -0
- package/hooks/blocking/pii_prevention_blocker_parts/config/__init__.py +1 -0
- package/hooks/blocking/pii_prevention_blocker_parts/config/repository_resolution_constants.py +28 -0
- package/hooks/blocking/pii_prevention_blocker_parts/repository_exemption.py +214 -0
- package/hooks/blocking/pii_prevention_blocker_parts/repository_resolution.py +208 -0
- package/hooks/blocking/plain_language_blocker.py +138 -4
- package/hooks/blocking/pr_description_command_parser.py +8 -4
- package/hooks/blocking/precommit_code_rules_gate.py +3 -3
- package/hooks/blocking/sensitive_file_protector.py +114 -48
- package/hooks/blocking/tdd_enforcer.py +97 -601
- package/hooks/blocking/tdd_enforcer_parts/CLAUDE.md +30 -0
- package/hooks/blocking/tdd_enforcer_parts/__init__.py +1 -0
- package/hooks/blocking/tdd_enforcer_parts/candidate_paths.py +142 -0
- package/hooks/blocking/tdd_enforcer_parts/config/__init__.py +1 -0
- package/hooks/blocking/tdd_enforcer_parts/config/tdd_enforcer_constants.py +32 -0
- package/hooks/blocking/tdd_enforcer_parts/content_analysis.py +268 -0
- package/hooks/blocking/tdd_enforcer_parts/decisions.py +92 -0
- package/hooks/blocking/tdd_enforcer_parts/freshness.py +80 -0
- package/hooks/blocking/tdd_enforcer_parts/git_tracking.py +63 -0
- package/hooks/blocking/tdd_enforcer_parts/path_classification.py +119 -0
- package/hooks/blocking/tdd_enforcer_parts/tests/conftest.py +10 -0
- package/hooks/blocking/tdd_enforcer_parts/tests/test_candidate_paths.py +31 -0
- package/hooks/blocking/tdd_enforcer_parts/tests/test_content_analysis.py +30 -0
- package/hooks/blocking/tdd_enforcer_parts/tests/test_decisions.py +34 -0
- package/hooks/blocking/tdd_enforcer_parts/tests/test_freshness.py +28 -0
- package/hooks/blocking/tdd_enforcer_parts/tests/test_git_tracking.py +48 -0
- package/hooks/blocking/tdd_enforcer_parts/tests/test_path_classification.py +36 -0
- package/hooks/blocking/test_code_rules_enforcer_scratchpad.py +105 -0
- package/hooks/blocking/test_code_rules_shared.py +181 -0
- package/hooks/blocking/test_inventory_deadlock_resolution.py +154 -0
- package/hooks/blocking/test_pii_payload_scan.py +168 -0
- package/hooks/blocking/test_plain_language_blocker_allowlist.py +184 -0
- package/hooks/blocking/test_sensitive_file_protector.py +185 -0
- package/hooks/blocking/test_tdd_enforcer_restore.py +108 -0
- package/hooks/blocking/test_tdd_enforcer_scratchpad.py +105 -0
- package/hooks/blocking/tests/conftest.py +10 -0
- package/hooks/blocking/tests/test_pii_prevention_blocker.py +260 -0
- package/hooks/blocking/tests/test_repository_exemption.py +105 -0
- package/hooks/blocking/tests/test_repository_resolution.py +108 -0
- package/hooks/diagnostic/hook_log_extractor.py +12 -10
- package/hooks/git-hooks/post_commit.py +3 -4
- package/hooks/hooks_constants/CLAUDE.md +4 -2
- package/hooks/hooks_constants/banned_identifiers_constants.py +0 -1
- package/hooks/hooks_constants/code_rules_path_utils_constants.py +1 -1
- package/hooks/hooks_constants/harness_scratchpad_constants.py +17 -0
- package/hooks/hooks_constants/local_identity.py +59 -8
- package/hooks/hooks_constants/pii_prevention_constants.py +0 -6
- package/hooks/hooks_constants/plain_language_blocker_constants.py +5 -0
- package/hooks/hooks_constants/sensitive_file_protector_constants.py +42 -0
- package/hooks/hooks_constants/test_local_identity.py +105 -3
- package/hooks/pyproject.toml +52 -4
- package/hooks/session/plugin_data_dir_cleanup.py +0 -1
- package/hooks/validation/mypy_validator.py +2 -2
- package/hooks/validators/CLAUDE.md +1 -1
- package/hooks/validators/README.md +2 -0
- package/hooks/validators/health_check.py +1 -0
- package/hooks/validators/mypy_integration.py +2 -0
- package/hooks/validators/python_style_checks.py +114 -136
- package/hooks/validators/python_style_helpers.py +95 -0
- package/hooks/validators/ruff_integration.py +3 -0
- package/hooks/validators/test_python_style_checks.py +0 -164
- package/hooks/validators/test_python_style_checks_decorator_gap.py +119 -0
- package/hooks/validators/test_python_style_fixes.py +251 -0
- package/hooks/validators/test_python_style_helpers.py +125 -0
- package/hooks/workflow/auto_formatter.py +5 -4
- package/package.json +1 -1
- package/rules/CLAUDE.md +1 -0
- package/rules/anti-corollary-tests.md +69 -0
- package/rules/bdd.md +1 -3
- package/rules/code-reviews.md +1 -1
- package/rules/gh-paginate.md +1 -1
- package/rules/plain-language.md +2 -0
- package/scripts/CLAUDE.md +4 -0
- package/scripts/dev_env_scripts_constants/CLAUDE.md +6 -4
- package/scripts/dev_env_scripts_constants/code_review_constants.py +71 -0
- package/scripts/dev_env_scripts_constants/grok_worker_constants.py +435 -0
- package/scripts/dev_env_scripts_constants/timing.py +7 -1
- package/scripts/grok_headless_runner.py +294 -0
- package/scripts/grok_worker_preflight.py +410 -0
- package/scripts/invoke_code_review.py +463 -0
- package/scripts/resolve_worker_spawn.py +619 -0
- package/scripts/spawn_grok_batch.py +672 -0
- package/scripts/test_grok_headless_runner.py +626 -0
- package/scripts/test_grok_worker_preflight.py +1054 -0
- package/scripts/test_invoke_code_review.py +672 -0
- package/scripts/test_resolve_worker_spawn.py +1014 -0
- package/scripts/test_spawn_grok_batch.py +1017 -0
- package/skills/CLAUDE.md +6 -3
- package/skills/_shared/pr-loop/scripts/build_audit_prompt.py +72 -13
- package/skills/_shared/pr-loop/scripts/build_fix_prompt.py +121 -14
- package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/path_resolver_constants.py +78 -0
- package/skills/_shared/pr-loop/scripts/test_build_audit_prompt.py +121 -0
- package/skills/_shared/pr-loop/scripts/test_build_fix_prompt.py +196 -6
- package/skills/autoconverge/CLAUDE.md +3 -3
- package/skills/autoconverge/SKILL.md +9 -3
- package/skills/autoconverge/reference/CLAUDE.md +2 -2
- package/skills/autoconverge/reference/convergence.md +33 -11
- package/skills/autoconverge/reference/stop-conditions.md +16 -5
- package/skills/autoconverge/workflow/CLAUDE.md +2 -1
- package/skills/autoconverge/workflow/converge.clean-audit.test.mjs +7 -2
- package/skills/autoconverge/workflow/converge.codex-gate.test.mjs +300 -0
- package/skills/autoconverge/workflow/converge.contract.test.mjs +5 -5
- package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +29 -29
- package/skills/autoconverge/workflow/converge.fix-progress.test.mjs +1 -1
- package/skills/autoconverge/workflow/converge.mjs +202 -18
- package/skills/bugteam/CLAUDE.md +2 -2
- package/skills/bugteam/CONSTRAINTS.md +3 -2
- package/skills/bugteam/PROMPTS.md +7 -6
- package/skills/bugteam/SKILL.md +18 -13
- package/skills/bugteam/reference/README.md +2 -3
- package/skills/bugteam/reference/audit-and-teammates.md +215 -35
- package/skills/bugteam/reference/design-rationale.md +1 -1
- package/skills/bugteam/reference/obstacles/CLAUDE.md +1 -1
- package/skills/bugteam/reference/team-setup.md +8 -2
- package/skills/closeout/SKILL.md +153 -0
- package/skills/closeout/reference/handoff-prompt-template.md +72 -0
- package/skills/closeout/reference/issue-body-templates.md +108 -0
- package/skills/closeout/reference/pii-redaction-checklist.md +36 -0
- package/skills/codex-review/CLAUDE.md +46 -0
- package/skills/codex-review/SKILL.md +181 -0
- package/skills/codex-review/reference/CLAUDE.md +15 -0
- package/skills/codex-review/reference/cli-contract.md +253 -0
- package/skills/codex-review/reference/loop-integration.md +118 -0
- package/skills/codex-review/scripts/codex_down_classifier.py +98 -0
- package/skills/codex-review/scripts/codex_review_scripts_constants/CLAUDE.md +18 -0
- package/skills/codex-review/scripts/codex_review_scripts_constants/__init__.py +1 -0
- package/skills/codex-review/scripts/codex_review_scripts_constants/classifier_constants.py +35 -0
- package/skills/codex-review/scripts/codex_review_scripts_constants/codex_usage_probe_constants.py +86 -0
- package/skills/codex-review/scripts/codex_review_scripts_constants/findings_constants.py +18 -0
- package/skills/codex-review/scripts/codex_review_scripts_constants/run_constants.py +45 -0
- package/skills/codex-review/scripts/codex_usage_probe.py +573 -0
- package/skills/codex-review/scripts/fixtures/auth_failure_synthetic.txt +1 -0
- package/skills/codex-review/scripts/fixtures/config_load_failure_v0.125.0.txt +1 -0
- package/skills/codex-review/scripts/fixtures/freeform_findings_v0.144.3.txt +6 -0
- package/skills/codex-review/scripts/fixtures/model_rejection_v0.125.0.jsonl +5 -0
- package/skills/codex-review/scripts/fixtures/structured_findings.txt +13 -0
- package/skills/codex-review/scripts/fixtures/success_stream_v0.144.3.jsonl +6 -0
- package/skills/codex-review/scripts/fixtures/unknown_failure_synthetic.txt +1 -0
- package/skills/codex-review/scripts/fixtures/usage_limit_synthetic.txt +1 -0
- package/skills/codex-review/scripts/parse_codex_findings.py +207 -0
- package/skills/codex-review/scripts/run_codex_review.py +415 -0
- package/skills/codex-review/scripts/test_codex_down_classifier.py +143 -0
- package/skills/codex-review/scripts/test_codex_usage_probe.py +678 -0
- package/skills/codex-review/scripts/test_parse_codex_findings.py +130 -0
- package/skills/codex-review/scripts/test_run_codex_review.py +812 -0
- package/skills/codex-review/test_skill_scaffold.py +192 -0
- package/skills/grok-spawn/CLAUDE.md +28 -0
- package/skills/grok-spawn/SKILL.md +226 -0
- package/skills/grok-spawn/reference/flag-profiles.md +132 -0
- package/skills/grok-spawn/reference/worker-briefs.md +152 -0
- package/skills/grokify/SKILL.md +9 -1
- package/skills/grokify/capability-claims.test.mjs +28 -0
- package/skills/grokify/evals/README.md +72 -0
- package/skills/grokify/evals/parse-payload.test.mjs +171 -0
- package/skills/grokify/evals/run-capability-evals.mjs +545 -0
- package/skills/orchestrator/SKILL.md +32 -22
- package/skills/orchestrator-refresh/SKILL.md +12 -8
- package/skills/pr-converge/CLAUDE.md +1 -1
- package/skills/pr-converge/SKILL.md +34 -13
- package/skills/pr-converge/reference/convergence-gates.md +42 -15
- package/skills/pr-converge/reference/fix-protocol.md +1 -1
- package/skills/pr-converge/reference/ground-rules.md +1 -1
- package/skills/pr-converge/reference/per-tick.md +130 -42
- package/skills/pr-converge/reference/state-schema.md +10 -0
- package/skills/pr-converge/scripts/CLAUDE.md +2 -0
- package/skills/pr-converge/scripts/_pr_converge_path_setup.py +5 -1
- package/skills/pr-converge/scripts/check_convergence.py +605 -29
- package/skills/pr-converge/scripts/check_convergence_availability.py +232 -0
- package/skills/pr-converge/scripts/check_convergence_gates.py +279 -235
- package/skills/pr-converge/scripts/check_convergence_thread_gates.py +1 -1
- package/skills/pr-converge/scripts/pr_converge_scripts_constants/convergence_gate_constants.py +36 -2
- package/skills/pr-converge/scripts/test__pr_converge_path_setup.py +4 -0
- package/skills/pr-converge/scripts/test_check_convergence.py +71 -3
- package/skills/pr-converge/scripts/test_check_convergence_availability.py +326 -0
- package/skills/pr-converge/scripts/test_check_convergence_codex.py +507 -0
- package/skills/pr-converge/scripts/test_check_convergence_contract.py +89 -17
- package/skills/pr-converge/scripts/test_check_convergence_fixture.py +179 -0
- package/skills/pr-converge/scripts/test_check_convergence_gates.py +84 -68
- package/skills/pr-converge/scripts/test_check_convergence_thread_gates.py +24 -0
- package/skills/pr-converge/test_step5_host_branch.py +106 -0
- package/skills/pr-fix-protocol/SKILL.md +65 -0
- package/skills/pr-loop-cloud-transport/SKILL.md +2 -0
- package/skills/reviewer-gates/SKILL.md +7 -5
- package/skills/skill-builder/references/skill-modularity.md +1 -1
- package/skills/team-advisor/SKILL.md +16 -12
- package/system-prompts/software-engineer.xml +7 -6
- package/hooks/validators/test_verify_paths.py +0 -32
- package/hooks/validators/verify_paths.py +0 -57
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
"""Named constants for the grok worker preflight, headless runner, and batch launcher.
|
|
2
|
+
|
|
3
|
+
``grok_worker_preflight.py``, ``grok_headless_runner.py``, and
|
|
4
|
+
``spawn_grok_batch.py`` share this module. Per project configuration
|
|
5
|
+
conventions, every scalar and structural constant those scripts need lives
|
|
6
|
+
here rather than inline in the modules.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
GROK_BINARY_NAME: str = "grok"
|
|
12
|
+
"""Executable name resolved on PATH for the headless grok tier."""
|
|
13
|
+
|
|
14
|
+
MODELS_SUBCOMMAND: str = "models"
|
|
15
|
+
"""Subcommand that prints login state and model list without agent tokens."""
|
|
16
|
+
|
|
17
|
+
LEADER_SOCKET_FLAG: str = "--leader-socket"
|
|
18
|
+
"""CLI flag that points grok at a dedicated leader socket path."""
|
|
19
|
+
|
|
20
|
+
SINGLE_TURN_FLAG: str = "-p"
|
|
21
|
+
"""CLI flag that runs one single-turn prompt and exits."""
|
|
22
|
+
|
|
23
|
+
MAX_TURNS_FLAG: str = "--max-turns"
|
|
24
|
+
"""CLI flag that caps agent turns for the opt-in live ping."""
|
|
25
|
+
|
|
26
|
+
PING_MAX_TURNS: str = "1"
|
|
27
|
+
"""Turn cap passed with the opt-in live ping so the call stays single-turn."""
|
|
28
|
+
|
|
29
|
+
AUTH_LEADER_SOCKET_FILENAME: str = "grok-preflight-auth.sock"
|
|
30
|
+
"""Leader socket filename used only by the auth ``models`` probe."""
|
|
31
|
+
|
|
32
|
+
PING_LEADER_SOCKET_FILENAME: str = "grok-preflight-ping.sock"
|
|
33
|
+
"""Leader socket filename used only by the opt-in live ping."""
|
|
34
|
+
|
|
35
|
+
PING_CACHE_FILENAME: str = "grok_preflight_ping_cache.json"
|
|
36
|
+
"""Cache file name under the caller-supplied run state directory."""
|
|
37
|
+
|
|
38
|
+
PING_CACHE_CHECKED_AT_KEY: str = "checked_at"
|
|
39
|
+
"""JSON key holding the unix timestamp of the last successful ping."""
|
|
40
|
+
|
|
41
|
+
PING_CACHE_IS_OK_KEY: str = "is_ok"
|
|
42
|
+
"""JSON key holding whether the last ping completed successfully."""
|
|
43
|
+
|
|
44
|
+
PING_TTL_SECONDS: int = 300
|
|
45
|
+
"""Run-scoped TTL for a successful ping cache entry, in seconds."""
|
|
46
|
+
|
|
47
|
+
PING_PROMPT: str = "reply with the single word ok"
|
|
48
|
+
"""Single-turn prompt text used by the opt-in live ping."""
|
|
49
|
+
|
|
50
|
+
DEFAULT_AUTH_TIMEOUT_SECONDS: int = 30
|
|
51
|
+
"""Timeout applied to the ``grok models`` auth probe."""
|
|
52
|
+
|
|
53
|
+
DEFAULT_PING_TIMEOUT_SECONDS: int = 120
|
|
54
|
+
"""Timeout applied to the opt-in live single-turn ping."""
|
|
55
|
+
|
|
56
|
+
CLAUDE_HOME_SUBDIRECTORY: str = ".claude"
|
|
57
|
+
"""Per-user directory under the home directory that holds Claude config."""
|
|
58
|
+
|
|
59
|
+
MANIFEST_FILENAME: str = ".claude-dev-env-manifest.json"
|
|
60
|
+
"""Install manifest written by ``claude-dev-env`` into the user Claude home."""
|
|
61
|
+
|
|
62
|
+
AGENTS_SUBDIRECTORY: str = "agents"
|
|
63
|
+
"""Subdirectory of the user Claude home that holds agent definition files."""
|
|
64
|
+
|
|
65
|
+
ROLE_BUGTEAM: str = "bugteam"
|
|
66
|
+
"""Role name whose agent definition set the preflight validates by default."""
|
|
67
|
+
|
|
68
|
+
ROLE_CLEAN_CODER: str = "clean-coder"
|
|
69
|
+
"""Role name that maps to the clean-coder agent for FIX and standards-fix."""
|
|
70
|
+
|
|
71
|
+
DEFAULT_ROLE: str = ROLE_BUGTEAM
|
|
72
|
+
"""Role applied when the caller does not pass ``--role``."""
|
|
73
|
+
|
|
74
|
+
ALL_AGENT_FILENAMES_BY_ROLE: dict[str, tuple[str, ...]] = {
|
|
75
|
+
ROLE_BUGTEAM: ("code-quality-agent.md", "clean-coder.md"),
|
|
76
|
+
ROLE_CLEAN_CODER: ("clean-coder.md",),
|
|
77
|
+
}
|
|
78
|
+
"""Agent definition filenames required under ``agents/`` for each known role."""
|
|
79
|
+
|
|
80
|
+
REASON_GROK_BINARY_MISSING: str = "grok_binary_missing"
|
|
81
|
+
"""Fallthrough reason when the grok binary is not resolvable on PATH."""
|
|
82
|
+
|
|
83
|
+
REASON_GROK_AUTH_FAILED: str = "grok_auth_failed"
|
|
84
|
+
"""Catch-all fallthrough for every non-usage failure of the auth or ping probe.
|
|
85
|
+
|
|
86
|
+
Covers a probe that exits non-zero, one whose launch raises, one that times out,
|
|
87
|
+
and one whose streams do not decode.
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
REASON_CLAUDE_DEV_ENV_CONFIG_MISSING: str = "claude_dev_env_config_missing"
|
|
91
|
+
"""Fallthrough reason when the install manifest or role agents are absent."""
|
|
92
|
+
|
|
93
|
+
REASON_GROK_USAGE_EXHAUSTED: str = "grok_usage_exhausted"
|
|
94
|
+
"""Fallthrough reason when a live ping fails with a usage-exhaustion signature."""
|
|
95
|
+
|
|
96
|
+
STDOUT_OK_LINE: str = "grok_preflight: ok"
|
|
97
|
+
"""Machine-readable stdout line when tier 1 is usable."""
|
|
98
|
+
|
|
99
|
+
STDOUT_FALLTHROUGH_TEMPLATE: str = "grok_preflight: fallthrough reason={reason}"
|
|
100
|
+
"""Machine-readable stdout line when the soft gate falls through."""
|
|
101
|
+
|
|
102
|
+
EXIT_USABLE: int = 0
|
|
103
|
+
"""Process exit code when tier 1 is usable."""
|
|
104
|
+
|
|
105
|
+
EXIT_FALLTHROUGH: int = 1
|
|
106
|
+
"""Process exit code when the soft gate falls through (callers continue the chain)."""
|
|
107
|
+
|
|
108
|
+
CLI_ROLE_FLAG: str = "--role"
|
|
109
|
+
"""CLI flag naming the role whose agent definition set must be present."""
|
|
110
|
+
|
|
111
|
+
CLI_PING_FLAG: str = "--ping"
|
|
112
|
+
"""CLI flag that enables the opt-in cached live single-turn ping."""
|
|
113
|
+
|
|
114
|
+
CLI_RUN_STATE_DIR_FLAG: str = "--run-temp-dir"
|
|
115
|
+
"""CLI flag naming the run-scoped state directory for sockets and the ping cache."""
|
|
116
|
+
|
|
117
|
+
UTF8_ENCODING: str = "utf-8"
|
|
118
|
+
"""Encoding used for subprocess text mode and the ping cache file."""
|
|
119
|
+
|
|
120
|
+
UTF8_DECODE_ERRORS: str = "replace"
|
|
121
|
+
"""``errors=`` value for subprocess text decode so invalid bytes never yield None streams."""
|
|
122
|
+
|
|
123
|
+
ALL_USAGE_LIMIT_SIGNATURES: tuple[str, ...] = (
|
|
124
|
+
"rate limit",
|
|
125
|
+
"usage limit",
|
|
126
|
+
"out of usage",
|
|
127
|
+
"rate quota exceeded",
|
|
128
|
+
"usage quota exceeded",
|
|
129
|
+
"api quota exceeded",
|
|
130
|
+
"usage exhausted",
|
|
131
|
+
"insufficient credit",
|
|
132
|
+
"http 429",
|
|
133
|
+
"status 429",
|
|
134
|
+
)
|
|
135
|
+
"""Case-insensitive multi-token phrases that mark a non-zero exit as a usage-limit failure."""
|
|
136
|
+
|
|
137
|
+
ALL_USAGE_EXHAUSTION_SIGNATURES: tuple[str, ...] = ALL_USAGE_LIMIT_SIGNATURES
|
|
138
|
+
"""Alias used by the preflight soft gate for the same usage-limit signatures."""
|
|
139
|
+
|
|
140
|
+
ALL_AUTH_FAILURE_SIGNATURES: tuple[str, ...] = (
|
|
141
|
+
"http 401",
|
|
142
|
+
"status 401",
|
|
143
|
+
"error: unauthorized",
|
|
144
|
+
"unauthorized: please login",
|
|
145
|
+
"invalid api key",
|
|
146
|
+
"not logged in",
|
|
147
|
+
"not authenticated",
|
|
148
|
+
"unauthenticated",
|
|
149
|
+
"authentication failed",
|
|
150
|
+
"please log in",
|
|
151
|
+
"login required",
|
|
152
|
+
)
|
|
153
|
+
"""Case-insensitive multi-token phrases that mark a non-zero completion as an auth failure."""
|
|
154
|
+
|
|
155
|
+
PROMPT_FILE_FLAG: str = "--prompt-file"
|
|
156
|
+
"""CLI flag that points grok at a prompt file for headless single-turn work."""
|
|
157
|
+
|
|
158
|
+
CWD_FLAG: str = "--cwd"
|
|
159
|
+
"""CLI flag that sets the working directory for the headless grok process."""
|
|
160
|
+
|
|
161
|
+
OUTPUT_FORMAT_FLAG: str = "--output-format"
|
|
162
|
+
"""CLI flag that selects the headless output format."""
|
|
163
|
+
|
|
164
|
+
OUTPUT_FORMAT_JSON: str = "json"
|
|
165
|
+
"""Output-format value that requests machine-readable JSON from grok."""
|
|
166
|
+
|
|
167
|
+
ALWAYS_APPROVE_FLAG: str = "--always-approve"
|
|
168
|
+
"""CLI flag that auto-approves tool executions in the headless worker."""
|
|
169
|
+
|
|
170
|
+
AGENT_FLAG: str = "--agent"
|
|
171
|
+
"""CLI flag that names the role agent definition the worker should load."""
|
|
172
|
+
|
|
173
|
+
MODEL_FLAG: str = "--model"
|
|
174
|
+
"""CLI flag that pins a model id when ``GROK_MODEL_PIN`` is non-empty."""
|
|
175
|
+
|
|
176
|
+
GROK_MODEL_PIN: str = ""
|
|
177
|
+
"""Optional model id pin. Empty string leaves the CLI default (``grok-4.5``)."""
|
|
178
|
+
|
|
179
|
+
LEADER_SOCKET_FILENAME_PREFIX: str = "grok-leader-"
|
|
180
|
+
"""Filename prefix for each unique per-invocation leader socket under the run state directory."""
|
|
181
|
+
|
|
182
|
+
LEADER_SOCKET_FILENAME_SUFFIX: str = ".sock"
|
|
183
|
+
"""Filename suffix for each unique per-invocation leader socket."""
|
|
184
|
+
|
|
185
|
+
CLASSIFICATION_OK: str = "ok"
|
|
186
|
+
"""Outcome classification when the headless process exits zero."""
|
|
187
|
+
|
|
188
|
+
CLASSIFICATION_USAGE_LIMIT: str = "usage_limit"
|
|
189
|
+
"""Outcome classification when stdout/stderr match a usage-limit signature."""
|
|
190
|
+
|
|
191
|
+
CLASSIFICATION_AUTH_FAILURE: str = "auth_failure"
|
|
192
|
+
"""Outcome classification when stdout/stderr match an auth-failure signature."""
|
|
193
|
+
|
|
194
|
+
CLASSIFICATION_TIMEOUT: str = "timeout"
|
|
195
|
+
"""Outcome classification when the headless process exceeds the timeout and is killed."""
|
|
196
|
+
|
|
197
|
+
CLASSIFICATION_ERROR: str = "error"
|
|
198
|
+
"""Outcome classification for a non-zero exit that matches no known signature."""
|
|
199
|
+
|
|
200
|
+
CLASSIFICATION_STREAM_JOIN_SEPARATOR: str = "\n"
|
|
201
|
+
"""Separator placed between stdout and stderr before signature matching so a phrase never forms or splits across the stream boundary."""
|
|
202
|
+
|
|
203
|
+
DEFAULT_WORKER_TIMEOUT_SECONDS: int = 600
|
|
204
|
+
"""Default timeout applied to one headless worker invocation, in seconds."""
|
|
205
|
+
|
|
206
|
+
DEFAULT_WORKER_MAX_TURNS: int = 8
|
|
207
|
+
"""Default max-turns value applied to one headless worker invocation."""
|
|
208
|
+
|
|
209
|
+
TIMEOUT_RETURN_CODE: int = -1
|
|
210
|
+
"""Return code recorded on the outcome when a timed-out process leaves no return code."""
|
|
211
|
+
|
|
212
|
+
LAUNCH_FAILURE_RETURN_CODE: int = -2
|
|
213
|
+
"""Return code when the grok process cannot be launched (missing binary, permission, etc.)."""
|
|
214
|
+
|
|
215
|
+
LAUNCH_FAILURE_STDERR_PREFIX: str = "failed to launch: "
|
|
216
|
+
"""Prefix for the non-empty stderr diagnostic returned on a launch OSError."""
|
|
217
|
+
|
|
218
|
+
KILL_GRACE_TIMEOUT_SECONDS: int = 10
|
|
219
|
+
"""Seconds to wait for a killed process to reap its pipes before giving up on its streams."""
|
|
220
|
+
|
|
221
|
+
MIN_WORKER_TIMEOUT_SECONDS: int = 1
|
|
222
|
+
"""Minimum accepted worker timeout_seconds in a batch specification."""
|
|
223
|
+
|
|
224
|
+
MIN_WORKER_MAX_TURNS: int = 1
|
|
225
|
+
"""Minimum accepted worker max_turns in a batch specification."""
|
|
226
|
+
|
|
227
|
+
WORKER_EXCEPTION_RETURN_CODE: int = -3
|
|
228
|
+
"""Return code recorded on a WorkerReport when the worker body raises before a process runs.
|
|
229
|
+
|
|
230
|
+
Negative like the other no-process sentinels, so a launcher-side failure never
|
|
231
|
+
reads as a grok process that ran and exited ``1``.
|
|
232
|
+
"""
|
|
233
|
+
|
|
234
|
+
TOOL_PROFILE_READONLY: str = "readonly"
|
|
235
|
+
"""Tool profile that removes write, edit, and shell tools from the worker."""
|
|
236
|
+
|
|
237
|
+
TOOL_PROFILE_BUILD: str = "build"
|
|
238
|
+
"""Tool profile that keeps full tools and forbids commit, push, and gh via prompt."""
|
|
239
|
+
|
|
240
|
+
ALL_KNOWN_TOOL_PROFILES: frozenset[str] = frozenset(
|
|
241
|
+
{TOOL_PROFILE_READONLY, TOOL_PROFILE_BUILD}
|
|
242
|
+
)
|
|
243
|
+
"""Accepted tool-profile names on a batch worker specification."""
|
|
244
|
+
|
|
245
|
+
DISALLOWED_TOOLS_FLAG: str = "--disallowed-tools"
|
|
246
|
+
"""CLI flag that names tools the headless worker must not use."""
|
|
247
|
+
|
|
248
|
+
ALL_READONLY_DISALLOWED_TOOLS: tuple[str, ...] = ("Write", "Edit", "Bash")
|
|
249
|
+
"""Tools removed under the readonly tool profile."""
|
|
250
|
+
|
|
251
|
+
READONLY_DISALLOWED_TOOLS_VALUE: str = ",".join(ALL_READONLY_DISALLOWED_TOOLS)
|
|
252
|
+
"""Comma-joined argument value for ``--disallowed-tools`` under readonly."""
|
|
253
|
+
|
|
254
|
+
DISABLE_WEB_SEARCH_FLAG: str = "--disable-web-search"
|
|
255
|
+
"""CLI flag that turns off web search for repo-only readonly workers."""
|
|
256
|
+
|
|
257
|
+
DEBUG_FILE_FLAG: str = "--debug-file"
|
|
258
|
+
"""CLI flag that points grok at a per-worker debug log path."""
|
|
259
|
+
|
|
260
|
+
OUTPUT_FILENAME_PREFIX: str = "grok-worker-output-"
|
|
261
|
+
"""Filename prefix for each per-worker report file under the run state directory."""
|
|
262
|
+
|
|
263
|
+
OUTPUT_FILENAME_SUFFIX: str = ".txt"
|
|
264
|
+
"""Filename suffix for each per-worker report file."""
|
|
265
|
+
|
|
266
|
+
PROMPT_FILENAME_PREFIX: str = "grok-worker-prompt-"
|
|
267
|
+
"""Filename prefix for each assembled per-worker prompt file."""
|
|
268
|
+
|
|
269
|
+
PROMPT_FILENAME_SUFFIX: str = ".txt"
|
|
270
|
+
"""Filename suffix for each assembled per-worker prompt file."""
|
|
271
|
+
|
|
272
|
+
DEBUG_FILENAME_PREFIX: str = "grok-worker-debug-"
|
|
273
|
+
"""Filename prefix for each per-worker debug log file."""
|
|
274
|
+
|
|
275
|
+
DEBUG_FILENAME_SUFFIX: str = ".log"
|
|
276
|
+
"""Filename suffix for each per-worker debug log file."""
|
|
277
|
+
|
|
278
|
+
PROMPT_PART_JOIN_SEPARATOR: str = "\n\n"
|
|
279
|
+
"""Separator inserted between prompt part file bodies when assembling a worker prompt."""
|
|
280
|
+
|
|
281
|
+
REPORT_STREAM_JOIN_SEPARATOR: str = "\n\n"
|
|
282
|
+
"""Separator between the stdout and stderr bodies of a failed worker's report text."""
|
|
283
|
+
|
|
284
|
+
BATCH_LAUNCH_ERROR_STDERR_PREFIX: str = "batch launch failed: "
|
|
285
|
+
"""Prefix on the stderr line the CLI prints when a spec cannot load or a batch cannot start."""
|
|
286
|
+
|
|
287
|
+
BUILD_PROFILE_PROMPT_HEADER: str = (
|
|
288
|
+
"Tool profile: build. Never commit, push, or call gh.\n\n"
|
|
289
|
+
)
|
|
290
|
+
"""Leading instruction block prepended to every build-profile worker prompt."""
|
|
291
|
+
|
|
292
|
+
READONLY_PROFILE_PROMPT_HEADER: str = (
|
|
293
|
+
"Tool profile: readonly. Do not write, edit, or run shell commands.\n\n"
|
|
294
|
+
)
|
|
295
|
+
"""Leading instruction block prepended to every readonly-profile worker prompt."""
|
|
296
|
+
|
|
297
|
+
BATCH_SPEC_ROLE_KEY: str = "role"
|
|
298
|
+
"""JSON key for the preflight role on a batch specification."""
|
|
299
|
+
|
|
300
|
+
BATCH_SPEC_SHOULD_PING_KEY: str = "should_ping"
|
|
301
|
+
"""JSON key for the opt-in preflight ping flag on a batch specification."""
|
|
302
|
+
|
|
303
|
+
BATCH_SPEC_WORKERS_KEY: str = "workers"
|
|
304
|
+
"""JSON key for the worker list on a batch specification."""
|
|
305
|
+
|
|
306
|
+
WORKER_SPEC_ROLE_NAME_KEY: str = "role_name"
|
|
307
|
+
"""JSON key for one worker's role name."""
|
|
308
|
+
|
|
309
|
+
WORKER_SPEC_PROMPT_PARTS_KEY: str = "prompt_parts"
|
|
310
|
+
"""JSON key for one worker's ordered prompt-part file paths."""
|
|
311
|
+
|
|
312
|
+
WORKER_SPEC_CWD_KEY: str = "cwd"
|
|
313
|
+
"""JSON key for one worker's working directory."""
|
|
314
|
+
|
|
315
|
+
WORKER_SPEC_TOOL_PROFILE_KEY: str = "tool_profile"
|
|
316
|
+
"""JSON key for one worker's tool profile name."""
|
|
317
|
+
|
|
318
|
+
WORKER_SPEC_TIMEOUT_KEY: str = "timeout_seconds"
|
|
319
|
+
"""JSON key for one worker's timeout in seconds."""
|
|
320
|
+
|
|
321
|
+
WORKER_SPEC_IS_REPO_ONLY_KEY: str = "is_repo_only"
|
|
322
|
+
"""JSON key for whether a readonly worker also disables web search."""
|
|
323
|
+
|
|
324
|
+
WORKER_SPEC_MAX_TURNS_KEY: str = "max_turns"
|
|
325
|
+
"""JSON key for one worker's max-turns cap."""
|
|
326
|
+
|
|
327
|
+
WORKER_SPEC_AGENT_NAME_KEY: str = "agent_name"
|
|
328
|
+
"""JSON key for one worker's optional agent definition name."""
|
|
329
|
+
|
|
330
|
+
CLI_BATCH_SPEC_FLAG: str = "--spec"
|
|
331
|
+
"""CLI flag that points the batch launcher at a JSON batch specification file."""
|
|
332
|
+
|
|
333
|
+
SUMMARY_IS_PREFLIGHT_USABLE_KEY: str = "is_preflight_usable"
|
|
334
|
+
"""Batch summary JSON key for the preflight usability flag."""
|
|
335
|
+
|
|
336
|
+
SUMMARY_PREFLIGHT_REASON_KEY: str = "preflight_reason"
|
|
337
|
+
"""Batch summary JSON key for the preflight fallthrough reason."""
|
|
338
|
+
|
|
339
|
+
SUMMARY_WORKERS_KEY: str = "workers"
|
|
340
|
+
"""Batch summary JSON key for the list of per-worker reports."""
|
|
341
|
+
|
|
342
|
+
SUMMARY_ROLE_NAME_KEY: str = "role_name"
|
|
343
|
+
"""Per-worker report JSON key for the worker role name."""
|
|
344
|
+
|
|
345
|
+
SUMMARY_RETURNCODE_KEY: str = "returncode"
|
|
346
|
+
"""Per-worker report JSON key for the process exit code."""
|
|
347
|
+
|
|
348
|
+
SUMMARY_CLASSIFICATION_KEY: str = "classification"
|
|
349
|
+
"""Per-worker report JSON key for the runner classification string."""
|
|
350
|
+
|
|
351
|
+
SUMMARY_IS_OK_KEY: str = "is_ok"
|
|
352
|
+
"""Per-worker report JSON key for whether the worker completed successfully."""
|
|
353
|
+
|
|
354
|
+
SUMMARY_REPORT_TEXT_KEY: str = "report_text"
|
|
355
|
+
"""Per-worker report JSON key for the captured worker report text."""
|
|
356
|
+
|
|
357
|
+
SUMMARY_OUTPUT_FILE_KEY: str = "output_file"
|
|
358
|
+
"""Per-worker report JSON key for the report file path."""
|
|
359
|
+
|
|
360
|
+
SUMMARY_LEADER_SOCKET_KEY: str = "leader_socket"
|
|
361
|
+
"""Per-worker report JSON key for the leader socket path."""
|
|
362
|
+
|
|
363
|
+
SUMMARY_PROMPT_FILE_KEY: str = "prompt_file"
|
|
364
|
+
"""Per-worker report JSON key for the assembled prompt file path."""
|
|
365
|
+
|
|
366
|
+
SUMMARY_DEBUG_FILE_KEY: str = "debug_file"
|
|
367
|
+
"""Per-worker report JSON key for the ``--debug-file`` log path."""
|
|
368
|
+
|
|
369
|
+
SUMMARY_TOOL_PROFILE_KEY: str = "tool_profile"
|
|
370
|
+
"""Per-worker report JSON key for the tool profile used."""
|
|
371
|
+
|
|
372
|
+
MISSING_BINARY_RETURN_CODE: int = 127
|
|
373
|
+
"""Return code recorded when the grok binary is not found on PATH."""
|
|
374
|
+
|
|
375
|
+
GROK_BINARY_NOT_FOUND_STDERR: str = f"{GROK_BINARY_NAME} not found"
|
|
376
|
+
"""Stderr text returned when the grok binary cannot be resolved on PATH."""
|
|
377
|
+
TIER_GROK: int = 1
|
|
378
|
+
"""Dispatcher tier number for the headless grok worker path."""
|
|
379
|
+
|
|
380
|
+
TIER_CLAUDE_AGENT: int = 2
|
|
381
|
+
"""Dispatcher tier number for the in-host claude_agent_required handoff."""
|
|
382
|
+
|
|
383
|
+
TIER_CLAUDE_HEADLESS: int = 3
|
|
384
|
+
"""Dispatcher tier number for the headless claude chain path."""
|
|
385
|
+
|
|
386
|
+
REASON_CLAUDE_AGENT_REQUIRED: str = "claude_agent_required"
|
|
387
|
+
"""Fallthrough reason when the caller must run claude_agent_required itself."""
|
|
388
|
+
|
|
389
|
+
REASON_PROMPT_FILE_MISSING: str = "prompt_file_missing"
|
|
390
|
+
"""Config reason when the dispatcher CLI prompt file path is absent or unreadable."""
|
|
391
|
+
|
|
392
|
+
DEFAULT_SPAWN_MAX_TURNS: int = 8
|
|
393
|
+
"""Default max-turns applied to the headless grok worker when the caller names none."""
|
|
394
|
+
|
|
395
|
+
SPAWN_SERVED_EXIT_CODE: int = 0
|
|
396
|
+
"""CLI exit code when a dispatcher tier served the call."""
|
|
397
|
+
|
|
398
|
+
SPAWN_EXHAUSTED_EXIT_CODE: int = 2
|
|
399
|
+
"""CLI exit code when no dispatcher tier served the call."""
|
|
400
|
+
|
|
401
|
+
SPAWN_CONFIG_ERROR_EXIT_CODE: int = 3
|
|
402
|
+
"""CLI exit code when the claude chain configuration is missing or invalid."""
|
|
403
|
+
|
|
404
|
+
RESULT_KEY_TIER_USED: str = "tier_used"
|
|
405
|
+
"""JSON result key naming the tier that served the call, or null."""
|
|
406
|
+
|
|
407
|
+
RESULT_KEY_OK: str = "ok"
|
|
408
|
+
"""JSON result key holding whether the served call completed successfully."""
|
|
409
|
+
|
|
410
|
+
RESULT_KEY_ATTEMPTS: str = "attempts"
|
|
411
|
+
"""JSON result key holding the ordered list of tier attempts."""
|
|
412
|
+
|
|
413
|
+
RESULT_KEY_OUTPUT: str = "output"
|
|
414
|
+
"""JSON result key holding captured worker stdout from the serving tier."""
|
|
415
|
+
|
|
416
|
+
RESULT_KEY_RETURNCODE: str = "returncode"
|
|
417
|
+
"""JSON result key holding the process return code from the last tier run."""
|
|
418
|
+
|
|
419
|
+
ATTEMPT_KEY_TIER: str = "tier"
|
|
420
|
+
"""JSON attempt key naming the tier number tried."""
|
|
421
|
+
|
|
422
|
+
ATTEMPT_KEY_OK: str = "ok"
|
|
423
|
+
"""JSON attempt key holding whether that tier completed successfully."""
|
|
424
|
+
|
|
425
|
+
ATTEMPT_KEY_REASON: str = "reason"
|
|
426
|
+
"""JSON attempt key holding the fallthrough or handoff reason string."""
|
|
427
|
+
|
|
428
|
+
CLI_TIMEOUT_FLAG: str = "--timeout-seconds"
|
|
429
|
+
"""CLI flag naming the per-tier timeout in seconds."""
|
|
430
|
+
|
|
431
|
+
CLI_ENABLE_CLAUDE_TIER_FLAG: str = "--enable-claude-tier"
|
|
432
|
+
"""CLI flag that enables the headless claude chain tier on a Claude host."""
|
|
433
|
+
|
|
434
|
+
EMPTY_OUTPUT: str = ""
|
|
435
|
+
"""Empty captured output when no tier produced stdout."""
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Timing constants for sweep_empty_dirs.
|
|
1
|
+
"""Timing constants for sweep_empty_dirs, the grok batch launcher, and code-review.
|
|
2
2
|
|
|
3
3
|
Per the project's configuration conventions, timeouts, delays, and retries
|
|
4
4
|
live in dev_env_scripts_constants/timing.py.
|
|
@@ -9,3 +9,9 @@ DEFAULT_AGE_SECONDS: int = 120
|
|
|
9
9
|
|
|
10
10
|
DEFAULT_POLL_INTERVAL: int = 30
|
|
11
11
|
"""Seconds between sweep passes in continuous-watch mode."""
|
|
12
|
+
|
|
13
|
+
WORKER_STAGGER_SECONDS: int = 15
|
|
14
|
+
"""Seconds between staggered headless grok worker process starts in a batch."""
|
|
15
|
+
|
|
16
|
+
DEFAULT_CODE_REVIEW_TIMEOUT_SECONDS: int = 600
|
|
17
|
+
"""Default timeout applied to one headless `/code-review` chain invocation, in seconds."""
|