sickn33/agentic-awesome-skills / plugins/aasb-aas-qa-test-automation/skills/systematic-debugging
systematic-debugging
VerifiedUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes
| File | Kind | Size |
|---|---|---|
| CREATION-LOG.md | markdown | 4.4 KB |
| SKILL.md | skill md | 11.1 KB |
| condition-based-waiting-example.ts | script | 2.2 KB |
| condition-based-waiting.md | markdown | 3.9 KB |
| defense-in-depth.md | markdown | 4.3 KB |
| find-polluter.sh | script | 3.4 KB |
| root-cause-tracing.md | markdown | 5.9 KB |
| test-academic.md | markdown | 876 B |
| test-pressure-1.md | markdown | 2.1 KB |
| test-pressure-2.md | markdown | 2.4 KB |
| test-pressure-3.md | markdown | 2.8 KB |
condition-based-waiting-example.ts
View on GitHub// Complete implementation of condition-based waiting utilities
// From: Lace test infrastructure improvements (2025-10-03)
// Context: Fixed 15 flaky tests by replacing arbitrary timeouts
import type { ThreadManager } from '~/threads/thread-manager';
import type { LaceEvent, LaceEventType } from '~/threads/types';
// Requires the source project's Lace interfaces. Polling reads must be synchronous.
// Bounds cannot interrupt a blocking getter; rejected getters stop without another timer.
async function poll<T>(read: () => T | undefined, description: string, timeoutMs: number): Promise<T> {
if (!Number.isFinite(timeoutMs) || timeoutMs < 0) throw new Error('Invalid timeout');
const deadline = performance.now() + timeoutMs;
while (true) {
const value = read();
if (value !== undefined) return value;
if (performance.now() >= deadline) throw new Error(`Timeout waiting for ${description}`);
await new Promise<void>(resolve => setTimeout(resolve, 10));
}
}
export function waitForEvent(manager: ThreadManager, threadId: string,
eventType: LaceEventType, timeoutMs = 5000): Promise<LaceEvent> {
return poll(() => manager.getEvents(threadId).find(event => event.type === eventType),
eventType, timeoutMs);
}
export function waitForEventCount(manager: ThreadManager, threadId: string,
eventType: LaceEventType, count: number, timeoutMs = 5000): Promise<LaceEvent[]> {
if (!Number.isInteger(count) || count < 1) return Promise.reject(new Error('Invalid count'));
return poll(() => {
const events = manager.getEvents(threadId).filter(event => event.type === eventType);
return events.length >= count ? events : undefined;
}, `${count} ${eventType} events`, timeoutMs);
}
export function waitForEventMatch(manager: ThreadManager, threadId: string,
predicate: (event: LaceEvent) => boolean, description: string,
timeoutMs = 5000): Promise<LaceEvent> {
return poll(() => manager.getEvents(threadId).find(predicate), description, timeoutMs);
}
// Scope observations to the current thread/request and await the actual tool events
// before cancelling or asserting. Historical source outcomes (15 repaired cases,
// 60% to 100% observed pass rate) are not a guarantee for other tests.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |