4 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
Aleksander DygońandClaude Opus 5.5 a00ba4a8ab Replace an OpenCode session of another folder (#8432)
OpenCode refuses to resume a session that it made in another directory
("Invalid params: session <id> does not belong to cwd: <cwd>"). When the
agent's workspace moved (for example by the startup rebase of #6153), each
message to the agent failed. The OpenCode flavor now reads this exact answer
as a session that cannot reopen, so the agent gets a new session with the
OpenBot transcript and keeps its thread.

Fixes #7622

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:42:52 +01:00
NBandClaude Opus 5.5 de39932986 Share one fake ACP agent helper and run provider fakes in CI (#2676)
Move the fake agents of six provider E2E tests out of inline CommonJS strings
into typed files under scripts/provider-fakes/agents/. acp-agent.ts holds the
NDJSON loop and the FAKE_LOG writer; host.ts installs a fake as an executable
and holds the thread, turn, log and cipher helpers.

test:custom-agents failed on main since #1368, which added a folder tag to
routed thread ids. It now reads <agent>:<tag>:<session>.

The new provider-fakes-e2e CI job runs the six tests. The other five reports
are the same as before the move.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:12:10 +02:00
NBandClaude Opus 5.5 ea7c870d61 Replace an OpenCode session that the running OpenCode cannot read (#2595)
* Replace an OpenCode session that the running OpenCode cannot read

OpenBot started its managed OpenCode 1.19.3 before a newer system
OpenCode 2.0. OpenCode 1.19.3 cannot read the sessions that 2.0 keeps
in its `session_v2` table. Each resume failed with "OpenCode service
failure", and the agent never got a new session.

- Use the system OpenCode when it is newer than the managed copy.
- Give `session/resume` the same session-list check as
  `session/load`: a session that OpenCode does not list is missing, so
  the agent gets a new session with its transcript.
- Add `scripts/opencode-downgraded-session-e2e.ts`.

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

* Compare each system OpenCode, and keep a managed update when a newer system copy runs

- Use a system OpenCode that is newer than the managed copy, also when it is not the first on PATH.
- Reuse isMinimumVersion for the version comparison.
- A managed OpenCode update no longer fails, and no longer removes the download, when a newer
  system OpenCode is selected.
- Correct the comment about which requests forget a missing session.

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

* Replace an OpenCode 2.x session that it does not have

OpenCode 2.x copies 1.x sessions into session_v2 only once. A session that
the managed 1.19.3 wrote after that copy is not in 2.x, which answers
"Invalid params: session not found: <id>" with data.sessionId. Treat this
exact form as a missing session, so that agents that ran on 1.19.3 do not
fail each turn when OpenBot uses the newer system OpenCode again. A session
of another directory is not a missing session.

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

* Keep the managed OpenCode first

Remove the selection of a newer system OpenCode. It would run a major
version that OpenBot does not pin or test. The session recovery stays: an
agent whose session OpenCode cannot read gets a new session with its
conversation.

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

---------

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