Commit Graph

698 Commits

Author SHA1 Message Date
Codex
65059719ce fix(discord): preserve fenced code blocks across 2000-char chunks
Long bot replies that exceeded Discord's 2000-char limit were split by a
naive byte-slice loop. When the split fell inside a ```fenced code block
the first chunk lost its closing fence and the next chunk lost its
opener, so Discord rendered raw backticks and the remainder as headings
or bold instead of code.

Replace the slice loop with chunkForDiscord(), a fence-aware splitter
that prefers newline boundaries, re-closes any open fence at the end of
a chunk, and reopens it (with the same language tag) at the start of the
next. Single oversize lines still fall back to a surrogate-pair-safe
byte split. Adds 10 unit tests covering the seam, multi-fence
documents, surrogate pairs, and single-line overflow.
2026-06-01 01:20:28 +09:00
Codex
32fbb00dd2 fix(paired): cap consecutive reviewer silent-failure retries
The reviewer (codex) sometimes emits a final result with no visible text.
The runtime marks the run failed → handleFailedReviewerExecution
preserves status as review_ready → the follow-up scheduler re-queues
another reviewer-turn → loop. The existing round_trip / arbiter caps
never fire because round_trip_count only advances on owner-side
submissions; bot-side reviewer flakes never increment it.

Mirror the owner_failure_count pattern: add reviewer_failure_count to
paired_tasks, increment on each silent failure, and escalate via
requestArbiterOrEscalate once it reaches 2. Reset to 0 on every
successful reviewer completion path (PROCEED/REVISE/arbiter/wait-for-user)
and when the owner re-submits a fresh review cycle.

Repro chat: 1507762222724546560 (stock-adiviser). Task
33968d31-0da2-480c-85d3-7a3999822ab4 logged 11 consecutive
reviewer-turn entries with no work_items and round_trip_count stuck
at 1.
2026-05-29 23:40:35 +09:00
Codex
cdb59ce9fe fix(dashboard): preserve registered room aliases 2026-05-29 18:47:46 +09:00
Codex
85085e2782 fix(codex): align primer warmup with fixed slots 2026-05-28 18:29:51 +09:00
Codex
cf9bf08197 fix(router): escape Discord markdown delimiters instead of stripping
Previously formatOutbound stripped `*`, `_`, `~`, `|`, `` ` ``, `#`, `>`
from prose so they wouldn't trigger Discord formatting. That worked but
silently lost information — `**DONE**`, `STEP_DONE`, ~~strike~~ all
arrived in Discord with the source characters missing.

Switch to backslash-escape so the literal source text shows up while
still suppressing the formatting interpretation. Triple-backtick fenced
code blocks are still preserved verbatim.

Escape is non-idempotent (running it twice double-escapes backslashes),
so split the pipeline:

  - sanitizeForOutbound: strip internal tags + tool-call leaks + redact
    secrets. Use this for intermediate text that will pass through
    another formatOutbound call downstream (work-item storage, channel
    wrappers, session-command output).
  - formatOutbound: sanitize + neutralizeStrayMarkdown. Reserved for the
    single Discord-send boundary in channels/discord.ts.

