Repository navigation
[access] test(rbac): cover grant fit, reveal masking, lock, audit and read-access classes - #7546
Conversation
…rizationWriter and AccessLinkActs Assisted-by: ClaudeCode:claude-opus-5-5
… path Assisted-by: ClaudeCode:claude-opus-5-5
…isions Assisted-by: ClaudeCode:claude-opus-5-5
…k pairing Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
…okups Assisted-by: ClaudeCode:claude-opus-5-5
|
CI note: Newman API Test Suite is red on 00cf58d (job), and the failure is not this PR's. The failing tests are the same set that fails on #7517: No fix for this exists in this PR. I could not re-run the job from this session. Generated by Claude Code |
|
CI note: quality / Frontend Tests (unit) is failing on 00cf58d (job), but not because of this PR. One jest suite fails to run: Generated by Claude Code |
|
CI note: quality / Vue Quality (eslint) is failing on 00cf58d (job). The failure is not from this PR's changes. ESLint reports problems in existing frontend files under Generated by Claude Code |
|
CI note: quality / Frontend Check (format) is failing on 00cf58d (job). The failures are not in this PR's files. Prettier flags existing frontend files under Generated by Claude Code |
|
CI note: quality / Frontend Check (test:l10n) is red on 00cf58d (job). The cause is outside this PR: 14 keys used in To avoid one comment per check: #7517 runs the same quality matrix from the same 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 | ❌ 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 16:33 UTC
Download the full PDF report from the workflow artifacts.
Covers nine access, audit and lock classes from lane T03 (round t1, SIG test coverage). Five of them had no coverage at all.
What is covered (new test files only)
lib/Service/Rbac/GrantRuleFit.php(was 0/42) →tests/Unit/Service/Rbac/GrantRuleFitTest.php. Covers: role entries and entries with no match are unconditional; a static clause the record satisfies vs. one it fails; values that read the caller ($userId,$organisation.x,$memberOf, nested operands) are relative and never evaluated; lookalike strings stay static; principal typing (user:prefix, user entry alone or in a holder list, pseudo principals, groups).lib/Service/Rbac/ExplicitRevealChangeMask.php(was 0/13) →ExplicitRevealChangeMaskTest.php. Covers: plain scalar, array, null, both diff sides, a null side.lib/Service/Rbac/ObjectAuthorizationWriter.php(was 0/12) →ObjectAuthorizationWriterTest.php. Checks it is a single-column UPDATE of_authorizationon the row with this_uuidin the right table, and that a block with no scope logs a null scope.lib/Service/Sharing/AccessLinkActs.php(was 0/17) →tests/Unit/Service/Sharing/AccessLinkActsTest.php. A comment is written as the link with public visibility; an upload is stored withshare: false.lib/Service/Object/AuditHandler.php(was 0/45) →AuditHandlerTest.php. Covers: defaults; only known, non-empty filters pass through, and a caller-suppliedobject_uuidcannot replace the binding; empty values are dropped; a mapper failure is logged and rethrown.lib/Service/Object/LockAuthorization.php(was 23/51) →LockAuthorizationBehaviourTest.php. Covers: the update-permission check on lock; no session; break is admin-only; the holder, admin and owner may release; a run lock is never released by an owner; manage-rule groups as an id or{group}; every missing-rule path refuses (no or empty schema id, unreadable schema, no authorization, nomanage, groups backend failure).lib/Service/Rbac/StoredRuleBlocks.php(was 15/39) →StoredRuleBlocksTest.php. Covers: the stored schema and register rows (table, id and type bound), undecodable columns, a missing row, no id / no connection, and property block pairing with the stored copy.lib/Service/Task/Authorization/FailClosedGroups.php(was 7/22) →tests/Unit/Service/Task/Authorization/FailClosedGroupsTest.php. Covers: a working backend, an empty group id, a throwing backend failing closed, no backend.lib/Service/Object/ObjectReadAccess.php(was 18/32) →ObjectReadAccessBehaviourTest.php. Covers: an ambiguous identifier is surfaced byreadableOrAmbiguousand swallowed byreadable; a missing object;schemaOf,registerIdOfand thenotReadable404.What ran
Each file with
vendor/bin/phpunit -c phpunit.xml <file>: 51 tests, 0 failures. Merged with currentorigin/developmentbefore opening.weak.phpreports none of these tests.Numbers
Before: the CI clover on development 30fbb6d, per file above.
After: coverage not measured. No coverage driver could be installed in this sandbox: there is no pcov/xdebug package, and building one from source was not permitted. CI's coverage job will report the new number.
Mutation samples (each change applied by hand; the tests went red; reverted, never committed)
oldside of a diff masked -> 2 tests failed_uuidchanged touuid-> 1 tests failedLeft
lib/Service/Rbac/EffectiveAuthorization.phphas no new test.EffectiveAuthorizationGoldenTest, which landed on development after the baseline, already pins every branch, so a new test would only duplicate it.LockAuthorization::mayManageSchema(): the admin branch and the null-user branch cannot be reached.mayUnlock()has already returned for an admin or a missing session before it gets there. This is a finding (b), not a gap in the tests.Tests written with Claude Code.
Generated by Claude Code