fix(fabricator): require the caller organisation on every fabrication request - #167
Merged
Merged
Conversation
added 3 commits
September 16, 2026 09:14
… request Fabrication requests from the GraphQL resolver and from the intake agent now carry the organisation resolved server-side, and neither producer enqueues when it cannot be resolved. The Fabricator refuses queue messages that lack an organisation instead of creating untenanted agents or tools, so producer and consumer enforcement land together. Adds a dispatch-gate-enumeration guard for the request resolver. Any authenticated member of an organisation may still request fabrication; there is intentionally no platform-role gate.
…ation gate The intake tool sends org_id (snake) and the supervisor sends orgId (camel); process_event now honours either and still refuses events with neither. Intake tests mock _resolve_session_organization and add fail-closed refuse-when-unresolved cases; the jobs_table fixture gains a terminating query() default so an unconfigured MagicMock can no longer spin the pagination loop forever. Ignore .venv-arbiter-test/. Refs finding fac16c02.
A hung test previously ran for an hour and grew mock call history to 63 GB before oomd killed the session. Pin pytest-timeout in both dev requirement files and set timeout = 60 in the root pytest.ini so any future infinite loop fails fast.
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.
Summary
process_event) and intakefabricate.pyfail closed when no caller organisation is resolved; dispatch-gate enumeration guard added.org_id(intake) andorgId(supervisor) keys.pytest-timeout==2.4.0pinned,timeout = 60inpytest.ini, terminating default on thejobs_tablemock.Verification
pytest arbiter/fabricator: 389 passedpytest service/agent_intake_single/tests: 364 passedjest fabricator-request-resolver: 28 passedtsc --noEmit: clean