Skip to content

Fix test/plugin desynchronization and add missing test coverage #76

Description

@striderZA

The plugin test suite has a critical structural flaw: all 11 test files re-implement handler logic locally instead of importing from the actual plugin code. This means tests validate their own copies, not the production code — bugfixes to plugins are invisible to the test suite.

Additionally, two plugins have zero test coverage: drift-detector.ts and changelog-generator.ts.

Tasks

  • Refactor all 11 test files in .opencode/plugins/tests/ to import handlers from ../ccgs-hooks.ts instead of copying logic
  • Add test suite for drift-detector.ts (complex frontmatter parsing, section detection, severity assignment)
  • Add test suite for changelog-generator.ts (at minimum parseConventionalCommits() and format generators)
  • Configure package.json with a proper test script (currently "test": "echo \"Error: no test specified\" && exit 1")
  • Verify all 127+ existing test scenarios still pass after refactor

Affected Files

  • .opencode/plugins/tests/test-*.mjs (11 files)
  • .opencode/plugins/ccgs-hooks.ts (may need to export handlers)
  • .opencode/plugins/drift-detector.ts (needs test file)
  • .opencode/plugins/changelog-generator.ts (needs test file)
  • package.json

Identified during comprehensive framework review on 2026-07-21

Metadata

Metadata

Assignees

No one assigned

    Labels

    framework-reviewIdentified during comprehensive framework reviewpriority-criticalMust fix immediatelytestingTest suite, test coverage, test infrastructure

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions