feat: callback-management (#227)#298
Conversation
Quality Report — ConductionNL/pipelinq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 249/249 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ❌ |
Spec coverage: 14% (42 tests / 298 specs)
Quality workflow — 2026-04-20 18:47 UTC
Download the full PDF report from the workflow artifacts.
- Add @NoAdminRequired to all four CallbackController endpoints (attempt, claim, complete, reassign) — without this annotation Nextcloud's AdminMiddleware restricts access to admins only, blocking KCC agents - Add class-level @SPEC PHPDoc tag to CallbackController, CallbackService, CallbackOverdueJob class docblocks (phpcs requirement) - Fix @SPEC tag indentation in CallbackController method docblocks (phpcbf auto-fix) Co-fixed-by: Juan Claude van Damme <hydra-reviewer@conduction.nl>
Quality Report — ConductionNL/pipelinq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 249/249 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ❌ |
Spec coverage: 14% (42 tests / 298 specs)
Quality workflow — 2026-04-20 19:12 UTC
Download the full PDF report from the workflow artifacts.
| * @NoAdminRequired | ||
| * @spec openspec/changes/callback-management/tasks.md#task-2.1 | ||
| */ | ||
| public function attempt(string $id): JSONResponse |
There was a problem hiding this comment.
[unfixed: architectural] Rule: OWASP A01:2021 / CWE-639 — attempt() has no task ownership check. Any @NoAdminRequired authenticated user can log an attempt against any task ID. The stub in getTaskStub() accepts any $id and returns placeholder data without verifying the caller is the assigned agent, group member, or admin. Fix requires a real OpenRegister fetch to validate the caller's relationship to the task before proceeding.
| * @NoAdminRequired | ||
| * @spec openspec/changes/callback-management/tasks.md#task-2.1 | ||
| */ | ||
| public function complete(string $id): JSONResponse |
There was a problem hiding this comment.
[unfixed: architectural] Rule: OWASP A01:2021 / CWE-639 — complete() has no task ownership check. Any authenticated user can mark any task as afgerond via any valid task ID. Fix requires verifying the calling user is the task's assigned agent (assigneeUserId) before allowing completion. Requires real OpenRegister fetch.
| * @NoAdminRequired | ||
| * @spec openspec/changes/callback-management/tasks.md#task-2.1 | ||
| */ | ||
| public function reassign(string $id): JSONResponse |
There was a problem hiding this comment.
[unfixed: architectural] Rule: OWASP A01:2021 / CWE-639 — reassign() has no task ownership check. Any authenticated user can reassign any task to any user or group. Fix requires verifying the caller is the current assignee or an admin before allowing reassignment. Requires real OpenRegister fetch.
Security Review — Clyde BarcodeResult: FAIL (0 fixed, 3 unfixed WARNING, 1 SUGGESTION, 0 blocking CRITICAL) Checks run
Findings[WARNING] SEC-01 — Broken Access Control on
|
Closes #227
Summary
Implements callback request (terugbelverzoek) management for Pipelinq, enabling KCC agents to log attempt tracking, claim group tasks, mark callbacks as complete, and reassign tasks. Includes a background job for proactive overdue detection and notifications.
Spec Reference
openspec/changes/callback-management/design.mdChanges
lib/Service/CallbackService.php— Callback business logic (attempt logging, claim validation, status transitions, threshold checks)lib/Controller/CallbackController.php— API endpoints for attempt, claim, complete, reassign operationslib/BackgroundJob/CallbackOverdueJob.php— Background job for overdue callback detection and notificationslib/Settings/pipelinq_register.json— Task schema updated with callback-specific properties (callbackPhoneNumber, preferredTimeSlot, attempts, completedAt, resultText)appinfo/routes.php— Routes registered for callback API endpointsappinfo/info.xml— Background job registeredtests/Unit/Service/CallbackServiceTest.php— Unit tests for CallbackServicetests/Unit/Controller/CallbackControllerTest.php— Unit tests for CallbackControllertests/Unit/BackgroundJob/CallbackOverdueJobTest.php— Unit tests for CallbackOverdueJobl10n/en.json,l10n/nl.json— i18n translationsTest Coverage
Code Quality