Repository navigation
[access] test(rbac): cover reach revocation, deny matching, run locks, party links and token grant edges - #7578
Conversation
Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
…) fallback Assisted-by: ClaudeCode:claude-opus-5-5
…eal masking Assisted-by: ClaudeCode:claude-opus-5-5
…eporting Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
…fier guards Assisted-by: ClaudeCode:claude-opus-5-5
…ng and refusal texts Assisted-by: ClaudeCode:claude-opus-5-5
… and lapse edges Assisted-by: ClaudeCode:claude-opus-5-5
…oments and undated entries Assisted-by: ClaudeCode:claude-opus-5-5
|
CI note: Newman API Test Suite is red on dadff4a (job). The failure does not come from this PR. These tests fail, the same set as on #7517 and #7546:
This PR adds or changes none of them, and none of its ten new test files shows up in the failures. This PR contains no fix for them. I could not re-run the job from this session. Generated by Claude Code |
|
CI note: quality / Vue Quality (eslint) fails on dadff4a (job), but the failure is in existing frontend files under The same No fix is ported here, because those files are outside this test-only lane. I could not re-run jobs from this session. Generated by Claude Code |
Quality Report — ConductionNL/openregister @
|
| 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 | ❌ 49082/49092 · 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:32 UTC
Download the full PDF report from the workflow artifacts.
Covers ten access, lock, party and tenancy classes from lane T03 (round t1, SIG test coverage). Each new test file fills in the branches the existing tests leave out: failures, fallbacks and refusals.
What is covered (new test files only, before = CI clover on development 30fbb6d)
lib/Service/Rbac/ReachRevocationService.php(92/123) →ReachRevocationServiceFailureTest: covers every source failing (schemas, derived, delegations) withfailedfilled per source and attribution tosystemwith no session; a schema update failing per schema, with empty and untouched schemas left unwritten; a forget failure and a delegation update failure recorded next to a successful revoke.lib/Service/Rbac/PrincipalReachService.php(95/119) →PrincipalReachServiceDegradedSourcesTest: covers every source failing (an empty, zeroed listing, each failure logged); a schema with no actions is skipped; a provenance failure keeps the grant withgrantedBy: null; derived grants are listed; no account means no group lookup.lib/Service/TenantLogRedactor.php(66/75) →TenantLogRedactorFailSafeTest: covers no app config, a counter that cannot be read or written (the line is still dropped), the counter incrementing, andredact()returning the failure marker instead of the raw payload.lib/Service/Rbac/AggregateVisibility.php(38/46) →AggregateVisibilityRevealTest: coversmayReadOnSomeRow(an ungoverned property, the rule's answer, a missing or throwing rule failing closed),isMaskedExplicit(masked unless trusted, other properties, no schema, no reveal service), and partitioning of explicit-reveal values.lib/Service/Rbac/DenyEntryMatcher.php(32/38) →DenyEntryMatcherTest: covers string and array entries, themcpscope, user prefixing, empty users, and conditional reporting (an empty or non-array match is unconditional).lib/Service/Party/PartyLinkWriter.php(49/57) →PartyLinkWriterFieldsTest: covers display-name preference (declared property, then entity name, then uuid) and e-mail preference (correspondence first, then the general list, otherwise none).lib/Service/Object/RunLockRegistry.php(80/87) →RunLockRegistryFailureTest: covers a blank run that is not recorded, the recorded row's fields, a record or forget failure that is swallowed, a blank-run release, a sweep that skips blank rows but still forgets them, and an unreadable object that is not released.lib/Service/Vocabulary/ConceptDeleteGuard.php(58/63) →ConceptDeleteGuardRefusalTest: covers a concept with no identity, schemas that cannot be listed, holder sampling capped at 10 while the total stays complete, and both refusal texts with their fallbacks.lib/Service/Rbac/TokenGrantValidator.php(41/45) →TokenGrantValidatorRefusalTest: covers an unreadable end date, a non-list axis, rate-limit bounds, and the edges of the lapse warning (no end date, already lapsed, today, a negative window). The clock is fixed.lib/Service/Rbac/ObjectAccessHistory.php(50/54) →ObjectAccessHistoryEdgeTest: covers malformed change payloads, undecodable blocks, a blank or unreadable moment, and an undated change passed over, with that change named as the later change. Every timestamp carries an explicit UTC offset.What ran
vendor/bin/phpunit -c phpunit.xml tests/Unit/Service/Rbac tests/Unit/Service/Object tests/Unit/Service/Party tests/Unit/Service/Vocabulary: 5308 tests, 0 failures, 1 pre-existing skip.origin/developmentbefore opening.weak.phpflags none of these tests.After: coverage was not measured. No coverage driver could be installed in this sandbox: there is no pcov or xdebug package, and building one from source was not permitted. CI's coverage job will report the new numbers.
Mutation samples (each applied by hand, tests went red, reverted, never committed)
One sample at
ObjectAccessHistory.php:114(dropping the$change['at'] === nullcheck) did not fail. It is equivalent:strtotime('')already returns false and takes the same branch. It was replaced by the sample at line 147.Left
lib/Service/OrganisationUsageService.php'sapcuAvailable()andapcuFetchInt()call APCu directly, and this sandbox has no APCu extension, so they are (c). That file is not part of this PR.Tests written with Claude Code.
Generated by Claude Code