Skip to content

[access] refactor(object): conflict readings and unique hints take fewer parameters - #7575

Merged
rubenvdlinde merged 1 commit into
mainfrom
cloud/k17-small-params
Nov 9, 2026
Merged

rubenvdlinde merged 1 commit into
mainfrom
cloud/k17-small-params

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Lane K17 (round 10c), SIG unit interfacing.

What changed

  • ConflictReport::readingsFor (5 → 4 params): takes the conflict readings it guards (built by a new static readings(sent, read, stored)) instead of the sent and read values. The canReadProperty check still runs first, and a property the caller may not read still answers only {status: withheld}.
  • UniqueHintChecker::check (5 → 4 params): takes a new UniqueHintScope (register and schema references, mixed as before, so nothing is coerced) instead of two loose references. The scope builds the per-property UniqueHintLookup. The only caller is SaveObject, at its two call sites (create and update).

Tests

  • Access outcomes are pinned by existing tests: ConflictReportTest covers allowed and withheld properties, and UniqueHintCheckerAccessGoldenTest covers visible, hidden and self-excluded holders. Both pass unchanged apart from building the scope.
  • Mutation checks: flipping the canReadProperty branch fails 3 ConflictReport tests, and swapping register and schema in the scope fails the Quality suite.
  • Ran: tests/Unit/Architecture, Contract, Kernel, Service/Rules, ControllerServicesWiringTest, ControllerSessionWiringTest on this branch merged with development (2658 OK); tests/Unit/Service/Quality (194 OK); ConflictReportTest, ObjectsControllerVersionConflictGoldenTest, LockGuardUnitsGoldenTest; the SaveObject tests that stub the checker (SaveCall, UpdatePath, ContainerServices, DefaultValues, ScanForRelations). phpcs and phpstan clean on the touched files.

Numbers (lane_measure K17, this branch alone)

  • Over 4 parameters: 469 → 436 LOC
  • Over 6 parameters: unchanged at 151

AI-assisted: written by Claude Code (Claude) for lane K17.


Generated by Claude Code

…eters

ConflictReport::readingsFor takes the readings it guards instead of the sent and
read values; the read check stays first and still withholds the values of a
property the caller may not read.

UniqueHintChecker::check takes a UniqueHintScope (register and schema
references, untyped as before) instead of two loose references; the scope
builds the per-property lookup.

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

Copy link
Copy Markdown
Contributor Author

The red Newman API Test Suite check does not come from this PR.

The PHPUnit step inside the Nextcloud container fails with 11 errors and 11 failures. None of them are in files this diff touches. The failing tests are:

  • FileVersioningHandlerGoldenTest: "Cannot declare interface OCA\Files_Versions\Versions\IVersionManager", because the container ships that class.
  • JobRunMapperNarrowGoldenTest
  • EndpointsControllerAnswersGoldenTest
  • ProcessingLogServiceGoldenTest
  • TextExtractionJobsGoldenTest
  • SchemaConfigValidatorsGoldenTest
  • SearchReferenceResolverGoldenTest
  • A18InterfaceBindingsTest

The same set fails on unrelated open PRs #7541, #7543, #7538 and #7540. Outside the container these tests pass on plain development. There is no fix yet, and it does not belong in this PR.

The tests this PR changes pass in the same run: ConflictReport, the UniqueHintChecker tests including the access golden, and the SaveObject save-call and update-path tests.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

The two red frontend checks on this PR come from development, not from this PR.

  • quality / Vue Quality (eslint) reports 769 problems (16 errors, 753 warnings) in src/ (for example src/views/search/SearchIndex.vue and src/views/settings/sections/RbacConfiguration.vue) and in one JSON fixture.
  • quality / Frontend Check (test:l10n:parity): most locales lack two keys that en.js already has: "Some objects could not be copied." and "We could not count the objects. Close this window and try again."

This PR changes only .php files under lib/ and tests/. It touches no .vue or .js file and no l10n catalogue, so it cannot change either result. Both findings are already present on development.

