Skip to content

refactor(objects): the bulk validate and vectorization routes in units of 15 lines or fewer - #5856

Merged
rubenvdlinde merged 4 commits into
developmentfrom
sig/r2-ctl3-bulk-routes
Nov 6, 2026
Merged

rubenvdlinde merged 4 commits into
developmentfrom
sig/r2-ctl3-bulk-routes

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Needs #5842 first (gate 122 reads these units only from there on).

The bulk routes of ObjectsController in units of at most 15 NLOC.

  • validate() (91 NLOC) reads a Support\ValidationWindow (register, schema, limit, offset), refuses an incomplete one, and leaves the work to validatedChunk(), validationCounts(), validationResponse() and validationFailureResponse(). The counts in the log line and in the answer now come from one place.
  • vectorizeBatch() (25) and getObjectVectorizationStats() (23) only lose their one-key-per-line arrays.

Behaviour worth knowing, kept as it is and pinned: the file imports OCP\DB\Exception, so catch (Exception $e) in these three routes catches database failures only. Any other failure leaves the route. ObjectsControllerBulkRoutesGoldenTest::testOtherFailuresLeaveTheRoutes records that. Whether the routes should answer every failure is a separate, visible change.

Pinned by ObjectsControllerBulkRoutesGoldenTest, 19 recorded cases plus that test, on the old code in the first commit, with every parameter read, service call and log line (without file and line). The fixture is unchanged afterwards.

Capped mutants: 13 of 13 killed.

Params 3+ in the class: unchanged. All new helpers take at most 2.

Checks: every unit test file naming ObjectsController (936 tests) under pcov with --fail-on-risky, touched-file phpcs, phpmd, phpstan and psalm clean. Gate 122 ratchet against #5842: 0 findings in 10 changed units. Gate 119: 0.

AI-assisted (Claude Code).

The sequence in `<object?>` ended the PHP block for lizard, so gate 122
read none of the 74 units below counts(). Those units are measured from
here on.

Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
…s of 15 lines or fewer

ValidationWindow carries the register, schema and chunk of a request.

Assisted-by: ClaudeCode:claude-opus-5-5
…her Support imports

Assisted-by: ClaudeCode:claude-opus-5-5
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ a19df1d

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 ✅ ✅ 165/165
npm ✅ ✅ 640/640
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ❌ 34124/34125 · 18 skipped
Newman ❌ 1628/1630
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-06 00:53 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit cae7fad into development Nov 6, 2026
39 of 49 checks passed
@rubenvdlinde
rubenvdlinde deleted the sig/r2-ctl3-bulk-routes branch November 10, 2026 09:47
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.

1 participant