Skip to content

[access] refactor(search): the example-set views writer, the index rebuild job and the vector rows stay inside Search - #7447

Merged
rubenvdlinde merged 6 commits into
developmentfrom
cloud/h11-search-hidden
Nov 9, 2026
Merged

rubenvdlinde merged 6 commits into
developmentfrom
cloud/h11-search-hidden

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Lane H11, round 10b (SIG component independence).

What changed

Three files outside lib/Search named concrete Search classes. They now name only an interface or a handle.

  • ExampleSetOwnRowKinds typed its views writer as ExampleSetViews. It now takes ExampleSetViewRowsInterface, which is bound in SearchWiring to ExampleSetViews, so autowiring resolves the same shared writer. The interface's single method, rows(), gives the engine the ExampleSetEngineRows it already drives.
  • OperationsJobsService named SearchIndexRebuildJob::class in its run-now allowlist. It now names SearchJobHandles::SEARCH_INDEX_REBUILD, which is the same string. This follows the lib/BackgroundJob/JobHandles pattern. [access] prefix because this allowlist decides which classes run-now may start; its value is unchanged and pinned.
  • ChunkVectorizationBatch built StoredVector from VectorSubject, VectorPayload and VectorChunkPosition. That same construction moved to ChunkVectorFactory (strict, like its source), reached through ChunkVectorFactoryInterface from the container the batch already reads. The per-batch chunk-count memo stays in the batch.
  • Both new interfaces are bound in SearchWiring::BINDINGS.

Tests

  • Added MaintenanceActionsGoldenTest first, against the old code. It pins the allowlist as literal class strings.
  • H11InterfaceBindingsTest checks that both bindings are present, that each bound class implements its interface, and that the three callers no longer name the hidden classes.
  • SearchRegistrarTest binding count goes from 17 to 19. The existing chunk-vectorization golden passes with the factory registered on its container. The ExampleSetOwnRowKinds and engine-kinds tests set rows() on their ExampleSetViews doubles.
  • Ran on this branch merged with current development: tests/Unit/Architecture, Contract, Kernel, Service/Rules, Controller (including the ControllerServices and ControllerSession wiring tests), Search, Service/ExampleSet, Service/Operations, BackgroundJob and Files. All green. php -l, phpcs (pre-existing @SPEC warnings only) and phpstan are clean on the touched files, including the unchanged ExampleSetEngineKinds.

Numbers (lane_measure, H11, all lane branches merged)

  • Exposed LOC of the lane's target classes: 873 before, 596 now (target ≤ 597). ExampleSetViews (182), SearchIndexRebuildJob (32), StoredVector (30), VectorChunkPosition (11), VectorPayload (11) and VectorSubject (10) are now hidden.

AI-assisted: this change was written by Claude Code (an AI agent), working the H11 lane brief.


Generated by Claude Code

… and the vector rows stay inside Search

Outside lib/Search, three files named Search classes:

- ExampleSetOwnRowKinds typed its views writer as ExampleSetViews. It now
  takes ExampleSetViewRowsInterface (bound in SearchWiring to ExampleSetViews,
  so autowiring resolves the same writer), whose rows() hands the engine the
  ExampleSetEngineRows it already drives.
- OperationsJobsService named SearchIndexRebuildJob::class in its run-now
  allowlist. It now names SearchJobHandles::SEARCH_INDEX_REBUILD, the same
  string (pinned as a literal by MaintenanceActionsGoldenTest, added first).
- ChunkVectorizationBatch built StoredVector from VectorSubject, VectorPayload
  and VectorChunkPosition. The same construction moved to ChunkVectorFactory
  (strict, as its source), reached through ChunkVectorFactoryInterface from
  the container the batch already reads; the per-batch chunk count stays in
  the batch.

SearchRegistrarTest counts the bindings: 17 to 19. H11InterfaceBindingsTest
pins both bindings and that the three callers no longer name the classes.

