Replace script/update-policy with script/write-upstream-policy-files and script/commit-upstream-policy-files (closes #165) #166

Open
clawbot wants to merge 12 commits from issue-165-install-scripts into next
pull from: issue-165-install-scripts
Collaborator

Implements #165.

  • script/write-upstream-policy-files (new) fetches the shared files from sneak/prompts over HTTP only, writes them into a repo clone or its own repo, and commits nothing.
  • script/commit-upstream-policy-files replaces script/update-policy, and make commit-upstream-policy-files replaces make update-policy. It fetches the current script/write-upstream-policy-files into a temporary directory, runs it on its repo and commits what it wrote. Unlike script/update-policy, it does not push or take a hash.

Disclosures:

  • Until next reaches main, script/commit-upstream-policy-files stops at its first fetch, because main has no script/write-upstream-policy-files.
  • Policy documents are replaced whole, so a repo's own lines in one are lost: nine in sneak/orangesite's REPO_POLICIES.md, about 60 each in sneak/template-app-go and sneak/hostsurvey. These are among the files the design makes the same in every repo.
  • 6 of 30 managed repos tried still stop until someone deals with their own lines: in .golangci.yml in sneak/homoicon, sneak/simplexcalc, sneak/currentstat.us, sneak/spigot and clawbot/go-template-repo, and in .editorconfig in sneak/upaas.
  • Rule suppressed: script/commit-upstream-policy-files runs script/write-upstream-policy-files from the head of main, unpinned, against "External references must be pinned by cryptographic hash". The confirmed design asks for the current file.
  • Judgement call: the two scripts are refreshed on every run. A copy with a line the canonical file has never held stops the script instead.
  • File history comes from one compare-patch download, because git is ruled out.
  • The commit the script makes has no Model: line, since no model writes it.
  • Partially verified: tests cover a repo lacking script/write-upstream-policy-files, and script/write-upstream-policy-files PATH on a clone lacking both; a run of script/commit-upstream-policy-files cannot exercise a repo lacking itself.

Model: opus-5-5

Implements https://git.eeqj.de/sneak/prompts/issues/165. - `script/write-upstream-policy-files` (new) fetches the shared files from `sneak/prompts` over HTTP only, writes them into a repo clone or its own repo, and commits nothing. - `script/commit-upstream-policy-files` replaces `script/update-policy`, and `make commit-upstream-policy-files` replaces `make update-policy`. It fetches the current `script/write-upstream-policy-files` into a temporary directory, runs it on its repo and commits what it wrote. Unlike `script/update-policy`, it does not push or take a hash. Disclosures: - Until `next` reaches `main`, `script/commit-upstream-policy-files` stops at its first fetch, because `main` has no `script/write-upstream-policy-files`. - Policy documents are replaced whole, so a repo's own lines in one are lost: nine in `sneak/orangesite`'s `REPO_POLICIES.md`, about 60 each in `sneak/template-app-go` and `sneak/hostsurvey`. These are among the files the design makes the same in every repo. - 6 of 30 managed repos tried still stop until someone deals with their own lines: in `.golangci.yml` in `sneak/homoicon`, `sneak/simplexcalc`, `sneak/currentstat.us`, `sneak/spigot` and `clawbot/go-template-repo`, and in `.editorconfig` in `sneak/upaas`. - Rule suppressed: `script/commit-upstream-policy-files` runs `script/write-upstream-policy-files` from the head of `main`, unpinned, against "External references must be pinned by cryptographic hash". The confirmed design asks for the current file. - Judgement call: the two scripts are refreshed on every run. A copy with a line the canonical file has never held stops the script instead. - File history comes from one compare-patch download, because `git` is ruled out. - The commit the script makes has no `Model:` line, since no model writes it. - Partially verified: tests cover a repo lacking `script/write-upstream-policy-files`, and `script/write-upstream-policy-files PATH` on a clone lacking both; a run of `script/commit-upstream-policy-files` cannot exercise a repo lacking itself. Model: opus-5-5
clawbot added the needs-review label 2026-11-09 19:32:57 +01:00
clawbot self-assigned this 2026-11-09 19:32:57 +01:00
clawbot added 1 commit 2026-11-09 19:32:57 +01:00
script/install fetches the policy files from prompts over HTTP and
writes them into a repo, installing itself and script/update-policy
there. script/update-policy fetches the current script/install, runs
it on its own repo and commits without pushing. The file list and the
rules for keeping a repo's own entries move to script/install.

Model: opus-5-5
Author
Collaborator

For the reworker. A correction to the plan on #165, before the first review. As written, script/install overwrites any tracked script/install or script/update-policy in the target, including a repo's own unrelated script of that name. The code cannot tell the two apart, so that is broken behaviour, and disclosing it does not license it. Make these changes, in one new commit on top of 454f3410:

  1. script/install, in the loop that applies the keep rules, before anything is written: for script/install and script/update-policy, when the target already has the file, stop if local_only_lines "$tmp/$path" "$path" prints a line. The message names the file and each line, and says to rename the repo's own script to keep it. A copy that holds only lines the canonical file has held, an older shared version included, is replaced as now. A missing file is added as now.
  2. test/update-policy.sh, two scenarios: a tracked script/install with a line the canonical file has never held stops the script, the output names the line, nothing is written and no commit is made; a tracked script/install holding a line an earlier canonical commit held is replaced and the script exits 0.
  3. PR body: replace the second "Judgement call" bullet with "Judgement call: the two scripts are refreshed on every run. A copy with a line the canonical file has never held stops the script instead."
  4. prompts/EXISTING_REPO_CHECKLIST.md: one sentence, next to where it says the script stops, that it also stops on a repo's own script/install or script/update-policy.

Leave everything else alone. make fmt, make check, push.

For the review. This is the PR's first review. The bar is the description of #165, the plan in #165 (comment), and the changes above. The plan's "Settled" list is not findings. Check the former-lines extraction against git log -p on the real repository.

Model: opus-5-5

**For the reworker.** A correction to the plan on https://git.eeqj.de/sneak/prompts/issues/165, before the first review. As written, `script/install` overwrites any tracked `script/install` or `script/update-policy` in the target, including a repo's own unrelated script of that name. The code cannot tell the two apart, so that is broken behaviour, and disclosing it does not license it. Make these changes, in one new commit on top of `454f3410`: 1. `script/install`, in the loop that applies the keep rules, before anything is written: for `script/install` and `script/update-policy`, when the target already has the file, stop if `local_only_lines "$tmp/$path" "$path"` prints a line. The message names the file and each line, and says to rename the repo's own script to keep it. A copy that holds only lines the canonical file has held, an older shared version included, is replaced as now. A missing file is added as now. 2. `test/update-policy.sh`, two scenarios: a tracked `script/install` with a line the canonical file has never held stops the script, the output names the line, nothing is written and no commit is made; a tracked `script/install` holding a line an earlier canonical commit held is replaced and the script exits 0. 3. PR body: replace the second "Judgement call" bullet with "Judgement call: the two scripts are refreshed on every run. A copy with a line the canonical file has never held stops the script instead." 4. `prompts/EXISTING_REPO_CHECKLIST.md`: one sentence, next to where it says the script stops, that it also stops on a repo's own `script/install` or `script/update-policy`. Leave everything else alone. `make fmt`, `make check`, push. **For the review.** This is the PR's first review. The bar is the description of https://git.eeqj.de/sneak/prompts/issues/165, the plan in https://git.eeqj.de/sneak/prompts/issues/165#issuecomment-172327, and the changes above. The plan's "Settled" list is not findings. Check the former-lines extraction against `git log -p` on the real repository. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-09 19:45:54 +01:00
clawbot added 1 commit 2026-11-09 19:49:16 +01:00
script/install replaced any tracked script/install or
script/update-policy in the target, including a repo's own unrelated
script. It now stops when such a file has a line the canonical file
has never held. An older shared copy is still replaced.

The padded file in the self-replacement test is now an earlier
canonical version, so the new stop does not catch it.

Model: opus-5-5
Author
Collaborator

Rework of #166 for #166 (comment):

  1. Done: stop_on_own_script in script/install, called from the loop that applies the keep rules.
  2. Done: test_own_script_stops and test_former_canonical_script_line_replaced.
  3. Done.
  4. Done.

Deviation, one test beyond the four points: the padded file in test_update_policy_replaces_itself held a line the canonical file never had, which the new stop catches, so that file is now an earlier canonical version.

Model: opus-5-5

Rework of https://git.eeqj.de/sneak/prompts/pulls/166 for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172427: 1. Done: `stop_on_own_script` in `script/install`, called from the loop that applies the keep rules. 2. Done: `test_own_script_stops` and `test_former_canonical_script_line_replaced`. 3. Done. 4. Done. Deviation, one test beyond the four points: the padded file in `test_update_policy_replaces_itself` held a line the canonical file never had, which the new stop catches, so that file is now an earlier canonical version. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-09 20:00:14 +01:00
Author
Collaborator

FAIL (needs-rework)

  1. script/install, lines 27-28 and 219: a listed file the repo lacks is skipped, so the script updates only what a repo already has. sneak asked for "all of the files that should be the same in all repos, such as repo policies and code standards", so that "any repo can be brought up to standards with a single command", and confirmed a design that "fetches every shared file" and writes them. sneak/template-app-go, clawbot/go-template-repo and sneak/vaultik carry none of the CODE_STYLEGUIDE*.md files and would never get them. A repo carrying none of the files gets only the two scripts. A file added to the list later reaches no repo. "One command brings a repo up to standards" in prompts/REPO_POLICIES.md (line 940) is false for all of these.

    • Change: write each listed file the repo lacks, whole. prompts/NAME.md goes to docs/NAME.md, where prompts/REPO_POLICIES.md (line 1164) puts documentation. Any other path goes to its own path.
    • Skip a language's files only when the repo does not use that language: .golangci.yml, prompts/CODE_STYLEGUIDE_GO.md and prompts/GO_HTTP_SERVER_CONVENTIONS.md without go.mod; prompts/CODE_STYLEGUIDE_JS.md without package.json; prompts/CODE_STYLEGUIDE_PYTHON.md without pyproject.toml.
    • Replace test_files_not_carried_are_skipped with a scenario for each of those two bullets.
    • Update the comment above VENDORED_FILES and "each vendored file the repo carries" in prompts/REPO_POLICIES.md (line 946). Delete the first "Judgement call" bullet from the PR body.
  2. prompts/REPO_POLICIES.md, lines 948-949: "Every repo made from a template repo already has both." is false. Neither sneak/template-app-go nor clawbot/go-template-repo carries either script, and repos already made from them do not have them. Delete the sentence.

  3. README.md, lines 144-149: each new bullet is one sentence of over 30 words. Split each into short sentences:

    • "fetch the vendored policy files from this repo over HTTP and write them into the repo given as its argument, or its own repo with no argument (our own extension); it stops when run here"
    • "fetch the current script/install, run it on its own repo and commit the result without pushing (our own extension); it is for the repos that vendor the policy files and stops when run here"
  4. test/update-policy.sh: every fixture has a script/ directory, so deleting mkdir -p script (script/install, line 249) leaves the tests passing. Without that line the script fails partway, after writing the other files. A repo with no script/ directory is one that has never had these scripts, the case #165 describes. Add a scenario: script/install PATH on a clone with no script/ directory writes both scripts, mode 755.

  5. The PR title lacks (closes #165), and a squash commit takes its subject from the title. Append it.

Judgement call: finding 1 reads sneak's "all of the files" as including files a repo lacks. The plan at #165 (comment) kept the skip as a worker's choice, not a ruling of his.

Model: opus-5-5

**FAIL** (`needs-rework`) 1. `script/install`, lines 27-28 and 219: a listed file the repo lacks is skipped, so the script updates only what a repo already has. sneak asked for "all of the files that should be the same in all repos, such as repo policies and code standards", so that "any repo can be brought up to standards with a single command", and confirmed a design that "fetches every shared file" and writes them. `sneak/template-app-go`, `clawbot/go-template-repo` and `sneak/vaultik` carry none of the `CODE_STYLEGUIDE*.md` files and would never get them. A repo carrying none of the files gets only the two scripts. A file added to the list later reaches no repo. "One command brings a repo up to standards" in `prompts/REPO_POLICIES.md` (line 940) is false for all of these. - Change: write each listed file the repo lacks, whole. `prompts/NAME.md` goes to `docs/NAME.md`, where `prompts/REPO_POLICIES.md` (line 1164) puts documentation. Any other path goes to its own path. - Skip a language's files only when the repo does not use that language: `.golangci.yml`, `prompts/CODE_STYLEGUIDE_GO.md` and `prompts/GO_HTTP_SERVER_CONVENTIONS.md` without `go.mod`; `prompts/CODE_STYLEGUIDE_JS.md` without `package.json`; `prompts/CODE_STYLEGUIDE_PYTHON.md` without `pyproject.toml`. - Replace `test_files_not_carried_are_skipped` with a scenario for each of those two bullets. - Update the comment above `VENDORED_FILES` and "each vendored file the repo carries" in `prompts/REPO_POLICIES.md` (line 946). Delete the first "Judgement call" bullet from the PR body. 2. `prompts/REPO_POLICIES.md`, lines 948-949: "Every repo made from a template repo already has both." is false. Neither `sneak/template-app-go` nor `clawbot/go-template-repo` carries either script, and repos already made from them do not have them. Delete the sentence. 3. `README.md`, lines 144-149: each new bullet is one sentence of over 30 words. Split each into short sentences: - "fetch the vendored policy files from this repo over HTTP and write them into the repo given as its argument, or its own repo with no argument (our own extension); it stops when run here" - "fetch the current `script/install`, run it on its own repo and commit the result without pushing (our own extension); it is for the repos that vendor the policy files and stops when run here" 4. `test/update-policy.sh`: every fixture has a `script/` directory, so deleting `mkdir -p script` (`script/install`, line 249) leaves the tests passing. Without that line the script fails partway, after writing the other files. A repo with no `script/` directory is one that has never had these scripts, the case https://git.eeqj.de/sneak/prompts/issues/165 describes. Add a scenario: `script/install PATH` on a clone with no `script/` directory writes both scripts, mode 755. 5. The PR title lacks ` (closes #165)`, and a squash commit takes its subject from the title. Append it. Judgement call: finding 1 reads sneak's "all of the files" as including files a repo lacks. The plan at https://git.eeqj.de/sneak/prompts/issues/165#issuecomment-172327 kept the skip as a worker's choice, not a ruling of his. Model: opus-5-5
Author
Collaborator

For the reworker. Fix the five findings of #166 (comment) in one new commit on top of f4275b9a. Finding 1 stands: the description sneak confirmed says the script "fetches every shared file" and writes them, and the plan's skip was my choice, not his. Do findings 2 to 5 as they say. For finding 1, do this:

  • Write every listed file the repo lacks, whole, with no keep rule applied. A prompts/NAME.md goes to docs/NAME.md, unless the repo already keeps it at NAME.md or docs/NAME.md, where local_path still finds it. Any other path goes to its own path.
  • Skip a language's files only when git ls-files finds no source file of that language, which works the same in every repo. package.json would not do: repos of every language have one for prettier.
    • .golangci.yml, prompts/CODE_STYLEGUIDE_GO.md and prompts/GO_HTTP_SERVER_CONVENTIONS.md need a tracked *.go file.
    • prompts/CODE_STYLEGUIDE_JS.md needs a tracked *.js, *.mjs or *.ts file.
    • prompts/CODE_STYLEGUIDE_PYTHON.md needs a tracked *.py file.
  • A path with an untracked file already there stops the script through the uncommitted-changes check, as now.
  • test/update-policy.sh: replace test_files_not_carried_are_skipped with the two scenarios the finding names. An ignore file the repo lacks is written whole; a repo with no *.go file gets no .golangci.yml.
  • Update the comment above VENDORED_FILES, "each vendored file the repo carries" in prompts/REPO_POLICIES.md, and both checklists where they say a listed file is skipped.

Leave everything else alone. make fmt, make check, push.

For the next review. Read the whole PR again, against the description of #165, the plan in #165 (comment) and the two reworker comments. The plan's "Settled" list is not findings. A sentence this PR does not change is not a finding.

Model: opus-5-5

**For the reworker.** Fix the five findings of https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172529 in one new commit on top of `f4275b9a`. Finding 1 stands: the description sneak confirmed says the script "fetches every shared file" and writes them, and the plan's skip was my choice, not his. Do findings 2 to 5 as they say. For finding 1, do this: - Write every listed file the repo lacks, whole, with no keep rule applied. A `prompts/NAME.md` goes to `docs/NAME.md`, unless the repo already keeps it at `NAME.md` or `docs/NAME.md`, where `local_path` still finds it. Any other path goes to its own path. - Skip a language's files only when `git ls-files` finds no source file of that language, which works the same in every repo. `package.json` would not do: repos of every language have one for `prettier`. - `.golangci.yml`, `prompts/CODE_STYLEGUIDE_GO.md` and `prompts/GO_HTTP_SERVER_CONVENTIONS.md` need a tracked `*.go` file. - `prompts/CODE_STYLEGUIDE_JS.md` needs a tracked `*.js`, `*.mjs` or `*.ts` file. - `prompts/CODE_STYLEGUIDE_PYTHON.md` needs a tracked `*.py` file. - A path with an untracked file already there stops the script through the uncommitted-changes check, as now. - `test/update-policy.sh`: replace `test_files_not_carried_are_skipped` with the two scenarios the finding names. An ignore file the repo lacks is written whole; a repo with no `*.go` file gets no `.golangci.yml`. - Update the comment above `VENDORED_FILES`, "each vendored file the repo carries" in `prompts/REPO_POLICIES.md`, and both checklists where they say a listed file is skipped. Leave everything else alone. `make fmt`, `make check`, push. **For the next review.** Read the whole PR again, against the description of https://git.eeqj.de/sneak/prompts/issues/165, the plan in https://git.eeqj.de/sneak/prompts/issues/165#issuecomment-172327 and the two reworker comments. The plan's "Settled" list is not findings. A sentence this PR does not change is not a finding. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-09 20:28:28 +01:00
clawbot added 1 commit 2026-11-09 20:38:41 +01:00
A listed file the repo lacks is now written whole, with no keep rule.
A prompts/NAME.md goes to docs/NAME.md unless the repo keeps it at
NAME.md, and any other file goes to its own path. A language's files
are skipped when git tracks no source file of that language.

A listed path git ignores now stops the script before it writes.

README bullets split into short sentences, and a false sentence about
template repos deleted.

Model: opus-5-5
clawbot changed title from Add script/install; script/update-policy runs it and commits to Add script/install; script/update-policy runs it and commits (closes #165) 2026-11-09 20:39:04 +01:00
Author
Collaborator

Rework of #166 for #166 (comment), in commit 76b75fa7:

  1. Done: script/install, test_files_the_repo_lacks_are_written_whole, test_language_files_need_a_source_file, the comment above VENDORED_FILES, prompts/REPO_POLICIES.md and the PR body.
  2. Done.
  3. Done.
  4. Done: test_install_without_script_directory.
  5. Done.

Checklists: unchanged, because neither says a listed file is skipped.

Deviation: a listed path git ignores now stops the script before it writes (git check-ignore, test_ignored_file_stops), because git status does not list ignored files and such a file would be overwritten.

Deviation: the test fixture now has a Go source file and commits every shared file a scenario does not name as canonical, because the script now writes any file a repo lacks.

Model: opus-5-5

Rework of https://git.eeqj.de/sneak/prompts/pulls/166 for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172566, in commit `76b75fa7`: 1. Done: `script/install`, `test_files_the_repo_lacks_are_written_whole`, `test_language_files_need_a_source_file`, the comment above `VENDORED_FILES`, `prompts/REPO_POLICIES.md` and the PR body. 2. Done. 3. Done. 4. Done: `test_install_without_script_directory`. 5. Done. Checklists: unchanged, because neither says a listed file is skipped. Deviation: a listed path git ignores now stops the script before it writes (`git check-ignore`, `test_ignored_file_stops`), because `git status` does not list ignored files and such a file would be overwritten. Deviation: the test fixture now has a Go source file and commits every shared file a scenario does not name as canonical, because the script now writes any file a repo lacks. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-09 20:44:50 +01:00
Author
Collaborator

FAIL (needs-rework)

  1. make install becomes a required target in every repo, meaning "write the policy files": prompts/REPO_POLICIES.md lines 96 and 197, prompts/EXISTING_REPO_CHECKLIST.md lines 208 and 215, prompts/NEW_REPO_CHECKLIST.md line 269. sneak/vaultik already has an install target that copies its built binary to $(HOME)/bin/, so an agent following the checklist replaces it. #165 asks for a Makefile target in prompts only.

    • Change: keep install in the Makefile of prompts, and remove make install from those five places. Every repo still gets script/install, and make update-policy stays the command every repo has.
  2. test/update-policy.sh leaves two parts of script/install untested. Removing either leaves the tests passing.

    • Line 259, the script/* case: test_own_script_stops covers only script/install. Without the stop for script/update-policy, a repo's own script of that name is overwritten. Repeat the scenario for script/update-policy.
    • Line 71: only *.ts is exercised. Without *.js or *.mjs, a repo whose only JavaScript source has that extension never gets prompts/CODE_STYLEGUIDE_JS.md. Add a scenario for each extension.

Judgement call, not a finding: all but one of the managed repos tried stop the first time, because .dockerignore or .gitignore lacks the canonical last line, until a person adds it by hand, as prompts/EXISTING_REPO_CHECKLIST.md says and #164 settled.

Model: opus-5-5

**FAIL** (`needs-rework`) 1. `make install` becomes a required target in every repo, meaning "write the policy files": `prompts/REPO_POLICIES.md` lines 96 and 197, `prompts/EXISTING_REPO_CHECKLIST.md` lines 208 and 215, `prompts/NEW_REPO_CHECKLIST.md` line 269. `sneak/vaultik` already has an `install` target that copies its built binary to `$(HOME)/bin/`, so an agent following the checklist replaces it. https://git.eeqj.de/sneak/prompts/issues/165 asks for a `Makefile` target in `prompts` only. - Change: keep `install` in the `Makefile` of `prompts`, and remove `make install` from those five places. Every repo still gets `script/install`, and `make update-policy` stays the command every repo has. 2. `test/update-policy.sh` leaves two parts of `script/install` untested. Removing either leaves the tests passing. - Line 259, the `script/*` case: `test_own_script_stops` covers only `script/install`. Without the stop for `script/update-policy`, a repo's own script of that name is overwritten. Repeat the scenario for `script/update-policy`. - Line 71: only `*.ts` is exercised. Without `*.js` or `*.mjs`, a repo whose only JavaScript source has that extension never gets `prompts/CODE_STYLEGUIDE_JS.md`. Add a scenario for each extension. Judgement call, not a finding: all but one of the managed repos tried stop the first time, because `.dockerignore` or `.gitignore` lacks the canonical last line, until a person adds it by hand, as `prompts/EXISTING_REPO_CHECKLIST.md` says and https://git.eeqj.de/sneak/prompts/pulls/164 settled. Model: opus-5-5
Author
Collaborator

For the reworker. Second failed review. Fix both findings of #166 (comment) as they say, in one new commit on top of 76b75fa7:

  1. install stays in this repo's Makefile, and leaves the required targets: remove make install from the five places the finding names. script/install stays required in every repo. Line 96's bullet goes entirely.
  2. Add the three scenarios: the stop for a repo's own script/update-policy, and one for each of *.js and *.mjs.
  3. Add one bullet to the PR body's disclosures: "On most managed repos the first run stops, because .dockerignore or .gitignore lacks the canonical last line, until a person adds that line, as prompts/EXISTING_REPO_CHECKLIST.md says. Settled on #164."

Leave everything else alone. make fmt, make check, push.

For the next review. The bar is git diff 76b75fa7..HEAD: those three changes, correct and nothing more. The three new scenarios each fail when their behaviour is removed from a copy of the script. The whole PR has now had two full reads; the only other finding that counts is the script committing the loss of a repo's own line that the canonical file has never held. Anything else goes under Disclosures. On a pass this PR goes to sneak.

Model: opus-5-5

**For the reworker.** Second failed review. Fix both findings of https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172656 as they say, in one new commit on top of `76b75fa7`: 1. `install` stays in this repo's `Makefile`, and leaves the required targets: remove `make install` from the five places the finding names. `script/install` stays required in every repo. Line 96's bullet goes entirely. 2. Add the three scenarios: the stop for a repo's own `script/update-policy`, and one for each of `*.js` and `*.mjs`. 3. Add one bullet to the PR body's disclosures: "On most managed repos the first run stops, because `.dockerignore` or `.gitignore` lacks the canonical last line, until a person adds that line, as `prompts/EXISTING_REPO_CHECKLIST.md` says. Settled on https://git.eeqj.de/sneak/prompts/pulls/164." Leave everything else alone. `make fmt`, `make check`, push. **For the next review.** The bar is `git diff 76b75fa7..HEAD`: those three changes, correct and nothing more. The three new scenarios each fail when their behaviour is removed from a copy of the script. The whole PR has now had two full reads; the only other finding that counts is the script committing the loss of a repo's own line that the canonical file has never held. Anything else goes under Disclosures. On a pass this PR goes to sneak. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-09 21:00:29 +01:00
clawbot added 1 commit 2026-11-09 21:04:08 +01:00
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
Author
Collaborator

Rework of #166 for #166 (comment), in commit e89fc86a:

  1. Done: make install is out of all five places; install stays in this repo's Makefile.
  2. Done: test_own_script_stops now runs for both scripts, and test_javascript_source_brings_its_styleguide runs for .js and .mjs. Each fails when its behaviour is removed from a copy of script/install.
  3. Done.

Model: opus-5-5

Rework of https://git.eeqj.de/sneak/prompts/pulls/166 for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172674, in commit `e89fc86a`: 1. Done: `make install` is out of all five places; `install` stays in this repo's `Makefile`. 2. Done: `test_own_script_stops` now runs for both scripts, and `test_javascript_source_brings_its_styleguide` runs for `.js` and `.mjs`. Each fails when its behaviour is removed from a copy of `script/install`. 3. Done. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-09 21:10:46 +01:00
Author
Collaborator

FAIL (needs-rework)

  1. README.md, line 146, on script/install: "It stops when run here." is false. Started from this repo with a path, the script writes into that clone. It stops only when its target is this repo. A repo with neither script can get its first update that way.
    • Change the sentence to "It stops when its target is this repo." Line 149, on script/update-policy, is correct and stays.

Disclosures:

  • Deviation: judged against the definition of done in #165 and the policies, not only the narrower diff named in #166 (comment).
  • Judgement call, not a finding: the policy documents are replaced whole, so an update of sneak/orangesite deletes a nine-line section the canonical REPO_POLICIES.md has never held. The description sneak confirmed lists repo policies among the files that are the same in every repo.
  • Follows sneak's confirmed design, not a finding: script/update-policy executes script/install from the head of main with no hash, which cuts against "External references must be pinned by cryptographic hash" in prompts/REPO_POLICIES.md.

Model: opus-5-5

**FAIL** (`needs-rework`) 1. `README.md`, line 146, on `script/install`: "It stops when run here." is false. Started from this repo with a path, the script writes into that clone. It stops only when its target is this repo. A repo with neither script can get its first update that way. - Change the sentence to "It stops when its target is this repo." Line 149, on `script/update-policy`, is correct and stays. Disclosures: - Deviation: judged against the definition of done in https://git.eeqj.de/sneak/prompts/issues/165 and the policies, not only the narrower diff named in https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172674. - Judgement call, not a finding: the policy documents are replaced whole, so an update of `sneak/orangesite` deletes a nine-line section the canonical `REPO_POLICIES.md` has never held. The description sneak confirmed lists repo policies among the files that are the same in every repo. - Follows sneak's confirmed design, not a finding: `script/update-policy` executes `script/install` from the head of `main` with no hash, which cuts against "External references must be pinned by cryptographic hash" in `prompts/REPO_POLICIES.md`. Model: opus-5-5
Author
Collaborator

For the reworker. Third failed review, so these instructions end the loop. #166 (comment) stands. Make exactly one change, in one new commit on top of e89fc86a: in README.md, in the script/install bullet, change "It stops when run here." to "It stops when its target is this repo." Leave the script/update-policy bullet and everything else alone. make fmt, make check, push.

The two points raised under that review's Disclosures are now in the PR body, for sneak to weigh.

For the next review. The bar is git diff e89fc86a..HEAD: that one sentence and what make fmt does to its lines. The PR has had three full reads, so nothing else is a finding; anything else goes under Disclosures. On a pass it goes to sneak.

Model: opus-5-5

**For the reworker.** Third failed review, so these instructions end the loop. https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172746 stands. Make exactly one change, in one new commit on top of `e89fc86a`: in `README.md`, in the `script/install` bullet, change "It stops when run here." to "It stops when its target is this repo." Leave the `script/update-policy` bullet and everything else alone. `make fmt`, `make check`, push. The two points raised under that review's Disclosures are now in the PR body, for sneak to weigh. **For the next review.** The bar is `git diff e89fc86a..HEAD`: that one sentence and what `make fmt` does to its lines. The PR has had three full reads, so nothing else is a finding; anything else goes under Disclosures. On a pass it goes to sneak. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-09 21:45:22 +01:00
clawbot added 1 commit 2026-11-09 21:46:36 +01:00
Started from this repo with a path, the script writes into that clone,
so "stops when run here" was false.

Model: opus-5-5
Author
Collaborator

Rework of #166 for #166 (comment), in commit 9f83f3c1:

  1. Done: the script/install bullet in README.md now says "It stops when its target is this repo."

Model: opus-5-5

Rework of https://git.eeqj.de/sneak/prompts/pulls/166 for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172772, in commit `9f83f3c1`: 1. Done: the `script/install` bullet in `README.md` now says "It stops when its target is this repo." Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-09 22:00:10 +01:00
Author
Collaborator

FAIL (needs-rework)

  1. script/install, keep_lines_below_last, lines 124-126: a local .gitignore, .dockerignore or .editorconfig without the canonical closing comment stops the script before it writes anything. All 24 repos tried stop this way, both template repos among them, until a person edits their ignore files by hand. #165 requires that script/update-policy in a clone of a managed repo installs the files and commits them, and sneak asked that "any repo can be brought up to standards with a single command". Disclosing the stop does not meet that. It is not on the settled list in #164 (comment), and sneak has not ruled on it.

    • Change: when the local file lacks the canonical last line, treat the whole file as above that line, and do not stop on the missing line.
      • .gitignore, .dockerignore: each line stands alone, so append every line local_only_lines prints below the fetched content.
      • .editorconfig: replace the file if local_only_lines prints nothing. Otherwise stop and name the lines, because a setting means nothing away from its section.
    • A file that has the closing comment behaves as now. The stops on .golangci.yml settings and on a repo's own scripts stay.
    • test/update-policy.sh: make test_gitignore_lacks_canonical_last_line expect exit 0 with the repo's own line below the canonical content, and add a scenario for an .editorconfig that lacks the comment and has a line of its own.
    • Update the header of script/install and the "Before its first use" sentence in prompts/EXISTING_REPO_CHECKLIST.md. Delete the PR body's "On most managed repos" bullet.
  2. test/update-policy.sh, line 48, serve_file: the stub writes each file with cp, which keeps the canonical file's mode 755. A real download has no execute bit. Removing chmod 755 (script/install, line 273) leaves the tests passing, so nothing tests the mode 755 that #165 (comment) requires. Without that line a repo gets scripts it cannot execute.

    • Change line 48 to cat "$canonical/$1" > "$output".

Disclosures:

  • Deviation: judged against the definition of done in #165 and the policies, as this review was instructed, not only the diff named in #166 (comment).
  • Judgement call: "the rules for keeping a repo's own lines", in the design sneak confirmed, is read as which lines are kept, not as a stop on every repo.
  • Follows sneak's confirmed design, not a finding: policy documents are replaced whole, and sneak/orangesite loses nine lines, against the ruling that overwriting a repo's data is never a limitation.
  • Follows sneak's confirmed design, not a finding: script/update-policy executes script/install from the head of main with no hash, against "External references must be pinned by cryptographic hash" in prompts/REPO_POLICIES.md.

Model: opus-5-5

**FAIL** (`needs-rework`) 1. `script/install`, `keep_lines_below_last`, lines 124-126: a local `.gitignore`, `.dockerignore` or `.editorconfig` without the canonical closing comment stops the script before it writes anything. All 24 repos tried stop this way, both template repos among them, until a person edits their ignore files by hand. https://git.eeqj.de/sneak/prompts/issues/165 requires that `script/update-policy` in a clone of a managed repo installs the files and commits them, and sneak asked that "any repo can be brought up to standards with a single command". Disclosing the stop does not meet that. It is not on the settled list in https://git.eeqj.de/sneak/prompts/pulls/164#issuecomment-172071, and sneak has not ruled on it. - Change: when the local file lacks the canonical last line, treat the whole file as above that line, and do not stop on the missing line. - `.gitignore`, `.dockerignore`: each line stands alone, so append every line `local_only_lines` prints below the fetched content. - `.editorconfig`: replace the file if `local_only_lines` prints nothing. Otherwise stop and name the lines, because a setting means nothing away from its section. - A file that has the closing comment behaves as now. The stops on `.golangci.yml` settings and on a repo's own scripts stay. - `test/update-policy.sh`: make `test_gitignore_lacks_canonical_last_line` expect exit 0 with the repo's own line below the canonical content, and add a scenario for an `.editorconfig` that lacks the comment and has a line of its own. - Update the header of `script/install` and the "Before its first use" sentence in `prompts/EXISTING_REPO_CHECKLIST.md`. Delete the PR body's "On most managed repos" bullet. 2. `test/update-policy.sh`, line 48, `serve_file`: the stub writes each file with `cp`, which keeps the canonical file's mode 755. A real download has no execute bit. Removing `chmod 755` (`script/install`, line 273) leaves the tests passing, so nothing tests the mode 755 that https://git.eeqj.de/sneak/prompts/issues/165#issuecomment-172327 requires. Without that line a repo gets scripts it cannot execute. - Change line 48 to `cat "$canonical/$1" > "$output"`. Disclosures: - Deviation: judged against the definition of done in https://git.eeqj.de/sneak/prompts/issues/165 and the policies, as this review was instructed, not only the diff named in https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172772. - Judgement call: "the rules for keeping a repo's own lines", in the design sneak confirmed, is read as which lines are kept, not as a stop on every repo. - Follows sneak's confirmed design, not a finding: policy documents are replaced whole, and `sneak/orangesite` loses nine lines, against the ruling that overwriting a repo's data is never a limitation. - Follows sneak's confirmed design, not a finding: `script/update-policy` executes `script/install` from the head of `main` with no hash, against "External references must be pinned by cryptographic hash" in `prompts/REPO_POLICIES.md`. Model: opus-5-5
Author
Collaborator

For the reworker. Fourth failed review. Finding 1 of #166 (comment) stands: sneak asked for one command that brings any repo up to standards, and today every repo tried stops until a person edits its ignore files. Finding 2 stands. I was wrong that this was settled. Make exactly these changes, in one new commit on top of 9f83f3c1:

  1. script/install, keep_lines_below_last: when the local file lacks the fetched file's last line, do not stop on that.
    • .gitignore, .dockerignore: after the fetched content, append every line local_only_lines "$1" "$2" prints, so each line the canonical file has never held is kept. Blank lines and comments are not kept.
    • .editorconfig: replace the file when local_only_lines prints nothing. Otherwise stop and name the file and each line, because a setting means nothing away from its section.
    • A file that has the last line behaves as now. The stops on .golangci.yml settings and on a repo's own scripts stay.
  2. test/update-policy.sh:
    • test_gitignore_lacks_canonical_last_line expects exit 0, with the repo's own line below the canonical content.
    • Add: a .dockerignore lacking the comment, holding a line an earlier canonical commit held, drops that line and exits 0. This is the old .git exclusion case.
    • Add: an .editorconfig lacking the comment with a line of its own stops, names the line and writes nothing.
    • serve_file writes with cat "$canonical/$1" > "$output", so the file has no execute bit, as with a real download.
  3. Update the header of script/install and the "Before its first use" sentence in prompts/EXISTING_REPO_CHECKLIST.md to say what the script does now. I have removed the "On most managed repos" bullet from the PR body.

Leave everything else alone. make fmt, make check, push.

For the next review. The bar is git diff 9f83f3c1..HEAD: those changes, correct and nothing more, with each new or changed scenario failing when its behaviour is removed from a copy of the script. The PR has had four reviews. Policy documents being replaced whole and script/update-policy fetching main unpinned are sneak's confirmed design and are in the PR body for him. Anything else outside that diff goes under Disclosures. On a pass this PR goes to sneak.

Model: opus-5-5

**For the reworker.** Fourth failed review. Finding 1 of https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172869 stands: sneak asked for one command that brings any repo up to standards, and today every repo tried stops until a person edits its ignore files. Finding 2 stands. I was wrong that this was settled. Make exactly these changes, in one new commit on top of `9f83f3c1`: 1. `script/install`, `keep_lines_below_last`: when the local file lacks the fetched file's last line, do not stop on that. - `.gitignore`, `.dockerignore`: after the fetched content, append every line `local_only_lines "$1" "$2"` prints, so each line the canonical file has never held is kept. Blank lines and comments are not kept. - `.editorconfig`: replace the file when `local_only_lines` prints nothing. Otherwise stop and name the file and each line, because a setting means nothing away from its section. - A file that has the last line behaves as now. The stops on `.golangci.yml` settings and on a repo's own scripts stay. 2. `test/update-policy.sh`: - `test_gitignore_lacks_canonical_last_line` expects exit 0, with the repo's own line below the canonical content. - Add: a `.dockerignore` lacking the comment, holding a line an earlier canonical commit held, drops that line and exits 0. This is the old `.git` exclusion case. - Add: an `.editorconfig` lacking the comment with a line of its own stops, names the line and writes nothing. - `serve_file` writes with `cat "$canonical/$1" > "$output"`, so the file has no execute bit, as with a real download. 3. Update the header of `script/install` and the "Before its first use" sentence in `prompts/EXISTING_REPO_CHECKLIST.md` to say what the script does now. I have removed the "On most managed repos" bullet from the PR body. Leave everything else alone. `make fmt`, `make check`, push. **For the next review.** The bar is `git diff 9f83f3c1..HEAD`: those changes, correct and nothing more, with each new or changed scenario failing when its behaviour is removed from a copy of the script. The PR has had four reviews. Policy documents being replaced whole and `script/update-policy` fetching `main` unpinned are sneak's confirmed design and are in the PR body for him. Anything else outside that diff goes under Disclosures. On a pass this PR goes to sneak. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-09 22:28:20 +01:00
clawbot added 1 commit 2026-11-09 22:34:34 +01:00
A .gitignore or .dockerignore lacking the canonical last line no longer
stops the script: each line the canonical file has never held goes
below the fetched content. An .editorconfig lacking it is replaced,
unless it has such a line, which stops the script.

The stub curl now writes files with no execute bit, as a real download
does, so the tests exercise the mode the script sets.

Model: opus-5-5
Author
Collaborator

Rework of #166 for #166 (comment), in commit 8a25e50:

  1. Done: keep_lines_below_last in script/install no longer stops on a missing last line.
  2. Done: test_gitignore_lacks_canonical_last_line changed, test_dockerignore_lacks_canonical_last_line and test_editorconfig_lacks_canonical_last_line added, serve_file writes with cat.
  3. Done: the header of script/install and the "Before its first use" sentence in prompts/EXISTING_REPO_CHECKLIST.md.

Disclosures:

  • Unverified by the suite: no scenario covers an .editorconfig lacking the comment with no line of its own, because the instructions name only the stop.
  • Judgement call: a fetched file whose last line is blank now takes the same path as a local file lacking the last line; it used to stop.
  • Left as instructed: prompts/REPO_POLICIES.md still says only the lines below the comment are kept, which does not describe a .gitignore or .dockerignore lacking the comment.

Model: opus-5-5

Rework of https://git.eeqj.de/sneak/prompts/pulls/166 for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172893, in commit `8a25e50`: 1. Done: `keep_lines_below_last` in `script/install` no longer stops on a missing last line. 2. Done: `test_gitignore_lacks_canonical_last_line` changed, `test_dockerignore_lacks_canonical_last_line` and `test_editorconfig_lacks_canonical_last_line` added, `serve_file` writes with `cat`. 3. Done: the header of `script/install` and the "Before its first use" sentence in `prompts/EXISTING_REPO_CHECKLIST.md`. Disclosures: - Unverified by the suite: no scenario covers an `.editorconfig` lacking the comment with no line of its own, because the instructions name only the stop. - Judgement call: a fetched file whose last line is blank now takes the same path as a local file lacking the last line; it used to stop. - Left as instructed: `prompts/REPO_POLICIES.md` still says only the lines below the comment are kept, which does not describe a `.gitignore` or `.dockerignore` lacking the comment. Model: opus-5-5
Author
Collaborator

For the reworker. The last commit leaves one sentence false, as its disclosure says. In one new commit on top of 8a25e502, in prompts/REPO_POLICIES.md, change the first bullet under "keeps only the repo's own entries" to:

"in .gitignore, .editorconfig and .dockerignore: the lines below the comment that ends the canonical file, and, in a .gitignore or .dockerignore lacking that comment, every line the canonical file has never held"

Leave everything else alone. make fmt, make check, push.

For the next review. The bar stays git diff 9f83f3c1..HEAD, as #166 (comment) says, plus this sentence. Anything else outside that diff goes under Disclosures.

Model: opus-5-5

**For the reworker.** The last commit leaves one sentence false, as its disclosure says. In one new commit on top of `8a25e502`, in `prompts/REPO_POLICIES.md`, change the first bullet under "keeps only the repo's own entries" to: "in `.gitignore`, `.editorconfig` and `.dockerignore`: the lines below the comment that ends the canonical file, and, in a `.gitignore` or `.dockerignore` lacking that comment, every line the canonical file has never held" Leave everything else alone. `make fmt`, `make check`, push. **For the next review.** The bar stays `git diff 9f83f3c1..HEAD`, as https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172893 says, plus this sentence. Anything else outside that diff goes under Disclosures. Model: opus-5-5
clawbot added 1 commit 2026-11-09 22:46:41 +01:00
Model: opus-5-5
Author
Collaborator

Rework of #166 for #166 (comment), in commit 5d82424:

  1. Done: the first bullet under "keeps only the repo's own entries" in prompts/REPO_POLICIES.md.

Model: opus-5-5

Rework of https://git.eeqj.de/sneak/prompts/pulls/166 for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-172937, in commit `5d82424`: 1. Done: the first bullet under "keeps only the repo's own entries" in `prompts/REPO_POLICIES.md`. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-09 23:00:09 +01:00
Author
Collaborator

FAIL (needs-rework)

  1. prompts/REPO_POLICIES.md, the first bullet under "keeps only the repo's own entries" (lines 953-956): "every line the canonical file has never held" is false. In a .gitignore or .dockerignore lacking the comment, the script drops blank lines and comments, as prompts/EXISTING_REPO_CHECKLIST.md says. The sentence also runs past 30 words, with a clause stacked inside it.

    • Change: split it into two bullets:
      • "in .gitignore, .editorconfig and .dockerignore: the lines below the comment that ends the canonical file"
      • "in a .gitignore or .dockerignore lacking that comment: every entry the canonical file has never held"
  2. test/update-policy.sh: no scenario covers an .editorconfig that lacks the closing comment and has no line of its own, which script/install replaces (line 136). If this case stopped the script instead, the tests would still pass. 18 of the 28 managed repos tried that have the file take this path, so a break here stops most repos until a person edits them.

    • Change: add a scenario to test/update-policy.sh: an .editorconfig lacking the comment, holding only lines the canonical file has held, exits 0 and ends up equal to the canonical file.

Disclosures:

  • Judgement call, not a finding: 6 of the 30 managed repos tried still stop on the stops this PR keeps: lines of their own in .golangci.yml in sneak/homoicon, sneak/simplexcalc, sneak/currentstat.us, sneak/spigot and clawbot/go-template-repo, and in .editorconfig in sneak/upaas.
  • Follows sneak's confirmed design, not a finding: besides the nine lines in sneak/orangesite that the PR body names, an update deletes about 60 lines of REPO_POLICIES.md that prompts has never held in each of sneak/template-app-go and sneak/hostsurvey.
  • Unverified: an update from the live server, because main has no script/install yet.

Model: opus-5-5

**FAIL** (`needs-rework`) 1. `prompts/REPO_POLICIES.md`, the first bullet under "keeps only the repo's own entries" (lines 953-956): "every line the canonical file has never held" is false. In a `.gitignore` or `.dockerignore` lacking the comment, the script drops blank lines and comments, as `prompts/EXISTING_REPO_CHECKLIST.md` says. The sentence also runs past 30 words, with a clause stacked inside it. - Change: split it into two bullets: - "in `.gitignore`, `.editorconfig` and `.dockerignore`: the lines below the comment that ends the canonical file" - "in a `.gitignore` or `.dockerignore` lacking that comment: every entry the canonical file has never held" 2. `test/update-policy.sh`: no scenario covers an `.editorconfig` that lacks the closing comment and has no line of its own, which `script/install` replaces (line 136). If this case stopped the script instead, the tests would still pass. 18 of the 28 managed repos tried that have the file take this path, so a break here stops most repos until a person edits them. - Change: add a scenario to `test/update-policy.sh`: an `.editorconfig` lacking the comment, holding only lines the canonical file has held, exits 0 and ends up equal to the canonical file. Disclosures: - Judgement call, not a finding: 6 of the 30 managed repos tried still stop on the stops this PR keeps: lines of their own in `.golangci.yml` in `sneak/homoicon`, `sneak/simplexcalc`, `sneak/currentstat.us`, `sneak/spigot` and `clawbot/go-template-repo`, and in `.editorconfig` in `sneak/upaas`. - Follows sneak's confirmed design, not a finding: besides the nine lines in `sneak/orangesite` that the PR body names, an update deletes about 60 lines of `REPO_POLICIES.md` that `prompts` has never held in each of `sneak/template-app-go` and `sneak/hostsurvey`. - Unverified: an update from the live server, because `main` has no `script/install` yet. Model: opus-5-5
Author
Collaborator

For the reworker. Fix both findings of #166 (comment) as they say, in one new commit on top of 5d82424a. Leave everything else alone. make fmt, make check, push.

The two disclosures that review added on repos that still stop and on lines lost from REPO_POLICIES.md are now in the PR body.

For the next review. The bar is git diff 5d82424a..HEAD: those two changes, correct and nothing more, and the new scenario failing when its behaviour is removed from a copy of the script. Anything else goes under Disclosures. On a pass this PR goes to sneak.

Model: opus-5-5

**For the reworker.** Fix both findings of https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-173000 as they say, in one new commit on top of `5d82424a`. Leave everything else alone. `make fmt`, `make check`, push. The two disclosures that review added on repos that still stop and on lines lost from `REPO_POLICIES.md` are now in the PR body. **For the next review.** The bar is `git diff 5d82424a..HEAD`: those two changes, correct and nothing more, and the new scenario failing when its behaviour is removed from a copy of the script. Anything else goes under Disclosures. On a pass this PR goes to sneak. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-09 23:28:30 +01:00
clawbot added 1 commit 2026-11-09 23:31:18 +01:00
REPO_POLICIES said an ignore file lacking the closing comment keeps every
line the canonical file has never held; blank lines and comments are
dropped, so it now says entries, in a bullet of its own.

A new scenario covers an .editorconfig lacking the comment with no line
of its own, which the script replaces.

Model: opus-5-5
Author
Collaborator

Rework of #166 for #166 (comment), in commit ff42f40:

  1. Done: the bullet in prompts/REPO_POLICIES.md is now the two bullets #166 (comment) gives.
  2. Done: test_editorconfig_lacks_canonical_last_line_no_own_line in test/update-policy.sh.

Model: opus-5-5

Rework of https://git.eeqj.de/sneak/prompts/pulls/166 for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-173025, in commit `ff42f40`: 1. Done: the bullet in `prompts/REPO_POLICIES.md` is now the two bullets https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-173000 gives. 2. Done: `test_editorconfig_lacks_canonical_last_line_no_own_line` in `test/update-policy.sh`. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-09 23:44:55 +01:00
Author
Collaborator

PASS: this change does what #165 asks of this repo; the fetch of script/install from the head of main with no hash and the whole replacement of policy documents follow the design sneak confirmed, against the policy that pins external references by hash and the ruling against overwriting a repo's data.

Model: opus-5-5

**PASS**: this change does what https://git.eeqj.de/sneak/prompts/issues/165 asks of this repo; the fetch of `script/install` from the head of `main` with no hash and the whole replacement of policy documents follow the design sneak confirmed, against the policy that pins external references by hash and the ruling against overwriting a repo's data. Model: opus-5-5
Author
Collaborator

sneak: this is yours to review, as you asked on #165 (comment). The independent review passed. It merges once you approve it on this PR, and the issues for the two template repositories follow that merge. The PR body lists what to weigh, including the repos that still stop on a first run and the lines replaced in their copies of REPO_POLICIES.md.

Model: opus-5-5

sneak: this is yours to review, as you asked on https://git.eeqj.de/sneak/prompts/issues/165#issuecomment-172319. The independent review passed. It merges once you approve it on this PR, and the issues for the two template repositories follow that merge. The PR body lists what to weigh, including the repos that still stop on a first run and the lines replaced in their copies of `REPO_POLICIES.md`. Model: opus-5-5
clawbot removed their assignment 2026-11-10 00:01:08 +01:00
sneak was assigned by clawbot 2026-11-10 00:01:08 +01:00
Author
Collaborator

sneak rejected this PR (chat, 10 November, about 20:10 UTC): "install" is the wrong verb. By convention, and in the scripts-to-rule-them-all set this repo documents, script/install installs the program itself; this script fetches the shared policy files into a repo.

For the reworker:

  • Rename script/install to script/fetch-policy everywhere: the file, every reference in script/update-policy, the tests, README, AGENTS.md, REPO_POLICIES.md, and the PR title and body. No file or text in this PR may call the fetch "install" or "installer".
  • Change nothing else in behaviour.
  • make check passes; push; update the PR body (under about 250 words) to the new name.

Model: opus-5-5

sneak rejected this PR (chat, 10 November, about 20:10 UTC): "install" is the wrong verb. By convention, and in the scripts-to-rule-them-all set this repo documents, `script/install` installs the program itself; this script fetches the shared policy files into a repo. For the reworker: - Rename `script/install` to `script/fetch-policy` everywhere: the file, every reference in `script/update-policy`, the tests, README, `AGENTS.md`, `REPO_POLICIES.md`, and the PR title and body. No file or text in this PR may call the fetch "install" or "installer". - Change nothing else in behaviour. - `make check` passes; push; update the PR body (under about 250 words) to the new name. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-10 21:11:07 +01:00
sneak was unassigned by clawbot 2026-11-10 21:11:07 +01:00
clawbot added 1 commit 2026-11-10 21:19:07 +01:00
Rename script/install to script/fetch-policy
check / check (push) Canceled after 0s
917fe4bc1d
By convention, and in scripts-to-rule-them-all, script/install installs
the program itself. This script fetches the shared policy files into a
repo. The make target, the test names and the messages take the new
name. Behaviour is unchanged.

Model: opus-5-5
clawbot changed title from Add script/install; script/update-policy runs it and commits (closes #165) to Add script/fetch-policy; script/update-policy runs it and commits (closes #165) 2026-11-10 21:20:01 +01:00
Author
Collaborator

Rework for #166 (comment), in commit 917fe4b:

  1. Done: the file, the Makefile target (now fetch-policy), script/update-policy, the tests, README.md, TODO.md, both checklists and prompts/REPO_POLICIES.md; this repo has no AGENTS.md.
  2. Done: only names changed.
  3. Done: title and body name script/fetch-policy; the body is otherwise unchanged.

Left as is: the branch is still named issue-165-install-scripts, because renaming it means opening a new PR.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-175003, in commit `917fe4b`: 1. Done: the file, the `Makefile` target (now `fetch-policy`), `script/update-policy`, the tests, `README.md`, `TODO.md`, both checklists and `prompts/REPO_POLICIES.md`; this repo has no `AGENTS.md`. 2. Done: only names changed. 3. Done: title and body name `script/fetch-policy`; the body is otherwise unchanged. Left as is: the branch is still named `issue-165-install-scripts`, because renaming it means opening a new PR. Model: opus-5-5
Owner

it doesn't just fetch it, though. still a bad name! "commit-current-upstream-policy-docs" makes sense. you can probably think of others. why are you choosing short obfuscated identifiers as if we are trying to fit everything in 640k of ram?

it doesn't just fetch it, though. still a bad name! "commit-current-upstream-policy-docs" makes sense. you can probably think of others. why are you choosing short obfuscated identifiers as if we are trying to fit everything in 640k of ram?
Author
Collaborator

For the reworker: sneak rejected fetch-policy too (#166 (comment)): the script does more than fetch, and short names are not wanted. Rename script/fetch-policy to script/commit-current-upstream-policy-docs, his suggested name, everywhere the previous rework touched (file, script/update-policy, tests, README, AGENTS.md, REPO_POLICIES.md, PR title and body). Behaviour unchanged; make check passes.

Model: opus-5-5

For the reworker: sneak rejected `fetch-policy` too (https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-175887): the script does more than fetch, and short names are not wanted. Rename `script/fetch-policy` to `script/commit-current-upstream-policy-docs`, his suggested name, everywhere the previous rework touched (file, `script/update-policy`, tests, README, `AGENTS.md`, `REPO_POLICIES.md`, PR title and body). Behaviour unchanged; `make check` passes. Model: opus-5-5
clawbot added 1 commit 2026-11-11 01:00:32 +01:00
sneak, on the PR: the script does more than fetch, and short names are
not wanted. The make target, the test names, the variables and the
messages take the new name. Behaviour is unchanged.

Model: opus-5-5
clawbot changed title from Add script/fetch-policy; script/update-policy runs it and commits (closes #165) to Add script/commit-current-upstream-policy-docs; script/update-policy runs it and commits (closes #165) 2026-11-11 01:01:06 +01:00
Author
Collaborator

Rework for #166 (comment), in commit ed60414:

  1. Done: the file, the Makefile target, script/update-policy, the tests, README.md, TODO.md, both checklists, prompts/REPO_POLICIES.md, and the PR title and body; this repo has no AGENTS.md.
  2. Done: only names changed, plus line wraps around the longer name.

For sneak to confirm: behaviour is unchanged, so script/commit-current-upstream-policy-docs itself still commits nothing; script/update-policy runs it and makes the commit.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-175985, in commit `ed60414`: 1. Done: the file, the `Makefile` target, `script/update-policy`, the tests, `README.md`, `TODO.md`, both checklists, `prompts/REPO_POLICIES.md`, and the PR title and body; this repo has no `AGENTS.md`. 2. Done: only names changed, plus line wraps around the longer name. For sneak to confirm: behaviour is unchanged, so `script/commit-current-upstream-policy-docs` itself still commits nothing; `script/update-policy` runs it and makes the commit. Model: opus-5-5
Author
Collaborator

FAIL (needs-rework)

  1. script/commit-current-upstream-policy-docs: the name says the script commits, but it commits nothing. Its own header (lines 2-4) says "It commits nothing; script/update-policy does that", and the PR body says the same. Someone who runs make commit-current-upstream-policy-docs expects a commit and gets uncommitted changes. The name also says "docs", but the script also writes .gitignore, .dockerignore, .editorconfig, .golangci.yml, the CI workflow and two scripts. sneak suggested this name because the script does more than fetch, and he said others would do (#166 (comment)).
    • Acceptable: a long name that says what the script does, for example script/write-current-upstream-policy-files. "Policy files" is the term this repo already uses. Apply it in every place the last rename touched: the file, the Makefile target, script/update-policy, the tests, README.md, TODO.md, both checklists, prompts/REPO_POLICIES.md, and the PR title and body.
    • Reading taken: in the design sneak confirmed, script/update-policy makes the commit, so the name changes and the behaviour stays. If sneak rules instead that this script makes the commit itself, that behaviour change needs his ruling first.

Disclosures:

  • Follows sneak's confirmed design, not a finding: script/update-policy runs the script from the head of main with no hash. This cuts against "External references must be pinned by cryptographic hash" in prompts/REPO_POLICIES.md.
  • Follows sneak's words ("the files that should be the same in all repos, such as repo policies"), not a finding: policy documents are replaced whole. This cuts against the ruling that overwriting a repo's data is never a limitation.

Model: opus-5-5

**FAIL** (`needs-rework`) 1. `script/commit-current-upstream-policy-docs`: the name says the script commits, but it commits nothing. Its own header (lines 2-4) says "It commits nothing; script/update-policy does that", and the PR body says the same. Someone who runs `make commit-current-upstream-policy-docs` expects a commit and gets uncommitted changes. The name also says "docs", but the script also writes `.gitignore`, `.dockerignore`, `.editorconfig`, `.golangci.yml`, the CI workflow and two scripts. sneak suggested this name because the script does more than fetch, and he said others would do (https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-175887). - Acceptable: a long name that says what the script does, for example `script/write-current-upstream-policy-files`. "Policy files" is the term this repo already uses. Apply it in every place the last rename touched: the file, the `Makefile` target, `script/update-policy`, the tests, `README.md`, `TODO.md`, both checklists, `prompts/REPO_POLICIES.md`, and the PR title and body. - Reading taken: in the design sneak confirmed, `script/update-policy` makes the commit, so the name changes and the behaviour stays. If sneak rules instead that this script makes the commit itself, that behaviour change needs his ruling first. Disclosures: - Follows sneak's confirmed design, not a finding: `script/update-policy` runs the script from the head of `main` with no hash. This cuts against "External references must be pinned by cryptographic hash" in `prompts/REPO_POLICIES.md`. - Follows sneak's words ("the files that should be the same in all repos, such as repo policies"), not a finding: policy documents are replaced whole. This cuts against the ruling that overwriting a repo's data is never a limitation. Model: opus-5-5
Author
Collaborator

For the reworker, the top manager's call on finding 1 (sneak may override): name each script for exactly what it does.

  • The script that downloads the shared files from prompts and writes them into the repo, committing nothing: script/write-upstream-policy-files.
  • The script that runs it and commits the result (today script/update-policy): script/commit-upstream-policy-files.

"files", not "docs", because they include .gitignore, .editorconfig and other config. Rename both everywhere (files, Makefile targets, tests, README, TODO.md, checklists, prompts/REPO_POLICIES.md, PR title and body); fix the review's other findings as its "Acceptable" lines say; behaviour unchanged.

Model: opus-5-5

For the reworker, the top manager's call on finding 1 (sneak may override): name each script for exactly what it does. - The script that downloads the shared files from `prompts` and writes them into the repo, committing nothing: `script/write-upstream-policy-files`. - The script that runs it and commits the result (today `script/update-policy`): `script/commit-upstream-policy-files`. "files", not "docs", because they include `.gitignore`, `.editorconfig` and other config. Rename both everywhere (files, `Makefile` targets, tests, README, `TODO.md`, checklists, `prompts/REPO_POLICIES.md`, PR title and body); fix the review's other findings as its "Acceptable" lines say; behaviour unchanged. Model: opus-5-5
clawbot added 1 commit 2026-11-11 01:47:40 +01:00
Rename the scripts that update the policy files
check / check (push) Canceled after 0s
f0ec2f38a8
script/commit-current-upstream-policy-docs is now
script/write-upstream-policy-files: it writes the policy files and
commits nothing. script/update-policy is now
script/commit-upstream-policy-files, and make update-policy is now
make commit-upstream-policy-files. test/update-policy.sh follows.
Behaviour is unchanged.

Model: opus-5-5
clawbot changed title from Add script/commit-current-upstream-policy-docs; script/update-policy runs it and commits (closes #165) to Replace script/update-policy with script/write-upstream-policy-files and script/commit-upstream-policy-files (closes #165) 2026-11-11 01:48:08 +01:00
Author
Collaborator

Rework for #166 (comment), in commit f0ec2f3:

  1. Done: script/write-upstream-policy-files.
  2. Done: script/commit-upstream-policy-files, and make commit-upstream-policy-files in place of make update-policy.
  3. Done in every place listed. test/update-policy.sh is now test/commit-upstream-policy-files.sh, and the Dockerfile line that runs it follows.
  4. No other findings: #166 (comment) has only finding 1.
  5. Done: only names changed, plus line wraps.

Left as is: the TODO.md entry for #162 keeps script/update-policy, because it records what that issue built.

For the manager, a new issue: that Dockerfile line keeps the timeout 90 that #164 added, against the ruling that time limits go only in the CI workflow.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-176548, in commit `f0ec2f3`: 1. Done: `script/write-upstream-policy-files`. 2. Done: `script/commit-upstream-policy-files`, and `make commit-upstream-policy-files` in place of `make update-policy`. 3. Done in every place listed. `test/update-policy.sh` is now `test/commit-upstream-policy-files.sh`, and the `Dockerfile` line that runs it follows. 4. No other findings: https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-176477 has only finding 1. 5. Done: only names changed, plus line wraps. Left as is: the `TODO.md` entry for https://git.eeqj.de/sneak/prompts/issues/162 keeps `script/update-policy`, because it records what that issue built. For the manager, a new issue: that `Dockerfile` line keeps the `timeout 90` that https://git.eeqj.de/sneak/prompts/pulls/164 added, against the ruling that time limits go only in the CI workflow. Model: opus-5-5
Author
Collaborator

FAIL (needs-rework)

  1. Dockerfile, line 45: the line this PR rewrites keeps timeout 90. sneak's ruling puts time limits only in the CI workflow file, on the step, and never in a Dockerfile. The test phase also runs under make check outside CI, where a slow host fails a test run that would pass.

    • Change the line to RUN test/commit-upstream-policy-files.sh.
  2. prompts/REPO_POLICIES.md, prompts/EXISTING_REPO_CHECKLIST.md and prompts/NEW_REPO_CHECKLIST.md, line 3: last_modified stays 2026-11-09, the date on next, though this PR's commits of 10 and 11 November change the text of all three. prompts/REPO_POLICIES.md requires the date so that copies can be kept in sync, and this repo sets it on every change. As it stands, a copy from next and a copy from this PR carry the same date and different text.

    • Set last_modified: 2026-11-11 in all three.

Disclosures:

  • Judgement call: finding 1 is on a line this PR only renames; the limit came in with #164.
  • Judgement call, not a finding: the two script names follow the top manager's call in #166 (comment), which sneak may override.
  • Unverified: a run against the live server, because main has no script/write-upstream-policy-files yet.

Model: opus-5-5

**FAIL** (`needs-rework`) 1. `Dockerfile`, line 45: the line this PR rewrites keeps `timeout 90`. sneak's ruling puts time limits only in the CI workflow file, on the step, and never in a `Dockerfile`. The `test` phase also runs under `make check` outside CI, where a slow host fails a test run that would pass. - Change the line to `RUN test/commit-upstream-policy-files.sh`. 2. `prompts/REPO_POLICIES.md`, `prompts/EXISTING_REPO_CHECKLIST.md` and `prompts/NEW_REPO_CHECKLIST.md`, line 3: `last_modified` stays `2026-11-09`, the date on `next`, though this PR's commits of 10 and 11 November change the text of all three. `prompts/REPO_POLICIES.md` requires the date so that copies can be kept in sync, and this repo sets it on every change. As it stands, a copy from `next` and a copy from this PR carry the same date and different text. - Set `last_modified: 2026-11-11` in all three. Disclosures: - Judgement call: finding 1 is on a line this PR only renames; the limit came in with https://git.eeqj.de/sneak/prompts/pulls/164. - Judgement call, not a finding: the two script names follow the top manager's call in https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-176548, which sneak may override. - Unverified: a run against the live server, because `main` has no `script/write-upstream-policy-files` yet. Model: opus-5-5
clawbot added 1 commit 2026-11-11 02:11:52 +01:00
Time limits go only in the CI workflow, so the test phase runs
test/commit-upstream-policy-files.sh with no timeout. REPO_POLICIES.md
and both checklists change in this PR, so their last_modified is
2026-11-11.

Model: opus-5-5
Author
Collaborator

Rework for #166 (comment), in commit da50899:

  1. Done: RUN test/commit-upstream-policy-files.sh.
  2. Done: last_modified: 2026-11-11 in all three.

For the manager, a new issue: prompts/REPO_POLICIES.md still asks for a 90-second timeout on the test command in the Dockerfile and Makefile. The ruling puts time limits only on the CI workflow's step. This repo's .gitea/workflows/check.yml limits only the job, which our runner ignores, so its test step now has no limit.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/prompts/pulls/166#issuecomment-176690, in commit `da50899`: 1. Done: `RUN test/commit-upstream-policy-files.sh`. 2. Done: `last_modified: 2026-11-11` in all three. For the manager, a new issue: `prompts/REPO_POLICIES.md` still asks for a 90-second timeout on the test command in the `Dockerfile` and `Makefile`. The ruling puts time limits only on the CI workflow's step. This repo's `.gitea/workflows/check.yml` limits only the job, which our runner ignores, so its test step now has no limit. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-11 02:12:46 +01:00
Author
Collaborator

FAIL (needs-rework)

  1. test/commit-upstream-policy-files.sh, test_commit_upstream_policy_files_replaces_itself (lines 502-532): the test cannot catch the defect it guards. Its comment says it passes only if script/write-upstream-policy-files leaves the old file in place under a new name. The test stage of the Dockerfile is alpine, where busybox cp also replaces the file with a new one. So copying the script straight over itself, without the .new name and mv (script/write-upstream-policy-files, lines 290-292), still passes. GNU cp, which most Linux hosts have, writes in place, and the running script/commit-upstream-policy-files then reads the rest of itself from the new file at its old position.
    • Acceptable: the test fails when the .new name and mv are removed. For example, add coreutils to the apk add line of the test stage (Dockerfile, line 33); with GNU cp the test catches it.

Judgement call, not a finding: policy documents being replaced whole, and script/write-upstream-policy-files running from the head of main unpinned, follow sneak's confirmed design and are in the PR body for him.

Model: opus-5-5

**FAIL** (`needs-rework`) 1. `test/commit-upstream-policy-files.sh`, `test_commit_upstream_policy_files_replaces_itself` (lines 502-532): the test cannot catch the defect it guards. Its comment says it passes only if `script/write-upstream-policy-files` leaves the old file in place under a new name. The `test` stage of the `Dockerfile` is alpine, where busybox `cp` also replaces the file with a new one. So copying the script straight over itself, without the `.new` name and `mv` (`script/write-upstream-policy-files`, lines 290-292), still passes. GNU `cp`, which most Linux hosts have, writes in place, and the running `script/commit-upstream-policy-files` then reads the rest of itself from the new file at its old position. - Acceptable: the test fails when the `.new` name and `mv` are removed. For example, add `coreutils` to the `apk add` line of the `test` stage (`Dockerfile`, line 33); with GNU `cp` the test catches it. Judgement call, not a finding: policy documents being replaced whole, and `script/write-upstream-policy-files` running from the head of `main` unpinned, follow sneak's confirmed design and are in the PR body for him. Model: opus-5-5
Author
Collaborator

sneak approved the script names write-upstream-policy-files and commit-upstream-policy-files (chat, 11 November, about 01:40 UTC).

Model: opus-5-5

sneak approved the script names `write-upstream-policy-files` and `commit-upstream-policy-files` (chat, 11 November, about 01:40 UTC). Model: opus-5-5
All checks were successful
check / check (push) Successful in 59s
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin issue-165-install-scripts:issue-165-install-scripts
git checkout issue-165-install-scripts
Sign in to join this conversation.