Skip to content

fix(flow): attribute interactive test runs to the caller (3rd instance of the ownerless-run defect) - #2171

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/command-plane-attribution
Jul 27, 2026
Merged

fix(flow): attribute interactive test runs to the caller (3rd instance of the ownerless-run defect)#2171
rubenvdlinde merged 1 commit into
developmentfrom
fix/command-plane-attribution

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Follow-up to #2169, same defect class, third instance.

Problem

FlowRunController::test() queued its run without the acting user — in the one dispatch path that has a session by definition.

Consequence: the run was ownerless, context['triggeredBy'] was null, and every attribution-requiring node refused. ObjectWriteNode returned "This flow run has no owner (triggeredBy); an object write must be attributable." So the interactive "run this flow now" button could never exercise a write node — the only runs that appeared to work were harness runs carrying a hand-injected context.

Why this mattered for verification

This is what made the earlier "object-write is proven" claim overstated. The node had 387 passing unit tests and a green live run, but that run's context was injected by the harness. On every real path the node refused.

Live proof, after the fix

A naturally triggered run, nothing injected:

run status : completed
triggeredBy: admin                     <- resolved from IUserSession
log        : [{"transition":"write1","status":"completed","itemsIn":1,"itemsOut":1}]

And the object actually landed, read back through the API:

findings BEFORE: 7
findings AFTER : 8
  -> rule 'written by openregister.object-write' | created 2026-07-27T17:58:13+00:00 | owner admin

Related

While proving this, two other things surfaced and are filed separately: the live instance was 57 commits behind origin/development so the #2169 fix was not deployed (environment, not code), and #2170FlowRunWorker is never registered in oc_jobs, so asynchronous runs still cannot execute regardless of attribution.

🤖 Generated with Claude Code

FlowRunController::test() queued its run without the acting user — the same
defect as or#2158 in FlowMcpToolProvider::runFlow(), in the one dispatch path
that has a session by definition.

Consequence: the run was ownerless, so context['triggeredBy'] was null and every
attribution-requiring node refused. ObjectWriteNode returned 'This flow run has
no owner (triggeredBy); an object write must be attributable.' The interactive
'run this flow now' button could therefore never exercise a write node — the
only runs that appeared to work were harness runs with a hand-injected context.

Live-verified end to end after this fix, on a naturally triggered run with no
injected context: status=completed, triggeredBy=admin, log shows
write1 completed itemsIn=1 itemsOut=1, and the object landed in hydra-cache
(findings 7 -> 8, owner=admin) read back through the API.
@rubenvdlinde
rubenvdlinde merged commit ccd04b4 into development Jul 27, 2026
16 of 18 checks passed
@rubenvdlinde
rubenvdlinde deleted the fix/command-plane-attribution branch July 27, 2026 17:59
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 04429d3

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 174/174
npm ✅ 555/555
PHPUnit
Newman
Playwright ⏭️

Quality workflow — 2026-07-27 18:07 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.

1 participant