feat: enforce exhaustive unit testing and 100% SonarQube branch coverage

- Enforce mandatory handle() and failed() method testing for all Jobs and Commands
- Ban shallow reflection-only helper testing in Jobs
- Mandate actual SQLite in-memory query execution for Repositories (ban Builder::class assertions alone)
- Enforce full branch coverage for SonarQube (ternary, null-coalescing, catch blocks, match)
- Update JobTest templates for PHPUnit and Pest to include handle() and failed() methods
- Update verification checklist and master system prompt with strict branch gatekeepers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-08 15:01:01 +07:00
parent c29bfb9c31
commit 0dce2ef812
7 changed files with 96 additions and 16 deletions
+12
View File
@@ -16,4 +16,16 @@ describe('{{ClassName}}', function () {
// Assert
expect(true)->toBeTrue();
});
it('handles job failure cleanly', function () {
// Arrange
// $job = new {{ClassName}}(...);
// $exception = new \RuntimeException('Job failed');
// Act
// $job->failed($exception);
// Assert
expect(true)->toBeTrue();
});
});
+14
View File
@@ -32,4 +32,18 @@ class {{ClassName}}Test extends TestCase
// Assert
$this->assertTrue(true);
}
#[Test]
public function it_handles_job_failure_cleanly(): void
{
// Arrange
// $job = new {{ClassName}}(...);
// $exception = new \RuntimeException('Job failed');
// Act
// $job->failed($exception);
// Assert
$this->assertTrue(true);
}
}