Skip to content

Pre-pitch hardening: security, dead-code removal, repo hygiene#4

Merged
dsr-restyn merged 5 commits into
mainfrom
fix/pre-pitch-hardening
Jun 19, 2026
Merged

Pre-pitch hardening: security, dead-code removal, repo hygiene#4
dsr-restyn merged 5 commits into
mainfrom
fix/pre-pitch-hardening

Conversation

@dsr-restyn

Copy link
Copy Markdown
Collaborator

Hardening pass to make Warren credible as an external integration proposal. Net: 34 files changed, +107 / −7,773. All 122 tests pass, ruff clean, app boots.

Security

  • Remove hardcoded local-r1-token backdoor — the startup path registered a static, source-visible device token on every run. Now generates an unguessable token per startup (WARREN_LOCAL_TOKEN env override for stable dev pairing).
  • Agent WebSocket fails closed — refuses connections when no secret is configured (was open to any anonymous client); uses secrets.compare_digest. Added tests for no-secret and wrong-token rejection.
  • Voice path — stop logging token previews (derive a non-reversible log id); downgrade per-message debug traces WARNING→DEBUG; fix bare except (WebSocketDisconnect, Exception).

Unfinished UI / no-op endpoints

  • Remove the three no-op /monitor/tasks + pause/resume endpoints and their tests.
  • Drop the permanently-empty TASKS section, the always-hidden REPO selector, dead pauseTask/resumeTask/fetchRepos client code, and the on-screen URL/token leak on auth failure.

Repo hygiene

  • Delete 15 internal AI-dev plan docs describing the removed NanoClaw architecture.
  • Genericize docker-compose.yml (drop personal /home/deploy paths, Dokploy network, dead ANTHROPIC_API_KEY); remove unused Claude Code + Entire CLI curl|bash installs from the Dockerfile; add a /health HEALTHCHECK; remove the vestigial anthropic_api_key config field.
  • Mark the Orca adapter experimental/single-session so the WebSocket proxy reads as the primary backend.

Known follow-ups (not in this PR)

  • LICENSE copyright holder is the GitHub handle dsr-restyn rather than a legal name/entity.
  • Orca adapter is labeled experimental rather than rewritten for multi-session.

🤖 Generated with Claude Code

dsr-restyn and others added 5 commits June 18, 2026 16:28
…token

The startup path registered a static 'local-r1-token' device token in the
DB on every run, present in public source — a known-credential backdoor for
anyone running the default 'python -m warren'. Generate an unguessable token
per startup (WARREN_LOCAL_TOKEN env override for stable dev pairing), and
de-emoji the console banner for a professional CLI presentation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Entire-Checkpoint: e3e169bd81f7
…token logging

- AgentWebSocketAdapter now refuses connections when no secret is configured
  (was: open to anonymous clients) and uses secrets.compare_digest.
- voice.py no longer logs token previews; derives a non-reversible log id.
- Downgrade per-message voice debug traces from WARNING to DEBUG, fix the
  bare (WebSocketDisconnect, Exception) catch, and hoist import time to module
  scope. Add tests for fail-closed and wrong-token rejection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Entire-Checkpoint: e3e169bd81f7
The nanoclaw removal left /monitor/tasks + pause/resume as inert no-op routes
and the R1 Creation still rendered a permanently-empty TASKS section plus an
always-hidden REPO selector and unreachable pause/resume client code.

- Remove the three no-op endpoints and their tests.
- Drop the TASKS monitor section, the dead REPO selector, renderMonitorTasks,
  loadRepos, and the api.js methods that targeted the removed endpoints.
- Replace the on-screen URL/token dump on auth failure with a plain message.
- Remove a leftover console.error (no console on the R1).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Entire-Checkpoint: e3e169bd81f7
- Delete internal AI-dev plan docs (docs/plans, docs/superpowers): they
  described the removed NanoClaw architecture and exposed dev process.
- docker-compose: drop personal /home/deploy paths, Dokploy network, and the
  dead ANTHROPIC_API_KEY; ship a generic compose.
- Dockerfile: remove the unused Claude Code + Entire CLI curl|bash installs
  (Warren proxies an external agent; it embeds neither), add a /health
  HEALTHCHECK.
- Remove the vestigial anthropic_api_key config field and its test fixtures
  (Warren is a generic proxy; the agent holds its own credentials).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Entire-Checkpoint: e3e169bd81f7
The Orca backend drives one local terminal and is not multi-session. Label it
experimental in the adapter docstring and README so the supported WebSocket
proxy is clearly the primary backend.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Entire-Checkpoint: e3e169bd81f7
@dsr-restyn
dsr-restyn merged commit 040b1e2 into main Jun 19, 2026
4 checks passed
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