Commit Graph

699 Commits

Author SHA1 Message Date
Eyejoker
dad6f50937 feat: enforce paired reviewer gate verdicts 2026-03-29 06:03:45 +09:00
Eyejoker
29310ce67f feat: recover paired executions after restart 2026-03-29 05:06:25 +09:00
Eyejoker
bb30330c66 feat: add paired execution freshness guard 2026-03-29 04:37:42 +09:00
Eyejoker
03ff69fdd0 fix: tighten auto review checkpoints 2026-03-29 03:58:14 +09:00
Eyejoker
d460933229 feat: add paired intent checkpoints 2026-03-29 03:34:55 +09:00
Eyejoker
2d8f8151dd style: sync high-risk plan gate formatting 2026-03-29 02:14:44 +09:00
Eyejoker
b536c90716 feat: add high-risk paired plan gate 2026-03-29 02:13:57 +09:00
Eyejoker
c76ed1d10a fix: reconcile governance scaffold follow-up 2026-03-29 01:38:30 +09:00
Eyejoker
dc8dd98e84 feat: scaffold paired governance state 2026-03-29 01:35:57 +09:00
Eyejoker
b0c833fd70 fix: keep review requests pending without owner workspace 2026-03-29 00:21:29 +09:00
Eyejoker
29053d3273 feat: formalize paired review command flow 2026-03-28 23:36:46 +09:00
Eyejoker
9006b92648 style: sync paired workspace sparse formatting 2026-03-28 21:34:25 +09:00
Eyejoker
eee09e8b7c fix: clean reviewer snapshots and scope git guard 2026-03-28 21:34:06 +09:00
Eyejoker
06b6326a9d style: sync paired workspace formatting fallout 2026-03-28 21:15:16 +09:00
Eyejoker
e7f49d77da feat: add paired review workspace flow 2026-03-28 21:14:25 +09:00
Eyejoker
79a8a2639e feat: add structured room role metadata 2026-03-28 19:30:32 +09:00
Eyejoker
806e5e4ff1 fix: keep codex approval wording role-based 2026-03-28 17:02:50 +09:00
Eyejoker
772fea45df refactor: share owner prompts and tighten silent output guidance 2026-03-28 07:46:13 +09:00
Eyejoker
b97d1a6260 refactor: unify typing policy across services 2026-03-28 06:52:57 +09:00
Eyejoker
de913985ba fix: promote visible progress after silent final 2026-03-28 06:27:36 +09:00
Eyejoker
38d96578a4 refactor: move retry and recovery paths to structured output helpers 2026-03-28 06:17:52 +09:00
Eyejoker
47dda19ded fix: block malformed structured silent envelope leaks 2026-03-28 06:04:26 +09:00
Eyejoker
0eb2270030 style: sync structured output formatting fallout 2026-03-28 05:57:50 +09:00
Eyejoker
fe6314108c feat: add structured silent output contract 2026-03-28 05:56:58 +09:00
Eyejoker
e1fdc47552 style: sync pre-commit formatting fallout 2026-03-28 05:41:16 +09:00
Eyejoker
ba9f6871b6 feat: add codex review failover and suppress output hardening 2026-03-28 05:40:38 +09:00
Eyejoker
d1c693fb17 fix: treat signal-killed agents as success when output was delivered
Two bugs fixed:

1. agent-runner: process close handler only checked `code !== 0`,
   but signal kills (SIGTERM/SIGKILL from post-close cleanup) set
   code=null which was misclassified as error even after successful
   output delivery. Now checks `code === null && signal` and resolves
   as success when hadStreamingOutput is true.

2. message-agent-executor: wrappedOnOutput persisted newSessionId
   before checking for poisoned session, allowing a stale session to
   be re-saved after clearSession. Reordered to check poison first
   and guard persist with !resetSessionRequested.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 21:25:30 +09:00
