Make test suite runnable from clean checkout + cross-platform vram_detect
CI / build (push) Has been cancelled
CI / build (push) Has been cancelled
runnable-test-suite (parent) — complete. Three sub-tasks all complete: - make-tests-runnable: add requirements.txt pinning pytest==7.4.4, sweep all docs/prompts from bare 'python' to 'python3' (stock macOS/Windows ships python3), add idempotent .venv install block to scripts/install.sh, and add 'from __future__ import annotations' to 3 dashboard modules using PEP 604 union syntax at definition time so they import on Python 3.9+. The PEP 604 bug was caught by the streak verifier itself during implementation. - vram-detect-cross-platform: scripts/vram_detect.py now branches on platform.system() for Linux/Darwin/Windows. macOS path uses system_profiler SPDisplaysDataType (Apple Silicon unified memory via sysctl hw.memsize; Intel Macs via 'VRAM (Total):'). Windows uses wmic path win32_VideoController get AdapterRAM with PowerShell fallback. Linux /proc/meminfo and nvidia-smi/lspci paths unchanged (regression test locks them). Added 14 local-LLM context-window entries (llama-3.1, qwen2.5, mistral, deepseek-r1/v3, glm-4/4.5, gemma-2, phi-3/4) with source-cited model cards. Added _probe_ollama_model() that runs 'ollama list' as a last-resort fallback. run_command() now wraps PowerShell cmdlets on Windows (['powershell', '-NoProfile', '-NoLogo', '-Command', ...]). - vram-detect-cross-platform-tests: 11 new monkeypatched tests in tests/test_vram_detect.py covering Linux/Darwin/Windows branches for detect_ram and detect_gpu_vram, prefix-match for unknown model names, ollama probe, Windows PowerShell wrapper, and a LOCKED regression test for _detect_ram_linux(). All external subprocess/sysctl/wmic calls are mocked; no live hardware probes. Suite total: 235 passed, 0 errors. Verified on this box: gpu_vram_gb 0 -> 32 on Apple M5 (32GB unified memory), target context correctly jumped 12k -> 42k. Subtask-2 implementation was authored by local LLM (gemma-4-26B-A4B-it via headroom proxy @ localhost:8787). The 10-consecutive-clean-pass streak verifier ran as the independent checker model (article #2/#9/#13 in 'WTF Is a Loop? Part 2'). One anti-spin rail fired: local LLM produced inline branches where subtask-3 tests expected private _detect_ram_linux() helper; extracted helper to match the test contract without weakening tests. Parent + all 3 subtasks complete. Prior opencode-subagent implementation of subtask-2 preserved in git stash for reference.
This commit is contained in:
@@ -200,34 +200,34 @@ Automaton v2.0 enforces the state machine computationally, not just via prompts:
|
||||
|
||||
```bash
|
||||
# Create a new task
|
||||
python ~/.automaton/scripts/status.py --create-task add-user-auth --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --create-task add-user-auth --project /path/to/project
|
||||
|
||||
# Check task status
|
||||
python ~/.automaton/scripts/status.py --task add-user-auth --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --task add-user-auth --project /path/to/project
|
||||
|
||||
# List all tasks
|
||||
python ~/.automaton/scripts/status.py --list --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --list --project /path/to/project
|
||||
|
||||
# Transition to next phase
|
||||
python ~/.automaton/scripts/status.py --transition research --task add-user-auth --project /path/to/project
|
||||
python ~/.automaton/scripts/status.py --transition research:awaiting_approval --task add-user-auth --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --transition research --task add-user-auth --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --transition research:awaiting_approval --task add-user-auth --project /path/to/project
|
||||
|
||||
# Approve a phase (after user sign-off)
|
||||
python ~/.automaton/scripts/status.py --approve --task add-user-auth --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --approve --task add-user-auth --project /path/to/project
|
||||
|
||||
# Validate task folder
|
||||
python ~/.automaton/scripts/status.py --validate-folder --task add-user-auth --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --validate-folder --task add-user-auth --project /path/to/project
|
||||
|
||||
# Audit all tasks
|
||||
python ~/.automaton/scripts/status.py --audit --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --audit --project /path/to/project
|
||||
|
||||
# Upgrade pre-v2.0 tasks (bootstrap .state files)
|
||||
python ~/.automaton/scripts/status.py --upgrade --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --upgrade --project /path/to/project
|
||||
|
||||
# Check if code edits are allowed (harness integration)
|
||||
python ~/.automaton/scripts/status.py --can-edit --project /path/to/project
|
||||
python ~/.automaton/scripts/status.py --can-edit --project /path/to/project --file src/main.py
|
||||
python ~/.automaton/scripts/status.py --can-edit --project /path/to/project --task add-user-auth --json
|
||||
python3 ~/.automaton/scripts/status.py --can-edit --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --can-edit --project /path/to/project --file src/main.py
|
||||
python3 ~/.automaton/scripts/status.py --can-edit --project /path/to/project --task add-user-auth --json
|
||||
```
|
||||
|
||||
**Important**: Always pass `--project` to ensure correct scoping when multiple projects exist. Without it, `status.py` resolves the project from the current directory and errors if not in a project.
|
||||
@@ -239,10 +239,10 @@ Tasks without `.state` files are UNTRACKED — all commands (`--transition`, `--
|
||||
To fix untracked tasks:
|
||||
```bash
|
||||
# Upgrade a single task
|
||||
python ~/.automaton/scripts/status.py --upgrade --task my-old-task --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --upgrade --task my-old-task --project /path/to/project
|
||||
|
||||
# Upgrade all tasks at once
|
||||
python ~/.automaton/scripts/status.py --upgrade --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --upgrade --project /path/to/project
|
||||
```
|
||||
|
||||
### Enforcement
|
||||
@@ -321,7 +321,7 @@ This will:
|
||||
|
||||
You can also upgrade tasks individually:
|
||||
```bash
|
||||
python ~/.automaton/scripts/status.py --upgrade --task my-task --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --upgrade --task my-task --project /path/to/project
|
||||
```
|
||||
|
||||
#### Installing the pre-commit hook manually
|
||||
@@ -335,7 +335,7 @@ ln -sf ~/.automaton/scripts/git-hooks/pre-commit .git/hooks/pre-commit
|
||||
|
||||
To verify the hook is working:
|
||||
```bash
|
||||
python ~/.automaton/scripts/status.py --can-edit --project /path/to/project
|
||||
python3 ~/.automaton/scripts/status.py --can-edit --project /path/to/project
|
||||
# Should return exit code 1 (DENIED) if no tasks are in implement/doc_review
|
||||
```
|
||||
|
||||
@@ -350,7 +350,7 @@ The dashboard provides a web-based Kanban board, statistics, and timeline views
|
||||
|
||||
```bash
|
||||
# Start from any project root or ~/.automaton/
|
||||
python -m automaton.dashboard
|
||||
python3 -m automaton.dashboard
|
||||
|
||||
# Or use the convenience wrapper
|
||||
bash ~/.automaton/scripts/dashboard.sh
|
||||
|
||||
Reference in New Issue
Block a user