gdkbox 0.1.20 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a5d8a8a1fbb33083f8cfb0b306ee0d6fc4efaffad04a110ef9f1a55141baae5
4
- data.tar.gz: f4ec5a9b60bf6ab209ced26b1c0ec9c6b95503ae6a65484844506553055ea900
3
+ metadata.gz: ed8db8e33eb456eab81c33ec420fccbb86294d1569373da95d4eab9aebf1ee79
4
+ data.tar.gz: 23812d9d52938ddbdbd5613f412bdb5e35ed588ec177c5f1ad8acfbfa76fe214
5
5
  SHA512:
6
- metadata.gz: 596f76ed57ea61c0fc0a00a7e0cd72a917a076aa9fcf022127d8b3ac7e5303c6ccb2c60e30c24727dcedb402f14065da1776be58832d1d28446b070850b09145
7
- data.tar.gz: 1e4e94bc489cfc712b5e7a7386cad211e5cdf26b826eddeb43fa5e2bf47cacfde8c945677d896c5a21e97deef8dae99458133ebb4a3253a2530142c66404ff77
6
+ metadata.gz: 588e9c4a5beaa9f7ddcfd0cdfe3c897de80b230646a24b1c580bdb1cf008ec9aa86531d5f5a03d2234bf128918dd821f02dba7b41a79470b172d5607b2abd8c2
7
+ data.tar.gz: d1369eb4dadb712a8e2cacef481c55475e4239f447daad5ef952bdb956d5651ca13ac7fe80a29e8390ac609228514ed3bbcac3cf659f1c050bcc22ce8d679ca5
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GDKBox
4
- VERSION = "0.1.20"
4
+ VERSION = "0.1.21"
5
5
  end
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: gdkbox-fleet
3
+ version: 1.0.0
3
4
  description: >-
4
5
  Orchestrate a fleet of GDK-in-a-box environments with the `gdkbox` CLI:
5
6
  provision a reusable pool of GitLab Development Kit boxes, then dispatch
@@ -190,8 +191,10 @@ can parse per task.
190
191
  ```
191
192
 
192
193
  When a dispatch returns, that box is idle again — assign it the next task
193
- from the queue. Never run two dispatches against the same box at once,
194
- and never dispatch into a box whose `claimed_by` is not your owner id.
194
+ from the queue, or **stop it immediately if nothing is queued for it**
195
+ (`gdkbox stop <box>`; see the "never leave a box running idle" guardrail).
196
+ Never run two dispatches against the same box at once, and never dispatch
197
+ into a box whose `claimed_by` is not your owner id.
195
198
 
196
199
  **Delegating to subagents:** the renewal in `run_task` above is for when
197
200
  *you* run the loop. If you hand a task to a subagent instead, do the
@@ -214,14 +217,20 @@ can parse per task.
214
217
  and summarize per task: success/failure (exit status), what the agent did,
215
218
  and any follow-ups. Surface failures explicitly.
216
219
 
217
- 6. **Wind down — release every box you claimed.** When the batch is done,
218
- release **all** your boxes so the pool is usable by others (a lease would
219
- expire eventually, but do not rely on it for normal completion). Then keep
220
- them warm (`gdkbox stop`, later `gdkbox start`) or `gdkbox rm --force` to
221
- discard:
220
+ 6. **Stop idle boxes as you go; release everything at wind-down.** A box with
221
+ no task running right now must not be left running — `gdkbox stop <box>`
222
+ it the moment it goes idle (stopping keeps the claim, license and seeded
223
+ data; `gdkbox start <box>` brings it straight back). Do this throughout the
224
+ batch, not only at the end — especially whenever you pause to wait on the
225
+ user, on a review, or on another box. See the guardrail below.
226
+
227
+ When the **whole batch is done**, stop every box, then release **all** of
228
+ them so the pool is usable by others (a lease would expire eventually, but
229
+ do not rely on it for normal completion), or `gdkbox rm --force` to discard:
222
230
 
223
231
  ```sh
224
232
  for b in $(gdkbox ls --json | jq -r ".[] | select(.claimed_by==\"$OWNER\") | .name"); do
233
+ gdkbox stop "$b" # no box left running once its work is done
225
234
  gdkbox release "$b" --owner "$OWNER"
226
235
  done
227
236
  ```
@@ -245,7 +254,8 @@ for i in 1 2 3; do
245
254
  gdkbox dispatch "pool-$i" --task-file "tasks/$i.md" --json > "out/$i.json" 2>&1 &
246
255
  done
247
256
  wait
248
- for i in 1 2 3; do gdkbox release "pool-$i" --owner "$OWNER"; done
257
+ # batch done: stop each box so none is left running, then release the pool
258
+ for i in 1 2 3; do gdkbox stop "pool-$i"; gdkbox release "pool-$i" --owner "$OWNER"; done
249
259
  ```
250
260
 
251
261
  Adopt one more existing free box when the queue outgrows the pool (each call
@@ -303,6 +313,15 @@ rest of the pool accordingly, and give the claim a generous `--ttl`.
303
313
  heavy. Prefer reusing the pool over creating more boxes.
304
314
  - **One dispatch per box at a time.** Serialize tasks on a box; parallelize
305
315
  *across* boxes.
316
+ - **Never leave a box running idle.** A box is expensive (a full GDK
317
+ container); it must be running *only* while a dispatch is actually using it.
318
+ The moment a box has no task queued for it — including whenever the
319
+ orchestration pauses to wait on the user, on a review, or on another box —
320
+ `gdkbox stop <box>` it. Stopping frees the host's memory and CPU but **keeps
321
+ the claim, license and seeded data**, so `gdkbox start <box>` resumes it in
322
+ seconds. Keep the claim while the box is yours and only *release* at session
323
+ wind-down; stopping is for idleness, releasing is for "done with it". If you
324
+ stopped boxes mid-session, `gdkbox start` them again before dispatching.
306
325
  - **Own every box you touch, for the whole batch.** Provision with
307
326
  `up --owner`, adopt with `claim`, and hold the claims until wind-down —
308
327
  then release them all. Claims are advisory: `dispatch` will not stop you
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gdkbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - jotolo