Commit Graph

1499 Commits

Author SHA1 Message Date
Eyejoker
63a4515241 fix: resume owner after failed reviewer feedback (#208) 2026-06-03 01:37:22 +08:00
Eyejoker
b4197875fa fix: cap codex unavailable recovery loops (#213) 2026-06-03 01:26:57 +08:00
Eyejoker
3d36e15f67 Fix recurring Codex unavailable in paired rooms (#212)
* fix: avoid codex leases for claude readonly sessions

* fix: restore codex lease quality budget

* fix: preserve owner finalization on codex failure

* fix: wake owner after arbiter codex failure

* chore: format readonly codex lease fix
2026-06-03 01:14:39 +08:00
ejclaw
3894d4f406 fix: release Codex lease after final output 2026-06-02 20:51:21 +09:00
Eyejoker
7fc558acb6 fix: restore main quality checks 2026-06-02 18:37:37 +08:00
ejclaw
5648b61075 fix: stop Codex pool retry loops 2026-06-02 05:30:04 +09:00
ejclaw
03d4c81192 fix: recover Codex rotation auth failures
- mark Codex bearer/refresh failures as terminal auth-expired states

- sync refreshed session auth back to rotation slots and revive refreshed dead_auth slots

- stop paired arbiter retry loops when Codex accounts are unavailable

- add regression coverage for rotation leases, follow-up suppression, and arbiter closure
2026-06-02 00:21:53 +09:00
claude-bot
453157f6c3 fix(db): backfill turn_progress_text columns for v15 migration collision
Deployments that shipped reviewer_failure_count as a local migration
numbered 15 record schema_migrations version 15 under that name, so the
version-number-only runner skips the canonical turn_progress_text
migration (also version 15) and never creates paired_turns.progress_text
/ progress_updated_at, which the runtime reads. Add an idempotent compat
migration (020) that re-adds the columns when missing, plus a regression
test reproducing the collided-version-15 database.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-01 21:08:45 +09:00
claude-bot
2d4b136c00 docs(readme): document Gitea deployment and operational adaptations 2026-06-01 20:44:09 +09:00
claude-bot
7197099db5 fix(discord): escape prose markdown without clobbering structured output 2026-06-01 20:44:03 +09:00
claude-bot
e9dd09a036 test(paired): cover reviewer silent-failure retry cap 2026-06-01 17:50:04 +09:00
claude-bot
5af1c5b1d1 fix(router): escape Discord markdown delimiters instead of stripping 2026-06-01 17:49:54 +09:00
claude-bot
ccc747ae1c fix(paired): cap consecutive reviewer silent-failure retries 2026-06-01 17:38:35 +09:00
claude-bot
7e16fce17e docs(prompts): require finalize message to be a self-contained answer
The user only sees the final owner message, not the owner↔reviewer loop. Add a
"Finalize message format" section mandating a direct answer, a consolidated
recap (no transcript, no narrating disagreement), an explicit 사용자 액션 아이템
section (with "없음" when nothing is needed), and no reviewer-loop meta phrases.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-01 17:29:56 +09:00
claude-bot
f924db78ed fix(dashboard): preserve registered room aliases
Stop overwriting the user-registered group/room name with the live Discord
channel name during channel-meta refresh; keep the alias and log the
divergence at debug instead.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-01 17:29:19 +09:00
claude-bot
9483d4836f chore(scripts): add Discord bot permission diagnostic
One-off script that logs in with each configured Discord bot token and prints
the bot member's effective permission bits per guild, so capability claims can
be verified empirically instead of inferred from intents.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-01 17:28:17 +09:00
claude-bot
5f21c27c66 fix(discord): preserve fenced code blocks across 2000-char chunks
Replace the naive byte-slice chunk loop with a fence-aware chunkForDiscord()
splitter: 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,
and is surrogate-pair safe. Adds 10 unit tests for the seam, multi-fence
documents, surrogate pairs, and single-line overflow.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-01 17:27:44 +09:00
claude-bot
5b16bb6694 feat(primer): add usage-window alignment primer on GitHub-main base
Port the local primer subsystem onto the upstream base by intent:
- add src/usage-primer.ts (KST-slot primer firing Claude + Codex signals)
- extend codex-warmup with the ignoreZeroUsageWindow runtime option used
  by the primer so a slot is never skipped just because Codex is partway
  through its weekly window
- Codex primer fires unconditionally (maxUsagePct/maxD7UsagePct=100),
  mirroring the Claude primer, refreshing usage before selection
- wire startUsagePrimer() into the runtime bootstrap

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-01 17:25:34 +09:00
Codex
f28399021a feat(primer): fire Codex primer unconditionally like the Claude primer
Raise CODEX_PRIMER_MAX_USAGE_PCT from 1 to 100 so the Codex usage-window
primer fires at every fixed KST slot regardless of current 5h usage level,
mirroring the Claude primer (which always fires unless rate-limited). The d7
gate stays at 100 so an account whose weekly quota is exhausted is still
skipped, matching Claude's rate-limit skip.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-01 16:45:18 +09:00
Codex
f4de795b1e fix(primer): refresh Codex usage before primer and allow 1% fresh accounts
Codex primer was skipping with no_eligible_accounts because it read a
stale usage cache and required exactly 0% usage. Re-query usage right
before the primer call and treat freshly-reset 0~1% accounts as eligible
so the 5h window can be anchored at the fixed KST slot. Also hold new
Codex-owner turns at fresh usage until the next primer slot.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-01 16:29:12 +09:00
Codex
db715c6329 style(prompts): prettier format owner paired-room rules
Follow-up to e3c8de6: prettier --check failed on the new section
(missing blank line after the "Before accepting any proposal..."
sentence ahead of the numbered list, and the "Do not include:" header
needed a blank line before the bullets). Running prettier --write
fixes those without changing semantics.

bunx prettier --check prompts/owner-common-paired-room.md → clean.
2026-06-01 10:46:39 +09:00
Codex
90c17c6890 style(scripts): prettier reflow on Discord perms diagnostic
Follow-up to 0d87778; the pre-commit prettier hook rewrapped a few long
console.log lines after the commit landed.
2026-06-01 10:44:51 +09:00
Codex
e3c8de61f1 docs(prompts): require finalize message to be a self-contained answer
The user only sees the final owner message, not the owner↔reviewer
back-and-forth. Recent turns leaked meta-narrative like "리뷰어 지적
반영해서 정정합니다" / "PROCEED 확정" into user-visible replies and
sometimes omitted explicit action items, leaving the user to guess
whether anything was needed from them.

Add a "Finalize message format (self-contained answer)" section to
owner-common-paired-room.md that mandates:
  - direct answer first
  - consolidated recap (no transcript, no narrating disagreement)
  - explicit "사용자 액션 아이템" section, with "없음" when there is
    nothing for the user to do
  - no meta phrases referencing the reviewer loop

The runner reads this prompt fresh per agent spawn
(src/agent-runner-environment.ts), so the change takes effect on the
next owner turn without a service restart.
2026-06-01 10:44:34 +09:00
Codex
0d87778b78 chore(scripts): add Discord bot permission diagnostic
One-off Bun script that logs each configured Discord bot in (owner /
reviewer / arbiter), walks every guild it sees, and prints the bot
member's effective permission bits for the capabilities we plan to
expose (ReadMessageHistory, ManageMessages, ManageChannels,
AddReactions, thread perms, etc.). Used to verify "current permissions
support feature X" empirically instead of guessing from intents.
2026-06-01 10:30:58 +09:00
Codex
047f0d3b70 style(discord): apply prettier reflow to chunker tests
Follow-up to 6505971: the pre-commit prettier hook rewrapped the new
import and an Array.from() call after the commit landed, leaving the
working tree dirty. Commit the reflow so the tree is clean.
2026-06-01 01:25:25 +09:00
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
Eyejoker
1ff6b3434f fix: ignore attachment syntax examples (#206) 2026-05-31 22:44:42 +09:00
Eyejoker
b6e7e060cc fix: load supported document attachments (#205) 2026-05-31 22:30:49 +09:00
Eyejoker
778ed9b94a fix: preserve paired input evidence context (#204) 2026-05-31 17:17:38 +09:00
Eyejoker
c0703836e1 fix: surface remaining paired evidence loss (#203) 2026-05-31 16:57:49 +09:00
Eyejoker
239c7ff1e6 fix: make paired evidence loss visible (#202) 2026-05-31 16:20:09 +09:00
Eyejoker
6eca648c47 fix: carry paired turn attachments into review context (#201) 2026-05-31 14:49:56 +09:00
Eyejoker
37b57b20bb refactor: centralize task runtime contracts (#199) 2026-05-30 01:56:41 +09:00
Eyejoker
1531482363 refactor: split Claude agent runner entrypoint (#200) 2026-05-30 01:47:41 +09:00
Eyejoker
35988d9797 fix: use workspace links for runner shared package (#198) 2026-05-30 00:30:31 +09:00
Eyejoker
e3d02dbac1 fix: refresh root deps after runner build (#197) 2026-05-30 00:18:33 +09:00
Eyejoker
46b5543cb5 refactor: centralize host evidence actions (#194) 2026-05-30 00:08:28 +09:00
Eyejoker
adf9c16b9a refactor: centralize paired room role normalization (#193) 2026-05-30 00:03:15 +09:00
Eyejoker
5fa5b2f684 fix: refresh root deps during deploy
Add a root bun install after git pull so file: dependencies are refreshed before build and runtime verification.
2026-05-29 23:52:32 +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
Eyejoker
d0ca76f776 fix: route arbiter resolutions through reviewer (#195) 2026-05-29 23:19:42 +09:00
Eyejoker
fb87e94c5a refactor: centralize EJClaw runtime env names (#192) 2026-05-29 22:00:15 +09:00
Eyejoker
e876a509a5 refactor: split message executor target preparation (#190) 2026-05-29 19:52:20 +09:00
Eyejoker
87eb2f0488 refactor: split message executor attempt runner (#189) 2026-05-29 19:49:57 +09:00
Eyejoker
6f82cea91e refactor: split message executor attempt lifecycle (#188) 2026-05-29 19:47:36 +09:00
Eyejoker
41f0460848 refactor: split paired executor lifecycle (#187) 2026-05-29 19:45:08 +09:00
Eyejoker
b2cfe385cf fix: keep streamed output delivery non-blocking (#186) 2026-05-29 19:42:21 +09:00
Eyejoker
0bbb3fe14f fix: treat CI watcher completions as system input (#191) 2026-05-29 19:15:14 +09:00
Codex
cdb59ce9fe fix(dashboard): preserve registered room aliases 2026-05-29 18:47:46 +09:00
Eyejoker
5c8def0674 fix: pass room role to Codex MCP tools (#185) 2026-05-29 06:14:08 +09:00