mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
1.5 KiB
1.5 KiB
Wind-down and restart
Used when the usage meter passes the wind-down mark (usage.windDownAtPct, default 95%), before a known reset, or when the owner says so.
Wind-down (the session manager runs it; one message to every area)
- Create
<stateDir>/PAUSEDcontaining the reason and time. Scheduled jobs (except restart) skip while it exists. - Tell every area: "Wind-down: finish or park your current step, commit, merge , submit if green, update `.task` and your docs/TODO.md section, then stop taking turns. If you have a scarce machine, say you are done with it in .task."
- Wait for each area's one-line report (SHA + state), then
node tools/fleet/bin/doctor.mjs: no DIRTY, no ONE-DISK rows, queue drained (landq.mjs status). - Write docs/agents/RESUME-BRIEF.md (mid-flight table, held work, owner questions) and land it.
- Stop sessions only if needed (
fleet down); an idle session costs nothing.
Restart (after the reset)
- Remove
<stateDir>/PAUSED(the restart job does it). fleet up(resumes every area by session id; the session manager last).- Each area reads RESUME-BRIEF.md and its TODO section, reports one line if blocked.
- The session manager checks
doctor,landq status, and picks up the loop.
Meter thresholds (if the usage governor is on)
| meter | action |
|---|---|
| >= windDownAtPct | wind down now, tell the owner |
| slowDownAtPct .. windDownAtPct | stop filling lulls: only close, relay and land |
| below | proceed |