Skip to content

Add live web editor, guided setup and pairing for 3.3.7 - #74

Merged
objz merged 49 commits into
v3from
feat/web-editor
Oct 26, 2026
Merged

objz merged 49 commits into
v3from
feat/web-editor

Conversation

@objz

@objz objz commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add /cb editor for live script editing, /cb setup for guided proxy setup, and console-confirmed /cbc pair for backend pairing.
  • Encrypt editor/setup relay traffic and harden authentication, Redis messaging, payload limits, reconnect handling, command registration and dispatch.
  • Preserve configuration and scheduled-task data with safer persistence; expand regression tests across core, backend and Velocity modules.
  • Add an isolated live-validation harness and repeatable sustained command-delivery checks.
  • Remove the bundled Cloudflare worker from this repo; its maintained implementation now lives in the separate wiki repo under worker/.

Validation

Completed local five-minute workloads:

Workload Delivered Target rate p95 p99
TLS public-API commands 6,000/6,000 20/sec 22.32 ms 22.77 ms
Redis public-API commands 6,000/6,000 20/sec 26.84 ms 27.22 ms

Both command runs recorded zero missing or duplicate executions, dispatch failures, wrong-target deliveries or server errors. Their functional preflights passed player command routes, permission denial, public API dispatch, built-in commands, reload and reconnect checks.

The six harness self-tests also passed. A separate local Wrangler relay test in the wiki repo delivered 30,000/30,000 encrypted round trips across 10 sessions with 1 KiB payloads over five minutes, with no loss, duplicates or reported errors (p95 8.40 ms; p99 21.75 ms).

These are bounded loopback tests, not production-capacity or long-term memory-leak guarantees. The TLS and Redis sustained runs overlapped on the same host. Command latency includes destination logging and Paper tick scheduling.

Known caveats / release checks

  • An initial TLS functional preflight timed out on a backend-to-secondary-proxy command route before load began. Later diagnostic and final runs passed that route, but the original timeout's cause remains unresolved.
  • The diagnostic run exposed a harness false positive that counted debug lines as reload executions; this PR includes the narrower execution-line check.
  • CI on this PR and a deployed setup/pairing/editor smoke test remain release gates. This PR does not deploy the wiki or worker, publish a release, or include production/attack load testing.
  • git diff --check origin/v3...HEAD reports one trailing-whitespace line in velocity/src/test/resources/setup/velocity.toml:45.

Local evidence

  • TLS: build/live-validation/20261026-234022-tls-36a1b3/result.json
  • Redis: build/live-validation/20261026-234035-redis-c2a4f0/result.json
  • Relay (wiki repo): .browser-check/relay-sustained-result.json

These generated evidence files are ignored and are not included in the PR.

objz added 30 commits October 26, 2026 18:14
The auth request now carries the platform the backend detected (Paper,
Folia, Bukkit, Forge, Fabric), and the proxy keeps it on the client
session. Older backends send none and show as unknown.
/cb editor opens a session through a relay on cb.objz.dev; every message
is signed with a secret that only lives in the editor link. Changes are
staged and written after /cb editor confirm <code>, unsaved work is kept
as a draft, and the session closes once the editor tab is gone.
Adds /cb editor list and /cb editor close.
…itor confirm in step with its messages, size caps
objz added 19 commits October 26, 2026 21:51
…script, queue capacity, player lookups, auth retry, optional numbers, dump redaction)
…, relay

Java plugin:
- Retain learned TOFU trust across reconnects so attacker cert substitution fails.
- Bind backend API identity to configured client ID, not the learned proxy ID.
- Atomic queued-task claim before dispatch; one task runs exactly once.
- Persist authorized script revision with queued work; resume rejects changed scripts.
- Reconstruct typed complex arguments across wire JSON and task storage.
- Carry authenticated remote-proxy player context without console fallback.
- Built-in CommandPayload API execution handlers on both API implementations.
- Authentication-generation guards reject stale callbacks on close/reconnect.
- Send-factory replacement propagates to already registered InNode handlers.
- RedisClient.close shuts down its API.
- Keep failed reload from publishing defaults/invalid candidates.
- Reject reserved server name try in setup plans and TOML writer.
- Editor opening generations invalidated on replacement, explicit close, restart.
- Setup open completions synchronize; obsolete sessions close offers.
- Reload sends empty script sets to every authenticated client.
- WebSocket message bounds via Undertow buffer limits (4 MiB per frame).
- Redis login no longer suffices to forge proxy/server commands: per-channel
  HMAC, 2-minute timestamp window, replay rejection, bounded nonces and message size.
- Undersized editor payloads and setup code validation.

Browser/wiki:
- Editor: inferred deletions cannot target unreadable scripts; external edits
  preserve the dirty baseline until revert; YAML sources stay paired with _src
  indexes through saves, undo and redo; YAML input cancels confirmation;
  undo/redo schedules draft persistence.
- Worker/relay: message size caps on editor and pairing channels; binary frames
  closed before forwarding; closing/replaced sockets cannot send or receive.

Tests: added regression suites for all fixes. docs/3.3.6 left byte-identical;
updated guidance copied to docs/3.3.7. Relays moved to wiki/worker/.

Signed-off-by: CommandBridge <me@objz.dev>
Empty the forced-hosts table so the generated primary config matches only
the local Paper server; Velocity rejects unknown forced-host entries and
would not start.
@objz
objz merged commit 5c68fe0 into v3 Oct 26, 2026
4 checks passed
@objz
objz deleted the feat/web-editor branch October 26, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant