Drop make install from the required targets; test three more stops
check / check (push) Successful in 48s

The install target stays in this repo's Makefile only. sneak/vaultik
already has an install target with another meaning, and every repo
still gets script/install.

Tests: a repo's own script/update-policy stops the script, and a repo
whose only JavaScript source is a .js or .mjs file gets the JavaScript
style guide.

Model: opus-5-5
This commit is contained in:
clawbot committed 2026-11-09 20:04:01 +00:00
1 parent 76b75fa79f
commit e89fc86adc
4 files changed
+31 -15

No files matched your search

+2 -2
View File
@@ -205,14 +205,14 @@ with your task.
- [ ] `Makefile` exists in root — reference
`https://git.eeqj.de/sneak/prompts/raw/branch/main/Makefile`
- [ ] Has targets: `test`, `lint`, `fmt`, `fmt-check`, `check`, `docker`,
`hooks`, `install`, `update-policy`
`hooks`, `update-policy`
- [ ] Target implementations live in `script/` (scripts-to-rule-them-all);
Makefile targets are thin shims calling them — model scripts at
`https://git.eeqj.de/sneak/prompts/raw/branch/main/script/<name>`
- [ ] `script/precommit` exists and the pre-commit hook (installed by
`script/install-precommit`, shimmed by `make hooks`) runs it
- [ ] `script/install` and `script/update-policy` exist, identical to the model
scripts, and `make install` and `make update-policy` shim to them.
scripts, and `make update-policy` shims to `script/update-policy`.
`make update-policy` commits without pushing, so a person reviews and
pushes the commit. Before its first use, the repo's own entries in
`.gitignore`, `.editorconfig` and `.dockerignore` go below the comment
+2 -3
View File
@@ -266,9 +266,8 @@ are thin shims calling them. Model scripts:
- [ ] `script/install-precommit` — installs the pre-commit hook that runs
`script/precommit`
- [ ] `make hooks` — shims to `script/install-precommit`
- [ ] `script/install` / `make install` — fetches the vendored policy files from
the `prompts` repo over HTTP and writes them into the repo; identical
across repos
- [ ] `script/install` — fetches the vendored policy files from the `prompts`
repo over HTTP and writes them into the repo; identical across repos
- [ ] `script/update-policy` / `make update-policy` — fetches the current
`script/install`, runs it on the repo and commits the result without
pushing; identical across repos
+1 -2
View File
@@ -93,7 +93,6 @@ style conventions are in separate documents:
- `make check` (runs `test`, `lint`, `fmt-check`)
- `make docker`
- `make hooks` (installs pre-commit hook)
- `make install` (writes the current policy files into the repo)
- `make update-policy` (brings the repo up to standards and commits)
A model Makefile is at
@@ -194,7 +193,7 @@ style conventions are in separate documents:
`make hooks` target shims to it.
- `script/install` fetches the vendored policy files from the `prompts` repo
over HTTP and writes them into the repo it is given, or its own repo with
no argument. The `make install` target shims to it.
no argument.
- `script/update-policy` fetches the current `script/install` from the
`prompts` repo, runs it on its own repo and commits the result. It does
not push. The `make update-policy` target shims to it.
+26 -8
View File
@@ -453,6 +453,21 @@ test_language_files_need_a_source_file() {
expect_new_commit_not_pushed
}
test_javascript_source_brings_its_styleguide() {
for extension in js mjs; do
start_scenario "a repo whose only JavaScript source is a .$extension file gets the JavaScript style guide"
echo "export {}" > "$dir/repo/web.$extension"
commit_and_push_fixture "web.$extension"
remove_from_fixture docs/CODE_STYLEGUIDE_JS.md
run_update_policy
expect_success
expect_file docs/CODE_STYLEGUIDE_JS.md << 'EOF'
new CODE_STYLEGUIDE_JS
EOF
expect_new_commit_not_pushed
done
}
test_nothing_changed() {
start_scenario "nothing changed"
cp "$dir/canonical/.prettierrc" "$dir/repo/.prettierrc"
@@ -675,14 +690,16 @@ EOF
}
test_own_script_stops() {
start_scenario "a tracked script/install with a line the canonical file has never held stops"
echo "echo our own installer" >> "$dir/repo/script/install"
commit_and_push_fixture .prettierrc
run_update_policy
expect_failure
expect_output "script/install has lines"
expect_output "echo our own installer"
expect_nothing_written
for script in script/install script/update-policy; do
start_scenario "a tracked $script with a line the canonical file has never held stops"
echo "echo our own script" >> "$dir/repo/$script"
commit_and_push_fixture .prettierrc
run_update_policy
expect_failure
expect_output "$script has lines"
expect_output "echo our own script"
expect_nothing_written
done
}
test_gitignore_lacks_canonical_last_line() {
@@ -827,6 +844,7 @@ main() {
test_own_entries_kept
test_files_the_repo_lacks_are_written_whole
test_language_files_need_a_source_file
test_javascript_source_brings_its_styleguide
test_nothing_changed
test_target_lacking_install_gets_both_scripts
test_update_policy_replaces_itself