Repository navigation
[access] refactor(service): RetentionPass for processActivity, generateJWT from the configuration - #8428
Merged
Conversation
…tion pass Assisted-by: ClaudeCode:claude-opus-5-5
…m the configuration ADR-011 Rule 2: processActivity() takes the activity and a RetentionPass (reference time and dry-run flag); generateJWT() takes the payload and the auth configuration and derives the key and header from it. Assisted-by: ClaudeCode:claude-opus-5-5
generateJWT resolves the key first again, so an unsupported or non-string algorithm is refused with BadRequestException rather than a TypeError from the header. A test pins that. Assisted-by: ClaudeCode:claude-opus-5-5
…erfacing RetentionPass is reapplied on main's split processActivity helpers; the retention pass test builds the guard through ArchivalSchemaLookup as main now requires. Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
Contributor
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-newman-route-ratchet | ✅ | ||||
| composer | ✅ | ✅ 169/169 | |||
| npm | ✅ | ✅ 639/639 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ✅ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ 56758/56774 · 27 skipped (worst of 3 legs: PHP 8.3, NC stable33, pgsql; counts from 3 of 8 legs) | ||||
| Newman | ❌ | ||||
| Playwright | ❌ 237/324 · 5 skipped · 164 did not run | ||||
| Hydra gates | ❌ |
Quality workflow — 2026-11-13 23:22 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lane S15, round 12 wave S: unit interfacing in
lib/Service(ADR-011). Touches the retention path, hence[access].What changed
AvgRetentionService::processActivity()(3 → 2): the reference time and the dry-run flag of one pass travel asRetentionPass(new final value object beside the service, 2 public readonly fields, named after the operation).runRetentionPass(bool $dryRun = false)keeps its signature (it is theAvgRetentionPassInterfacecontract) and builds the object on its first line. Erase / withhold outcomes are unchanged: the legal-hold and clock checks still run before any soft delete, in the same order.AuthenticationService::generateJWT()(4 → 2): takes the payload and the auth configuration and derives the signing key and the protected header from it, the wayfetchJWTToken()did before calling it. Same header (alg,typ, optionalx5t), same key, same exceptions.AvgRetentionPassGoldenTest(new, committed before the change, green on the old code) pins a dry run (matched, nothing erased, nothing withheld), a real run's per-activity report, and the skip of an activity without a usable bewaartermijn. Mutation check: flipping the dry-run condition fails 3 of its 4 tests. The existing legal-hold tests (allowed and refused outcomes) stay green unchanged. The three reflection tests ofgenerateJWTpass the configuration instead of a prebuilt key.What ran
AvgRetentionServiceLegalHoldTest+AvgRetentionPassGoldenTest(8),AuthenticationServiceTest(53): OK.php -l, phpcs (0 errors; inherited class@specwarnings), phpstan (no errors) on touched files.Left (S15, lib/Service)
AvgRetentionService::__construct(6p), reason (e): it holds two refusal guards that stay direct parameters (ArchivalRetentionGuard,RetentionClockService), and its other collaborators (db, processing-activity mapper, object mapper, logger) form no capability aggregate with three consumers in this lane's files.AuditHashService,AppRegisterImportRunner,CospendLinkServiceconstructors (4p), reason (e): no three-consumer aggregate over their collaborators in this lane's files.CospendLinkService::linkBill()/createAndLinkProject(), reason (a): ADR-019 link-service facade called fromCospendLinksController; both are already delegates of one or two lines to value-object methods.AI disclosure: prepared by Claude Code (claude-opus-5-5) for lane S15; reviewed by the human who merges it.