Skip to content

refactor: remove the dead CodecheckMetadataDAO and schema.xml - #161

Merged
nuest merged 2 commits into
codecheckers:mainfrom
nuest:remove-dead-code
Aug 13, 2026
Merged

refactor: remove the dead CodecheckMetadataDAO and schema.xml#161
nuest merged 2 commits into
codecheckers:mainfrom
nuest:remove-dead-code

Conversation

@nuest

@nuest nuest commented Aug 13, 2026

Copy link
Copy Markdown
Member

Three files described the codecheck_metadata table and none of them agreed.

  • The migration creates version, publication_type, manifest, repository, source, codecheckers, certificate, issue, check_time, summary, report, additional_content.
  • schema.xml declared opt_in, code_repository, data_repository, dependencies, execution_instructions.
  • CodecheckMetadataDAO queried identifier, manifest_files, paper_metadata, repositories.

Only the migration is real, so the other two are removed.

CodecheckMetadataDAO was unreachable: nothing outside its own unit test referenced it, and every query would throw against the actual table — swallowed by a bare catch returning null or an empty array, so a caller would have seen "no data" rather than an error. CodecheckSubmissionDAO is the live one.

schema.xml was never loaded. OJS 3.5 installs plugin schemas through getInstallMigration(), which this plugin implements; Plugin::getInstallSchemaFile() is now a final, empty stub a plugin cannot override.

This drops the suite from 132 tests to 113. The 19 removed tests exercised the dead DAO against a mocked DB, so they passed while asserting nothing about code that could run.

@nuest
nuest marked this pull request as ready for review August 13, 2026 09:23
@nuest
nuest merged commit 3facd42 into codecheckers:main Aug 13, 2026
3 checks passed
@nuest
nuest deleted the remove-dead-code branch August 26, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant