fix(scripts): rename test runner to run-tests to avoid shadowing POSIX test
Core Architecture & Invariant CI / validate (pull_request) Successful in 1m10s
Core Architecture & Invariant CI / validate (push) Successful in 1m9s

- Rename scripts/test to scripts/run-tests to eliminate name collision with standard POSIX test (/usr/bin/test, [)
- Prevent nixos-rebuild-ng activation safety assertions (test -f) from invoking the Python test suite instead of coreutils test
- Update test runner invocation paths across AGENTS.md, README.md, ROADMAP.md, SECURITY.md, and documentation runbooks
This commit was merged in pull request #37.
This commit is contained in:
kiskaadee committed 2026-11-17 14:53:34 -05:00
1 parent cdd2d562c3
commit a5826e0e74
7 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ Every implementation step must close with the automated verification gate before
```bash
# Full verification gate: Ruff + Pyright + Pytest (124+ tests) + nix flake check + NixOS drv eval
./scripts/test
./scripts/run-tests
# Targeted fast iteration commands (inside direnv / nix develop, or via .venv)
ruff check .
+2 -2
View File
@@ -95,7 +95,7 @@ For detailed runtime layers, network segmentation, and the P4 control-plane tran
│ ├── bootstrap_token.py # Operator Bearer token provisioning helper
│ ├── core_manifest.py # Authoritative Pydantic v2 schema v1.0 parser for app.yaml
│ ├── gitops_dispatcher.py # Authenticated webhook CD engine with Compose AST validation
│ └── test # Automated verification gate (Ruff, Pyright, Pytest, Nix flake checks)
│ └── run-tests # Automated verification gate (Ruff, Pyright, Pytest, Nix flake checks)
├── tests/ # Unit, structural, and security invariant test suites
└── docs/ # Architecture references, operational runbooks, and MADR decisions
```
@@ -110,7 +110,7 @@ Entering the directory via `direnv` (`use flake`) or `nix develop` provisions th
```bash
# Run full automated verification (Ruff + Pyright + Pytest + nix flake check + NixOS drv eval)
./scripts/test
./scripts/run-tests
# Run individual checks directly
ruff check .
+1 -1
View File
@@ -148,5 +148,5 @@ It describes the implementation trajectory and phased engineering milestones for
Progress across milestones is governed by explicit verification criteria:
* **Behavioral Invariant Coverage**: All defined domain, authorization, deployment, and security invariants must have automated regression tests.
* **Pre-Merge Validation**: Every commit must pass `./scripts/test` (Ruff linter + Pytest suite + Nix flake check).
* **Pre-Merge Validation**: Every commit must pass `./scripts/run-tests` (Ruff linter + Pytest suite + Nix flake check).
* **Zero Production Regressions**: Platform migrations must include verified pre-flight snapshots, state parity proofs, and documented rollback runbooks.
+1 -1
View File
@@ -63,7 +63,7 @@ This document outlines the security controls, container isolation rules, and ope
- [x] User identities managed in LLDAP (`users.${HOMELAB_DOMAIN}`).
- [x] `socket-proxy` configured with `POST=0`, `DELETE=0`, `BUILD=0`, `EXEC=0`.
- [x] Webhook HMAC signature verification active on port 9000.
- [x] Invariant test runner (`./scripts/test`) passing on changes.
- [x] Invariant test runner (`./scripts/run-tests`) passing on changes.
- [x] `config/letsencrypt/acme.json` permissions set to `0600`.
- [x] Host firewall ports restricted to declared services in `nixos/modules/homeserver.nix`.
- [x] Control plane daemon (`homelab-appctl.service`) isolated to UDS (`0660`) and loopback HTTP.
+1 -1
View File
@@ -391,4 +391,4 @@ Before marking Milestone P4 complete, the following automated regression suite m
| **Truthful Error Reporting** | `test_execution_failure_audit`: Failing or timing-out Docker/Git subprocess returns `500 ERR_EXECUTION_FAILED` and records `phase: FAILED` in `audit.jsonl`. | Reject PR |
| **Audit Persistence Gate** | `test_audit_failure_blocks_mutation`: Unwritable `audit.jsonl` aborts mutating command with `500 ERR_EXECUTION_FAILED` and zero Docker/Git invocations. | Block Release |
| **Daemon Crash Recovery** | `test_daemon_restart_preserves_state`: Clean stop and restart of daemon unlinks/rebinds socket cleanly and leaves running workloads and Git state undisturbed. | Reject PR |
| **Existing Invariant Regression** | Run `./scripts/test`: All 124 existing unit, security, structural, Ruff, Pyright, and Nix flake sandbox checks pass with 0 regressions. | Block Merge |
| **Existing Invariant Regression** | Run `./scripts/run-tests`: All 124 existing unit, security, structural, Ruff, Pyright, and Nix flake sandbox checks pass with 0 regressions. | Block Merge |
+1 -1
View File
@@ -207,7 +207,7 @@ Before committing changes to Homelab Core, run the repository test runner:
```bash
cd ~/Core
./scripts/test
./scripts/run-tests
```
This runs:
* Code formatting and lint checks (`ruff`).
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# scripts/test - Automated test & invariant verification runner for Homelab Core
# scripts/run-tests - Automated test & invariant verification runner for Homelab Core
set -euo pipefail
cd "$(dirname "$0")/.."