Repository navigation
[access] refactor(log): split LogService export/lookup and bundle relation-cleanup link services - #6693
Conversation
Golden tests on the current code: which object a history request resolves to or refuses, the unfiltered lookups it makes, export content per format with explicit-reveal masking, and which relations cleanup destroys or leaves standing, with its exact log lines. Assisted-by: ClaudeCode:claude-opus-5-5
…borators LogExportFormatter shapes and renders the export rows; LogObjectInTable holds the in-table half of the history lookup (live-holder fallback for a shared slug). Masking still runs in LogService before any row is shaped; every lookup keeps _rbac/_multitenancy false; refusals are unchanged. ObjectRelationCleanupService takes its four link services as one ObjectRelationCleanupLinks bundle (7 -> 4 constructor parameters) and its task and count loops are split into units of at most 15 lines. Assisted-by: ClaudeCode:claude-opus-5-5
|
Newman API Test Suite is red, but not because of this PR. The job's PHPUnit step reports
None of them touch Generated by Claude Code |
|
This PR changes no frontend files; its diff is only 4 tests fail across 2 snapshot specs:
Both snapshots format a date in the runner's local timezone. They expect The fix belongs in those specs, by pinning the timezone or the formatter, and isn't in scope for this PR. I know of no existing fix to port in. Generated by Claude Code |
|
Four more This PR touches only
These failures come from the current Generated by Claude Code |
|
Addendum: three more
As above, I know of no fix to port in, so I've made no change. Generated by Claude Code |
|
Addendum: Five gates fail on the whole repository:
Gates 7, 17 and 49 are about controllers, and this PR changes no controller. For gates 3 and 46, I ran the hydra-gates checkers I've made no change here. Generated by Claude Code |
|
Addendum: Generated by Claude Code |
|
Addendum:
This PR changes only the log export and lookup helpers and how relation-cleanup dependencies are bundled. Its golden tests pin both behaviours byte for byte. I couldn't compare against Generated by Claude Code |
|
Addendum:
Both tests fail the same way on Generated by Claude Code |
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ❌ | ||||
| psalm | ❌ | ||||
| phpstan | ❌ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| test-l10n | ❌ | ||||
| test-l10n-parity | ❌ | ||||
| format | ❌ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 168/168 | |||
| npm | ✅ | ✅ 641/641 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ✅ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ 40915/40922 · 19 skipped | ||||
| Newman | ❌ 1625/1628 | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ❌ |
Quality workflow — 2026-11-08 11:25 UTC
Download the full PDF report from the workflow artifacts.
ObjectRelationCleanupService keeps this branch's link bundle and takes main's ObjectCalendarTasksInterface type for the task service. Assisted-by: ClaudeCode:claude-opus-5-5
What changed
Maintainability-only refactor of two access-relevant services in
lib/Service(lane A20). No behaviour change: nothing that was allowed or refused before changes.LogExportFormatter. The in-table half of the object-history lookup (with the live-holder fallback for a shared slug) moves to a newLogObjectInTable. Both are built inside the constructor, the same wayExplicitRevealTrailMaskeralready is, so the constructor and DI stay as they were.LogServicebefore any row is shaped._rbac: false, _multitenancy: false, exactly as before.LogExportFormatterhas nostrict_types, so values are coerced the same way they were inLogServiceand exported files stay byte-identical.finalclassObjectRelationCleanupLinks. The constructor goes from 7 parameters to 4, and the container autowires the bundle. The task-deletion and timeline-count loops are split into small units. Log messages are unchanged.ObjectRelationCleanupServiceTest::setUpand the golden test'sbuild().Golden tests (committed first, green on the old code)
tests/Unit/Service/LogServiceAccessGoldenTest.phppins both sides of the history lookup:tests/Unit/Service/ObjectRelationCleanupServiceGoldenTest.phppins what gets destroyed and what stays:cleanup()destroys all six relation kinds, in order.destroyTimelineLinks()leaves notes and tasks alone.countTimelineLinks()counts nothing for a failing source.Mutation checks:
findObjectInScopefall back to a cross-table lookup instead of rethrowing the ambiguity failstestSlugHeldOnlyByDeletedObjectsIsRefusedAsAmbiguous.cleanup()fails 3 golden tests.Both mutations were reverted.
What ran
php -lon all touched files: clean.phpcs(phpcs.xml) on the touched lib files: 0 errors. The only warnings are 2 missing@spectags inLogService, on its class andgetLog(); that docblock was not changed here.phpstan analyseon the touched lib files: no errors.Metrics (SIG five-star profile, hydra-gates
check_sig_maintainability.py)Lane A20 area (lib/Service G–O top level), lines in units > 15: 1860 → 1701. Lines in units McCabe > 5: 500 → 464. The lane's overall baseline is 2.92–3.07; the after rating is measured by the lane on the combined result.
AI disclosure
Prepared by Claude Code (AI-assisted); reviewed by a human before merge.
Generated by Claude Code