fix(athena): address 9 council-audit findings — dead code, bugs, and hardening

Fixes from multi-model council audit (7 members, 19 findings, 9 selected):

- Use parseModelString() for cross-provider Anthropic thinking config (#3)
- Update stale AGENTS.md athena directory listing (#4)
- Replace prompt in appendMissingCouncilPrompt instead of appending (#5)
- Extract duplicated session cleanup logic in agent-switch hook (#6)
- Surface skipped council members when >=2 valid members exist (#9)
- Expand fallback handoff regex with negation guards (#11)
- Remove dead council-member agent from agentSources and tests (#12)
- Make runtime council member duplicate check case-insensitive (#14)
- Fix false-positive schema tests by adding required name field (#18)
This commit is contained in:
ismeth
2026-02-20 16:10:08 +01:00
committed by YeonGyu-Kim
parent 4ca623c29c
commit 9f541ed3ee
12 changed files with 99 additions and 46 deletions
+11 -12
View File
@@ -14,6 +14,15 @@ import {
const processedFallbackMessages = new Set<string>()
const MAX_PROCESSED_FALLBACK_MARKERS = 500
function clearFallbackMarkersForSession(sessionID: string): void {
clearPendingSwitchRuntime(sessionID)
for (const key of Array.from(processedFallbackMessages)) {
if (key.startsWith(`${sessionID}:`)) {
processedFallbackMessages.delete(key)
}
}
}
function getSessionIDFromStatusEvent(input: { event: { properties?: Record<string, unknown> } }): string | undefined {
const props = input.event.properties as Record<string, unknown> | undefined
const fromProps = typeof props?.sessionID === "string" ? props.sessionID : undefined
@@ -46,12 +55,7 @@ export function createAgentSwitchHook(ctx: PluginInput) {
const info = props?.info as Record<string, unknown> | undefined
const deletedSessionID = info?.id
if (typeof deletedSessionID === "string") {
clearPendingSwitchRuntime(deletedSessionID)
for (const key of Array.from(processedFallbackMessages)) {
if (key.startsWith(`${deletedSessionID}:`)) {
processedFallbackMessages.delete(key)
}
}
clearFallbackMarkersForSession(deletedSessionID)
}
return
}
@@ -61,12 +65,7 @@ export function createAgentSwitchHook(ctx: PluginInput) {
const info = props?.info as Record<string, unknown> | undefined
const erroredSessionID = info?.id ?? props?.sessionID
if (typeof erroredSessionID === "string") {
clearPendingSwitchRuntime(erroredSessionID)
for (const key of Array.from(processedFallbackMessages)) {
if (key.startsWith(`${erroredSessionID}:`)) {
processedFallbackMessages.delete(key)
}
}
clearFallbackMarkersForSession(erroredSessionID)
}
return
}