No fix exists yet. They need an eslint cleanup and translations of those two keys in every locale (docs/l10n-workflow.md §6.15), which belong in their own PRs.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

The red quality / Frontend Check (format) check is not caused by this PR.

prettier --check "**/*.{js,ts,vue,css,scss}" reports code style issues in 126 files. This PR changes only .php files under lib/ and tests/, none of which match that glob. These files already exist on development.

No fix exists yet. A repo-wide prettier --write belongs in its own PR.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

The red quality / PHP Quality (phpcs) check is not caused by this PR.

phpcs reports 11 errors, all in files this PR does not change:

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

These errors are already on development. The files this PR touches (ConflictReport, UniqueHintChecker, the new UniqueHintScope, SaveObject) are not among them, and they pass phpcs locally.

No fix exists yet, and those files belong to other lanes, so the fix is outside this PR.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

The red quality / PHP Quality (phpstan) check is not caused by this PR.

phpstan reports 24 errors in 12 files, and this PR changes none of them:

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

The errors are mostly calls to methods missing from the narrowed interfaces (NoteServiceInterface::requireNoteOf, ImportPreviewRowMapperInterface::persist, TaskSequenceMapperInterface::update, …) and dead catches. They are already on development. A local phpstan run over every file this PR touches reports no errors.

No fix exists yet. The fixes belong to the lanes that own those files, not to this PR.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

quality / PHP Quality (psalm) is red, but not because of this PR.

Psalm reports 60 errors across 35 files under lib/. This PR changes none of those files. Examples:

  • LessSpecificImplementedReturnType on the *LinkMapperInterface::findByObjectUuid family through FindLinksByObjectUuidTrait, and on EndpointMapper, WebhookMapper and Register::jsonSerialize
  • NullableReturnStatement in CredentialController and AuditTrail
  • InvalidPropertyAssignmentValue in MagicMapper/FacetResults
  • UnusedClosureParam in AppHost/ObservabilityWiring

These errors are already on development, and none touch ConflictReport, UniqueHintChecker, UniqueHintScope or SaveObject.

No fix exists yet. These files belong to other lanes, so the fixes do not belong in this PR.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

The red quality / Frontend Check (test:l10n) check is not caused by this PR.

The gate reports 14 translation keys used in src/ that are missing from l10n/en.js. This PR changes only PHP files under lib/ and tests/, and touches no .vue/.js file or any l10n catalogue. The repository's CLAUDE.md records npm run test:l10n as red at HEAD for this reason (keys added by a development merge without en.js entries).

The fix is a separate en.js change following docs/l10n-workflow.md §6.15, which does not belong in this PR.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

The red quality / PHP Quality (phpmd) check is not caused by this PR.

PHPMD reports 616 findings across lib/. None of them are in the files this PR touches: ConflictReport, UniqueHintChecker, the new UniqueHintScope, and SaveObject. The findings are repo-wide debt that is already on development. The same check is red on #7540 with an essentially identical count.

No fix exists yet, and it does not belong in this PR.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

The red quality / Hydra Gates check is not caused by this PR.

Seven whole-tree gates fail, with the same counts as on the unrelated open PR #7541 and on #7540:

  • gate-3: 1
  • gate-7: 113
  • gate-12: 1
  • gate-17: 1
  • gate-40: 1
  • gate-46: 2
  • gate-49: 19

The diff-scoped gates pass.

This PR changes no controller, so gates 7, 17 and 49 cannot have picked up anything from it. Gates 12 and 40 check Vue files, which this PR does not touch. The one new @spec tag (on UniqueHintScope) uses the anchor UniqueHintChecker already carries, and gate 46 still counts the same 2 findings.

No fix exists yet. These are gate debts already on development and belong outside this PR.


Generated by Claude Code

@rubenvdlinde
rubenvdlinde merged commit d57eb7d 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 @ 7edc3bf

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 17:18 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