feat: planner overseer session advisor (OMP advisor parity)#2082
Conversation
Add a live transcript-aware session advisor beside the lifecycle supervisor: emission guard, severity-routed steering inject, agent-log delta runtime, OVERSEER.md/WATCHDOG.md discovery, and workflow model gate settings. Soft-disabled until advisor provider+model are configured.
getAgentLogs returns chronological trailing windows; seed the poll cursor on first sight without replaying history, then feed only net-new rows.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughAdds a planner overseer session advisor that consumes executor transcript deltas, parses severity-routed advice, applies emission guards, injects steering comments when permitted, exposes runtime snapshots, and adds workflow, project, and task controls with persistence and dashboard support. It also documents concurrent migration handling. ChangesPlanner overseer session advisor
Session advisor task controls
Concurrent migration handling
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Executor
participant ProjectEngine
participant AdvisorService
participant AdvisorRuntime
participant AdvisorModel
participant TaskStore
Executor->>ProjectEngine: flush executor log entries
ProjectEngine->>AdvisorService: forward new task log delta
AdvisorService->>AdvisorRuntime: enqueue rendered session update
AdvisorRuntime->>AdvisorModel: prompt isolated advisor session
AdvisorModel-->>AdvisorRuntime: return parsed advice and severity
AdvisorRuntime->>AdvisorService: deliver guarded advice
AdvisorService->>TaskStore: inject steering comment and audit event
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds a planner overseer session advisor for live executor transcript review. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (10): Last reviewed commit: "fix(review): inject-time enable re-check..." | Re-trigger Greptile |
- Re-resolve oversight level at inject time so mid-session observe/off flips cannot keep injecting - Pass live engine settings into OverseerAdvisorService so autoMerge:false human-control withholds - Pass systemPrompt into createResolvedAgentSession for the advisor contract
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/engine/src/runtimes/in-process-runtime.ts (1)
1585-1596: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winNew
getExecutor()was inserted betweengetTaskStore()'s docstring and its declaration.The pre-existing JSDoc block (
Get the project's TaskStore instance.@throwsError if runtime has not been started) now sits directly abovegetExecutor()instead ofgetTaskStore(), since the new method was spliced in between. Purely a doc-placement issue but will confuse anyone reading hover-docs/generated API docs for either method.🐛 Proposed fix
- /** - * Get the project's TaskStore instance. - * `@throws` Error if runtime has not been started - */ /** * FNXC:PlannerOversight 2026-07-13-23:05: * Expose TaskExecutor so ProjectEngine can wire session-advisor log flush. */ getExecutor(): TaskExecutor | undefined { return this.executor; } + /** + * Get the project's TaskStore instance. + * `@throws` Error if runtime has not been started + */ getTaskStore(): TaskStore {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/engine/src/runtimes/in-process-runtime.ts` around lines 1585 - 1596, Move the existing TaskStore JSDoc back directly above getTaskStore(), and place the getExecutor() method and its explanatory comment after that method’s documentation or in the appropriate separate location. Ensure each public method has only the documentation describing its own behavior.
🧹 Nitpick comments (1)
packages/engine/src/project-engine.ts (1)
2572-2646: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate settings resolution and cwd derivation.
resolveLevelandresolveModeleach independently callresolveEffectiveSettings(store, { id: task.id })— two separate resolution round-trips per advisor cycle for the same task. Separately,agentFactoryre-derivescwdfromstore.getTask(taskId)even thoughresolveCwdabove already implements the same fallback chain from an in-handtaskobject; if the service could pass the already-resolved cwd intoagentFactory, the extragetTaskround-trip could be avoided.Consider consolidating the two
resolveEffectiveSettingscalls into one shared resolution, and threading the already-resolved cwd through toagentFactoryinstead of re-fetching it.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/engine/src/project-engine.ts` around lines 2572 - 2646, Consolidate the duplicated resolveEffectiveSettings calls used by resolveLevel and resolveModel in buildSessionAdvisorService, reusing one per-task resolved settings result while preserving existing fallbacks. Thread the cwd resolved by resolveCwd into agentFactory and use it when creating the session; remove the redundant store.getTask(taskId) lookup and retain the existing config/process.cwd fallback behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/architecture.md`:
- Around line 1381-1385: Update the OverseerAdvisorService documentation to
describe the complete watchdog discovery contract, including supported
user-agent locations and .fusion/.omp variants alongside project
OVERSEER.md/WATCHDOG.md files. If this section is intentionally limited to
project-level files, explicitly state that scope and direct operators to the
documentation covering the other supported locations.
In `@packages/engine/src/overseer-advisor-runtime.ts`:
- Around line 220-233: Reset `#failureNotified` when the three-failure drop is
handled in the consecutive-failure branch, after the optional host notification
and before resetting `#consecutiveFailures`, so each newly accumulated failure
streak can notify the host once.
In `@packages/engine/src/project-engine.ts`:
- Around line 1209-1220: Update notifySessionAdvisorLogDelta so the promise
returned by sessionAdvisor.onExecutorLogDelta is handled with a rejection-safe
catch while preserving the existing synchronous try/catch and fail-soft
behavior. Ensure rejected asynchronous calls are swallowed and cannot become
unhandled promise rejections.
- Around line 2597-2645: Change the sessionPurpose in the
createResolvedAgentSession call within agentFactory’s complete callback from the
coding-capable executor lane to the established read-only or restricted purpose.
Keep the advisor completion transcript-only and preserve the existing session
lifecycle and response extraction behavior.
---
Outside diff comments:
In `@packages/engine/src/runtimes/in-process-runtime.ts`:
- Around line 1585-1596: Move the existing TaskStore JSDoc back directly above
getTaskStore(), and place the getExecutor() method and its explanatory comment
after that method’s documentation or in the appropriate separate location.
Ensure each public method has only the documentation describing its own
behavior.
---
Nitpick comments:
In `@packages/engine/src/project-engine.ts`:
- Around line 2572-2646: Consolidate the duplicated resolveEffectiveSettings
calls used by resolveLevel and resolveModel in buildSessionAdvisorService,
reusing one per-task resolved settings result while preserving existing
fallbacks. Thread the cwd resolved by resolveCwd into agentFactory and use it
when creating the session; remove the redundant store.getTask(taskId) lookup and
retain the existing config/process.cwd fallback behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 90b8aaac-67f4-4f66-ba22-0830a66c51c3
📒 Files selected for processing (28)
.changeset/overseer-session-advisor.mddocs/architecture.mddocs/plans/2026-07-13-001-feat-overseer-advisor-parity-plan.mddocs/settings-reference.mdpackages/core/src/__tests__/overseer-emission-guard.test.tspackages/core/src/builtin-workflow-settings.tspackages/core/src/index.tspackages/core/src/overseer-advice.tspackages/core/src/overseer-emission-guard.tspackages/core/src/planner-intervention.tspackages/core/src/planner-overseer-events.tspackages/core/src/planner-overseer-state.tspackages/core/src/types.tspackages/engine/src/__tests__/overseer-advise-tool.test.tspackages/engine/src/__tests__/overseer-advisor-runtime.test.tspackages/engine/src/__tests__/overseer-advisor-service.test.tspackages/engine/src/__tests__/overseer-session-delta.test.tspackages/engine/src/__tests__/overseer-watchdog.test.tspackages/engine/src/agent-logger.tspackages/engine/src/executor.tspackages/engine/src/index.tspackages/engine/src/overseer-advise-tool.tspackages/engine/src/overseer-advisor-runtime.tspackages/engine/src/overseer-advisor-service.tspackages/engine/src/overseer-session-delta.tspackages/engine/src/overseer-watchdog.tspackages/engine/src/project-engine.tspackages/engine/src/runtimes/in-process-runtime.ts
Add plannerOverseerAdvisorEnabled (boolean, default false). Require explicit enable plus model ids before any second-model transcript review runs; lifecycle overseer is unchanged.
Port oh-my-pi advisor persona, critical silence rules, and severity criteria into OVERSEER_ADVISOR_SYSTEM_PROMPT while keeping Fusion's JSON reply contract and PROMPT.md / File Scope anchors.
- Reset failure-notify latch after each 3-failure backlog drop - Catch async rejections on session-advisor log-delta notify - Use reviewer + tools:readonly for advisor sessions - Re-fetch settings at inject time for autoMerge human-control - Runtime-agnostic assistant text extraction - Document full OVERSEER/WATCHDOG discovery paths; fix getExecutor JSDoc
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/engine/src/__tests__/overseer-advisor-service.test.ts`:
- Around line 268-273: Replace the fixed 80ms sleep after onExecutorLogDelta in
the affected test with vi.waitFor, matching the existing pattern used earlier in
the file. Wait for the relevant async condition or assertion to settle, then
retain the addSteeringComment negative assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: bec81103-413a-4c34-a36f-f934632da8a2
📒 Files selected for processing (15)
.changeset/overseer-session-advisor.mddocs/architecture.mddocs/plans/2026-07-13-001-feat-overseer-advisor-parity-plan.mddocs/settings-reference.mdpackages/core/src/__tests__/builtin-workflow-settings-triage.test.tspackages/core/src/builtin-workflow-settings.tspackages/engine/src/__tests__/overseer-advise-tool.test.tspackages/engine/src/__tests__/overseer-advisor-runtime.test.tspackages/engine/src/__tests__/overseer-advisor-service.test.tspackages/engine/src/index.tspackages/engine/src/overseer-advise-tool.tspackages/engine/src/overseer-advisor-runtime.tspackages/engine/src/overseer-advisor-service.tspackages/engine/src/project-engine.tspackages/engine/src/runtimes/in-process-runtime.ts
🚧 Files skipped from review as they are similar to previous changes (11)
- .changeset/overseer-session-advisor.md
- packages/engine/src/tests/overseer-advise-tool.test.ts
- packages/engine/src/runtimes/in-process-runtime.ts
- packages/engine/src/index.ts
- packages/engine/src/tests/overseer-advisor-runtime.test.ts
- docs/settings-reference.md
- docs/architecture.md
- docs/plans/2026-07-13-001-feat-overseer-advisor-parity-plan.md
- packages/engine/src/overseer-advisor-runtime.ts
- packages/engine/src/overseer-advisor-service.ts
- packages/engine/src/project-engine.ts
…ce (#2082) - Migration 0006: tolerate concurrent fusion_runtime CREATE ROLE across DBs (duplicate_object OR unique_violation) — same root cause as main PG gate. - deliverAdvice: withhold inject when store.getSettings() throws (do not use stale autoMerge:true cache). - Tests: replace fixed setTimeout with vi.waitFor; add fail-closed regression.
Treat a missing live settings object the same as a getSettings throw: withhold session-advisor inject so a stale autoMerge:true cache cannot bypass human control. Regression covers undefined resolution.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/src/postgres/migrations/0006_project_ownership.sql`:
- Around line 34-49: Create a new forward migration named 0007 for the project
ownership role and grant changes instead of editing the already-versioned
0006_project_ownership migration. Preserve the shown DO block in the new
migration so databases that have applied 0006 execute the role creation and
current-user grant.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 615cec66-cf2e-4fbe-83a6-2995860246cf
📒 Files selected for processing (5)
.changeset/fix-concurrent-project-ownership-migration.mdpackages/core/src/index.tspackages/core/src/postgres/migrations/0006_project_ownership.sqlpackages/core/src/types.tspackages/engine/src/__tests__/overseer-advisor-service.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/core/src/types.ts
- packages/core/src/index.ts
- packages/engine/src/tests/overseer-advisor-service.test.ts
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/src/postgres/migrations/0006_project_ownership.sql`:
- Around line 34-49: Create a new forward migration named 0007 for the project
ownership role and grant changes instead of editing the already-versioned
0006_project_ownership migration. Preserve the shown DO block in the new
migration so databases that have applied 0006 execute the role creation and
current-user grant.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 615cec66-cf2e-4fbe-83a6-2995860246cf
📒 Files selected for processing (5)
.changeset/fix-concurrent-project-ownership-migration.mdpackages/core/src/index.tspackages/core/src/postgres/migrations/0006_project_ownership.sqlpackages/core/src/types.tspackages/engine/src/__tests__/overseer-advisor-service.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/core/src/types.ts
- packages/core/src/index.ts
- packages/engine/src/tests/overseer-advisor-service.test.ts
🛑 Comments failed to post (1)
packages/core/src/postgres/migrations/0006_project_ownership.sql (1)
34-49: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash # Look for the migration runner/tracker to see if it hashes/validates applied migration file contents. fd -e ts -e js . packages/core/src/postgres | xargs rg -n -i "checksum|hash|md5|sha256" -C3 rg -n -i "migration" packages/core/src -g '*.ts' -l | xargs rg -n "applyMigration|runMigration|migrations_applied|schema_migrations" -C3Repository: Runfusion/Fusion
Length of output: 34351
🏁 Script executed:
#!/bin/bash set -euo pipefail echo '--- outline: packages/core/src/postgres/schema-applier.ts ---' ast-grep outline packages/core/src/postgres/schema-applier.ts --view expanded | sed -n '1,220p' echo echo '--- relevant lines: packages/core/src/postgres/schema-applier.ts ---' sed -n '120,220p' packages/core/src/postgres/schema-applier.ts echo echo '--- relevant lines: packages/core/src/postgres/startup-factory.ts ---' sed -n '1,220p' packages/core/src/postgres/startup-factory.ts echo echo '--- search for migration bookkeeping schema ---' rg -n "fusion_schema_migrations|MIGRATION_BOOKKEEPING_TABLE|applied_at|version text PRIMARY KEY|checksum|hash" packages/core/src -g '*.ts' -g '*.sql'Repository: Runfusion/Fusion
Length of output: 35229
Add this as a new forward migration
packages/core/src/postgres/migrations/0006_project_ownership.sqlis already versioned, andfusion_schema_migrationsonly tracks applied versions. Editing it in place won’t reach databases that have already recorded0006; they’ll keep the old state and miss this role/grant change. Move it into0007_...instead.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/core/src/postgres/migrations/0006_project_ownership.sql` around lines 34 - 49, Create a new forward migration named 0007 for the project ownership role and grant changes instead of editing the already-versioned 0006_project_ownership migration. Preserve the shown DO block in the new migration so databases that have applied 0006 execute the role creation and current-user grant.
Add project sessionAdvisorEnabledByDefault, per-task sessionAdvisorEnabled override, and a Quick Add eye toggle next to GitHub so the LLM overseer agent can be opted in without relying only on workflow settings.
Resolve 0006_project_ownership.sql CREATE ROLE exception-handler formatting while keeping race-safe duplicate_object OR unique_violation handling from both sides, plus branch fail-closed advisor settings and session-advisor controls.
Gate boot-smoke failed selecting session_advisor_enabled because Drizzle schema and health self-heal expected the column but migrations 0000-0007 never created it on fresh DBs. Versioned ADD COLUMN IF NOT EXISTS path keeps applier/upgrade parity with per-task session advisor controls.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/session-advisor-project-task-controls.md:
- Around line 5-7: Update the dev description in the changeset so
plannerOverseerAdvisorEnabled is described as a workflow-level master gate that
can disable the session advisor regardless of task or project settings, rather
than as the final inheritance fallback. Preserve the existing descriptions of
project defaults, task overrides, Quick Add, and
resolveTaskSessionAdvisorEnabled.
In `@packages/dashboard/app/components/QuickEntryBox.tsx`:
- Around line 2216-2235: Update the onClick handler for the quick-entry session
advisor toggle to compute the next value from the current effective state, then
setSessionAdvisorOverride to null when that value matches
projectSessionAdvisorDefault; otherwise store the explicit boolean override.
Preserve the existing functional state update and toggle behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 45aed467-8099-4895-978e-24f616d79729
📒 Files selected for processing (33)
.changeset/session-advisor-project-task-controls.mddocs/settings-reference.mdpackages/core/src/__tests__/postgres/schema-applier.test.tspackages/core/src/__tests__/session-advisor.test.tspackages/core/src/__tests__/settings-parity.test.tspackages/core/src/builtin-workflow-settings.tspackages/core/src/index.gate.tspackages/core/src/index.tspackages/core/src/postgres/index.tspackages/core/src/postgres/migrations/0006_project_ownership.sqlpackages/core/src/postgres/migrations/0008_session_advisor_enabled.sqlpackages/core/src/postgres/postgres-health.tspackages/core/src/postgres/schema-applier.tspackages/core/src/postgres/schema/project.tspackages/core/src/session-advisor.tspackages/core/src/settings-schema.tspackages/core/src/store.tspackages/core/src/task-store/persistence.tspackages/core/src/task-store/remaining-ops-6.tspackages/core/src/task-store/serialization.tspackages/core/src/task-store/task-creation.tspackages/core/src/task-store/task-update.tspackages/core/src/types.tspackages/dashboard/app/api/legacy.tspackages/dashboard/app/components/QuickEntryBox.tsxpackages/dashboard/app/components/TaskDetailModal.tsxpackages/dashboard/app/components/settings/section-keys.tspackages/dashboard/app/components/settings/sections/GeneralSection.tsxpackages/dashboard/app/components/settings/sections/__tests__/settings-default-descriptions.test.tsxpackages/dashboard/src/routes/register-task-workflow-routes.tspackages/engine/src/__tests__/overseer-advisor-service.test.tspackages/engine/src/overseer-advisor-service.tspackages/engine/src/project-engine.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- packages/core/src/index.ts
- packages/engine/src/tests/overseer-advisor-service.test.ts
- packages/core/src/builtin-workflow-settings.ts
- packages/engine/src/overseer-advisor-service.ts
- packages/engine/src/project-engine.ts
…2082) - deliverAdvice re-resolves resolveEnabled and clears runtime when disabled mid-session - Changeset: workflow plannerOverseerAdvisorEnabled is a master/legacy gate, not final inheritance fallback - Quick Add eye clears override to null when effective matches project default (TaskDetail parity)
## Summary Adds a **session advisor** to the planner overseer so Fusion can review live executor transcripts the way [oh-my-pi’s advisor](https://github.com/can1357/oh-my-pi/tree/main/packages/coding-agent/src/advisor) does — without replacing the existing lifecycle supervisor (stage watch, retry, merge confirmation, human-control withhold). ### What ships - **Emission guard** (`OverseerEmissionGuard`) — content-free phrase filter, session dedupe with severity-rank escalation, one accept per advisor update - **Session delta runtime** — queues agent-log deltas, drains through an advisor agent, drops backlog after 3 failures - **Session advisor service** — model gate, level matrix (`observe` / `steer` / `autonomous`), human-control re-check at inject, `[session-advisor]` steering comments - **OVERSEER.md / WATCHDOG.md** discovery for project review priorities - **AgentLogger `onEntriesFlushed`** + poll-backed agent-log cursor for durable deltas - Workflow settings: `plannerOverseerAdvisorProvider` + `plannerOverseerAdvisorModelId` (both required; empty = soft-disabled for cost safety) - Docs + changeset ### What does not ship (deferred) - Multi-advisor YAML roster, mutating advisor tools, reviewer/merger shadowing, true tool-abort interrupt ### Plan `docs/plans/2026-07-13-001-feat-overseer-advisor-parity-plan.md` ## Enablement 1. Set workflow **Session advisor model provider** + **Session advisor model id** 2. Oversight level `observe` (log only), `steer`, or `autonomous` (inject) 3. Optional: add `OVERSEER.md` or `WATCHDOG.md` in the project ## Test plan - [x] `pnpm --filter @fusion/core exec vitest run src/__tests__/overseer-emission-guard.test.ts` - [x] `pnpm --filter @fusion/engine exec vitest run` overseer-* unit tests (21 tests) - [x] Related planner-overseer / intervention regression tests - [x] `@fusion/engine` + `@fusion/core` typecheck - [ ] Manual: configure advisor model, run an executor task, confirm `[session-advisor]` inject + timeline metadata when concern is raised ## Residual Review Findings None from autofix pass (log-cursor ordering fix already committed). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an off-by-default “session advisor” that can review live execution activity and provide severity-based guidance. * Added project and per-task controls to enable it, including a default enable switch and Quick Add / Task Detail toggles. * Enhanced advisor prompting by discovering and incorporating `OVERSEER.md`/`WATCHDOG.md` review files. * **Documentation** * Added architecture and settings documentation for the new session-advisor parity behavior. * **Bug Fixes** * Improved fail-soft handling so advisor behavior won’t disrupt execution. * Fixed concurrent PostgreSQL migration startup failures. * **Tests** * Added coverage for advice parsing, emission guarding, runtime behavior, and watchdog discovery. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Adds a session advisor to the planner overseer so Fusion can review live executor transcripts the way oh-my-pi’s advisor does — without replacing the existing lifecycle supervisor (stage watch, retry, merge confirmation, human-control withhold).
What ships
OverseerEmissionGuard) — content-free phrase filter, session dedupe with severity-rank escalation, one accept per advisor updateobserve/steer/autonomous), human-control re-check at inject,[session-advisor]steering commentsonEntriesFlushed+ poll-backed agent-log cursor for durable deltasplannerOverseerAdvisorProvider+plannerOverseerAdvisorModelId(both required; empty = soft-disabled for cost safety)What does not ship (deferred)
Plan
docs/plans/2026-07-13-001-feat-overseer-advisor-parity-plan.mdEnablement
observe(log only),steer, orautonomous(inject)OVERSEER.mdorWATCHDOG.mdin the projectTest plan
pnpm --filter @fusion/core exec vitest run src/__tests__/overseer-emission-guard.test.tspnpm --filter @fusion/engine exec vitest runoverseer-* unit tests (21 tests)@fusion/engine+@fusion/coretypecheck[session-advisor]inject + timeline metadata when concern is raisedResidual Review Findings
None from autofix pass (log-cursor ordering fix already committed).
Summary by CodeRabbit
OVERSEER.md/WATCHDOG.mdreview files.