Skip to content

[access] refactor(schema): revalidation engine and configuration drafts reached through interfaces - #7562

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

rubenvdlinde merged 3 commits into
mainfrom
cloud/k29-schema-independence

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

Lane K29 (round 10c, SIG component independence). Two concrete lib/Service classes are now named from outside their component only through interfaces. Only types change. The four-eyes approval, every refusal, and the revalidation run logic stay exactly where they were. Each interface is bound in SchemasBindings, as an alias to the same shared instance.

Changes

  • lib/Service/Schema/SchemaRevalidatorInterface.php (new): start() and processBatch(), implemented by SchemaRevalidationService. SchemaMigrationDomain (type hint only), SchemaRunServices and SchemaRunJob now name the interface.
  • lib/Service/ConfigurationDeployment/ConfigurationDraftsInterface.php (new): the draft-set workflow (requiresFourEyes, openSet, loadSet, draftValue, draftRemoval, draftsIn, approveSet, discardSet, listSets), implemented by ConfigurationDraftService. ConfigDeploymentControllerServices and ConfigurationDeploymentController (use line and property type only, since that file is in feat(config): the settings screen, bundles and seeding join the deployment lifecycle #3860) now name the interface.
  • lib/Service/Bindings/SchemasBindings.php: two bindings.
  • tests/Unit/Architecture/K29InterfaceBindingsTest.php (new): checks that each binding is present and that each class implements its interface.

Test Coverage

  • Merged with current development: tests/Unit/Architecture, Contract, Kernel, Service/Rules, ControllerServicesWiringTest, ControllerSessionWiringTest, plus the tests of every touched directory: 14,809 tests OK.
  • phpcs: no errors on touched files. phpstan reports two findings, both on unchanged lines of SchemaRevalidationService and both also present on development.

Numbers (lane_measure.py, K29, both K29 branches merged on origin/development)

  • Exposed LOC of the lane's target classes: 1,339 → 1,029 (target 756). SchemaRevalidationService (106) and ConfigurationDraftService (204) are now hidden.

Quality checklist

  • Guards and touched-directory tests pass on a merge with current development
  • New interfaces have a binding test

Written with AI assistance (Claude Code).


Generated by Claude Code

…e through SchemaRevalidatorInterface

Assisted-by: ClaudeCode:claude-opus-5-5
… through ConfigurationDraftsInterface

Types only: the controller and its service bundle name the interface; the
four-eyes approval and every refusal stay in ConfigurationDraftService.

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

Copy link
Copy Markdown
Contributor Author

Newman API Test Suite: the red is not from this PR.

The job's PHPUnit step finishes with 11 errors and 11 failures. Those 22 failures come from these test classes:

  • JobRunMapperNarrowGoldenTest
  • FileVersioningHandlerGoldenTest
  • A18InterfaceBindingsTest (ObjectRetentionHandler)
  • TextExtractionJobsGoldenTest
  • EndpointsControllerAnswersGoldenTest
  • SchemaConfigValidatorsGoldenTest
  • ProcessingLogServiceGoldenTest

This PR touches none of the classes those tests cover. The same 22 failures appear on #7561's Newman job (129002082935), and #7561 has already merged.

The failures depend on where the suite runs. The suite runs inside the Nextcloud container, where real server classes replace the test stubs. Some examples:

  • QBMapper calls fetchAssociative, which the mocks don't configure.
  • OCA\Files_Versions\Versions\IVersionManager is already declared.

Locally, all 75 tests in those classes pass at this PR's head, on origin/development, and on the merge of the two.

No fix exists yet, and it doesn't belong in this PR. I didn't re-run the job: the failures are deterministic, so a re-run would fail the same way.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / Vue Quality (eslint): the red is not from this PR.

This PR changes only PHP and adds no .vue or .js files. The eslint errors in the job are all in existing frontend files:

  • unused imports (NcActions, Refresh, schemaStore)
  • perfectionist/sort-imports
  • @nextcloud/l10n-enforce-ellipsis

The same check failed on #7561, which also changed only PHP and has already merged.

No fix belongs in this PR. Fixing those files is frontend work for whoever owns them. A re-run would fail the same way, so I didn't re-run the job.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (phpcs) and Frontend Check (test:l10n): neither red is from this PR.

  • phpcs: every error is in a file this PR doesn't touch:

    • lib/Db/ImportPreviewRow.php
    • lib/Db/RuleRun.php
    • lib/Db/EntityRelation.php
    • lib/Db/CaseItem.php
    • lib/Db/MagicMapper/MagicObjectSearchInterface.php
    • lib/Service/Flow/FlowTokenRouter.php
    • lib/Service/Object/SaveObject/RelationCascadeHandler.php
    • lib/Service/ContractBindings.php

    Most are lines over 150 characters. Running phpcs on the files this PR changes reports no errors.

  • test:l10n: this PR changes no frontend strings. Development is already known to be red here: src/ uses 17 keys that en.js doesn't have yet (see CLAUDE.md, "Known state").

Both checks also failed on #7561, which changed only PHP and has already merged. Neither fix belongs in this PR, and a re-run would fail the same way.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Frontend Check (test:l10n:parity): this red is not from this PR either.

This PR doesn't touch l10n/ or src/. The same check failed on #7561, which changed only PHP and has already merged. A re-run would fail the same way.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (phpstan): this red is not from this PR.

phpstan reports 24 errors. All of them are in files this PR doesn't touch:

  • BackgroundJob/FileTextExtractionJob.php
  • Controller/EndpointsController.php
  • Controller/Support/RegisterStatistics.php
  • Controller/TaskNotesController.php
  • Controller/WebhooksController.php
  • Db/Tenancy/TenancyIdentityTrait.php
  • Notifications/Controller/NotesController.php
  • Search/Service/GraphQL/GraphQLService.php
  • Service/Flow/FlowService.php
  • Service/Import/ImportPreviewService.php
  • Service/Integration/BuiltinProviders/NotesProvider.php
  • Service/Task/TaskSequenceService.php

None of the files this PR changes appear. The same check failed on #7561, which changed only PHP and has already merged. A re-run would fail the same way.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Frontend Check (format): this red is not from this PR.

This PR changes no frontend files. The same check failed on #7561, which changed only PHP and has already merged. A re-run would fail the same way.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (psalm): this red is not from this PR.

Psalm reports 60 errors, mostly in files this PR doesn't touch. The worst is Db/FindLinksByObjectUuidTrait.php with 15.

The one error that reaches this PR's area is ContractBindings.php:610 (InvalidConstantAssignmentValue on BINDINGS). The same error appears on #7561's psalm run, and #7561 adds no bindings. #7561's run also reports exactly 60 errors, the same count as here, so the two bindings this PR adds bring no new psalm error.

The same check failed on #7561, which has already merged. A re-run would fail the same way.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (phpmd): this red is not from this PR.

phpmd reports findings in 348 lib/ files. None of them is a file this PR changes or adds. The only mentions of this PR's areas are composer's PSR-4 notices about existing test classes, and those are not phpmd findings.

The same check failed on #7561, which has already merged. A re-run would fail the same way.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / Hydra Gates: this red is not from this PR.

Seven gates fail, and #7561 (already merged) failed exactly the same seven with the same counts:

Gate Check Findings
3 stub-scan 1
7 no-admin-idor 113
12 nc-input-labels 1
17 redundant-controller 1
40 form-label-association 1
46 spec-anchor-existence 2
49 controller-exception-translation 19

Gate 46 also reports two unresolved targets on #7561, which added no @spec tags. Both targets this PR's tags point at do exist:

  • openspec/specs/schema-migration/spec.md
  • openspec/changes/configuration-as-a-deployment/specs/configuration-deployment/spec.md

A re-run would fail the same way.


Generated by Claude Code

@rubenvdlinde
rubenvdlinde merged commit 99d18aa 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 @ 20dd8b2

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:30 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