Internal callers (message-turn-controller, session-commands, the
sendFormattedChannelMessage / sendFormattedTrackedChannelMessage /
editFormattedTrackedChannelMessage wrappers in index.ts, and the cron
reviewer-bot path) now use sanitizeForOutbound so the markdown escape
runs exactly once at the channel boundary.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 14:52:33 +09:00
Codex
890991394d remove one-shot reviewer mode 2026-05-27 12:43:15 +09:00
Codex
4e90e1d7ec fix bun path for one-shot review workspaces 2026-05-27 11:31:24 +09:00
Codex
7ed0af98a2 fix one-shot review for rooms without workDir 2026-05-27 11:20:30 +09:00
Codex
51512c9aeb add one-shot reviewer mode for single rooms 2026-05-27 10:57:57 +09:00
Codex
1509108e04 backup current stable ejclaw state 2026-05-27 10:53:31 +09:00
Eyejoker
646bc34372 [codex] Improve mobile dashboard UX (#19)
* feat(dashboard): improve mobile control plane UX

* fix(dashboard): improve mobile nav accessibility

* feat(dashboard): add mobile drawer and usage glance cards

* feat(dashboard): add compact usage matrix and i18n

* fix(dashboard): make usage-first console layout

* fix(dashboard): remove chrome and group usage rows
2026-04-26 21:29:13 +09:00
Eyejoker
5ba607644f Add read-only web dashboard MVP
Adds a disabled-by-default loopback web dashboard MVP with read-only control-plane views, prompt preview redaction, Vite React UI, and validation coverage.
2026-04-26 17:05:50 +09:00
Eyejoker
d52556fd28 fix: preserve structured attachment outputs (#17) 2026-04-25 14:41:46 +09:00
Eyejoker
a74ea4bad0 fix: preserve paired owner workspace branch invariant
Safely re-anchor drifted paired owner workspaces, guard owner completion handling, and tighten generated attachment temp-dir allowlisting.
2026-04-25 12:02:02 +09:00
ejclaw
bd7e8a2deb Allow Codex warm-up state file 2026-04-25 09:30:40 +09:00
ejclaw
3c13ab6ed8 style: format structured attachment test 2026-04-25 09:22:01 +09:00
ejclaw
83b7aef494 Add structured Discord attachments 2026-04-25 09:21:47 +09:00
ejclaw
ee8b18145e fix: avoid repeated zero-usage Codex warm-ups 2026-04-24 19:04:22 +09:00
ejclaw
884aef5c99 fix: restrict Codex warm-up to fresh quota windows 2026-04-24 18:53:04 +09:00
ejclaw
bd56a5d765 feat: add optional Codex warm-up scheduler 2026-04-24 18:40:36 +09:00
ejclaw
deca9dab74 test: include message source migration in bootstrap expectations 2026-04-24 15:48:11 +09:00
ejclaw
e036521054 fix: salvage EJClaw runtime hardening
- add dist freshness guard to deploy flow
- preserve message source provenance for IPC injection
- harden Codex usage fallback and workspace package manager detection
- document owner branch return protocol
2026-04-24 15:02:09 +09:00
ejclaw
f84dccfa10 Route STEP_DONE through reviewer 2026-04-24 12:03:32 +09:00
ejclaw
6d28a4ae19 style: format paired stepdone telemetry files 2026-04-23 18:53:36 +09:00
ejclaw
9ef79e3828 Add STEP_DONE guards, verdict storage, and stale delivery suppression 2026-04-23 15:28:42 +09:00
ejclaw
afd9c7a538 Phase 0 — STEP_DONE/TASK_DONE split + owner-follow-up integration smoke 2026-04-23 13:07:20 +09:00
ejclaw
12838a8b07 review: harden readonly git checks and lint verification 2026-04-22 20:49:02 +09:00
ejclaw
fa30124b46 test: align message runtime mocks with reviewer session flag 2026-04-22 06:50:56 +09:00
ejclaw
2b32b72119 paired: decouple unsafe host mode from fresh reviewer sessions 2026-04-22 06:47:52 +09:00
ejclaw
091f34ed23 paired: preserve prior owner and reviewer finals across superseded tasks 2026-04-22 06:02:27 +09:00
ejclaw
1122ace363 paired: disable latest owner final carry-forward by default 2026-04-22 05:51:43 +09:00
ejclaw
8fff703f84 test/runtime: align executor specs and bundled cli resolution 2026-04-20 13:33:13 +09:00
ejclaw
fc1c377cf1 fix(runtime): guard carry-forward prompts and support inbound IPC injection 2026-04-20 13:31:34 +09:00
ejclaw
34a51c95b2 build: restore dev type compatibility 2026-04-20 09:06:38 +09:00
ejclaw
be7383d68c style: format paired execution carry-forward changes 2026-04-20 08:20:17 +09:00
ejclaw
b6a24ad9fb paired: carry forward latest owner final across superseded tasks 2026-04-20 08:19:31 +09:00
ejclaw
a59813dee6 feat: support room-level reviewer and arbiter agent selection 2026-04-15 23:47:46 +09:00
ejclaw
1846d59d2f Format owner failure recovery changes 2026-04-15 03:11:47 +09:00
ejclaw
2ab3bddc0e Recover Codex compaction failures in paired owner flow 2026-04-15 03:11:14 +09:00
ejclaw
533d0fbd18 Format supersession follow-up changes 2026-04-15 01:22:20 +09:00
ejclaw
0a6782f5c2 Fix merge-ready task supersession handling 2026-04-15 01:21:00 +09:00
ejclaw
df04ef25eb runtime: resume review after CI watcher completion 2026-04-13 10:51:17 +09:00
ejclaw
721f0f65f0 runtime: suppress stale owner progress updates 2026-04-12 14:59:52 +09:00
ejclaw
1f4cd861af runtime: suppress stale owner progress flush 2026-04-12 14:18:22 +09:00
ejclaw
4275f4f984 prompts: anchor reviewer verification to workspace root 2026-04-12 00:31:19 +09:00
ejclaw
c984d972e1 paired: resync reviewer workspace to owner path 2026-04-11 20:12:53 +09:00
ejclaw
e458382d3d runtime: canonicalize Claude token env names 2026-04-11 14:32:43 +09:00
ejclaw
a1617b7456 runtime: unify final delivery and startup preconditions 2026-04-11 13:48:54 +09:00
ejclaw
dcf18b8797 runtime: replace owner progress with final delivery 2026-04-11 12:45:41 +09:00
ejclaw
29e39f25c9 paired: suppress reviewer progress flush before verdict 2026-04-11 09:56:59 +09:00