Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
HTML agent-skillsai-agentsarchitecture-diagramclaude-codeclaude-skillscodexcoding-agentsdeepseek-harnessdeveloper-toolsdiagramsdiagrams-as-codedsh-pluginflowchartllmmermaidopencodesequence-diagramsoftware-architecturesystem-designvisualization
test(benchmarks): cover repair-rounds blind spots
杨嘉伟f97d464f3d71
diff --git a/archify/test/repair-rounds.test.mjs b/archify/test/repair-rounds.test.mjsindex 5b7dadb5..a88c1b81 100644--- a/archify/test/repair-rounds.test.mjs+++ b/archify/test/repair-rounds.test.mjs@@ -29,8 +29,8 @@ function writeJson(name, value) {return file;}-function miniManifest(id, type, defects) {- const fixture = path.join(skillRoot, 'examples', {+function miniManifest(id, type, defects, fixtureOverride) {+ const fixture = fixtureOverride || path.join(skillRoot, 'examples', {architecture: 'web-app.architecture.json',workflow: 'agent-tool-call.workflow.json',sequence: 'cache-miss-request.sequence.json',@@ -77,11 +77,45 @@ test('rules repair converges a schema defect reported with a path and evidence',assert.equal(receipt.totals.rounds, 2);assert.deepEqual(receipt.defects.map((d) => d.firstSeenGate), ['validate:render']);assert.equal(receipt.rounds[0].diagnostics[0].code, 'schema/required');+ assert.equal(receipt.rounds[0].diagnostics[0].hasSubjectDetail, true);+ assert.equal(receipt.rounds[0].diagnostics[0].hasEvidence, true);+ assert.equal(receipt.rounds[0].diagnostics[0].hasSupportedFixes, true);assert.equal(receipt.rounds[0].repairs.applied.length, 1);assert.equal(receipt.totals.tokens.context > 0, true);assert.equal(receipt.totals.tokens.receipts > 0, true);});+test('keeps a valid boundary label visible to the repair-rounds suite', () => {+ const fixture = writeJson('valid-boundary.architecture.json', {+ schema_version: 1,+ diagram_type: 'architecture',+ meta: {+ title: 'Valid boundary label',+ output: 'boundary.html',+ quality_profile: 'showcase',+ viewBox: [1600, 300],+ },+ components: [{+ id: 'boundary',+ type: 'backend',+ label: 'i'.repeat(205),+ sublabel: '',+ pos: [80, 100],+ size: [1400, 60],+ }],+ boundaries: [],+ connections: [],+ cards: [],+ });+ const file = miniManifest('architecture-valid-boundary', 'architecture', [], fixture);+ const result = run(['run', '--manifest', file, '--command', 'validate']);+ assert.equal(result.status, 0, result.stderr || result.stdout);+ const receipt = JSON.parse(result.stdout.split('\n')[0]);+ assert.equal(receipt.passed, true);+ assert.equal(receipt.rounds[0].ok, true);+ assert.deepEqual(receipt.defects, []);+});+test('a staged second defect surfaces only after the first is repaired', () => {const file = miniManifest('arch-staged', 'architecture', [{ class: 'meta-missing-output' },