Files
ruflo/v2/tests/fixtures/generators.ts
T
rUvandClaude Opus 4.5 1b6a1971f7 feat(v3): add comprehensive v3 implementation plans and swarm architecture
- Reorganize v3/ into implementation/ subfolders:
  - planning/, architecture/, migration/, integration/
  - security/, adrs/, research/, swarm-plans/

- Add 15-agent concurrent swarm implementation plans:
  - SWARM-OVERVIEW.md: Hierarchical mesh topology, 4 phases
  - AGENT-SPECIFICATIONS.md: 15 agent configs with capabilities
  - TDD-LONDON-SCHOOL-PLAN.md: Mock-first TDD methodology
  - BENCHMARK-OPTIMIZATION.md: Performance targets (2.49x-7.47x)
  - DEPLOYMENT-PLAN.md: Release strategy, CI/CD, rollback
  - GITHUB-ISSUE-TRACKING.md: Issue workflow with agent replies

- Update .claude/settings.json with proper hooks format
- Add bash aliases for claude --dangerously-skip-permissions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 15:40:51 +00:00

93 lines
2.2 KiB
TypeScript

// Test data generators
export function generateCoordinationTasks(count: number) {
return Array.from({ length: count }, (_, i) => ({
id: `task-${i}`,
priority: ['low', 'medium', 'high', 'critical'][Math.floor(Math.random() * 4)],
requiredResources: [`resource-${i % 3}`],
estimatedDuration: Math.random() * 1000
}));
}
export function generateMemoryEntries(count: number) {
const namespaces = ['test', 'production', 'staging', 'development'];
const tags = ['important', 'urgent', 'archive', 'temporary', 'cached'];
return Array.from({ length: count }, (_, i) => ({
namespace: namespaces[i % namespaces.length],
key: `entry-${i}`,
value: {
id: i,
data: `Test data ${i}`,
metadata: {
created: new Date().toISOString(),
source: 'generator',
index: i
}
},
tags: tags.filter(() => Math.random() > 0.5)
}));
}
export function generateErrorScenarios() {
return [
{
name: 'network-timeout',
error: new Error('Network timeout'),
recoverable: true
},
{
name: 'invalid-input',
error: new TypeError('Invalid input type'),
recoverable: false
},
{
name: 'resource-exhausted',
error: new Error('Resource exhausted'),
recoverable: true
},
{
name: 'permission-denied',
error: new Error('Permission denied'),
recoverable: false
}
];
}
export function generateEdgeCaseData() {
return {
strings: {
empty: '',
veryLong: 'x'.repeat(10000),
unicode: '🚀🎭🌍',
specialChars: '!@#$%^&*()_+-=[]{}|;:\'",.<>?/\\',
whitespace: ' \t\n\r '
},
numbers: {
zero: 0,
negative: -1,
infinity: Infinity,
negativeInfinity: -Infinity,
nan: NaN,
maxSafeInt: Number.MAX_SAFE_INTEGER,
minSafeInt: Number.MIN_SAFE_INTEGER
},
objects: {
null: null,
undefined: undefined,
empty: {},
nested: { a: { b: { c: { d: 'deep' } } } },
circular: (() => {
const obj: any = { a: 1 };
obj.self = obj;
return obj;
})()
},
arrays: {
empty: [],
sparse: [1, , , 4],
mixed: [1, 'two', { three: 3 }, [4]],
large: Array(1000).fill(0)
}
};
}