Skip to content

[T-046] Composition roots (roboprobe.bootstrap) and plugin entry-point registries #94

Closed

Description

@CodewithJha

Task T-046 · Milestone M3 — Oracles + runner + store · Size S · Priority P0 · Epic #3

Implements NFR-EXT-001 · NFR-EXT-002 · PR-19

Branch feat/t-046-composition-roots-and-plugin-entry — one task = one branch = one PR (doc 32 §6)

Summary

Create bootstrap/{worker,orchestrator,cli,api}.py wiring settings → adapters → services (doc 34 §3), and register built-in plugins (backends, strategies, oracles, stores) via entry points.

Context / motivation

ADR-0016: only bootstrap may import concrete adapters together with application services. This makes every implementation swappable by configuration.

Scope

In scope

  • Factories: build_worker(settings), build_orchestrator(settings), build_cli_services(settings); API factory stub filled in T-080a.
  • Import-linter contract 3 verified.
  • Document how to add a plugin package (doc 10 §10 style) in CONTRIBUTING.

Implementation guidance

  • No service locator / globals; plain constructor injection.
  • Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff PLR2004); public APIs typed (mypy strict) and documented.

Acceptance criteria

  • Workers/orchestrator/CLI use bootstrap factories exclusively.
  • Swapping the backend name in settings switches the adapter with no code change (test with FakeBackend entry point).
  • Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
  • Docs, config reference and CHANGELOG Unreleased updated where behaviour, keys or interfaces changed.
  • Definition of Done (doc 32 §3) satisfied.

Tests required

  • tests/unit/bootstrap/test_factories.py.

Dependencies

Blocked by: #55 (T-035b), #85 (T-041a), #80 (T-040a)

Blocks: #95 (T-048), #142 (T-080a)

Parallelization notes

Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:

  • backend/src/roboprobe/bootstrap/**
  • CONTRIBUTING.md (plugin section)

Touches only bootstrap.

Definition of Done

Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-046 (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.

References

Design docs: doc 34 §3 · doc 16 §2 · ADR-0016 · doc 05 §13

Requirements: NFR-EXT-001 · NFR-EXT-002 · PR-19 (traceability: doc 28)

Activity

  1. added
    area:coreDomain core, plugin registry, shared types
    area:runnerQueue, workers, campaign orchestration
    priority:P0Critical path / blocks others
    milestone:M3M3 — Oracles + runner + store
    taskChild task of a milestone epic
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreDomain core, plugin registry, shared typesarea:runnerQueue, workers, campaign orchestrationmilestone:M3M3 — Oracles + runner + storepriority:P0Critical path / blocks otherssize:S<= 1 daytaskChild task of a milestone epictype:featureNew functionality

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions