Skip to content

fix(fabricator): require the caller organisation on every fabrication request - #167

Merged
gibbsie merged 3 commits into
mainfrom
fix/fabricator-request-tenancy
Sep 18, 2026
Merged

gibbsie merged 3 commits into
mainfrom
fix/fabricator-request-tenancy

Conversation

@gibbsie

@gibbsie gibbsie commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Resolver, consumer (process_event) and intake fabricate.py fail closed when no caller organisation is resolved; dispatch-gate enumeration guard added.
  • Consumer accepts both org_id (intake) and orgId (supervisor) keys.
  • Suite hardening: pytest-timeout==2.4.0 pinned, timeout = 60 in pytest.ini, terminating default on the jobs_table mock.

Verification

  • pytest arbiter/fabricator: 389 passed
  • pytest service/agent_intake_single/tests: 364 passed
  • jest fabricator-request-resolver: 28 passed
  • tsc --noEmit: clean

Oliver Gibbs 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.
@gibbsie
gibbsie merged commit e7b7c6f into main Sep 18, 2026
15 checks passed
@gibbsie
gibbsie deleted the fix/fabricator-request-tenancy branch September 18, 2026 02:38
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