3 Commits
Author SHA1 Message Date
Aleksander DygońandClaude Opus 5.5 03c2ff34c2 Remove code comments and add the no-comments rule (#12604)
* Remove code comments and add the no-comments rule

Remove the comments from first-party code and configuration files:
TS/JS, JSX, CSS, SQL migrations, Swift, Kotlin, Gradle, shell,
Docker, systemd, Nix, YAML, TOML, JSONC and GritQL.

Keep only what a tool reads: license headers, shebangs, compiler
and lint directives, JSDoc types in plain .js files, generated file
headers, GritQL scope lines, the install-server.sh help text and the
openbot-boat-pre-stop marker. Vendored code, fixtures and released
schemas keep their comments.

Add the rule to AGENTS.md, and change the docs that asked for
comments. Add two i18n keys that only comments named to
RELEASED_SOURCE_KEYS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep comments that are data in strings

The benchmark task files in opencode-free-models-bench.ts tell the
model what each function must do. The sample file and HTML page in
the two stories are display content. Put their comments back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep released migrations and mobile native inputs unchanged

check:migrations compares each released migration with v0.73.0 byte
for byte, so restore src/backend/migrations. A change to a native
build input of apps/mobile makes a new runtime version, so restore
those files and the extra fingerprint sources.

List these files and the comment markers that a tool reads in
AGENTS.md. Remove the last requests for comments in
src/renderer/AGENTS.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 12:19:28 +01:00
14ced50e2b fix(docker): verify backup databases before restore (#2143)
* fix(docker): verify backup databases before restore

* Keep the backup E2E script to the restore checks

- Revert the harness changes that the fix does not need: the source
  manifest, the nonce, the Node version, the private-path filter and
  report schema 2. The manifest named a changelog file that a release
  deletes, and the script stopped when `node` was not on PATH.
- Keep the new restore checks, the `docker cp` status checks and the
  database try/finally.
- Rename the changelog fragment to the branch name.
- Say that `restore` needs `sqlite3` 3.37 or later on the host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Sniezka1927 <dygons14@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:52:41 +02:00
NBandClaude Opus 5.5 bb73b21477 Add backup, verify and restore commands for Docker instances (#2125)
* Add backup, verify and restore commands for Docker instances

openbot-instance backup stops the container, writes /data to a
compressed archive with a manifest and checksums, and starts the
container again. verify unpacks a backup as the data user and checks
the databases, the keyring and the counts. restore puts a backup back
and keeps the instance stopped. backups shows the state for a monitor.
A systemd timer makes a daily backup.

scripts/instance-backup-e2e.ts runs the commands in Docker in Docker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Do not follow agent links during a restore

The restore made its folders at fixed names in /data and checked them
before the container stopped. An agent could put a link there, and root
then moved the old data to the link target. The restore now makes each
folder with mktemp after the stop. Verification accepts only a number
as the schema version, because agents can change the database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the new backup and report backups that stopped

Retention now never deletes the backup that was just made, also when
the clock went back, and --verify checks that backup. backups shows a
run that ended without a result as stopped and exits with 1. A restore
sets its restart trap before the stop, and the script stops when Docker
does not answer instead of reading the container as stopped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Delete old backups only after the new one is verified

With --verify, retention now runs after the verification succeeds, so
a failed verification keeps all older backups. When a restore has too
little free space, the message and the docs tell the operator to move
the old data off the disk first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Share the step status code of backup and verify

backup and verify_locked now call one run_step function, which records
the start, keeps the errors, and writes the result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Take the instance lock in up, down, restart and upgrade

These commands could start or stop the container while a backup copied
the database or a restore moved files. They now wait for the same lock
as updates, backups and restores. lock_instance checks the name first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Record the image version when the container was removed

After `down`, the container is gone, and a backup recorded no OpenBot
version, so a restore could not refuse an older image. The backup now
takes the version and image from the compose configuration. A restore
of a backup with no version shows a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:27:46 +02:00