James Feng
|
76c47956dd
|
fix: resolve ~50 CodeQL alerts — unused, injection, type issues
unused-local-variable / useless-assignment (~30 alerts):
- mcp-client: manager.ts (11), connection.ts (3)
- acp-link: server.ts (4), rcs-upstream.ts
- remote-control-server: 10 files (SessionDetail, acp/client, transports, etc.)
- src: constants/tools.ts, attribution.ts, win32.ts, main.tsx, attachments.ts
log-injection (2):
- chromeNativeHost.ts, rcs-upstream.ts — apply sanitizeLog()
indirect-command-line-injection (4):
- imagePaste.ts: convert shell:true to explicit sh -c pattern
use-before-declaration (4):
- query.ts, claude.ts, tools.ts, attachments.ts — move feature() import up
comparison-between-incompatible-types (2):
- ExitPlanModePermissionRequest.tsx, useTerminalNotification.ts
shared: sensitive.ts — sanitizeLog() helper
|
2026-06-08 17:15:22 +08:00 |
|
James Feng
|
9538ebd243
|
feat: full merge of f2e9af49 autonomy PR #386 — source + tests
Source integration points (previously missing from CCP):
- useScheduledTasks: export createScheduledTaskQueuedCommand, autonomy-backed
queue dedup with markAutonomyRunCancelled on dispose
- processUserInput: thread autonomy payload through to slash commands;
expose deferAutonomyCompletion on ProcessUserInputBaseResult
- processSlashCommand: accept autonomy arg; allowBackgroundForkedSlashCommands
test-only gate on ToolUseContext; defer/finalize autonomy in background fork
- handlePromptSubmit: claim stale autonomy commands before idle queue drain;
finalize autonomy on error paths
- Tool.ts: add allowBackgroundForkedSlashCommands to ToolUseContext
Tests ported from upstream f2e9af49 (11 files, +97 assertions):
- autonomyAuthority.test.ts — authority parsing, prompt assembly
- autonomyFlows.test.ts — managed flow lifecycle
- autonomyPersistence.test.ts — file locking, active retention
- autonomyQueueLifecycle.test.ts — queue partition/claim/finalize
- autonomyRuns.test.ts — state machine, dedup, formatters
- queryAutonomyProviderBoundary.test.ts — provider error finalization
- handlePromptSubmit.test.ts — stale autonomy filtering
- useScheduledTasks.test.ts — cron task → autonomy queue
- processSlashCommand.test.ts — slash command autonomy integration
- autonomy-lifecycle-user-flow.test.ts — CLI subprocess integration
- RemoteTriggerTool.test.ts — merged upstream assertion improvements
3699 pass, 0 fail (was 3602)
|
2026-06-04 20:56:53 +08:00 |
|
James Feng
|
5b0c0fa46f
|
fix: sync missing test mocks and agentToolFilter from upstream
Copied 6 missing mock files (auth, axios, childProcess, log, state,
toolContext) and agentToolFilter.ts from claude-code-best/claude-code.
Result: +92 tests pass, 9 'module not found' errors resolved.
LocalMemoryRecallTool has 40 new failures (mock/impl mismatch, TBD).
|
2026-06-02 00:59:36 +08:00 |
|