Skip to content

Day 5: Orchestrator v2 — config-driven pipeline (closes KI-1)#5

Merged
evkir merged 4 commits into
mainfrom
refactor/orchestrator-v2
May 23, 2026
Merged

Day 5: Orchestrator v2 — config-driven pipeline (closes KI-1)#5
evkir merged 4 commits into
mainfrom
refactor/orchestrator-v2

Conversation

@evkir
Copy link
Copy Markdown
Owner

@evkir evkir commented May 23, 2026

No description provided.

evkir added 4 commits May 23, 2026 08:09
Day 5, part of KI-1 fix.

Orchestrator.__init__ now takes (config, phases, dry_run) instead of
(phases, authorized_scope, dry_run). authorized_scope moved to run()
since scope is per-target, not per-orchestrator.

- builds a shared LLMClient lazily (skipped entirely in dry-run, so no
  API key is ever needed for a dry run)
- builds an AuditLogger per session
- constructs every agent with the new BaseAgent contract:
  Agent(config, session, llm, audit)
- _dispatch refactored to a dict lookup

test_orchestrator.py: test_dry_run_authorized_scope updated to pass
authorized_scope via run() — the other 10 tests are unchanged.

Refs: STANDOFF.md day 5/30
The CLI was calling Orchestrator(config) and orchestrator.run_pipeline(
session) — neither existed. It also created a PentestSession that the
orchestrator silently ignored.

Now:
- Orchestrator(config=config, dry_run=dry_run)
- session = orchestrator.run(target, authorized_scope=...)
- the orchestrator owns session creation (single source of truth)

New options:
- --dry-run : run the full pipeline with no real network calls
- --scope   : repeatable authorized-scope entry (--scope a --scope b)
- --provider now overrides config only when given (was hardcoded openai)

Verified: 'python -m cyberai scan 127.0.0.1 --dry-run' runs all four
phases and exits cleanly — the exact invocation that crashed before.

Refs: STANDOFF.md day 5/30, closes KI-1
docs: mark KI-1 as fixed (7/8 closed)
@evkir evkir merged commit 8cad0c3 into main May 23, 2026
4 checks passed
@evkir evkir deleted the refactor/orchestrator-v2 branch May 23, 2026 05:21
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