Skip to content

refactor(independence): hide SyncRecordStatus, RegisterSlugAliases and RegisterObjectEntity behind constant interfaces - #7582

Merged
rubenvdlinde merged 3 commits into
mainfrom
cloud/k24-independence
Nov 9, 2026
Merged

rubenvdlinde merged 3 commits into
mainfrom
cloud/k24-independence

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Lane K24 (round 10c), SIG component independence.

What changed: three concrete classes are now named from outside their component only through an interface. Each interface holds constants only, so no container binding is needed and DI semantics are unchanged.

  • Service/Sync/SyncRecordStatusInterface: the status vocabulary and the transition table. SyncRecordStatus implements it, so SyncRecordStatus::PENDING etc. still resolve. Db/SyncRecordMapper now reads SyncRecordStatusInterface::PENDING and TRANSITIONS[$current]. That is equivalent to canTransition(): every listed target is a valid status, and an unknown $from has no entry.
  • Support/RegisterSlugAliasesInterface: the declared alias map. Service/RegisterSlugResolver reads ALIASES[$key] ?? [$key] on the key it has already normalised and empty-checked, which is exactly candidatesFor().
  • WorkflowEngine/RegisterObjectEntityInterface extends IEntity, with ENTITY_ID (the Flow entity id is the class name). Listener/FlowEngineRegistrationListener resolves the entity by that id.
  • tests/Unit/Architecture/K24InterfaceBindingsTest.php pins that each class implements its interface, that the table and the map answer exactly what canTransition() and candidatesFor() answer over every status pair / alias key, and that the listener registers the entity by its id.

What ran (branch merged with current development): tests/Unit/Architecture, Contract, Kernel, Service/Rules, ControllerServicesWiringTest, ControllerSessionWiringTest, plus Db/SyncRecordMapperGoldenTest, Service/Sync, RegisterSlugResolverTest, Support, Listener: green. phpcs: no new findings in lib. phpstan on touched files: OK.

Numbers: exposed LOC of the lane's target classes is 261 before. This PR hides RegisterObjectEntity (57), SyncRecordStatus (52) and RegisterSlugAliases (36), so 145 of it.

AI disclosure: written by Claude Code (claude-opus-5-5) in an automated lane.


Generated by Claude Code

…d RegisterObjectEntity behind constant interfaces

Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5

Copy link
Copy Markdown
Contributor Author

Newman API Test Suite failed in its PHPUnit step, and I don't think this PR causes it. The failing tests are exactly the same 22 that fail on #7501, #7571 and #7572: environment and golden differences in the CI Nextcloud (FileVersioningHandlerGoldenTest, EndpointsControllerAnswersGoldenTest, A18InterfaceBindingsTest and others). None of them touch the files changed here. On this branch merged with development, the guard set plus SyncRecordMapperGoldenTest, Service/Sync, RegisterSlugResolverTest, Support and Listener pass locally (3724 tests). Nothing is pushed here.


Generated by Claude Code

@rubenvdlinde
rubenvdlinde changed the base branch from development to main November 9, 2026 06:53

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (phpcs) failed, and it is not caused by this PR. phpcs reports errors in the same 8 files as on #7501, #7571 and #7572 (lib/Db/ImportPreviewRow.php, lib/Service/ContractBindings.php and others, mostly lines over 150 characters). None of them are the Sync, RegisterSlug, WorkflowEngine or FlowEngineRegistration files this PR changes. The other repo-wide reds traced on #7501 will most likely show up here too (psalm, phpstan, phpmd, the frontend checks, Hydra Gates). I will add a note here only if one of them names a file this PR changes. Nothing is pushed here.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / Hydra Gates failed. Seven of the eight failing gates (3, 7, 12, 17, 40, 46, 49) are the same full-repo findings as on the other K24 PRs and are not this PR's.

Gate 16 (spec-coverage) is this PR's: "1 changed method(s) missing @SPEC". The job log does not name the method. The most likely one is FlowEngineRegistrationListener::handle(): it has never had a method-level @spec, and this PR changed one line in it, the switch from RegisterObjectEntity::class to RegisterObjectEntityInterface::ENTITY_ID. Touching it brought it into the gate's scope.

Fix: add @spec openspec/changes/visual-flow-builder/specs/integration-flow/spec.md (the file's own spec) to that method's docblock. It is a one-line, docs-only change, but under the lane rules this PR is finished once opened, so it needs a follow-up.


Generated by Claude Code

@rubenvdlinde
rubenvdlinde merged commit 1e83ed0 into main Nov 9, 2026
37 of 49 checks passed
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ ae5208d

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 ✅
test-coverage-ratchet ✅
composer ✅ ✅ 168/168
npm ✅ ✅ 641/641
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ❌ cancelled — no verdict
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-09 17:44 UTC

Download the full PDF report from the workflow artifacts.

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.

2 participants