fix(paired): deliver escalation notices that were silently dropped
When a paired task escalated to the user after a reviewer final, the "⚠️ 자동 해결 불가" mention was emitted after the turn had already published its final and released its attempt. MessageTurnController dropped it ("Discarding late agent output after terminal final") and the ownership guard would have suppressed it anyway, so rooms looked stalled right after the reviewer's reply (javis_bot 2026-11-11 14:11, 15:28). - Mark host post-completion notices (escalation, reviewer-unavailable answer) and send them as a fresh message past both guards and the reviewer direct-terminal skip. - Reviewer prompt: NEEDS_CONTEXT is only for questions the user must answer; ask the owner for evidence with DONE_WITH_CONCERNS. - run_verification: load the helper and verifier from the EJClaw install instead of the repo under review (was "Module not found" outside EJClaw), and run the helper outside the repo so its .env is not read by EJClaw's config loader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { execFile } from 'child_process';
|
||||
import path from 'path';
|
||||
import { pathToFileURL } from 'url';
|
||||
import { fileURLToPath, pathToFileURL } from 'url';
|
||||
export { computeVerificationSnapshotId } from '../../../shared/verification-snapshot.js';
|
||||
|
||||
export const VERIFICATION_PROFILES = [
|
||||
@@ -130,17 +130,19 @@ export async function runVerificationRequestDirect(
|
||||
repoRoot: string,
|
||||
request: VerificationRequest,
|
||||
): Promise<VerificationResponse> {
|
||||
const helperPath = path.join(
|
||||
repoRoot,
|
||||
'shared',
|
||||
'verification-request-runner.js',
|
||||
// The helper ships with the EJClaw install, not with the repo under review
|
||||
// (src/ and dist/ both sit three levels below the install root).
|
||||
const helperPath = fileURLToPath(
|
||||
new URL('../../../shared/verification-request-runner.js', import.meta.url),
|
||||
);
|
||||
const helperEnv = buildVerificationHelperEnv();
|
||||
const { stdout, stderr } = await execFileCapture(
|
||||
'bun',
|
||||
[helperPath, repoRoot, JSON.stringify(request)],
|
||||
{
|
||||
cwd: repoRoot,
|
||||
// Not repoRoot: EJClaw's config loader reads `.env` from the cwd, and the
|
||||
// repo under review may have its own `.env`. Commands still run in repoRoot.
|
||||
cwd: path.dirname(helperPath),
|
||||
env: helperEnv,
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user