Eyejoker
c4744177e9 style: format extractWatchCiTarget line wrap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 20:59:25 +09:00
Eyejoker
7b63ba859d fix: deduplicate CI watchers and remove task ID from watcher prompts
Prevent duplicate CI completion notifications in paired rooms by checking
for existing active watchers with the same channel+provider+metadata before
creating a new one. Remove Task ID from watcher prompt construction to
avoid router secret redaction (task- IDs contain sk- pattern), passing
EJCLAW_RUNTIME_TASK_ID via env var instead and making cancel_task
auto-resolve when task_id is omitted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 20:57:59 +09:00
Eyejoker
9152a4ee18 style: format Claude usage cache migration guard 2026-03-26 16:37:38 +09:00
Eyejoker
d865a6b07f fix: stabilize Claude usage cache across token refreshes 2026-03-26 16:37:00 +09:00
Eyejoker
f79baf1ff8 fix: avoid Claude token refresh races across services 2026-03-26 10:25:09 +09:00
Eyejoker
2b74e6fe40 style: format streamed output evaluator test 2026-03-26 10:13:02 +09:00
Eyejoker
a330ebdf2a fix: suppress Claude 502 provider errors from chat output 2026-03-26 10:11:24 +09:00
Eyejoker
5c2e8e4fdc feat: allow status dashboard header without room details 2026-03-25 23:00:39 +09:00
Eyejoker
c7ba983ea6 feat: show watcher counts in status dashboard header 2026-03-25 22:52:02 +09:00
Eyejoker
20ca6c10fc style: fix prettier formatting in GitHub watcher scheduler tests 2026-03-25 22:44:02 +09:00
Eyejoker
09b4309d96 feat: add GitHub watcher backoff and auto-pause safeguards 2026-03-25 22:43:35 +09:00
Eyejoker
57f2045ca6 style: fix prettier formatting in github-ci and scheduler tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 22:31:52 +09:00
Eyejoker
33fcf9c788 feat: add host-driven GitHub Actions CI watcher (Level 3)
Replace LLM-per-tick polling with direct `gh api` calls for GitHub
Actions watchers. New `ci_provider` discriminator column routes tasks
to either the host-driven path (zero LLM tokens) or the existing
generic LLM path. GitHub watchers poll at 15s intervals (min 10s)
via `checkGitHubActionsRun()` in the scheduler, with completion
messages sent directly to chat on terminal state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 22:31:42 +09:00
Eyejoker
07c1437055 style: fix prettier formatting in ipc processing loop 2026-03-25 22:00:52 +09:00
Eyejoker
691dbc3310 fix: claim IPC files before processing to avoid duplicates 2026-03-25 22:00:36 +09:00
Eyejoker
fad85ef027 style: fix prettier formatting in db migration 2026-03-25 21:54:27 +09:00
Eyejoker
c3c75882e4 fix: add watcher TTL and cleanup task-scoped artifacts 2026-03-25 21:54:15 +09:00
Eyejoker
113c540f10 style: fix prettier formatting in task-scheduler test 2026-03-25 21:41:08 +09:00
Eyejoker
24d93d5c78 fix: fail fast on missing host IPC dir for task runtimes 2026-03-25 21:40:34 +09:00
Eyejoker
5620301024 fix: pass EJCLAW_HOST_IPC_DIR to MCP server env for both runners
Watcher tasks get task-scoped IPC dirs (data/ipc/{group}/tasks/{taskId}/),
but the MCP server used HOST_IPC_DIR to write IPC files. Without
EJCLAW_HOST_IPC_DIR, it fell back to the task-scoped path, writing
cancel_task/send_message files to nested dirs the IPC watcher never scans.

This caused 11 zombie watchers stuck in infinite loops — self-cancel
calls silently failed with ~4000 stranded IPC files accumulating.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 21:05:22 +09:00
Eyejoker
c89242b6dd fix: harden stripToolCallLeaks regex for CJK/non-ASCII garbage tokens
The previous regex used \w+ for descriptor tokens between the function
name and JSON body, which only matches ASCII word characters. Model
hallucinations often inject CJK/non-ASCII text (e.g. 彩神争霸) in this
position. Switch to (?:\s+[^\s{}]+)+ to match any whitespace-separated
non-brace tokens regardless of character set.

Also removes stale backward-compat re-exports from index.ts and updates
the test import for composeDashboardContent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 18:06:31 +09:00
Eyejoker
6806001ed6 style: fix prettier formatting after type union refactor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:46:54 +09:00
Eyejoker
94eeaa5e3e refactor: introduce AgentTriggerReason type union as SSOT for error reason strings
Replace scattered reason string literals with a centralized type hierarchy:
- AgentTriggerReason: all possible trigger reasons
- ClaudeRotationReason, CodexRotationReason, NoFallbackCooldownReason:
  derived subtypes for specific contexts
- AgentErrorClassification, FallbackTriggerResult, CodexRotationTriggerResult:
  discriminated unions for compile-time narrowing

Remove dead export isUsageExhausted() (superseded by
isPrimaryNoFallbackCooldownActive). Replace NO_FALLBACK_COOLDOWN_REASONS
Set with isNoFallbackCooldownReason() type guard.

Add tests for agent-error-detection and provider-retry (423 total passing).

Known limitation: 6 `as CodexRotationReason` casts in Codex rotation paths
where streamed trigger reason is AgentTriggerReason but runtime value is
always CodexRotationReason-compatible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:46:43 +09:00