6 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
NBandClaude Opus 5.5 48f6fbde69 Send Signal and TURN capacity to OpenPanel (#4114)
* Send Signal and TURN capacity to OpenPanel

A host-network sidecar reads the coturn metrics and the Signal metrics every
5 minutes and sends one signal_capacity event with counts only. Signal now
publishes its metrics on host 127.0.0.1:9642 for the sidecar.

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

* Run the capacity smoke against the real Signal server

Knip now knows the capacity-report entry, and the smoke starts the reporter
by an absolute path. The smoke uses the real Signal server with two open
sockets and checks that the reporter stops and sends nothing without the
OpenPanel client.

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

* Send only live capacity counts and deploy the reporter with Signal

coturn adds relayed bytes to its metrics only when an allocation closes, so
the traffic value did not show the live load. Remove it. Send 0 for a
transport with no allocations, read the two metric pages at the same time,
and match only the "type" label. remote:update now builds and starts the
capacity reporter with Signal.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 21:24:31 +01:00
Aleksander DygońandClaude Opus 5.5 212eff2a80 Remove unit tests and keep E2E and protected tests (#2051)
* Remove unit tests and keep E2E and protected tests

Delete 591 vitest unit test files and their test-only harnesses. Keep
E2E and smoke scripts under scripts/, and keep vitest files only for
migrations, schema parity, the renderer-to-main trust boundary, secret
redaction, and check-rule fixtures.

Remove the test runners that have no tests now (site-router, remote/api,
contracts, brand, auth-api client), their CI jobs, and the transfer
budget report. Remove code and dependencies that only the deleted tests
used.

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

* Set the E2E-only test policy and remove references to deleted tests

AGENTS.md now permits vitest files only for migrations, the trust
boundary, secret redaction and check-rule fixtures. All other behaviour
gets an E2E script under scripts/.

Remove references to deleted tests, harnesses and commands from docs,
AGENTS.md files and skills. The release-upgrade-safety gates that ran a
deleted test now use a manual check.

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

* Keep migration tests and fix CI checks after the test removal

Move the migration cases out of the deleted mixed test files into
three migration test files: the v15 agent usage upgrade and rollback,
the read-state baseline from schema v2, and the remote control plane
and permanent invitation D1 migrations.

Keep error.agent.noStartingModel for the text that older hosts send,
and let i18n-check accept it. Lower two type baseline entries. Correct
comments and docs that named removed tests or test commands.

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

* Remove the empty test patterns from the knip configuration

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

* Add E2E checks for Signal secrets, IPC input decoding and analytics redaction

- scripts/signal-security-e2e.ts starts the real Signal service with
  throwaway secrets. It checks the Telegram secret header, the Slack
  signature, signed account events, remote and route tickets, webhook
  headers, and that no frame or log line holds the bot token. CI runs
  it in the new Signal E2E job.
- scripts/ipc-input-e2e.ts sends malformed requests from a running dev
  app and checks that the main process decoders refuse them.
- scripts/analytics-redaction-e2e.ts checks that no captured analytics
  or failure report request holds a seeded secret. For this,
  OPENBOT_ANALYTICS_CAPTURE_URL sends analytics to a loopback capture
  server. Only an unpackaged build reads it.

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

* Check the renderer analytics path and path traversal in the E2E scripts

The analytics E2E now loads the window again and waits for the renderer event, so the renderer send path cannot pass with no request. The IPC input E2E now sends an attachment id and a shared file path that try to leave their folder.

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

* Remove an unused optional parameter from the read-state migration test

The parameter gave one exactOptionalPropertyTypes error, which the type ratchet refuses for a new file.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:25:48 +02:00
NBandClaude Opus 5 0550396763 ci: check the remote stack's scripts and Compose files, and fix the image's pruned install (#250)
* ci: typecheck the remote stack scripts, and gate the deploy on Surfaces

`remote/scripts/check.ts` and `update.ts` had no checker at all.
`tsconfig.node.json` covers the root `scripts/**` but stops there, and
`remote/api/tsconfig.json` reached only inside its own directory. Both
files use `Bun.spawn` and `import.meta.dir`, so they cannot join
`tsconfig.node.json`, which pins `"types": ["node"]` - the reason all
thirty root scripts use the `Bun` global exactly zero times.

Adding `@types/bun` at the root would have fixed the resolution by
making Bun globals visible repo-wide, including in `src/main`, which
runs under Node. `remote/api` already has the Bun-typed project the
scripts need, so its `include` carries `../scripts/*.ts` instead and the
existing `typecheck:remote` covers both.

Separately, `deploy-production` did not need `surfaces`, so a red
mobile, site-router, team-client or remote typecheck did not stop the
Cloudflare production deploy on a push to main. It does now.

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

* fix(remote): copy the logging and team-client manifests into the image

The remote API image installs from a pruned checkout, and the root package
gained `@openbot/logging` and `@openbot/team-client` without the matching COPY
lines, so `bun run remote:up` failed on `the root package depends on workspace
"@openbot/logging" (packages/logging), which is listed in bun.lock but not on
disk`. Nothing in CI builds this image, so every job stayed green.

The guard lives in `scripts/dependency-catalog.test.ts`, which already reads
these manifests: it walks the workspace dependency graph from the root package
and `@openbot/remote-api` and asserts the Dockerfile copies a manifest for each
workspace it reaches.

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

* ci: validate both remote Compose files in Surfaces

`remote:check` was left out of CI on the premise that it needs Docker the
runners do not have. Only half of that is true: `docker compose config`
interpolates and validates client-side and never opens a socket, so it succeeds
with no daemon running, and `ubuntu-latest` ships the docker CLI. The Compose
files were the last part of the remote stack nothing checked.

`--compose` selects that half alone, so Surfaces does not re-run the workspace
typecheck and tests it already runs as their own steps, and the env defaults the
two files interpolate stay in one place instead of being copied into the
workflow. `remote:check` is unchanged as the local superset.

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

* docs: list remote:check:compose in the README command table

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

* test: say why the Dockerfile guard walks every dependency field

The image installs with `--production`, so walking devDependencies is stricter
than the install strictly needs. Every workspace edge in the repo is a plain
dependency today, so the difference is inert - but the bias is the deliberate
one, and the comment now says so rather than leaving the next reader to decide
it is a bug.

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

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 21:45:22 +02:00
NB 6a5c038ce3 Use pinned Node for remote checks (#130) 2026-09-01 12:07:24 +02:00
NB 342e8d0308 Migrate remote transport from Cloudflare Tunnel to WebRTC (#111)
* Migrate remote transport to WebRTC

* Limit hosts to one active remote session

* Harden remote session resume and signaling

* Preserve authorization and member identity across reconnects

* Tighten remote session preparation

* Close remote session lifecycle gaps

* Finish remote lifecycle reliability

* Complete remote session lifecycle

* Harden remote reconnect recovery

* Close remote transport lifecycle gaps

* Revoke rotated host credentials

* Harden reconnect state and transfer expiry

* Serialize signaling and secure remote TLS keys

* Complete remote renewal and transfer recovery

* Bound WebRTC framing and recover event streams

* Harden remote identity and shutdown

* Serialize remote authorization epochs

* Secure remote restart and registration

* Isolate remote file transports

* Renew remote host credentials safely

* fix remote session recovery edge cases

* secure remote peer authentication and recovery

* Fix WebRTC authentication completion ordering

* Complete remote-only WebRTC rollout path

* Prepare encrypted remote production environment

* Keep remote desktop runtime lock stable

* Preserve sessions across Signal recovery

* Distinguish Signal resume from client replacement

* Close replaced WebRTC peer state

* Stop replaced clients from reclaiming sessions

* Fix fail-closed WebRTC edge cases

* Close remote authorization lifecycle gaps

* Preserve pinned WebRTC session identity

* Preserve immutable runtime lock metadata

* Disconnect revoked remote hosts during sync

* Remove sidebar event test race

* Configure remote ACME token

* Harden remote session recovery

* Complete WebRTC host administration

* Resolve remote rollout review findings

* Close remote authorization races

* Make remote revocation atomic

* Secure remote lifecycle concurrency

* Recover remote event streams

* Restore live WebRTC smoke coverage

* Make remote logout and readiness fail closed
2026-09-01 10:30:06 +02:00