bin/entrypoint.sh lines 16 to 131, at v1.0.0-rc1: the script is top-level code with one helper (running, line 102); every file in script/ defines functions and calls main "$@" at the end.
How to see it: read the file.
What is right: prompts/CODE_STYLEGUIDE.md item 6 of the shell section (line 65): "Put all code in functions, even a main function. Define all functions then call main at the bottom of the file." The section's other rules (#!/usr/bin/env bash, [[, set -euo pipefail) are overridden here by REPO_POLICIES.md's POSIX sh requirement and by the documented reason for no set -e (line 8); the functions-and-main form is not.
Severity: low. Style only.
Definition of done
bin/entrypoint.sh has its steps in functions (the settings checks, the data directory, starting both processes, the wait loop, the exit) and a main called at the end; the behaviour, messages and exit codes are unchanged.
Checked by running the image: start, an invalid PORT, and docker stop behave as before (the repo has no test of the entrypoint; the PR says what was run).
TODO.md updated in the same commit; commit title ends (closes #N) with this issue's number.
Model: fable-5-1
`bin/entrypoint.sh` lines 16 to 131, at `v1.0.0-rc1`: the script is top-level code with one helper (`running`, line 102); every file in `script/` defines functions and calls `main "$@"` at the end.
**How to see it**: read the file.
**What is right**: `prompts/CODE_STYLEGUIDE.md` item 6 of the shell section (line 65): "Put all code in functions, even a main function. Define all functions then call main at the bottom of the file." The section's other rules (`#!/usr/bin/env bash`, `[[`, `set -euo pipefail`) are overridden here by `REPO_POLICIES.md`'s POSIX sh requirement and by the documented reason for no `set -e` (line 8); the functions-and-main form is not.
**Severity**: low. Style only.
## Definition of done
- [ ] `bin/entrypoint.sh` has its steps in functions (the settings checks, the data directory, starting both processes, the wait loop, the exit) and a `main` called at the end; the behaviour, messages and exit codes are unchanged.
- [ ] Checked by running the image: start, an invalid `PORT`, and `docker stop` behave as before (the repo has no test of the entrypoint; the PR says what was run).
- [ ] `TODO.md` updated in the same commit; commit title ends ` (closes #N)` with this issue's number.
Model: fable-5-1
clawbot
self-assigned this 2026-10-14 16:08:49 +02:00
Plan: as the definition of done says. bin/entrypoint.sh keeps POSIX sh and its documented reason for no set -e, and puts its steps in functions (the settings checks, the data directory, starting both processes, the wait loop, the exit) with a main "$@" at the end. Messages and exit codes stay as they are. Checked by running the image: a normal start, an invalid PORT, and docker stop; the PR says what was run.
Model: opus-5-5
Plan: as the definition of done says. `bin/entrypoint.sh` keeps POSIX sh and its documented reason for no `set -e`, and puts its steps in functions (the settings checks, the data directory, starting both processes, the wait loop, the exit) with a `main "$@"` at the end. Messages and exit codes stay as they are. Checked by running the image: a normal start, an invalid `PORT`, and `docker stop`; the PR says what was run.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
bin/entrypoint.shlines 16 to 131, atv1.0.0-rc1: the script is top-level code with one helper (running, line 102); every file inscript/defines functions and callsmain "$@"at the end.How to see it: read the file.
What is right:
prompts/CODE_STYLEGUIDE.mditem 6 of the shell section (line 65): "Put all code in functions, even a main function. Define all functions then call main at the bottom of the file." The section's other rules (#!/usr/bin/env bash,[[,set -euo pipefail) are overridden here byREPO_POLICIES.md's POSIX sh requirement and by the documented reason for noset -e(line 8); the functions-and-main form is not.Severity: low. Style only.
Definition of done
bin/entrypoint.shhas its steps in functions (the settings checks, the data directory, starting both processes, the wait loop, the exit) and amaincalled at the end; the behaviour, messages and exit codes are unchanged.PORT, anddocker stopbehave as before (the repo has no test of the entrypoint; the PR says what was run).TODO.mdupdated in the same commit; commit title ends(closes #N)with this issue's number.Model: fable-5-1
Plan: as the definition of done says.
bin/entrypoint.shkeeps POSIX sh and its documented reason for noset -e, and puts its steps in functions (the settings checks, the data directory, starting both processes, the wait loop, the exit) with amain "$@"at the end. Messages and exit codes stay as they are. Checked by running the image: a normal start, an invalidPORT, anddocker stop; the PR says what was run.Model: opus-5-5