Repository navigation
[access] refactor(merge): survivorship resolvers and MergeService take their value objects and bundles - #7566
Conversation
…urceFreshness resolveTier(entityType, attribute, sourceSystem, trustRows, asOf) now takes the TrustTuple it already built internally; applyFreshnessDecay(tier, tierOrder, decayDays, anchor, asOf) takes a SourceFreshness (decay window, anchor, reference instant), which hasDecayed reads too. Behaviour unchanged: the existing branch goldens pin both methods and pass unedited apart from the call shape. Assisted-by: ClaudeCode:claude-opus-5-5
… MergeService bundles its collaborators SurvivorshipResolver::resolveGoldenRecord(entityType, sourceRecords, config, trustRows, trustResolver, asOf, overrides) now takes the SurvivorshipTrustLookup it already built from four of those values. Both callers (MergeService, SurvivorshipRecomputeListener) build it. MergeService's nine-argument constructor keeps the object path and the property-read guard direct and takes two autowired bundles: MergeSurvivorshipServices (schema lookup + the three resolvers) and MergeReportingServices (event, audit, log). recomputeSurvivor and fieldChoices take a MergePair (both objects, schema, merge annotation); fieldChoices reads the payloads and survivorship block from it, which are the same values both callers passed before. Assisted-by: ClaudeCode:claude-opus-5-5
# Conflicts: # tests/Unit/Service/Survivorship/SurvivorshipBranchesGoldenTest.php
|
Newman API Test Suite: red, and not caused by this PR.
No fix for these failures exists on Generated by Claude Code |
|
This PR changes nothing under The two checks fail on catalogue state that this PR inherits from
No fix for either exists yet, so there is nothing to port into this PR, and adding l10n work would widen it beyond its scope. Generated by Claude Code |
|
No formatting fix for those files exists yet, so there is nothing to port into this PR, and reformatting them here would widen it. Generated by Claude Code |
|
None of the findings in these checks names a file this PR changes:
Locally, Generated by Claude Code |
|
CI runs the gates over the whole tree ( To check what this PR itself adds, I ran No fix exists for the tree-wide findings yet, and fixing them here would widen this PR well beyond its scope. Generated by Claude Code |
|
None of the phpmd findings names a file this PR changes ( No fix exists for them yet, so there is nothing to port into this PR. 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 17:30 UTC
Download the full PDF report from the workflow artifacts.
What changed
Interfacing work (SIG unit interfacing, parameter bands > 4 and > 6) on the survivorship and merge path. Lane K18, round 10c.
TrustTierResolver::resolveTier()takes theTrustTupleit already built inside (5 → 3 params).applyFreshnessDecay()takes a newSourceFreshnessvalue object holding the decay window, the anchor and the reference instant (5 → 3).hasDecayed()reads the same object. The interface follows.SurvivorshipResolver::resolveGoldenRecord()takes the existingSurvivorshipTrustLookup, which it used to build from four of its arguments (7 → 4). Both callers build the lookup:MergeServiceandSurvivorshipRecomputeListener.MergeService::__construct(9 → 4 params): the object path andPropertyRbacHandler(the property-read guard) stay as direct parameters. Two autowiredfinal readonlybundles hold the rest:MergeSurvivorshipServices(schema mapper plus the three resolvers) andMergeReportingServices(event dispatcher, audit trail, logger). The typed properties are assigned one at a time, so no method body changes.recomputeSurvivor()(6 → 3) andfieldChoices()(5 → 2) take aMergePair(both objects, the schema and the merge annotation).fieldChoicesnow reads the payloads and the survivorship block from that pair. Both callers passed exactly those values before: inexecuteMergethe call comes before any payload changes.Behaviour is unchanged. Tests changed only where they build these classes or pin the old call shape, and they use the same values. In the listener golden the callback now takes the lookup and still checks the trust engine type.
What ran
On this branch merged with current
origin/development, together with the lane's other branch:tests/Unit/Architecture,tests/Unit/Contract,tests/Unit/Kernel,tests/Unit/Service/Rules,ControllerServicesWiringTest,ControllerSessionWiringTest,tests/Unit/Service/{Merge,Survivorship,Object},tests/Unit/Listener,tests/Unit/Controller: all green.php -l,phpcs(no new findings) andphpstanon the touched files: clean.Numbers (lane_measure.py, K18)
executeMergealso got 13 lines shorter.executeMergeitself is out of scope: its signature is fixed byKernel/Contracts/ObjectMergerInterface.The
[access]prefix is there becauseMergeServiceholds the property-read refusal and its audit write. Neither moved: the guard is still a direct constructor parameter, and it still runs before any write.Written with AI assistance (Claude Code).
Generated by Claude Code