Assisted-by: ClaudeCode

Copy link
Copy Markdown
Contributor Author

Newman API Test Suite (api-test-coverage) failed, but this PR did not cause it.

  • The job runs the unit suite inside the Nextcloud container. It fails on 22 tests:
    • JobRunMapperNarrowGoldenTest and FileVersioningHandlerGoldenTest (mocks of methods the container's OCP version does not have)
    • A18InterfaceBindingsTest, TextExtractionJobsGoldenTest, EndpointsControllerAnswersGoldenTest, SchemaConfigValidatorsGoldenTest and ProcessingLogServiceGoldenTest
  • None of these tests, or the classes they cover, are touched by this diff.
  • The same workflow is red on recent development pushes (runs 42533234657, 42533226999, 42533218532) and on the other open lane PRs.
  • All 7 failing test files pass locally at this head (91747e1) and at current development (75 tests).

No fix exists yet. It belongs in its own PR, not this one. I could not re-run the job from this session.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / Frontend Check (format) and quality / Vue Quality (eslint) failed, but this PR didn't cause it. Both checks look only at frontend code (src/, tests/unit/). This PR changes no file there: its diff is PHP under lib/ plus PHPUnit tests. The same checks fail on #7444, whose diff is PHP-only as well. There, format reports Prettier issues in 116 files under src/ and tests/unit/support/, all already on development. The fixes belong in their own frontend PRs. I could not re-run the jobs from this session.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Three more frontend checks failed: quality / Frontend Tests (unit), Frontend Check (test:l10n) and Frontend Check (test:l10n:parity). This PR didn't cause them.

These checks look only at src/, l10n/ and the JS tests, and this PR changes nothing there.

test:l10n is listed in the repo's CLAUDE.md as already red at HEAD: keys used in src/ are missing from en.js. On #7444, which also changes PHP only, it names strings from MassValidateObjects.vue and LLMConfigModal.vue.

The fixes belong in their own frontend and l10n PRs. I couldn't re-run the jobs from this session.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (phpstan) failed, but this PR didn't cause it. It reports the same 24 errors as on #7444, in the same 12 files. None of those files are in this diff:

  • 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

This PR's own files raise nothing. The fix belongs in its own PR against development.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (phpcs) failed, but this PR did not cause it. It flags the same 8 files as on #7444, none of which this diff touches: Service/ContractBindings.php, Db/CaseItem.php, Service/Object/SaveObject/RelationCascadeHandler.php, Db/RuleRun.php, Db/EntityRelation.php, Db/MagicMapper/MagicObjectSearchInterface.php, Service/Flow/FlowTokenRouter.php and Db/ImportPreviewRow.php. Most are lines over the 150-character limit. No file in this PR is flagged. The fix belongs in its own PR against development.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (psalm) failed, but this PR didn't cause it. It reports 54 errors in 32 files, the same failure as on #7444. That includes type mismatches in CacheHandler.php, DbalAggregator.php and OAuth2TokenSet.php, plus stale baseline entries for TaskService.php and CalendarEventService.php. None of the 32 files is among the 9 production files this PR changes (I compared the two lists). The fix belongs in its own PR against development.


Generated by Claude Code

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 433778a

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 01:38 UTC

Download the full PDF report from the workflow artifacts.

…hunk entity

forChunk() now takes the chunk's source type and id, index, text and
offsets, so lib/Search no longer names OCA\OpenRegister\Files\Db\Chunk
and the H15 guard holds. The vector row it builds is unchanged.

Assisted-by: ClaudeCode:claude-opus-5-5
The chunk's source type and id, index, text and offsets travel in one
readonly ChunkVectorSource owned by the Search vectorization code, so
forChunk() takes three parameters instead of eight. It still does not
name the Chunk entity, and the vector row it builds is unchanged.

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde merged commit 2b9263e into development 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 @ 7d19306

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 ❌ 49041/49051 · 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-09 07:16 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