mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 11:13:43 +08:00
Adversarial review of PR #464 found that classify() promoted an absent channelType to the 'authenticated' trust branch, stamping an untrusted ThreadLocal username (e.g. stale value on a reused thread, or internal tasks like SkillConsolidation/Reflection that carry no channel) with authenticated trust — contradicting the fail-closed contract the service documents. - classify(): channel==null/blank now resolves to NONE (no injection); only the explicit 'web' channel may yield authenticated. Unrecognised non-web channels downgrade to external, never authenticated. - signingKey(): replace the one-shot keyParseAttempted latch with lastAttemptedPem so a corrected/hot-reloaded PEM re-parses on the next call without an app restart. Still fail-closed when PEM is unchanged. - Tests: 4 new cases lock the regression (null+dirty-ThreadLocal->NONE, blank->NONE, novel channel->external, self-heal after config fix). - .gitignore: exclude local .codebase-memory/ agent index. MCP+identity suite: 93/93 green. |
||
|---|---|---|
| .. | ||
| browser | ||
| builtin | ||
| controller | ||
| disclosure | ||
| document | ||
| guard | ||
| image | ||
| local | ||
| mcp | ||
| model | ||
| model3d | ||
| music | ||
| repository | ||
| search | ||
| service | ||
| video | ||
| ConcurrencyUnsafe.java | ||
| ToolConcurrencyRegistry.java | ||
| ToolRegistry.java | ||