🛟 Updated.
5db4bb2 parent: 27bdf0b modified
.github/workflows/release.yml +3 -2 | @@ -60,8 +60,9 @@ jobs: | ||
| 60 | 60 | run: go test ./... -count=1 |
| 61 | 61 | |
| 62 | 62 | - name: Build the release |
| 63 | - # release.env is git-ignored, so the tag is passed explicitly and the | |
| 64 | - # script falls back to "Turbo JS <tag>" for the description. | |
| 63 | + # The tag is passed explicitly — the one just pushed — so release.env, which | |
| 64 | + # is committed, cannot make the build disagree with it. ABOUT is still read | |
| 65 | + # from the file for the description, "Turbo JS <tag>" being the fallback. | |
| 65 | 66 | run: bash ./02-build-releases.sh "${GITHUB_REF_NAME}" |
| 66 | 67 | |
| 67 | 68 | - name: Release notes |
| @@ -60,8 +60,9 @@ jobs: | |||
| 60 | run: go test ./... -count=1 | 60 | run: go test ./... -count=1 |
| 61 | 61 | ||
| 62 | - name: Build the release | 62 | - name: Build the release |
| 63 | - # release.env is git-ignored, so the tag is passed explicitly and the | 63 | + # The tag is passed explicitly — the one just pushed — so release.env, which |
| 64 | - # script falls back to "Turbo JS <tag>" for the description. | 64 | + # is committed, cannot make the build disagree with it. ABOUT is still read |
| 65 | + # from the file for the description, "Turbo JS <tag>" being the fallback. | ||
| 65 | run: bash ./02-build-releases.sh "${GITHUB_REF_NAME}" | 66 | run: bash ./02-build-releases.sh "${GITHUB_REF_NAME}" |
| 66 | 67 | ||
| 67 | - name: Release notes | 68 | - name: Release notes |
modified
.gitignore +4 -0 | @@ -1,6 +1,10 @@ | ||
| 1 | 1 | bin/ |
| 2 | 2 | kits |
| 3 | 3 | *.env |
| 4 | +# release.env is the one .env that is committed: it carries the version being | |
| 5 | +# published and its one-line description, which are part of the project's | |
| 6 | +# record. Token files (*.token.env) stay under the rule above. | |
| 7 | +!release.env | |
| 4 | 8 | release |
| 5 | 9 | node_modules/ |
| 6 | 10 | |
| @@ -1,6 +1,10 @@ | |||
| 1 | bin/ | 1 | bin/ |
| 2 | kits | 2 | kits |
| 3 | *.env | 3 | *.env |
| 4 | +# release.env is the one .env that is committed: it carries the version being | ||
| 5 | +# published and its one-line description, which are part of the project's | ||
| 6 | +# record. Token files (*.token.env) stay under the rule above. | ||
| 7 | +!release.env | ||
| 4 | release | 8 | release |
| 5 | node_modules/ | 9 | node_modules/ |
| 6 | 10 | ||
modified
.memory/handoffs/2026-09-20-load-config.md +9 -0 | @@ -15,3 +15,12 @@ | ||
| 15 | 15 | |
| 16 | 16 | - The sample configs repository is `rickub.com/turbo-editors/configs`; its git address is `git.rickub.com`, which `configrepo` tries second. A wrong first candidate costs one `ls-remote`, not the load. |
| 17 | 17 | - The editor refuses when `.turbo-js` already exists (`configrepo.ErrExists`); there is deliberately no `--force`. |
| 18 | + | |
| 19 | +## Also | |
| 20 | + | |
| 21 | +`release.env` is committed from now on (`!release.env` in `.gitignore`). `01-release.tag.sh` does `git add .`, so the next release commits it by itself. | |
| 22 | + | |
| 23 | +## Update, end of session | |
| 24 | + | |
| 25 | +turbo-core v1.0.3 is published and `go.mod` pins it (done from the host, with a commit, during the session). Step 1 of "Next steps" is done; the two release-script tests are expected green again — see the history entry for the run that confirmed it. | |
| 26 | + | |
| @@ -15,3 +15,12 @@ | |||
| 15 | 15 | ||
| 16 | - The sample configs repository is `rickub.com/turbo-editors/configs`; its git address is `git.rickub.com`, which `configrepo` tries second. A wrong first candidate costs one `ls-remote`, not the load. | 16 | - The sample configs repository is `rickub.com/turbo-editors/configs`; its git address is `git.rickub.com`, which `configrepo` tries second. A wrong first candidate costs one `ls-remote`, not the load. |
| 17 | - The editor refuses when `.turbo-js` already exists (`configrepo.ErrExists`); there is deliberately no `--force`. | 17 | - The editor refuses when `.turbo-js` already exists (`configrepo.ErrExists`); there is deliberately no `--force`. |
| 18 | + | ||
| 19 | +## Also | ||
| 20 | + | ||
| 21 | +`release.env` is committed from now on (`!release.env` in `.gitignore`). `01-release.tag.sh` does `git add .`, so the next release commits it by itself. | ||
| 22 | + | ||
| 23 | +## Update, end of session | ||
| 24 | + | ||
| 25 | +turbo-core v1.0.3 is published and `go.mod` pins it (done from the host, with a commit, during the session). Step 1 of "Next steps" is done; the two release-script tests are expected green again — see the history entry for the run that confirmed it. | ||
| 26 | + | ||
modified
.memory/history.md +2 -0 | @@ -46,4 +46,6 @@ Append-only. One dated entry per session. Never rewritten. | ||
| 46 | 46 | - **Depends on turbo-core v1.0.3**, not yet tagged: `go.mod` still pins v1.0.2, so this builds only under the umbrella `go.work` (`turbo-editors/README.md` explains) until `go get rickub.com/turbo-editors/turbo-core@v1.0.3 && go mod tidy`. Verified with `make check` under that workspace. |
| 47 | 47 | - **Not done**: not committed; go.mod not re-pinned; not run against a real terminal. |
| 48 | 48 | - **Correction, same session**: under the workspace everything passes **except `TestTheTagScriptTagsAndPushesForReal` and `TestTheTagScriptRefusesATagItAlreadyPublished`** — they copy the module elsewhere and run `make check` there, outside the workspace, where turbo-core v1.0.2 from the proxy has no `configrepo`. They go green the moment `go.mod` is re-pinned to v1.0.3. The package diagram (`docs/diagrams/packages.drawio`, where the module has one) gained a `configrepo` box and a `main → configrepo` arrow, which its own test demanded. |
| 49 | +- **Later, same session**: `release.env` is now **committed** — `.gitignore` gained `!release.env` under `*.env`, with a comment; `*.token.env` files stay ignored (verified with `git check-ignore` in every repository). The comments that said it was ignored were reworded to match: `02-build-releases.sh`, `.github/workflows/release.yml`, the release how-to (EN+FR), and this summary. Asked by the user so the version and its description travel with the repository. | |
| 50 | +- **End of session**: turbo-core v1.0.3 having been published and `go.mod` re-pinned to it from the host, `GOWORK=off go test ./... -count=1` is entirely green here, the two release-script tests included. | |
| 49 | 51 | |
| @@ -46,4 +46,6 @@ Append-only. One dated entry per session. Never rewritten. | |||
| 46 | - **Depends on turbo-core v1.0.3**, not yet tagged: `go.mod` still pins v1.0.2, so this builds only under the umbrella `go.work` (`turbo-editors/README.md` explains) until `go get rickub.com/turbo-editors/turbo-core@v1.0.3 && go mod tidy`. Verified with `make check` under that workspace. | 46 | - **Depends on turbo-core v1.0.3**, not yet tagged: `go.mod` still pins v1.0.2, so this builds only under the umbrella `go.work` (`turbo-editors/README.md` explains) until `go get rickub.com/turbo-editors/turbo-core@v1.0.3 && go mod tidy`. Verified with `make check` under that workspace. |
| 47 | - **Not done**: not committed; go.mod not re-pinned; not run against a real terminal. | 47 | - **Not done**: not committed; go.mod not re-pinned; not run against a real terminal. |
| 48 | - **Correction, same session**: under the workspace everything passes **except `TestTheTagScriptTagsAndPushesForReal` and `TestTheTagScriptRefusesATagItAlreadyPublished`** — they copy the module elsewhere and run `make check` there, outside the workspace, where turbo-core v1.0.2 from the proxy has no `configrepo`. They go green the moment `go.mod` is re-pinned to v1.0.3. The package diagram (`docs/diagrams/packages.drawio`, where the module has one) gained a `configrepo` box and a `main → configrepo` arrow, which its own test demanded. | 48 | - **Correction, same session**: under the workspace everything passes **except `TestTheTagScriptTagsAndPushesForReal` and `TestTheTagScriptRefusesATagItAlreadyPublished`** — they copy the module elsewhere and run `make check` there, outside the workspace, where turbo-core v1.0.2 from the proxy has no `configrepo`. They go green the moment `go.mod` is re-pinned to v1.0.3. The package diagram (`docs/diagrams/packages.drawio`, where the module has one) gained a `configrepo` box and a `main → configrepo` arrow, which its own test demanded. |
| 49 | +- **Later, same session**: `release.env` is now **committed** — `.gitignore` gained `!release.env` under `*.env`, with a comment; `*.token.env` files stay ignored (verified with `git check-ignore` in every repository). The comments that said it was ignored were reworded to match: `02-build-releases.sh`, `.github/workflows/release.yml`, the release how-to (EN+FR), and this summary. Asked by the user so the version and its description travel with the repository. | ||
| 50 | +- **End of session**: turbo-core v1.0.3 having been published and `go.mod` re-pinned to it from the host, `GOWORK=off go test ./... -count=1` is entirely green here, the two release-script tests included. | ||
| 49 | 51 | ||
modified
.memory/summary.md +2 -2 | @@ -89,7 +89,7 @@ To build against a turbo-core you have changed but not released: `go work init . | ||
| 89 | 89 | - **Agent windows have never been opened in this editor.** The starter file is covered by tests that create it, load it back and check it names this editor's fences; nobody has run `turbo-js`, pressed `Alt-A` and talked to an agent from it. |
| 90 | 90 | - **Never run on macOS or Windows.** Everything here was verified on Linux/arm64. `/tmp/tj/turbo-js` is an ELF built for the pty run and lives outside the tree on purpose; `bin/` is empty. |
| 91 | 91 | - **No CI.** No pipeline configuration in the repository. |
| 92 | -- **Never released.** No tag exists; `release.env` says `TAG="v0.1.0"`. `01`–`04` have only ever been read here, never run. `turbo-js.token.env` does not exist yet (gitignored by `*.env`). | |
| 92 | +- **Never released.** No tag exists; `release.env` says `TAG="v0.1.0"`. `01`–`04` have only ever been read here, never run. `turbo-js.token.env` does not exist yet (gitignored by `*.env`; `release.env` itself is committed since 2026-09-20). | |
| 93 | 93 | - **No `LICENSE` file.** The siblings are MIT (`Copyright (c) 2026 turbo-editors`); adding one is the owner's decision, and the root README says so. |
| 94 | 94 | - **The real-server tests have only run against typescript-language-server 6.0.0 + typescript 6.0.3.** A newer server that starts with TypeScript 7 would make the `@6` pin unnecessary; a test does not detect that. |
| 95 | 95 | - **Performance on a large file is unmeasured.** |
| @@ -103,5 +103,5 @@ To build against a turbo-core you have changed but not released: `go work init . | ||
| 103 | 103 | |
| 104 | 104 | ## State as of 2026-09-20 |
| 105 | 105 | |
| 106 | -- **`-load-config <url>` is wired** (`main.go`: `loadConfig`, `describeLoad`), on top of turbo-core's `configrepo`. It needs **turbo-core v1.0.3**, which is not tagged yet; `go.mod` pins v1.0.2, so the editor builds only under the umbrella `go.work` until re-pinned. A project with a `.turbo-js` already is refused, not overwritten. | |
| 106 | +- **`-load-config <url>` is wired** (`main.go`: `loadConfig`, `describeLoad`), on top of turbo-core's `configrepo`. `go.mod` pins **turbo-core v1.0.3**, which is published (re-pinned from the host on 2026-09-20), so it builds on its own again. A project with a `.turbo-js` already is refused, not overwritten. | |
| 107 | 107 | |
| @@ -89,7 +89,7 @@ To build against a turbo-core you have changed but not released: `go work init . | |||
| 89 | - **Agent windows have never been opened in this editor.** The starter file is covered by tests that create it, load it back and check it names this editor's fences; nobody has run `turbo-js`, pressed `Alt-A` and talked to an agent from it. | 89 | - **Agent windows have never been opened in this editor.** The starter file is covered by tests that create it, load it back and check it names this editor's fences; nobody has run `turbo-js`, pressed `Alt-A` and talked to an agent from it. |
| 90 | - **Never run on macOS or Windows.** Everything here was verified on Linux/arm64. `/tmp/tj/turbo-js` is an ELF built for the pty run and lives outside the tree on purpose; `bin/` is empty. | 90 | - **Never run on macOS or Windows.** Everything here was verified on Linux/arm64. `/tmp/tj/turbo-js` is an ELF built for the pty run and lives outside the tree on purpose; `bin/` is empty. |
| 91 | - **No CI.** No pipeline configuration in the repository. | 91 | - **No CI.** No pipeline configuration in the repository. |
| 92 | -- **Never released.** No tag exists; `release.env` says `TAG="v0.1.0"`. `01`–`04` have only ever been read here, never run. `turbo-js.token.env` does not exist yet (gitignored by `*.env`). | 92 | +- **Never released.** No tag exists; `release.env` says `TAG="v0.1.0"`. `01`–`04` have only ever been read here, never run. `turbo-js.token.env` does not exist yet (gitignored by `*.env`; `release.env` itself is committed since 2026-09-20). |
| 93 | - **No `LICENSE` file.** The siblings are MIT (`Copyright (c) 2026 turbo-editors`); adding one is the owner's decision, and the root README says so. | 93 | - **No `LICENSE` file.** The siblings are MIT (`Copyright (c) 2026 turbo-editors`); adding one is the owner's decision, and the root README says so. |
| 94 | - **The real-server tests have only run against typescript-language-server 6.0.0 + typescript 6.0.3.** A newer server that starts with TypeScript 7 would make the `@6` pin unnecessary; a test does not detect that. | 94 | - **The real-server tests have only run against typescript-language-server 6.0.0 + typescript 6.0.3.** A newer server that starts with TypeScript 7 would make the `@6` pin unnecessary; a test does not detect that. |
| 95 | - **Performance on a large file is unmeasured.** | 95 | - **Performance on a large file is unmeasured.** |
| @@ -103,5 +103,5 @@ To build against a turbo-core you have changed but not released: `go work init . | |||
| 103 | 103 | ||
| 104 | ## State as of 2026-09-20 | 104 | ## State as of 2026-09-20 |
| 105 | 105 | ||
| 106 | -- **`-load-config <url>` is wired** (`main.go`: `loadConfig`, `describeLoad`), on top of turbo-core's `configrepo`. It needs **turbo-core v1.0.3**, which is not tagged yet; `go.mod` pins v1.0.2, so the editor builds only under the umbrella `go.work` until re-pinned. A project with a `.turbo-js` already is refused, not overwritten. | 106 | +- **`-load-config <url>` is wired** (`main.go`: `loadConfig`, `describeLoad`), on top of turbo-core's `configrepo`. `go.mod` pins **turbo-core v1.0.3**, which is published (re-pinned from the host on 2026-09-20), so it builds on its own again. A project with a `.turbo-js` already is refused, not overwritten. |
| 107 | 107 | ||
modified
02-build-releases.sh +5 -4 | @@ -23,10 +23,11 @@ COMMENT | ||
| 23 | 23 | set -euo pipefail |
| 24 | 24 | |
| 25 | 25 | # release.env carries TAG ("v1.0.0") and ABOUT (the one-line description). It |
| 26 | -# is git-ignored (*.env), so a CI job does not have it: there the tag comes | |
| 27 | -# from the command line and ABOUT from the environment, or defaults to the | |
| 28 | -# tag. A tag given on the command line always wins, so a test build never | |
| 29 | -# edits the file. | |
| 26 | +# is committed — the one .env that is — so a CI job has it too and reads ABOUT | |
| 27 | +# from it; there the tag still comes from the command line, the tag that was | |
| 28 | +# pushed, so the file cannot make a build disagree with the tag it is on. With | |
| 29 | +# no ABOUT anywhere it defaults to the tag. A tag given on the command line | |
| 30 | +# always wins, so a test build never edits the file. | |
| 30 | 31 | if [ -f release.env ]; then |
| 31 | 32 | # shellcheck source=/dev/null |
| 32 | 33 | source release.env |
| @@ -23,10 +23,11 @@ COMMENT | |||
| 23 | set -euo pipefail | 23 | set -euo pipefail |
| 24 | 24 | ||
| 25 | # release.env carries TAG ("v1.0.0") and ABOUT (the one-line description). It | 25 | # release.env carries TAG ("v1.0.0") and ABOUT (the one-line description). It |
| 26 | -# is git-ignored (*.env), so a CI job does not have it: there the tag comes | 26 | +# is committed — the one .env that is — so a CI job has it too and reads ABOUT |
| 27 | -# from the command line and ABOUT from the environment, or defaults to the | 27 | +# from it; there the tag still comes from the command line, the tag that was |
| 28 | -# tag. A tag given on the command line always wins, so a test build never | 28 | +# pushed, so the file cannot make a build disagree with the tag it is on. With |
| 29 | -# edits the file. | 29 | +# no ABOUT anywhere it defaults to the tag. A tag given on the command line |
| 30 | +# always wins, so a test build never edits the file. | ||
| 30 | if [ -f release.env ]; then | 31 | if [ -f release.env ]; then |
| 31 | # shellcheck source=/dev/null | 32 | # shellcheck source=/dev/null |
| 32 | source release.env | 33 | source release.env |
modified
docs/en/how-to/make-a-release.md +1 -1 | @@ -55,7 +55,7 @@ Theme: Turbo Classic | ||
| 55 | 55 | |
| 56 | 56 | ## Or use the scripts and let the workflow publish |
| 57 | 57 | |
| 58 | -That is the way a release is actually cut. Put the version and its one-line description in `release.env` — it is gitignored, so CI never sees it: | |
| 58 | +That is the way a release is actually cut. Put the version and its one-line description in `release.env` — it is committed with the release, and CI takes the tag from the push rather than from it: | |
| 59 | 59 | |
| 60 | 60 | ```sh |
| 61 | 61 | TAG="v1.0.0" |
| @@ -55,7 +55,7 @@ Theme: Turbo Classic | |||
| 55 | 55 | ||
| 56 | ## Or use the scripts and let the workflow publish | 56 | ## Or use the scripts and let the workflow publish |
| 57 | 57 | ||
| 58 | -That is the way a release is actually cut. Put the version and its one-line description in `release.env` — it is gitignored, so CI never sees it: | 58 | +That is the way a release is actually cut. Put the version and its one-line description in `release.env` — it is committed with the release, and CI takes the tag from the push rather than from it: |
| 59 | 59 | ||
| 60 | ```sh | 60 | ```sh |
| 61 | TAG="v1.0.0" | 61 | TAG="v1.0.0" |
modified
docs/fr/how-to/make-a-release.md +1 -1 | @@ -53,7 +53,7 @@ Theme: Turbo Classic | ||
| 53 | 53 | |
| 54 | 54 | ## Ou utiliser les scripts et laisser le workflow publier |
| 55 | 55 | |
| 56 | -C'est ainsi qu'une release est réellement faite. Mettez la version et sa description d'une ligne dans `release.env` — il est ignoré par git, donc la CI ne le voit jamais : | |
| 56 | +C'est ainsi qu'une release est réellement faite. Mettez la version et sa description d'une ligne dans `release.env` — il est versionné avec la release, et la CI prend le tag du push plutôt que dans ce fichier : | |
| 57 | 57 | |
| 58 | 58 | ```sh |
| 59 | 59 | TAG="v1.0.0" |
| @@ -53,7 +53,7 @@ Theme: Turbo Classic | |||
| 53 | 53 | ||
| 54 | ## Ou utiliser les scripts et laisser le workflow publier | 54 | ## Ou utiliser les scripts et laisser le workflow publier |
| 55 | 55 | ||
| 56 | -C'est ainsi qu'une release est réellement faite. Mettez la version et sa description d'une ligne dans `release.env` — il est ignoré par git, donc la CI ne le voit jamais : | 56 | +C'est ainsi qu'une release est réellement faite. Mettez la version et sa description d'une ligne dans `release.env` — il est versionné avec la release, et la CI prend le tag du push plutôt que dans ce fichier : |
| 57 | 57 | ||
| 58 | ```sh | 58 | ```sh |
| 59 | TAG="v1.0.0" | 59 | TAG="v1.0.0" |
added
release.env +10 -0 | new file mode 100644 | ||
| @@ -0,0 +1,10 @@ | ||
| 1 | +# Edited before every release, then: | |
| 2 | +# ./01-release.tag.sh make check, commit, push, tag, push the tag | |
| 3 | +# (pushing the tag starts .github/workflows/release.yml, which builds the | |
| 4 | +# binaries with ./02-build-releases.sh and publishes the release with them — | |
| 5 | +# no personal token is needed, and nothing else has to be run) | |
| 6 | +# | |
| 7 | +# ./02-build-releases.sh v1.0.0 to build the binaries by hand and see what | |
| 8 | +# the CI will publish, without publishing anything | |
| 9 | +TAG="v1.0.3" | |
| 10 | +ABOUT="Turbo JS" | |
| new file mode 100644 | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | +# Edited before every release, then: | ||
| 2 | +# ./01-release.tag.sh make check, commit, push, tag, push the tag | ||
| 3 | +# (pushing the tag starts .github/workflows/release.yml, which builds the | ||
| 4 | +# binaries with ./02-build-releases.sh and publishes the release with them — | ||
| 5 | +# no personal token is needed, and nothing else has to be run) | ||
| 6 | +# | ||
| 7 | +# ./02-build-releases.sh v1.0.0 to build the binaries by hand and see what | ||
| 8 | +# the CI will publish, without publishing anything | ||
| 9 | +TAG="v1.0.3" | ||
| 10 | +ABOUT="Turbo JS" | ||
modified
release_test.go +4 -3 | @@ -469,9 +469,10 @@ func writeTestFile(t *testing.T, path, contents string) { | ||
| 469 | 469 | } |
| 470 | 470 | |
| 471 | 471 | func TestTheBuildScriptTakesTheTagFromTheCommandLine(t *testing.T) { |
| 472 | - // release.env is git-ignored, so the workflow has none: it passes the tag | |
| 473 | - // it was started by. A script that only reads the file builds nothing in | |
| 474 | - // CI, or builds whatever version the file last named. | |
| 472 | + // The workflow passes the tag it was started by. release.env is committed | |
| 473 | + // now, so CI does have one — but a script that read only the file would | |
| 474 | + // build whatever version the file last named, tag or no tag, and the file | |
| 475 | + // and the pushed tag are two things that can disagree. The argument wins. | |
| 475 | 476 | script := readReleaseScript(t) |
| 476 | 477 | |
| 477 | 478 | if !strings.Contains(script, `TAG="${1:-${TAG:-}}"`) { |
| @@ -469,9 +469,10 @@ func writeTestFile(t *testing.T, path, contents string) { | |||
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | func TestTheBuildScriptTakesTheTagFromTheCommandLine(t *testing.T) { | 471 | func TestTheBuildScriptTakesTheTagFromTheCommandLine(t *testing.T) { |
| 472 | - // release.env is git-ignored, so the workflow has none: it passes the tag | 472 | + // The workflow passes the tag it was started by. release.env is committed |
| 473 | - // it was started by. A script that only reads the file builds nothing in | 473 | + // now, so CI does have one — but a script that read only the file would |
| 474 | - // CI, or builds whatever version the file last named. | 474 | + // build whatever version the file last named, tag or no tag, and the file |
| 475 | + // and the pushed tag are two things that can disagree. The argument wins. | ||
| 475 | script := readReleaseScript(t) | 476 | script := readReleaseScript(t) |
| 476 | 477 | ||
| 477 | if !strings.Contains(script, `TAG="${1:-${TAG:-}}"`) { | 478 | if !strings.Contains(script, `TAG="${1:-${TAG:-}}"`) { |