Skip to content

buildiq breaks object creation instance-wide: AutomationApprovalTriggerListener depends on ApprovalChainMapper, deleted by openregister #3302 #651

Description

@rubenvdlinde

AutomationApprovalTriggerListener takes OCA\OpenRegister\Db\ApprovalChainMapper as a constructor dependency:

// lib/Listener/AutomationApprovalTriggerListener.php:105
private readonly ApprovalChainMapper $chainMapper,

OpenRegister deleted that class in #3302 (feat(approval): consolidate the approval engine onto ordered task sequences), merged 2026-09-01 22:27. AutomationCompilerService imports it too.

Why this is worse than a broken feature

The listener is registered globally, on ObjectCreatedEvent / ObjectUpdatedEvent with no register or schema filter (lib/AppInfo/Application.php:445-455, and the comment there explains the filter is deliberately absent so it fires for automations authored later).

So on any instance with buildiq enabled, Nextcloud instantiates this listener on every object write in every app, DI cannot resolve the missing class, and the write fails. Measured on the shared dev instance just now, creating an opencatalogi object:

403 {"error":"Could not resolve OCA\\OpenRegister\\Db\\ApprovalChainMapper!
     Class \"OCA\\OpenRegister\\Db\\ApprovalChainMapper\" does not exist"}

That is object creation broken instance-wide, not just buildiq's automations.

Why CI has not caught it

buildiq's last Code Quality run on development was 19:05, three hours before OR #3302 merged at 22:27. The green is real but stale — it was measured against an OpenRegister that still had the class. The next run should go red.

What the replacement looks like

OR #3302 ships a machine-readable contract at tests/fixtures/approval-consolidation/retired-approval-surface.json, which lists ApprovalChainMapper under retiredClasses and says explicitly:

an app calling one of these routes or registering a listener for one of these classes is a BROKEN INTEGRATION finding, not a style finding

Also retired: ApprovalChain, ApprovalStep, ApprovalStepMapper, ApprovalService, ApprovalController, the /api/approval-chains and /api/approval-steps routes, and the four ApprovalStep*Event classes. The replacement is a task template plus an opened sequence (TaskSequenceService), with MigrateApprovalChainsToTasks as the data-side repair.

The companion hitl-retirement-inventory.json maps every retired property to its new home, but it is scoped to openconnector/integriq's approval_request schema. buildiq does not appear in it, so this looks like an untracked casualty of the consolidation rather than a planned migration.

Not fixed here

Migrating AutomationCompilerService and AutomationApprovalTriggerListener onto the task-sequence model is real work against a 141-file, 7k-line change, and it needs the design context from whoever owns flow-approval-consolidation. Filing rather than guessing at the mapping.

Two things worth deciding quickly, given the blast radius: whether buildiq should be disabled on shared instances until it is migrated, and whether the anti-pattern gate that reads retired-approval-surface.json runs fleet-wide yet — it would have named this immediately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

triageAwaiting triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions