Skip to content

[access] test(gdpr): cover the locked-note refusal and erasure bucket membership - #7627

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

rubenvdlinde merged 1 commit into
mainfrom
cloud/t02-small

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What this covers

File Before (CI clover, development 30fbb6d) After
lib/Exception/NoteLockedException.php 5/6 6/6 (100%, subset run)
lib/Service/Gdpr/Erasure/ErasureBucket.php 5/6 line 169 (isMember), the one CI left uncovered, is now executed; the remaining statements were already covered in CI
  • NoteLockedExceptionTest: 423, message, note id and cause.
  • ErasureBucketMembershipTest: the three buckets are members; another case, null, empty and a kind name are not.

What ran

php -d pcov.enabled=1 -d pcov.directory=lib vendor/bin/phpunit -c phpunit.xml --no-progress --coverage-clover /tmp/t02z.xml <the 2 new files> → OK (3 tests, 11 assertions); clover_files.py on the T02 file list (subset run). Weak-test scanner reports nothing for these files. php-cs-fixer applied.

Mutation samples (each reverted, never committed)

  • mutation: lib/Exception/NoteLockedException.php:80 return $this->noteId -> return 0 -> 1 test failed
  • mutation: lib/Service/Gdpr/Erasure/ErasureBucket.php:169 in_array(...) -> !in_array(...) -> 2 tests failed

No production code changed. Tests written with Claude Code.


Generated by Claude Code

@rubenvdlinde
rubenvdlinde changed the base branch from development to main November 9, 2026 06:51

Copy link
Copy Markdown
Contributor Author

Newman API Test Suite (api-test-coverage) is red, but not because of this PR.

The failures are 11 errors and 11 failures across seven test classes that this PR does not touch:

  • A18InterfaceBindingsTest
  • TextExtractionJobsGoldenTest
  • EndpointsControllerAnswersGoldenTest
  • JobRunMapperNarrowGoldenTest
  • SchemaConfigValidatorsGoldenTest
  • FileVersioningHandlerGoldenTest (Cannot declare class OCA\Files_Versions\Versions\IVersionManager)
  • ProcessingLogServiceGoldenTest

This PR only adds two test files (locked-note refusal, erasure bucket membership). The same seven classes fail in this workflow on every other open cloud/* PR I checked, for example cloud/k41-view-styles. The latest completed run of this workflow on all 25 most recent branches has concluded failure.

On development (732e0ed), those classes pass when run on their own (67 tests). That points at the full-suite run in this job, not at any one change. No fix exists yet. Fixing it means touching those tests, which belong to other lanes, so I am not widening this PR. I have not re-run the job: the failure is the same on every branch, so a re-run would not tell us anything new.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

The quality checks that are failing or will fail here are inherited from development. This PR adds only PHPUnit test files.

Frontend Check (test:l10n) failed here (14 keys missing from en.js, recorded in CLAUDE.md as red at development). This PR changes no file under l10n/ or src/.

I have traced the other quality checks on #7555, which has the same kind of diff (new PHPUnit test files only, under tests/Unit/). They fail there on existing code this PR does not touch:

  • test:l10n: 14 keys missing from en.js. CLAUDE.md already records this as red at development.
  • test:l10n:parity: locale bundles.
  • eslint: 769 problems in existing JS.
  • phpcs, phpstan, psalm and phpmd: findings in existing lib/ files, including stale psalm baseline entries.
  • Frontend Tests (unit): src/components/shared/refreshButton.spec.js.
  • Hydra Gates (forced full-repo run): controller and Vue gates.

When these checks fail here the same way, I will not add a comment per check. The details and log excerpts are in the comments on #7555. The lane rules forbid me from changing production, frontend or locale code in a test-only PR. No fix exists yet.


Generated by Claude Code

@rubenvdlinde
rubenvdlinde merged commit 93a5365 into main Nov 9, 2026
36 of 49 checks passed
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 2ee1a1b

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 20:36 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