Files
infinite/.claude-flow/logs/headless/testgaps_1778785230148_ewvomo_result.log
2026-05-14 21:08:13 +00:00

102 lines
23 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[2026-05-14T19:02:20.736Z] RESULT
============================================================
{
"success": true,
"output": "The exploration confirms what this session has repeatedly found: **this project has zero application source code**. It's a claude-flow agent orchestration runtime — only configuration, a SQL schema, and database artifacts. Here's the full gap analysis based on what actually exists.\n\n---\n\n## Test Coverage Analysis\n\n### Current State\n\n| Category | Count |\n|----------|-------|\n| Source files (JS/TS/Python) | 0 |\n| Test files | 0 |\n| Test coverage | 0% |\n| Testable artifacts | 2 (`schema.sql`, `claude-flow.config.json`) |\n\nThere are no functions, classes, or business logic to unit test. All testable surface area is in the **database schema constraints** and **configuration validity**.\n\n---\n\n## Coverage Gaps\n\n### Gap 1 — Schema constraint enforcement (`data/memory/schema.sql`)\n\nThe schema has CHECK constraints, enum values, unique indexes, and foreign keys — none have regression tests.\n\n**Sub-gaps:**\n\n| Issue | Risk |\n|-------|------|\n| `patterns.confidence` has no `CHECK` bounds (`0.01.0`) | Out-of-range values silently stored |\n| Vector dimension mismatch (documented bug #1947) | 384-dim config vs schema could diverge |\n| FK cascades (`trajectory_steps → trajectories`) | Orphan rows on delete |\n| PRAGMA `foreign_keys` and WAL mode — not per-connection tested | FKs silently unenforced on new connections |\n| Enum CHECK values not tested at insertion boundary | Invalid types accepted if CHECK removed |\n\n**Skeleton:**\n\n```javascript\n// tests/schema/constraints.test.js\nconst Database = require('better-sqlite3');\nconst fs = require('fs');\n\nlet db;\nbeforeEach(() => {\n db = new Database(':memory:');\n db.pragma('foreign_keys = ON');\n const schema = fs.readFileSync('data/memory/schema.sql', 'utf8');\n db.exec(schema);\n});\nafterEach(() => db.close());\n\ntest('memory_entries rejects invalid type', () => {\n expect(() =>\n db.prepare(\"INSERT INTO memory_entries(namespace,key,value,type) VALUES('ns','k','v','INVALID')\")\n .run()\n ).toThrow();\n});\n\ntest('memory_entries enforces UNIQUE(namespace, key)', () => {\n db.prepare(\"INSERT INTO memory_entries(namespace,key,value,type) VALUES('ns','k','v','episodic')\").run();\n expect(() =>\n db.prepare(\"INSERT INTO memory_entries(namespace,key,value,type) VALUES('ns','k','v2','episodic')\")\n .run()\n ).toThrow(/UNIQUE/);\n});\n\ntest('patterns rejects type outside allowed enum', () => {\n expect(() =>\n db.prepare(\"INSERT INTO patterns(pattern_type,pattern_data) VALUES('UNKNOWN','{}')\").run()\n ).toThrow();\n});\n```\n\n---\n\n### Gap 2 — Confidence bounds not enforced (`patterns.confidence`)\n\nThe schema stores `confidence REAL` with no CHECK constraint. Values outside `[0.0, 1.0]` are silently accepted.\n\n**Skeleton:**\n\n```javascript\n// tests/schema/confidence-bounds.test.js\ntest('patterns.confidence accepts 1.5 (BUG: no CHECK constraint)', () => {\n // This test documents the MISSING constraint — it currently passes when it should fail.\n // Fix: ALTER TABLE patterns ADD CHECK(confidence BETWEEN 0.0 AND 1.0)\n const stmt = db.prepare(\n \"INSERT INTO patterns(pattern_type,confidence,pattern_data) VALUES('action',1.5,'{}')\"\n );\n expect(() => stmt.run()).not.toThrow(); // BUG: should throw\n});\n```\n\n---\n\n### Gap 3 — Vector dimension regression (bug #1947)\n\nConfig declares 384-dim vectors; schema default must match. No test guards this invariant.\n\n**Skeleton:**\n\n```javascript\n// tests/schema/vector-dimensions.test.js\nconst config = require('../../claude-flow.config.json');\n\ntest('memory config vector dimensions match schema default (bug #1947)', () => {\n const SCHEMA_DEFAULT_DIMS = 384; // from schema.sql CREATE TABLE vector_indexes\n expect(config.memory?.vectorDimensions ?? config.memory?.hnsw?.dimensions)\n .toBe(SCHEMA_DEFAULT_DIMS);\n});\n\ntest('vector_indexes rejects unknown quantization_type', () => {\n expect(() =>\n db.prepare(\n \"INSERT INTO vector_indexes(name,dimensions,quantization_type) VALUES('test',384,'INVALID')\"\n ).run()\n ).toThrow();\n});\n```\n\n---\n\n### Gap 4 — PRAGMA enforcement per connection\n\n`foreign_keys` and WAL mode must be re-applied on every connection; a fresh connection without them silently bypasses FK enforcement.\n\n**Skeleton:**\n\n```javascript\n// tests/schema/pragmas.test.js\ntest('foreign keys are NOT enforced without explicit PRAGMA (documents required setup)', () => {\n const freshDb = new Database(':memory:');\n // NO pragma('foreign_keys = ON')\n const schema = fs.readFileSync('data/memory/schema.sql', 'utf8');\n freshDb.exec(schema);\n\n // With FK off, inserting an orphan trajectory_step should succeed (bad)\n // This test documents that callers MUST set the pragma\n expect(() =>\n freshDb.prepare(\n \"INSERT INTO trajectory_steps(trajectory_id,step_index,action) VALUES(999,0,'x')\"\n ).run()\n ).not.toThrow(); // documents the footgun\n\n freshDb.close();\n});\n\ntest('FK violations ARE caught when pragma is set', () => {\n // db fixture has pragma enabled in beforeEach\n expect(() =>\n db.prepare(\n \"INSERT INTO trajectory_steps(trajectory_id,step_index,action) VALUES(999,0,'x')\"\n ).run()\n ).toThrow(/FOREIGN KEY/);\n});\n```\n\n---\n\n### Gap 5 — Configuration schema validation (`claude-flow.config.json`)\n\nNo tests validate that the config conforms to expected types, ranges, or required fields.\n\n**Skeleton:**\n\n```javascript\n// tests/config/schema-validation.test.js\nconst Ajv = require('ajv');\nconst config = require('../../claude-flow.config.json');\n\nconst schema = {\n type: 'object',\n required: ['version', 'agents', 'swarm', 'memory', 'mcp'],\n properties: {\n version: { type: 'number', minimum: 1 },\n agents: {\n type: 'object',\n properties: {\n maxConcurrent: { type: 'integer', minimum: 1, maximum: 50 },\n timeout: { type: 'integer', minimum: 1000 }\n },\n required: ['maxConcurrent']\n },\n swarm: {\n type: 'object',\n properties: {\n topology: { enum: ['hierarchical', 'mesh', 'hierarchical-mesh', 'ring', 'star'] },\n maxAgents: { type: 'integer', minimum: 1, maximum: 100 }\n }\n },\n memory: {\n type: 'object',\n properties: {\n backend: { enum: ['hybrid', 'sql', 'vector', 'redis'] }\n }\n },\n mcp: {\n type: 'object',\n properties: {\n port: { type: 'integer', minimum: 1024, maximum: 65535 }\n }\n }\n }\n};\n\ntest('claude-flow.config.json passes JSON schema', () => {\n const ajv = new Ajv();\n const valid = ajv.validate(schema, config);\n expect(valid).toBe(true);\n if (!valid) console.error(ajv.errors);\n});\n\ntest('swarm.maxAgents does not exceed agents.maxConcurrent', () => {\n expect(config.swarm.maxAgents).toBeLessThanOrEqual(config.agents.maxConcurrent);\n});\n```\n\n---\n\n### Gap 6 — Session and migration status transitions\n\n`sessions.status` and `migration_state.status` have CHECK constraints but no tests verify only legal state transitions are possible at the schema level.\n\n**Skeleton:**\n\n```javascript\n// tests/schema/sessions.test.js\nconst VALID_SESSION_STATUSES = ['active', 'paused', 'completed', 'error'];\nconst INVALID_STATUSES = ['running', 'done', 'failed', 'ACTIVE'];\n\ntest.each(VALID_SESSION_STATUSES)('sessions accepts status: %s', (status) => {\n expect(() =>\n db.prepare(\n `INSERT INTO sessions(session_id,status) VALUES('s1','${status}')`\n ).run()\n ).not.toThrow();\n});\n\ntest.each(INVALID_STATUSES)('sessions rejects status: %s', (status) => {\n expect(() =>\n db.prepare(\n `INSERT INTO sessions(session_id,status) VALUES('s2','${status}')`\n ).run()\n ).toThrow();\n});\n```\n\n---\n\n## To Wire These Up\n\nAdd to `package.json`:\n\n```json\n{\n \"scripts\": {\n \"test\": \"jest --testPathPattern=tests/\"\n },\n \"devDependencies\": {\n \"jest\": \"^29\",\n \"better-sqlite3\": \"^9\",\n \"ajv\": \"^8\"\n }\n}\n```\n\n---\n\n## Summary\n\nThis project has no application logic to unit test. All gaps are in **schema constraint coverage** and **config validity**. The highest-priority items are the vector dimension regression guard (bug #1947) and the missing `confidence` bounds CHECK — both are silent data corruption risks.\n",
"parsedOutput": {
"sections": [
{
"title": "Test Coverage Analysis",
"content": "\n",
"level": 2
},
{
"title": "Current State",
"content": "\n| Category | Count |\n|----------|-------|\n| Source files (JS/TS/Python) | 0 |\n| Test files | 0 |\n| Test coverage | 0% |\n| Testable artifacts | 2 (`schema.sql`, `claude-flow.config.json`) |\n\nThere are no functions, classes, or business logic to unit test. All testable surface area is in the **database schema constraints** and **configuration validity**.\n\n---\n\n",
"level": 3
},
{
"title": "Coverage Gaps",
"content": "\n",
"level": 2
},
{
"title": "Gap 1 — Schema constraint enforcement (`data/memory/schema.sql`)",
"content": "\nThe schema has CHECK constraints, enum values, unique indexes, and foreign keys — none have regression tests.\n\n**Sub-gaps:**\n\n| Issue | Risk |\n|-------|------|\n| `patterns.confidence` has no `CHECK` bounds (`0.01.0`) | Out-of-range values silently stored |\n| Vector dimension mismatch (documented bug #1947) | 384-dim config vs schema could diverge |\n| FK cascades (`trajectory_steps → trajectories`) | Orphan rows on delete |\n| PRAGMA `foreign_keys` and WAL mode — not per-connection tested | FKs silently unenforced on new connections |\n| Enum CHECK values not tested at insertion boundary | Invalid types accepted if CHECK removed |\n\n**Skeleton:**\n\n```javascript\n// tests/schema/constraints.test.js\nconst Database = require('better-sqlite3');\nconst fs = require('fs');\n\nlet db;\nbeforeEach(() => {\n db = new Database(':memory:');\n db.pragma('foreign_keys = ON');\n const schema = fs.readFileSync('data/memory/schema.sql', 'utf8');\n db.exec(schema);\n});\nafterEach(() => db.close());\n\ntest('memory_entries rejects invalid type', () => {\n expect(() =>\n db.prepare(\"INSERT INTO memory_entries(namespace,key,value,type) VALUES('ns','k','v','INVALID')\")\n .run()\n ).toThrow();\n});\n\ntest('memory_entries enforces UNIQUE(namespace, key)', () => {\n db.prepare(\"INSERT INTO memory_entries(namespace,key,value,type) VALUES('ns','k','v','episodic')\").run();\n expect(() =>\n db.prepare(\"INSERT INTO memory_entries(namespace,key,value,type) VALUES('ns','k','v2','episodic')\")\n .run()\n ).toThrow(/UNIQUE/);\n});\n\ntest('patterns rejects type outside allowed enum', () => {\n expect(() =>\n db.prepare(\"INSERT INTO patterns(pattern_type,pattern_data) VALUES('UNKNOWN','{}')\").run()\n ).toThrow();\n});\n```\n\n---\n\n",
"level": 3
},
{
"title": "Gap 2 — Confidence bounds not enforced (`patterns.confidence`)",
"content": "\nThe schema stores `confidence REAL` with no CHECK constraint. Values outside `[0.0, 1.0]` are silently accepted.\n\n**Skeleton:**\n\n```javascript\n// tests/schema/confidence-bounds.test.js\ntest('patterns.confidence accepts 1.5 (BUG: no CHECK constraint)', () => {\n // This test documents the MISSING constraint — it currently passes when it should fail.\n // Fix: ALTER TABLE patterns ADD CHECK(confidence BETWEEN 0.0 AND 1.0)\n const stmt = db.prepare(\n \"INSERT INTO patterns(pattern_type,confidence,pattern_data) VALUES('action',1.5,'{}')\"\n );\n expect(() => stmt.run()).not.toThrow(); // BUG: should throw\n});\n```\n\n---\n\n",
"level": 3
},
{
"title": "Gap 3 — Vector dimension regression (bug #1947)",
"content": "\nConfig declares 384-dim vectors; schema default must match. No test guards this invariant.\n\n**Skeleton:**\n\n```javascript\n// tests/schema/vector-dimensions.test.js\nconst config = require('../../claude-flow.config.json');\n\ntest('memory config vector dimensions match schema default (bug #1947)', () => {\n const SCHEMA_DEFAULT_DIMS = 384; // from schema.sql CREATE TABLE vector_indexes\n expect(config.memory?.vectorDimensions ?? config.memory?.hnsw?.dimensions)\n .toBe(SCHEMA_DEFAULT_DIMS);\n});\n\ntest('vector_indexes rejects unknown quantization_type', () => {\n expect(() =>\n db.prepare(\n \"INSERT INTO vector_indexes(name,dimensions,quantization_type) VALUES('test',384,'INVALID')\"\n ).run()\n ).toThrow();\n});\n```\n\n---\n\n",
"level": 3
},
{
"title": "Gap 4 — PRAGMA enforcement per connection",
"content": "\n`foreign_keys` and WAL mode must be re-applied on every connection; a fresh connection without them silently bypasses FK enforcement.\n\n**Skeleton:**\n\n```javascript\n// tests/schema/pragmas.test.js\ntest('foreign keys are NOT enforced without explicit PRAGMA (documents required setup)', () => {\n const freshDb = new Database(':memory:');\n // NO pragma('foreign_keys = ON')\n const schema = fs.readFileSync('data/memory/schema.sql', 'utf8');\n freshDb.exec(schema);\n\n // With FK off, inserting an orphan trajectory_step should succeed (bad)\n // This test documents that callers MUST set the pragma\n expect(() =>\n freshDb.prepare(\n \"INSERT INTO trajectory_steps(trajectory_id,step_index,action) VALUES(999,0,'x')\"\n ).run()\n ).not.toThrow(); // documents the footgun\n\n freshDb.close();\n});\n\ntest('FK violations ARE caught when pragma is set', () => {\n // db fixture has pragma enabled in beforeEach\n expect(() =>\n db.prepare(\n \"INSERT INTO trajectory_steps(trajectory_id,step_index,action) VALUES(999,0,'x')\"\n ).run()\n ).toThrow(/FOREIGN KEY/);\n});\n```\n\n---\n\n",
"level": 3
},
{
"title": "Gap 5 — Configuration schema validation (`claude-flow.config.json`)",
"content": "\nNo tests validate that the config conforms to expected types, ranges, or required fields.\n\n**Skeleton:**\n\n```javascript\n// tests/config/schema-validation.test.js\nconst Ajv = require('ajv');\nconst config = require('../../claude-flow.config.json');\n\nconst schema = {\n type: 'object',\n required: ['version', 'agents', 'swarm', 'memory', 'mcp'],\n properties: {\n version: { type: 'number', minimum: 1 },\n agents: {\n type: 'object',\n properties: {\n maxConcurrent: { type: 'integer', minimum: 1, maximum: 50 },\n timeout: { type: 'integer', minimum: 1000 }\n },\n required: ['maxConcurrent']\n },\n swarm: {\n type: 'object',\n properties: {\n topology: { enum: ['hierarchical', 'mesh', 'hierarchical-mesh', 'ring', 'star'] },\n maxAgents: { type: 'integer', minimum: 1, maximum: 100 }\n }\n },\n memory: {\n type: 'object',\n properties: {\n backend: { enum: ['hybrid', 'sql', 'vector', 'redis'] }\n }\n },\n mcp: {\n type: 'object',\n properties: {\n port: { type: 'integer', minimum: 1024, maximum: 65535 }\n }\n }\n }\n};\n\ntest('claude-flow.config.json passes JSON schema', () => {\n const ajv = new Ajv();\n const valid = ajv.validate(schema, config);\n expect(valid).toBe(true);\n if (!valid) console.error(ajv.errors);\n});\n\ntest('swarm.maxAgents does not exceed agents.maxConcurrent', () => {\n expect(config.swarm.maxAgents).toBeLessThanOrEqual(config.agents.maxConcurrent);\n});\n```\n\n---\n\n",
"level": 3
},
{
"title": "Gap 6 — Session and migration status transitions",
"content": "\n`sessions.status` and `migration_state.status` have CHECK constraints but no tests verify only legal state transitions are possible at the schema level.\n\n**Skeleton:**\n\n```javascript\n// tests/schema/sessions.test.js\nconst VALID_SESSION_STATUSES = ['active', 'paused', 'completed', 'error'];\nconst INVALID_STATUSES = ['running', 'done', 'failed', 'ACTIVE'];\n\ntest.each(VALID_SESSION_STATUSES)('sessions accepts status: %s', (status) => {\n expect(() =>\n db.prepare(\n `INSERT INTO sessions(session_id,status) VALUES('s1','${status}')`\n ).run()\n ).not.toThrow();\n});\n\ntest.each(INVALID_STATUSES)('sessions rejects status: %s', (status) => {\n expect(() =>\n db.prepare(\n `INSERT INTO sessions(session_id,status) VALUES('s2','${status}')`\n ).run()\n ).toThrow();\n});\n```\n\n---\n\n",
"level": 3
},
{
"title": "To Wire These Up",
"content": "\nAdd to `package.json`:\n\n```json\n{\n \"scripts\": {\n \"test\": \"jest --testPathPattern=tests/\"\n },\n \"devDependencies\": {\n \"jest\": \"^29\",\n \"better-sqlite3\": \"^9\",\n \"ajv\": \"^8\"\n }\n}\n```\n\n---\n\n",
"level": 2
},
{
"title": "Summary",
"content": "This project has no application logic to unit test. All gaps are in **schema constraint coverage** and **config validity**. The highest-priority items are the vector dimension regression guard (bug #1947) and the missing `confidence` bounds CHECK — both are silent data corruption risks.",
"level": 2
}
],
"codeBlocks": [
{
"language": "javascript",
"code": "// tests/schema/constraints.test.js\nconst Database = require('better-sqlite3');\nconst fs = require('fs');\n\nlet db;\nbeforeEach(() => {\n db = new Database(':memory:');\n db.pragma('foreign_keys = ON');\n const schema = fs.readFileSync('data/memory/schema.sql', 'utf8');\n db.exec(schema);\n});\nafterEach(() => db.close());\n\ntest('memory_entries rejects invalid type', () => {\n expect(() =>\n db.prepare(\"INSERT INTO memory_entries(namespace,key,value,type) VALUES('ns','k','v','INVALID')\")\n .run()\n ).toThrow();\n});\n\ntest('memory_entries enforces UNIQUE(namespace, key)', () => {\n db.prepare(\"INSERT INTO memory_entries(namespace,key,value,type) VALUES('ns','k','v','episodic')\").run();\n expect(() =>\n db.prepare(\"INSERT INTO memory_entries(namespace,key,value,type) VALUES('ns','k','v2','episodic')\")\n .run()\n ).toThrow(/UNIQUE/);\n});\n\ntest('patterns rejects type outside allowed enum', () => {\n expect(() =>\n db.prepare(\"INSERT INTO patterns(pattern_type,pattern_data) VALUES('UNKNOWN','{}')\").run()\n ).toThrow();\n});"
},
{
"language": "javascript",
"code": "// tests/schema/confidence-bounds.test.js\ntest('patterns.confidence accepts 1.5 (BUG: no CHECK constraint)', () => {\n // This test documents the MISSING constraint — it currently passes when it should fail.\n // Fix: ALTER TABLE patterns ADD CHECK(confidence BETWEEN 0.0 AND 1.0)\n const stmt = db.prepare(\n \"INSERT INTO patterns(pattern_type,confidence,pattern_data) VALUES('action',1.5,'{}')\"\n );\n expect(() => stmt.run()).not.toThrow(); // BUG: should throw\n});"
},
{
"language": "javascript",
"code": "// tests/schema/vector-dimensions.test.js\nconst config = require('../../claude-flow.config.json');\n\ntest('memory config vector dimensions match schema default (bug #1947)', () => {\n const SCHEMA_DEFAULT_DIMS = 384; // from schema.sql CREATE TABLE vector_indexes\n expect(config.memory?.vectorDimensions ?? config.memory?.hnsw?.dimensions)\n .toBe(SCHEMA_DEFAULT_DIMS);\n});\n\ntest('vector_indexes rejects unknown quantization_type', () => {\n expect(() =>\n db.prepare(\n \"INSERT INTO vector_indexes(name,dimensions,quantization_type) VALUES('test',384,'INVALID')\"\n ).run()\n ).toThrow();\n});"
},
{
"language": "javascript",
"code": "// tests/schema/pragmas.test.js\ntest('foreign keys are NOT enforced without explicit PRAGMA (documents required setup)', () => {\n const freshDb = new Database(':memory:');\n // NO pragma('foreign_keys = ON')\n const schema = fs.readFileSync('data/memory/schema.sql', 'utf8');\n freshDb.exec(schema);\n\n // With FK off, inserting an orphan trajectory_step should succeed (bad)\n // This test documents that callers MUST set the pragma\n expect(() =>\n freshDb.prepare(\n \"INSERT INTO trajectory_steps(trajectory_id,step_index,action) VALUES(999,0,'x')\"\n ).run()\n ).not.toThrow(); // documents the footgun\n\n freshDb.close();\n});\n\ntest('FK violations ARE caught when pragma is set', () => {\n // db fixture has pragma enabled in beforeEach\n expect(() =>\n db.prepare(\n \"INSERT INTO trajectory_steps(trajectory_id,step_index,action) VALUES(999,0,'x')\"\n ).run()\n ).toThrow(/FOREIGN KEY/);\n});"
},
{
"language": "javascript",
"code": "// tests/config/schema-validation.test.js\nconst Ajv = require('ajv');\nconst config = require('../../claude-flow.config.json');\n\nconst schema = {\n type: 'object',\n required: ['version', 'agents', 'swarm', 'memory', 'mcp'],\n properties: {\n version: { type: 'number', minimum: 1 },\n agents: {\n type: 'object',\n properties: {\n maxConcurrent: { type: 'integer', minimum: 1, maximum: 50 },\n timeout: { type: 'integer', minimum: 1000 }\n },\n required: ['maxConcurrent']\n },\n swarm: {\n type: 'object',\n properties: {\n topology: { enum: ['hierarchical', 'mesh', 'hierarchical-mesh', 'ring', 'star'] },\n maxAgents: { type: 'integer', minimum: 1, maximum: 100 }\n }\n },\n memory: {\n type: 'object',\n properties: {\n backend: { enum: ['hybrid', 'sql', 'vector', 'redis'] }\n }\n },\n mcp: {\n type: 'object',\n properties: {\n port: { type: 'integer', minimum: 1024, maximum: 65535 }\n }\n }\n }\n};\n\ntest('claude-flow.config.json passes JSON schema', () => {\n const ajv = new Ajv();\n const valid = ajv.validate(schema, config);\n expect(valid).toBe(true);\n if (!valid) console.error(ajv.errors);\n});\n\ntest('swarm.maxAgents does not exceed agents.maxConcurrent', () => {\n expect(config.swarm.maxAgents).toBeLessThanOrEqual(config.agents.maxConcurrent);\n});"
},
{
"language": "javascript",
"code": "// tests/schema/sessions.test.js\nconst VALID_SESSION_STATUSES = ['active', 'paused', 'completed', 'error'];\nconst INVALID_STATUSES = ['running', 'done', 'failed', 'ACTIVE'];\n\ntest.each(VALID_SESSION_STATUSES)('sessions accepts status: %s', (status) => {\n expect(() =>\n db.prepare(\n `INSERT INTO sessions(session_id,status) VALUES('s1','${status}')`\n ).run()\n ).not.toThrow();\n});\n\ntest.each(INVALID_STATUSES)('sessions rejects status: %s', (status) => {\n expect(() =>\n db.prepare(\n `INSERT INTO sessions(session_id,status) VALUES('s2','${status}')`\n ).run()\n ).toThrow();\n});"
},
{
"language": "json",
"code": "{\n \"scripts\": {\n \"test\": \"jest --testPathPattern=tests/\"\n },\n \"devDependencies\": {\n \"jest\": \"^29\",\n \"better-sqlite3\": \"^9\",\n \"ajv\": \"^8\"\n }\n}"
}
]
},
"durationMs": 110588,
"model": "sonnet",
"sandboxMode": "permissive",
"workerType": "testgaps",
"timestamp": "2026-05-14T19:02:20.736Z",
"executionId": "testgaps_1778785230148_ewvomo"
}