fix: [ENG-2884] address PR #689 review — wire DREAM_REMOVED_FLAGS + close schema/post-work straggler gates
Two should-fix items + comment cleanup from the reviewer:
1. DREAM_REMOVED_FLAGS was exported and unit-tested but never consumed.
`brv dream --timeout 30` printed the topic-root hint instead of the
migration message that names --timeout. Wired
`findRemovedFlagMessage(this.argv, DREAM_REMOVED_FLAGS)` into the
topic root with the same JSON-envelope / this.error branching the
curate and query commands use.
2. Dropped 'dream' from the transport schemas + post-work gate so any
straggler `type: 'dream'` task that still hits the daemon (older
client, stale queue, internal stray producer) fails at the schema
boundary instead of silently completing with result = ''.
- TaskTypeSchema + TaskExecuteSchema type enums: 'dream' removed.
- TaskExecuteSchema.force field: removed (dream was the only consumer).
- TaskExecuteSchema.trigger enum: 'agent-idle' removed (idle-trigger
dispatch is gone). 'cli' and 'manual' remain.
- TaskCreateRequestSchema.force field: removed.
- agent-process.ts post-work gate: dropped `type === 'dream'`.
- task-router.ts: dropped the orphan `data.force` plumbing.
Cosmetic
- task-router.test.ts: swapped the `type: 'dream'` fixtures (used to
exercise the generic preDispatchCheck plumbing) to `type: 'curate'`.
The tests stay — they cover the gate mechanism, not dream-specific
logic.
- review.ts description: dropped the stale `brv dream needsReview`
bullet. Tool-mode dream-finalize writes `needsReview: false`
unconditionally; the toggle has no dream-side effect to describe.
- Cleared stale `dream-executor` comment refs in curate-session.ts,
dream-state-service.ts, agent-process.ts, and two test files.
- Topic-root exit code: kept exit 0 (matches oclif topic-root default)
with a clarifying code comment noting the deliberate choice.
Kept
- `'agent-idle'` in dream-log-schema.ts — backwards-read compat for
existing dream-log entries on disk. No new entries will carry that
trigger; existing files still parse.
Verified
- npm run typecheck clean
- npm run lint 0 errors (256 pre-existing warnings)
- npm test: 8337 passing, 16 pending, 0 failing C
Cuong committed
7d77a8e6c19bfa09756ada9796b619300c247451
Parent: 13d83a6