Record CI and main's protection in the decisions, hold ci.sh's image to README's Python, and say so in README
CI / tests (pull_request) Successful in 3m10s
CI / tests (pull_request) Successful in 3m10s
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Decisions live in `docs/decisions.md`:
|
||||
|
||||
- bin/: an outcome is an entry of a `.outcomes.md` file in loop-claude's archive, a record is a document tools or people keep entries in, and a place is what a comprehension seat names
|
||||
- bin/: the tools and their tests run on the host's Python, with no container
|
||||
- bin/: the tools run on the host's Python, with no container, and so do their tests outside CI
|
||||
- bin/: the tools support only the latest stable Python, and the tests, written in plain unittest, run on it in four pytest-xdist workers
|
||||
- chunks: a chunk takes every unblocked item of its release that fires the same review passes, whatever its purpose, and an item above R 5 ships alone
|
||||
- comprehension floor: every dimension and the overall at 7.0 or above is the target, and blocks no merge or release
|
||||
@@ -56,6 +56,7 @@ Decisions live in `docs/decisions.md`:
|
||||
- rules/: `CLAUDE.md` holds the worker's rules that no file path can scope, and each topic's rules for the worker live in a `rules/` file that Claude Code loads by its `paths:` frontmatter
|
||||
- settings.json: Claude Code runs in auto mode with the dangerous-mode prompt skipped
|
||||
- settings.json: each machine owns its model, and git's clean filter `bin/settings_filter.py` keeps it, and Claude Code's key order, out of every commit
|
||||
- tests: CI runs the suite through `ci.sh` on every pull request, in a pinned Python container, and `main`'s branch protection holds a merge until it passes
|
||||
- tests: each test earns its keep as the technical principles' test bullet says, and the worker takes a test's expected values from its item, never from the code
|
||||
- the repo may name bender, bender-infra and ai-sandbox
|
||||
- todo.md: one table of items, scored by the formula it states, held to its bar and ranked by `bin/rank_todo.py`, which ranks each blocker above the items it blocks; each achieve goal weighs by its position, code health first and four times as heavy while the comprehension panel's overall is under 7.0 or unmeasured, then README.md's goals; the table's order is the plan's only order
|
||||
|
||||
@@ -115,6 +115,8 @@ Install puts only `loop-claude` and `loop-inbox` on `PATH`; call the others by t
|
||||
|
||||
Test on the host with `uvx --python "$(command -v python3)" --with pytest-xdist==3.8.0 pytest==9.2.0 -n 4 bin`. It needs `uv` on `PATH`, which fetches pytest, pytest-xdist and mypy. pytest-xdist runs the tests in four workers, one heavy slot's CPUs (`docs/decisions.md` → `bin/: the tools support only the latest stable Python, …`). `python3 -m unittest discover -s bin -p 'test_*.py'` runs the same tests one at a time. Test the bench's scripts with `python3 -m unittest discover -s workflow-bench -p 'test_*.py'`.
|
||||
|
||||
CI runs `ci.sh` on every pull request, and `main` merges nothing until it passes. The script runs the same tests on the committed HEAD in a pinned Python container; run it under `run-heavy` to reproduce a CI failure, with Docker on `PATH`.
|
||||
|
||||
To mutation-test a changed module, copy `bin/` to a scratch directory (`cp -r bin "$scratch"`): mutmut writes files beside its config. In the copy, name the module and its tests in a `setup.cfg`, as below for `score_outcomes/results.py`. Leave out each test class that starts a tool's launcher through `subprocess`: a mutated module fails to load in a process mutmut did not start.
|
||||
|
||||
```ini
|
||||
|
||||
@@ -22,12 +22,12 @@ import os
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
from command_patterns.tally import table, tally
|
||||
from failure import Failure
|
||||
from git_cli.git_repo import git
|
||||
from records.utc_stamp import seconds
|
||||
from transcript_archive.location import project_archive
|
||||
from transcript_archive.read import finished_chunks, read_threads
|
||||
from git_cli.git_repo import git
|
||||
from transcript_archive.location import project_archive
|
||||
from records.utc_stamp import seconds
|
||||
from command_patterns.tally import table, tally
|
||||
|
||||
USAGE = "usage: command-patterns [<version>]"
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from command_patterns.tally import pattern, Row, tally
|
||||
from test_env import isolated_env
|
||||
from command_patterns.tally import pattern, Row, tally
|
||||
|
||||
TOOL = pathlib.Path(__file__).resolve().parents[1] / "command-patterns"
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from repo_checks import ROOT
|
||||
from repo_checks.test_types import SUPPORTED
|
||||
|
||||
|
||||
class Ci(unittest.TestCase):
|
||||
def test_ci_runs_the_python_readme_install_names(self):
|
||||
image = re.search(r"python:(3\.\d+)\.\d+", (ROOT / "ci.sh").read_text(encoding="utf-8"))
|
||||
supported = SUPPORTED.search((ROOT / "README.md").read_text(encoding="utf-8"))
|
||||
self.assertIsNotNone(image, "ci.sh runs a python:3.N.P image")
|
||||
self.assertIsNotNone(supported, "README.md's Install names `the latest stable Python, today 3.N`")
|
||||
self.assertEqual(image.group(1), supported.group(1), "ci.sh's image follows the Python README.md's Install names")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
+8
-2
@@ -10,9 +10,9 @@
|
||||
|
||||
Valid while the archive's file names, the Vocabulary and the panel keep these words.
|
||||
|
||||
## bin/: the tools and their tests run on the host's Python, with no container
|
||||
## bin/: the tools run on the host's Python, with no container, and so do their tests outside CI
|
||||
|
||||
2026-09-24, larv-review. Serves goals 1 and 2. The tools drive the host's claude CLI and read the host's session files, which a container cannot see; the tests run on the same host Python the tools meet. Valid while claude runs on the host.
|
||||
2026-09-24, larv-review. Serves goals 1 and 2. The tools drive the host's claude CLI and read the host's session files, which a container cannot see; the tests run on the same host Python the tools meet. CI alone runs them in a container, which drives no claude (the `tests:` entry on CI). Valid while claude runs on the host.
|
||||
|
||||
## bin/: the tools support only the latest stable Python, and the tests, written in plain unittest, run on it in four pytest-xdist workers
|
||||
|
||||
@@ -426,6 +426,12 @@ Valid while Claude Code loads `~/.claude/rules/*.md` in every project, a path-sc
|
||||
|
||||
2026-10-21, lilleman. Serves goal 2: Claude Code rewrites `"model"` in `settings.json` on every `/model` and plugin install, so a tracked model let one machine's pick override every other's. lilleman chose a model per machine over one synced in `env.ANTHROPIC_MODEL`, which would override a `/model` pick from the next session on. A model per machine is simpler, and loop-claude picks each project's model in `~/.claude/loop-claude-models.json` anyway. The filter also sorts the keys, since each write puts them back in Claude Code's order. The cost: a move or pull that changes `settings.json` drops the machine's model. The effort keys, `effortLevel` and `modelSettings`, stay synced: the routing decision on a chunk's worker rung relies on the effort `settings.json` gives every interactive session. Valid while Claude Code writes the model it picks into `settings.json`.
|
||||
|
||||
## tests: CI runs the suite through `ci.sh` on every pull request, in a pinned Python container, and `main`'s branch protection holds a merge until it passes
|
||||
|
||||
2026-11-09, larv-review, through todo item 12. Serves goal 1.1: a merge no longer rests on the worker's word. larv-review's gate was the local run alone, which it skips when the last stability round left the suite green, so an unattended chunk could merge on the worker's own report. gitea.larvit.se's runners labelled `docker-host` run `.gitea/workflows/ci.yml`, which runs `ci.sh`: it pipes the committed HEAD as a git bundle into `python:3.14.8` and runs README's Test line there as a non-root user, so the tests root skips run too. A bundle, not a bind mount, works whether or not the runner shares the docker daemon's filesystem. A run takes about 3 minutes. `test_ci.py` holds the image to the Python README Install names.
|
||||
|
||||
The protection lives in Gitea's settings, outside the repo: rule `main`, required status check `CI / tests (pull_request)`. A pull request has no status until CI queues its run, so `deploy-release --cut` waits for each check the protection requires rather than reading no status as no checks. CI runs no rule-hook check, so a `rule-override` in the PR body has nothing to override; a rule check added to CI would need one. Valid while gitea.larvit.se runs a runner labelled `docker-host`.
|
||||
|
||||
## tests: each test earns its keep as the technical principles' test bullet says, and the worker takes a test's expected values from its item, never from the code
|
||||
|
||||
2026-10-16, lilleman asked for research on what makes tests valuable, then for these changes; claude drafted them. Serves goal 1.1, since a test that cannot catch a bug, or breaks without one, lowers quality and costs review rounds.
|
||||
|
||||
Reference in New Issue
Block a user