fix(adr-084): the two AmendmentOrderService call sites #506 did not reach - #507
Merged
Conversation
… signatures decidesk's E2E job went from 3 failed / 117 passed to 13 failed / 107 passed when #495 (`refactor/adr-084-type-hint-the-contract`) merged at 08:46 today. The SKIP COUNT is 58 on both sides, so the ten extra failures are a regression, not a skip shuffle, and their messages are backend 500s seen through the browser: seeded chair must be allowed to open (got 500) show-of-hands tally should not 500 unauthorized open must be 403 The refactor replaced `ContainerInterface $container` with `ObjectServiceInterface $objectService` in constructor SIGNATURES, but not in the constructor BODIES that use `$container` to build collaborators, nor at the call sites. Eleven of those, in seven files, are hard runtime fatals: `$container` is an undefined variable in four constructors, and six `new X(...)` calls pass a parameter the target no longer has or omit one it now requires. `VotingRoundOpener` and `PublicationService` are the two the failing E2E tests walk through — hence the 500s on opening a voting round, tallying, and withdrawing or rectifying a published decision. Repairs, each the completion of #495 rather than a revert of it: - McpMeetingScopeResolver: took the container only to fetch ObjectService, so it now takes the contract. That removes McpMeetingGate's need for a container entirely. - McpMeetingGate / McpActionItemTools / McpMeetingTools / DecideskToolProvider: pass `objectService` down; drop the `container` argument where the target no longer declares one. - MotionService, VotingRoundOpener, VotingRoundResults: pass `objectService` to the collaborator that now requires it. - PublicationService: the container existed only to reach the repository, which no longer wants one — replaced by the contract. - TranscriptionService and VoteCastingService: their collaborators are now INJECTED rather than hand-built. Re-adding a container to feed them would have restored a service locator ADR-084 is removing AND pushed CouplingBetweenObjects to the phpmd threshold; injection removes both and drops the parameters that existed only to feed the collaborators. - MotionForwardingService::forward(): `saveObject()` now returns an `ObjectEntityInterface`, so `$created['id']` was array-indexing an object and `forwardMotion(): array` would have TypeError'd on it. Both were invisible while the container returned `mixed`. Reads `getUuid()` / `getObject()`. - ActionItemWriter: the promoted `$container` is dead after #495 rewired it to typed TaskService / RegisterMapper / SchemaMapper. - psalm.xml: `OCA\OpenRegister\Service\TaskService` joins the existing cross-app UndefinedClass list its siblings RegisterMapper, SchemaMapper, FileService and ObjectService are already on. Measured with each tool's own command, in a php:8.3-cli container, same vendor tree for every run: | check | pre-#495 b05a1fd | base f3a1df8 | this branch | |--------------------|-------------------|---------------|-------------| | phpstan | 0 | **29** | **0** | | psalm | 0 | **21** | **0** | | phpmd | 0 | **16** | **5** | | PHPUnit errors | 0 | 222 | 217 | | PHPUnit failures | 0 | 25 | 27 | | broken tests total | 0 | 247 | 244 | 207 lib files scanned. The five remaining phpmd findings are all `CouplingBetweenObjects = 13`, all present on the base, all caused by #495 adding one type to a class that already sat at 12 — no new finding is introduced here. NO test that passes on the base fails on this branch: the two that move from `error` to `failure` are the same two tests, and the deeper defect the ArgumentCountError was masking is #495's test migration replacing store-backed fakes with hollow `createMock(ObjectServiceInterface::class)` doubles. That test-side debt is ~244 tests across ~50 files and is NOT fixed here.
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
August 16, 2026 10:58
Contributor
Quality Report — ConductionNL/decidesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ❌ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 104/104 | |||
| npm | ✅ | ✅ 532/532 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ❌ | ||||
| Newman | ✅ | ||||
| Playwright | ❌ | ||||
| Hydra gates | ❌ |
Quality workflow — 2026-08-16 11:51 UTC
Download the full PDF report from the workflow artifacts.
…s it missed decidesk#506 (fix/mcp-chain-lost-the-object-service) landed the same ADR-084 call-site repair this branch was carrying, and it landed first. Every file this branch touched has been reset to `origin/development` wholesale — the MCP chain, PublicationService, TranscriptionService, VoteCastingService, MotionForwardingService, MotionService, ActionItemWriter and psalm.xml are theirs, unmodified, and none of this branch's version survives. Re-litigating two equivalent fixes is not worth a conflict. What #506 did NOT reach, verified rather than assumed: lib/Service/VotingRoundOpener.php:78 new AmendmentOrderService(container: $container, …) lib/Service/VotingRoundResults.php:86 new AmendmentOrderService(container: $container, …) `$container` is neither a parameter of these constructors (ADR-084 replaced it with ObjectServiceInterface) nor an argument AmendmentOrderService declares. So constructing either class raises "Undefined variable: $container" at REQUEST time — opening a voting round and computing a tally both 500. That is the backend fault behind the ten extra E2E failures in publication-workflow and voting-quorum-workflow. Measured on origin/development (d1957ca) and on this tree, same vendor, same php:8.3-cli container, both tools' own commands: origin/development this branch phpstan 6 errors [OK] No errors (rc 1 -> 0) psalm 4 errors No errors found! (rc 2 -> 0) phpmd 11 findings 7 findings (the 4 removed are exactly the two $container pairs) The 7 remaining phpmd findings are pre-existing CouplingBetweenObjects = 13 on seven unrelated classes; they fail on development too and are not touched here. PHPUnit "Unit Tests", both trees, identical: Tests: 961, Assertions: 3339, Errors: 187, Failures: 36, Warnings: 17, Skipped: 25 and the 183 unique failing-test identifiers diff clean between the two trees, so this change neither fixes nor breaks a test. The 223 broken tests are the separate ADR-084 test-rewiring debt (hollow ObjectServiceInterface doubles), deliberately out of scope here.
Contributor
Quality Report — ConductionNL/decidesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ❌ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 104/104 | |||
| npm | ✅ | ✅ 532/532 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ❌ | ||||
| Newman | ✅ | ||||
| Playwright | ❌ | ||||
| Hydra gates | ❌ |
Quality workflow — 2026-08-16 13:39 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.
fix(adr-084): the two
AmendmentOrderServicecall sites #506 did not reachThis PR was reduced on 2026-08-16 by S29. It originally carried S19's repair
of eleven ADR-084 call sites. While S19 was killed by the session crash,
decidesk#506
fix/mcp-chain-lost-the-object-servicelanded the same repairand reached
developmentfirst, which is what made this branchmergeable_state=dirty.Their version was taken wholesale. Every file this branch touched has been
reset to
origin/development—lib/Mcp/*(all five),PublicationService,TranscriptionService,VoteCastingService,MotionForwardingService,MotionService,ActionItemWriterandpsalm.xml. None of this branch'sversion of any of them survives. Two equivalent fixes are not worth a conflict,
and this is the fourth duplicate-work collision on the board today.
What #506 did NOT reach — verified, not assumed
Before dropping the branch as redundant I measured
origin/development(
d1957ca1, the merge itself) with each tool's own command. It is not clean:$containeris neither a parameter of those two constructors — ADR-084 replacedit with
ObjectServiceInterface— nor an argumentAmendmentOrderServicedeclares. Constructing either class raises
Undefined variable: $containeratrequest time, so opening a voting round and computing a tally both answer 500.
That is the backend fault behind the ten extra E2E failures S19 traced to
publication-workflowandvoting-quorum-workflow(the skip count was 58 onboth sides, which is what made those ten a regression rather than a shuffle).
This PR is now two files, +19/−3, and nothing else.
Before / after —
origin/developmentvs this branchSame
vendor/, samephp:8.3-clicontainer, each tool's own composer script,207
lib/files on both trees:origin/developmentd1957ca1[OK] No errors(rc 0)No errors found!(rc 0)Two independent analysers agree on the same two files and nothing else, and both
go to zero. The four phpmd findings that disappear are exactly the
UndefinedVariable/UnusedLocalVariable$containerpair in each of the twofiles. The 7 that remain are pre-existing
CouplingBetweenObjects = 13onMeetingService,MinutesDocumentService,MotionService,ParticipationPublicationService,TranscriptionService,VoteCastingServiceand
VotingRoundCloser— they fail ondevelopmenttoo and are not touchedhere, so
PHP Quality (phpmd)stays red on both sides, strictly improved.Tests — identical on both trees, by identifier and not by count
The 183 unique failing-test identifiers diff clean between the two trees, so
this change neither fixes nor breaks a test. The 187+36 are the separate ADR-084
test-rewiring debt R2 catalogued (hollow
createMock(ObjectServiceInterface)doubles replacing store-backed fakes), which is its own slot and is deliberately
out of scope here.
Deliberately not done
ArgumentCountErrors into assertion failures, not greens — it is a rewiringjob, not an arity sweep.
CouplingBetweenObjects = 13classes. Each is refactor(deps): type-hint OpenRegister's published contract (ADR-084) #495 addingone type to a class already at 12; each needs its own DI pass.
Integration Tests (Newman), red ondevelopmentsince refactor(deps): type-hint OpenRegister's published contract (ADR-084) #495.[S29] Re-measured in CI — zero introduced, three jobs fixed, eight E2E tests fixed
PR run 31948665299 (36 jobs) vs base run 31944146603 (
d1957ca1, 36 jobs):The local measurement reproduces exactly in CI:
phpstanandpsalmare bothsuccesson this PR and bothfailureon the base.PHP Quality (phpmd)stays red on both sides, strictly improved — CI names11 findings at base and 7 here, and the four that disappear are exactly the
UndefinedVariable/UnusedLocalVariable$containerpair in each of the twofiles. The 7 that remain are pre-existing
CouplingBetweenObjects = 13.PHPUnit is byte-identical, cell for cell:
Tests: 969, Assertions: 3366, Errors: 177, Failures: 37, Warnings: 17, Skipped: 33on both the PR and the base.
E2E — 11 failures → 3, and the eight that go green are the two repaired paths
Identical skip count (58), so this is a real delta and not a skip shuffle.
Diffing the failing-test identifiers rather than the counts: nothing is
introduced, and the eight that go green are
Every one of them walks
VotingRoundOpener::__constructorVotingRoundResults::__construct— the two constructors this PR repairs. Thatis causal, not correlational: the fix is two call sites, and the tests that
recover are exactly the ones that construct those two classes.
Gates
gate-19's disappearance is not claimed — it is diff-scoped, and this branch's
diff is now two files, so the two-dot artefact is working in our favour.