feat(scheduler): wire mission autopush to main bot on completion#46
Open
jsmninvest wants to merge 1 commit into
Open
feat(scheduler): wire mission autopush to main bot on completion#46jsmninvest wants to merge 1 commit into
jsmninvest wants to merge 1 commit into
Conversation
rubening
reviewed
May 19, 2026
rubening
left a comment
There was a problem hiding this comment.
Review (Overnight Agent, Night #97)
The mission autopush feature itself is solid -- CAS-based exactly-once Telegram delivery, clean autopushed_at column, 13/13 tests passing. Good work.
Issue: The PR carries ~15K lines across 63 files, but the actual autopush feature is only 3-4 files (src/mission-autopush.ts, src/db.ts column, src/scheduler.ts call sites, migration). The rest appears to be branch divergence from when main was rebuilt.
Request: Could you rebase onto current main and squash down to only the autopush-specific changes? That would make this reviewable and mergeable quickly. The feature is good -- the branch just needs cleanup.
Note: PR #47 depends on this, so rebasing here means #47 will need to be rebased on top afterward.
5 tasks
Restores the mission-autopush module (dropped during rebuild in 111d22a) and wires notifyMissionCompletion into scheduler.ts so every completeMissionTask() call in runDueMissionTasks also fires the autopush hook. Why: missions created by Rudy (created_by='main') would complete silently. Aditya had no visibility unless he polled the CLI. This closes the loop. Exactly-once delivery is guaranteed by db.markMissionAutopushed(), which CAS-stamps the autopushed_at column iff currently NULL. 4 call sites added in scheduler.ts (timeout, acceptance-pass, acceptance-fail, catch-block) — the CAS absorbs any double-invocation. Restored from 1906b01: - src/mission-autopush.ts + src/mission-autopush.test.ts (13 tests, all pass) - db.ts: markMissionAutopushed, RetryReason, autopushed_at on MissionTask, autopushed_at column + idempotent migration Canary mission 878dee40 (priority 5, ops) completed with autopushed_at set. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
a84035d to
dda2f75
Compare
mm-consult-gautam
pushed a commit
to morphingmachines/claudeclaw-os-mm-public-claudeclaw-backup-2026-05-25
that referenced
this pull request
May 25, 2026
* fix(windows): first-class Windows support in setup + Gemini model update
Setup wizard:
- Native Windows acknowledged as fully supported (PM2 for auto-start)
- WSL2 mentioned as neutral alternative, not the recommended path
- Python discovery uses Windows py launcher (py -3.13, etc.) and "python"
- Venv paths use Scripts\python.exe and Scripts\pip.exe on Windows
- Activate instructions show Windows syntax when on win32
- Python install guidance includes python.org, winget, and PATH reminder
- uv detected and used for faster venv creation + pip install when available
- Auto-start uses PM2 as primary option, Task Scheduler as fallback
Gemini:
- Default model updated from gemini-2.0-flash to gemini-2.5-flash
(2.0-flash returns 404 for new users)
- generateContent and embedText return empty when GOOGLE_API_KEY is
not set instead of throwing, so memory/consolidation degrade gracefully
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(windows): runtime error messages + npm shell fix
Runtime error messages (index.ts, meet-cli.ts):
- War Room venv-not-found and deps-not-installed messages now detect
uv and show uv commands first, then Windows paths, then POSIX
- Hardcoded /tmp/warroom-debug.log replaced with tmpDir() and the
crash-disabled message references the actual resolved log path
- Added "uv detected" log line at War Room startup
Setup (setup.ts):
- All spawnSync('npm', ...) calls now use shell:true so npm.cmd
resolves correctly on Windows (was causing silent build failures)
- Removed unnecessary shell:true from Python py launcher detection
(args are already split, fixes Node DEP0190 deprecation warning)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(windows): add windowsHide to all spawn/exec calls
Prevents console popup windows from flashing on Windows when the bot
spawns subprocesses. Every spawn(), spawnSync(), execSync(), and exec()
call that runs a Windows command (taskkill, tasklist, wmic, powershell,
schtasks) or Python subprocess now includes windowsHide: true.
Files: index.ts, meet-cli.ts, dashboard.ts, platform.ts, security.ts,
skill-health.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(windows): address PR earlyaidopters#46 review
1. synthesizeBrief now uses os.tmpdir() instead of hardcoded /tmp/,
so meeting briefs land in %TEMP% on Windows. (Mark item earlyaidopters#1.)
2. setup.ts wires in getVenvPython() and a new getVenvPip() helper
from platform.ts instead of inline path.join with platform
conditionals. Single source of truth. (Mark item earlyaidopters#2.)
3. Reverted the Gemini default model from gemini-2.5-flash back to
gemini-2.0-flash. The 2.5 migration is real (2.0-flash retires
June 2026; new GCP projects already see 404s) but it isn't a
Windows fix and changes pricing/rate limits for every existing
user on next restart. Will land in its own PR with a changelog
note. (Mark item earlyaidopters#3.)
4. shell: true on the npm spawnSync calls in setup.ts is now gated
on PLATFORM === 'win32'. The execSync('npm start', ...) call
dropped its explicit shell option entirely — execSync always
uses a shell, so the option was redundant. (Mark item earlyaidopters#4.)
5. findProcessesByPattern skips wmic and uses PowerShell's
Get-CimInstance directly. wmic was removed in Windows 11 22H2+
and every failed spawn cost ~100ms before the fallback. (Mark
item earlyaidopters#5.)
6. War Room venv error messages in index.ts and setup.ts now show
distinct PowerShell vs Command Prompt commands so users know
which form to paste. (Mark item earlyaidopters#6.)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor(setup): Task Scheduler as primary Windows auto-start, PM2 as fallback
Task Scheduler runs at logon without elevated privileges and has no
extra dependencies. PM2 is still offered as an alternative when already
installed (restart-on-crash, log rotation), but defaults to No.
This also avoids the VBScript deprecation warnings from pm2-windows-startup
on Windows 11, which uses wscript.exe to launch invisible.vbs on boot.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
autopushed_atcolumn,markMissionAutopushed()CAS, andRetryReasontype to db.tsnotifyMissionCompletion(mission.id)into all 4 completion paths in scheduler.ts (timeout, acceptance-pass, acceptance-fail, catch-block)Why
Missions queued by Rudy (
created_by='main') were completing silently — Aditya had no visibility unless he polled. This closes the loop by pushing a short Telegram notification to the main bot chat whenever a main-created mission finishes.Exactly-once delivery is guaranteed by
markMissionAutopushed(), which CAS-stampsautopushed_atiff currently NULL. The 4 call sites all go through the same CAS, so even if the completion path is re-entered, Telegram is pinged exactly once.Test plan
npm run buildcleannpm test -- --run src/mission-autopush.test.ts— 13/13 passautopushed_at=1776884052🤖 Generated with Claude Code