Repository navigation
setup: one-command install and upgrade, release archives, and a first-day checklist - #89
Conversation
install/install.sh installs or upgrades Consolebook on a systemd Linux host from a checksum-verified release archive and prints the address and first-run setup code; install/consolebook.service runs it as a hardened service account. scripts/package-release.sh builds the static release archive, and .github/workflows/release.yml builds both architectures, runs the installer end to end on a real systemd runner (fresh install, setup code, upgrade), and publishes on a version tag. docs/install.md is the operator guide. getting_started::progress counts the installation's setup steps for a manage_users holder (GET /api/getting-started), for the home checklist. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
# Conflicts: # .gitignore
The administrator's home now leads with a "Getting started" checklist: seven steps from adding people to a first finalized evaluation, each ticked from GET /api/getting-started and linked to where it happens, refreshed when a person is added, and gone once all are done. A browser test covers the start, the people step ticking only once all three roles exist, and its absence for a trainee. `setup-code` and the first-run log now say to open the setup page in a browser instead of naming the API route. The README leads with the one-command install, releasing.md describes the release workflow, the development index routes to the installer and checklist, and the 0.1.0 changelog lists the installer, checklist, and interface work. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
`Username` also matches the setup page's "Administrator username" until the redirect lands, so the checklist test filled the wrong form. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
svelte-check failed the gates: the checklist derived its steps from `progress` in a plain $derived expression, where TypeScript narrows the state to its null initializer and the counts branch becomes never. Derive in a function, which reads the declared type. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
/welcome, linked from the Getting started checklist, adds people in a batch (usernames suggested from names, a refused row keeps its text and reason while the rest are created) and ends in a printable sign-in sheet that states the codes' 15-minute expiry and how to reissue one. Its program step imports a bundled, invented example program as an editable draft through the ordinary import API, or sends the administrator to Programs to start from scratch. tests/example_program.rs imports the bundled template and publishes it, so a format or publishing-rule change that would break the example fails the build instead of an administrator; a one-letter reference typo makes both tests fail with the exact refusal. welcome.spec.ts drives the whole wizard in a browser. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
`Name, row 1` is a substring of `Username, row 1`, so the unscoped label matched both inputs. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
Added to this PR: optional guided setup (
|
pr-gate failed cargo fmt --check on d91cafc. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 265186957f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The installer's health and setup probes always used 127.0.0.1, so a service bound to a specific address (--listen 192.0.2.10:7770, or [::1]:7770) came up healthy while every probe failed, and the installer reported failure without setup instructions. Probes now use the bound address, or loopback when it listens on every interface. The release workflow's upgrade step now moves the service to 127.0.0.2:7771, which the previous probe could not reach. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8854fa2b87
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The release workflow ran on pull requests only when installer files changed, while pr-gate builds the host target, not the musl archives. A Rust, dependency, or web change could merge green and fail only once the immutable version tag ran packaging. It now runs on every pull request to main; CONTRIBUTING.md names it with pr-gate. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c99983bf1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The installer fixes operator-facing names and behavior: the executable path, the consolebook service account, the data and settings locations, the hardened unit, the default listen address, and how install, upgrade, and (refused) downgrade behave. ADR 0023 records them as a contract, says which files are the operator's and which the product's, and requires a versioned migration path to change any of them. It also names what stays open: HTTPS and the Secure cookie, a backup before upgrade, and pinning or signing the installer. The install guide and the development index link it. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
Brings #89's latest state (probe follows the bind, release workflow on every pull request, ADR 0023 for the installation lifecycle, and main through #92) into this branch. - release.yml: the upgrade step keeps both the backup warning check and the move to 127.0.0.2:7771. - The backup ADR becomes ADR 0024, since the installer ADR took 0023; every reference is renumbered, and ADR 0024 cites ADR 0023 for the unit's writable paths. - ADR 0023 now records --data-dir, --backup-dir, and the paths.conf drop-in this branch adds. Refs #90 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3e75d0d92
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
With a wildcard bind on an IPv6-only host, the first address from `hostname -I` is an IPv6 literal, and the installer printed http://2001:db8::1:7770/, which a browser cannot parse. A discovered address containing a colon is now bracketed. Refs #87 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
Primary Issue
Closes #87
Problem And Outcome
Running Consolebook meant installing Rust, Node.js, and npm, building twice, and running
cargo run -- serve. There was no service, no upgrade path, and no guide past the setup page. After this PR:curl -fsSL …/install/install.sh | sudo shinstalls or upgrades, then prints the address and the setup code.Changes
install/install.sh(POSIXsh, shellcheck-clean):--version);consolebookaccount,/var/lib/consolebook(mode 0750),/etc/consolebook/consolebook.env(kept on upgrade), and the hardened unit;--lan,--listen,--version,--from FILE,--no-service.install/consolebook.service: a dedicated user,ProtectSystem=strictwith only the data directory writable,NoNewPrivileges, private tmp and devices.scripts/package-release.sh: builds the release binary with the UI embedded and the commit pinned, and writes the archive and its.sha256..github/workflows/release.yml:127.0.0.2:7771.v*tag, checks the tag against the Cargo version, then publishes only after both architectures pass.docs/install.md: the operator guide, linked from the README.GET /api/getting-startedreturns counts only and requiresmanage_users;/welcome, an optional guided setup: add people in a batch, print a sign-in sheet, and load an editable invented example program;tests/example_program.rsimports and publishes that example program.Scope
Verification
Local full gates passed on
9c99983, with main merged in and the permission-bypass capabilities dropped:fa44d14874eef9ab6fc159d8de4ccd9855f793233ecfae8f43d1d0e35f646cf1.The commits since then change only
install/install.shand docs. None of the local gates execute the installer.Hosted on
66285bb:fmt-clippy-testpassed;releasepassed on both architectures: a real systemd install, the setup code, health reporting the build's commit, data-directory ownership, and an upgrade that moves the bind to127.0.0.2:7771.Installer negative control: a tampered
.sha256fails withchecksum mismatchand installs nothing.Automated review: five findings across rounds. Four were fixed with tests or CI coverage: the probe address, the release trigger, the ADR, and the IPv6 URL. The fifth was resolved.
Added or updated tests when behavior changed
ADR 0023 for the installation lifecycle
All fixtures and examples are invented
Review And Merge Notes
serveneeds, and the release job'scontents: writedraft-then-publish flow.v0.1.0perdocs/releasing.mdand install from the published release with the one-liner.🤖 Generated with Claude Code
https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
Generated by Claude Code