Дмитрий
8a7144892c
fix(router-gate-v4): calibrate per-tool LLM-judge — calibration 4 soft user-prompt fallback
...
The per-tool judge compares each mutating tool call against the classifier's
distilled task summary read from router-state. That summary is lossy and
frequently "(unknown)" even for a perfectly explicit user request — and with an
unknown task the judge has nothing to compare against, so "Сомнения → NO"
blocked every real edit. Reproduced repeatedly this session: an explicit
"реализуй ... main() ..." prompt still classified unknown → all edits blocked,
including the judge's own fix. Calibration 2 (allow on unknown) was rejected by
the owner as a discipline hole.
Calibration 4 (soft, scope-preserving): when — and only when — the classifier
summary is "(unknown)"/empty, fall back to judging against the user's actual
last prompt (the ground-truth request) instead of nothing. The judge still runs
and still blocks on doubt; it just uses better evidence. When the summary is
meaningful, behaviour is unchanged (the user-prompt reader is not consulted).
When both summary and prompt are unavailable, the task stays "(unknown)" and
doubt→block is preserved.
NOT calibration 2: this does not blindly allow on unknown — it re-grounds the
judge in the literal user request, which the controller cannot fabricate (the
user writes it; it is read locally from the session transcript).
- tools/llm-judge-per-tool.mjs: resolveEffectiveTask(declaredTask, lastUserPrompt).
- tools/enforce-llm-judge-per-tool.mjs: runPerTool reads the last user prompt
(helpers.lastUserPromptText + readTranscript) only on an unknown summary;
main() binds it.
Regression: judge tests 57/57 GREEN; full tools suite 1951 passed | 2 skipped.
The 6 remaining failures are uncommitted point-2 WIP in
enforce-parallel-session-lock.test.mjs — not part of this change, not committed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-31 10:34:27 +03:00
..
2026-05-23 10:16:32 +03:00
2026-05-23 09:46:28 +03:00
2026-05-23 09:41:48 +03:00
2026-05-27 18:09:38 +03:00
2026-05-30 11:28:13 +03:00
2026-05-30 11:28:13 +03:00
2026-05-29 19:50:14 +03:00
2026-05-29 19:50:14 +03:00
2026-05-29 19:44:55 +03:00
2026-05-29 19:48:49 +03:00
2026-05-19 16:23:51 +03:00
2026-05-19 16:23:52 +03:00
2026-05-19 16:23:45 +03:00
2026-05-30 11:39:47 +03:00
2026-05-30 11:39:47 +03:00
2026-05-26 10:49:28 +03:00
2026-05-28 07:48:20 +03:00
2026-05-28 07:48:20 +03:00
2026-05-25 14:28:26 +03:00
2026-05-25 14:28:26 +03:00
2026-05-29 19:49:38 +03:00
2026-05-29 19:49:38 +03:00
2026-05-28 16:21:39 +03:00
2026-05-28 16:21:39 +03:00
2026-05-28 16:21:39 +03:00
2026-05-28 16:21:39 +03:00
2026-05-28 16:21:39 +03:00
2026-05-28 16:21:39 +03:00
2026-05-19 07:29:43 +03:00
2026-05-19 07:29:43 +03:00
2026-05-29 20:22:26 +03:00
2026-05-29 20:22:26 +03:00
2026-05-24 13:25:05 +03:00
2026-05-24 13:25:05 +03:00
2026-05-30 11:28:13 +03:00
2026-05-30 11:28:13 +03:00
2026-05-25 18:16:29 +03:00
2026-05-25 18:16:29 +03:00
2026-05-25 18:19:03 +03:00
2026-05-25 18:19:03 +03:00
2026-05-30 11:31:00 +03:00
2026-05-30 11:31:00 +03:00
2026-05-30 14:16:12 +03:00
2026-05-30 14:16:12 +03:00
2026-05-31 10:34:27 +03:00
2026-05-31 10:34:27 +03:00
2026-05-31 08:06:26 +03:00
2026-05-31 08:06:26 +03:00
2026-05-30 06:11:21 +03:00
2026-05-30 06:11:21 +03:00
2026-05-25 18:15:31 +03:00
2026-05-25 18:15:31 +03:00
2026-05-29 20:48:51 +03:00
2026-05-29 20:48:51 +03:00
2026-05-26 11:16:16 +03:00
2026-05-26 11:16:16 +03:00
2026-05-30 11:34:44 +03:00
2026-05-30 11:34:44 +03:00
2026-05-29 20:29:23 +03:00
2026-05-29 20:20:35 +03:00
2026-05-25 18:20:08 +03:00
2026-05-25 18:20:08 +03:00
2026-05-29 18:47:21 +03:00
2026-05-29 18:47:21 +03:00
2026-05-31 07:26:30 +03:00
2026-05-31 07:38:18 +03:00
2026-05-30 16:11:34 +03:00
2026-05-30 16:11:34 +03:00
2026-05-31 05:57:59 +03:00
2026-05-31 05:57:59 +03:00
2026-05-31 05:57:47 +03:00
2026-05-31 05:57:47 +03:00
2026-05-30 06:08:19 +03:00
2026-05-30 06:08:19 +03:00
2026-05-29 20:07:58 +03:00
2026-05-29 20:07:58 +03:00
2026-05-25 18:22:12 +03:00
2026-05-25 18:22:12 +03:00
2026-05-30 06:05:17 +03:00
2026-05-30 06:05:17 +03:00
2026-05-30 06:00:00 +03:00
2026-05-30 06:00:00 +03:00
2026-05-27 08:23:17 +03:00
2026-05-27 08:23:17 +03:00
2026-05-26 19:25:44 +03:00
2026-05-26 19:25:44 +03:00
2026-05-30 10:50:50 +03:00
2026-05-30 10:50:50 +03:00
2026-05-29 19:56:09 +03:00
2026-05-29 19:56:09 +03:00
2026-05-20 13:47:43 +03:00
2026-05-29 19:45:33 +03:00
2026-05-29 19:45:33 +03:00
2026-05-28 04:50:10 +03:00
2026-05-28 04:50:10 +03:00
2026-05-19 07:36:21 +03:00
2026-05-19 07:36:21 +03:00
2026-05-30 19:29:58 +03:00
2026-05-30 19:29:58 +03:00
2026-05-31 10:34:27 +03:00
2026-05-31 10:34:27 +03:00
2026-05-29 20:10:23 +03:00
2026-05-29 20:10:23 +03:00
2026-05-29 20:55:20 +03:00
2026-05-29 19:50:01 +03:00
2026-05-29 19:50:01 +03:00
2026-05-29 19:56:09 +03:00
2026-05-29 19:56:09 +03:00
2026-05-25 14:28:25 +03:00
2026-05-25 14:28:25 +03:00
2026-05-21 06:06:25 +03:00
2026-05-21 06:06:25 +03:00
2026-05-21 06:06:26 +03:00
2026-05-21 06:06:26 +03:00
2026-05-23 09:41:48 +03:00
2026-05-19 13:39:09 +03:00
2026-05-19 13:39:09 +03:00
2026-05-25 14:28:24 +03:00
2026-05-21 09:59:56 +03:00
2026-05-25 17:07:23 +03:00
2026-05-25 17:07:23 +03:00
2026-05-23 13:49:42 +03:00
2026-05-23 13:49:42 +03:00
2026-05-19 10:27:23 +03:00
2026-05-19 06:36:13 +03:00
2026-05-19 06:36:13 +03:00
2026-05-23 12:26:24 +03:00
2026-05-23 12:26:24 +03:00
2026-05-23 13:22:55 +03:00
2026-05-23 13:22:55 +03:00
2026-05-21 06:06:27 +03:00
2026-05-21 06:06:27 +03:00
2026-05-19 10:27:23 +03:00
2026-05-19 10:27:23 +03:00
2026-05-27 06:46:55 +03:00
2026-05-27 06:46:55 +03:00
2026-05-25 16:32:30 +03:00
2026-05-25 16:32:30 +03:00
2026-05-26 07:57:25 +03:00
2026-05-26 07:57:25 +03:00
2026-05-26 19:25:16 +03:00
2026-05-26 19:25:16 +03:00
2026-05-30 11:34:44 +03:00
2026-05-30 11:34:44 +03:00
2026-05-30 11:43:31 +03:00
2026-05-30 11:43:31 +03:00
2026-05-23 14:18:52 +03:00
2026-05-28 05:33:22 +03:00
2026-05-23 14:26:34 +03:00
2026-05-23 14:31:34 +03:00
2026-05-24 06:45:27 +03:00
2026-05-24 06:45:27 +03:00
2026-05-25 14:28:25 +03:00
2026-05-27 06:46:55 +03:00
2026-05-27 06:46:55 +03:00
2026-05-28 12:12:39 +03:00
2026-05-28 12:13:54 +03:00
2026-05-25 14:28:24 +03:00
2026-05-25 14:28:24 +03:00
2026-05-25 14:28:25 +03:00
2026-05-25 14:28:25 +03:00
2026-05-25 14:28:25 +03:00
2026-05-29 21:26:10 +03:00
2026-05-29 21:26:10 +03:00
2026-05-27 06:46:55 +03:00
2026-05-27 06:46:55 +03:00
2026-05-24 15:26:18 +03:00
2026-05-24 15:26:18 +03:00
2026-05-24 15:36:14 +03:00
2026-05-24 15:36:14 +03:00
2026-05-24 10:40:20 +03:00
2026-05-27 06:46:55 +03:00
2026-05-27 06:46:55 +03:00
2026-05-15 15:28:18 +03:00
2026-05-15 15:28:18 +03:00
2026-05-15 17:25:09 +03:00
2026-05-15 17:25:09 +03:00
2026-05-15 15:34:33 +03:00
2026-05-15 15:34:33 +03:00
2026-05-29 20:01:00 +03:00
2026-05-29 20:01:00 +03:00
2026-05-29 21:01:56 +03:00
2026-05-29 21:01:56 +03:00
2026-05-31 07:26:30 +03:00
2026-05-31 07:26:30 +03:00
2026-05-29 20:10:41 +03:00
2026-05-29 20:10:41 +03:00
2026-05-29 19:42:51 +03:00
2026-05-29 19:42:51 +03:00
2026-05-28 10:45:45 +03:00
2026-05-28 10:46:00 +03:00
2026-05-29 20:15:12 +03:00
2026-05-29 20:01:57 +03:00
2026-05-30 12:08:33 +03:00
2026-05-30 12:08:33 +03:00
2026-05-18 10:18:54 +03:00
2026-05-28 10:46:00 +03:00
2026-05-28 10:46:00 +03:00
2026-05-29 21:12:33 +03:00
2026-05-29 21:12:33 +03:00
2026-05-25 14:28:01 +03:00
2026-05-25 14:28:01 +03:00
2026-05-29 20:46:54 +03:00
2026-05-29 20:46:54 +03:00
2026-05-20 10:32:31 +03:00