Skip to content

refactor(aangeboden-gebruik): split the koppelingen lookup by uuid into access, query and search steps - #1404

Merged
rubenvdlinde merged 3 commits into
developmentfrom
refactor/sig-koppelingen-gebruik-params
Nov 3, 2026
Merged

rubenvdlinde merged 3 commits into
developmentfrom
refactor/sig-koppelingen-gebruik-params

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

REVIEW (access): held for a reviewer. Lane SQ3, SIG unit interfacing in stackiq.

AangebodenGebruikService::getKoppelingenGebruikByUuid was one 161-line unit with three parameters and the access check inline. It keeps its signature and error envelope; the work moves into koppelingenGebruik, mayReadKoppelingen (an ambtenaar, or the caller's active organisation owns the object behind the uuid), searchKoppelingen, isOrganisationUuid and emptyKoppelingenPage, each with at most two parameters. The order of lookups (including the organisation lookup that also runs for an ambtenaar), log lines and results are unchanged.

What to check: mayReadKoppelingen grants exactly what the old inline block granted; an organisation option only filters for an ambtenaar.

Numbers (PHP, lizard): getKoppelingenGebruikByUuid 161 LOC / 3 params to 21 LOC / 3 params; the new units are 37 LOC or less with at most 2 params. Together with the batch PR and the organisation sync PR params >=3 lands at 14.97% (limit 15%).

Golden: AangebodenGebruikKoppelingenGoldenTest, recorded on the old code. 20 cases; the acting organisation comes from the session and the doubles only grant ownership to it. Cases include a forged organisation option from a non-ambtenaar, no session, no active organisation, a failing organisation lookup, a failing or empty ownership lookup, organisation and module uuids, and a failing search.

Mutants (capped, control survived): 12 of 12 killed, among them ambtenaar not granted, owner check weakened to "has an owner", no organisation granted, a failed lookup granting access, the filter applied for anyone, and the organisation lookup moved after the ambtenaar check.

Debt fixed: class @spec tag (phpcs warning).

Verification: golden plain re-run green on old and new; development merged in; touched tests (54 AangebodenGebruik tests) green under pcov --fail-on-risky; full unit suite under pcov on this branch combined with the organisation sync PR: 1591 tests, exit 0 (before the last development merge); on the final tree with the batch PR and development merged: 1631 tests, exit 0, lint 0 errors, gates 37 of 37 applicable 0 FAIL; phpcs, phpstan, psalm, phpmd clean on the touched file.

This PR was prepared with AI assistance (Claude Code).

…acting organisation pinned

Assisted-by: ClaudeCode:claude-opus-5-5
…to access, query and search steps

getKoppelingenGebruikByUuid keeps its signature and its error envelope; the work
moves into koppelingenGebruik, mayReadKoppelingen (ambtenaar, or the active
organisation owns the object), searchKoppelingen, isOrganisationUuid and
emptyKoppelingenPage, each with at most two parameters. Order of the lookups,
the log lines and the results are unchanged (golden of the previous commit).

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

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/stackiq @ f394939

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-vue-demi ✅
test-l10n ✅
format ❌
check-schema-l10n ❌
check-l10n-js ✅
composer ❌ ✅ 127/127
npm ❌ ✅ 807/807
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ❌ 1546/1552 · 24 skipped
Newman ⏭️
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-03 16:57 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit 8946d70 into development Nov 3, 2026
43 of 50 checks passed
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