Skip to content

Commit 4872cf3

Browse files
author
jovanSAPFIONEER
committed
fix: resolve CodeQL #92-#94 — unused variable/function in adapter-hooks and test-phase7
1 parent 1edfc92 commit 4872cf3

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

lib/adapter-hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class AdapterHookManager {
116116
* @returns true if a hook was removed
117117
*/
118118
unregister(name: string): boolean {
119-
for (const [phase, list] of this.hooks.entries()) {
119+
for (const [, list] of this.hooks.entries()) {
120120
const idx = list.findIndex(h => h.name === name);
121121
if (idx !== -1) {
122122
list.splice(idx, 1);

test-phase7.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ function assertThrows(fn: () => void, test: string) {
6666
catch { pass(test); }
6767
}
6868

69-
async function assertThrowsAsync(fn: () => Promise<unknown>, test: string) {
70-
try { await fn(); fail(test, 'Expected to throw'); }
71-
catch { pass(test); }
72-
}
69+
7370

7471
// ============================================================================
7572
// MOCK ADAPTER
@@ -594,7 +591,7 @@ async function testSkillComposition() {
594591

595592
// 6. batch with concurrency limit
596593
{
597-
const { registry, mock } = await makeRegistry();
594+
const { registry } = await makeRegistry();
598595
const composer = new SkillComposer(registry, baseCtx);
599596
const steps: ComposableStep[] = Array.from({ length: 4 }, (_, i) => ({
600597
agentId: 'mock:w' + i,

0 commit comments

Comments
 (0)