load levels: remove load levels from model, config, CLI, IPC, tests, docs
CI / test (pull_request) Successful in 3m20s
CI / test (pull_request) Successful in 3m20s
Completes issue #2 on top of the phase-1 strict single-job FIFO scheduler. Removed: - Job.load_level / Manifest.load_level / CreateOptions.load_level and the manifest.json loadLevel field (old manifests still parse: unknown fields are ignored) - loadLevel in job JSON and <load_level> in XML output (field order shifts; old JSON still parses) - the [load_levels] config section, service.max_concurrent_jobs, ZAG_LOAD_LEVELS_*/ZAG_LOADLEVELS_*/ZAG_SERVICE_MAX_CONCURRENT_JOBS env vars, loadlevel.zig / loadclass.zig and the default .load files Friendly deprecation: old configs and environments still load fine. config validate and config show report the removed settings as non-fatal warnings (validate exit 1 stays reserved for real errors) and the CLI/daemon logs them once at startup. --load-level is gone from zag run; old IPC clients sending loadLevel are simply ignored. e2e: wait_state is now portable to macOS bash 3.2 (it silently skipped three checks before) and a serial-execution check asserts the second job stays QUEUED while the first runs and both finish in FIFO order. README and AGENTS.md document the deviation from barn.
This commit is contained in:
20 files changed
+250
-543
No files matched your search
@@ -16,6 +16,9 @@ Guidance for AI coding agents working in `zag`, the Zig port of the
|
||||
- Keep CLI flags, JSON/XML output field order, config defaults and the on-disk job
|
||||
directory layout compatible with barn (`zag` replaces `barn` in names and paths).
|
||||
- Port specs from barn's unit tests alongside each module (`test` blocks).
|
||||
- **Intentional deviation (issue #2)**: zag runs only one job at a time (strict FIFO);
|
||||
barn's load levels are gone. Old `[load_levels]` / `max_concurrent_jobs` settings and
|
||||
`ZAG_LOAD_LEVELS_*` env vars still load, are reported as non-fatal warnings, and ignored.
|
||||
|
||||
## Layout
|
||||
|
||||
@@ -28,19 +31,17 @@ Guidance for AI coding agents working in `zag`, the Zig port of the
|
||||
| `src/fsutil.zig` | Atomic writes, trimmed reads, advisory `FileLock` |
|
||||
| `src/jsonpretty.zig` | Streaming JSON writer matching Jackson `INDENT_OUTPUT` layout |
|
||||
| `src/toml.zig` | Parser for barn's TOML subset (`[section]`, `key = value`, arrays) |
|
||||
| `src/loadlevel.zig` | `high`/`medium`/`low` load levels |
|
||||
| `src/job.zig` | `Job`, `Manifest`, `ExitCode` types |
|
||||
| `src/dirs.zig` | On-disk layout under the base dir |
|
||||
| `src/statefiles.zig` | One-value-per-file job state (atomic) |
|
||||
| `src/repository.zig` | Job create/find/transition/retry persistence, `manifest.json` I/O |
|
||||
| `src/config.zig` | Config structs, defaults, TOML loading/merging, `ZAG_*` env overrides, validation |
|
||||
| `src/loadclass.zig` | `.load` whitelist parsing and load-level classifier |
|
||||
| `src/defaults.zig`, `src/defaults/` | Default `zag.conf` and `*.load` files embedded in the binary |
|
||||
| `src/config.zig` | Config structs, defaults, TOML loading/merging, `ZAG_*` env overrides, validation, deprecated-setting warnings |
|
||||
| `src/defaults.zig`, `src/defaults/` | Default `zag.conf` embedded in the binary |
|
||||
| `src/retry.zig` | Retry decision and backoff/jitter delay |
|
||||
| `src/proc.zig` | Spawn with log redirection, process-group signals, liveness |
|
||||
| `src/runner.zig` | Runs one job: heartbeat, timeout, kill, completion, retry |
|
||||
| `src/recovery.zig` | Startup crash recovery of orphaned running jobs |
|
||||
| `src/scheduler.zig` | Per-load-level concurrency, thread per job, `killJob` |
|
||||
| `src/scheduler.zig` | Strict single-job FIFO scheduling, thread per job, `killJob` |
|
||||
| `src/usage.zig` | `ps`/`nvidia-smi` sampling, `usage.csv`, summaries |
|
||||
| `src/cleanup.zig` | Automatic and manual (`zag clean`) cleanup planning |
|
||||
| `src/jobjson.zig` | `Job` JSON (shared by CLI `--output=json` and IPC) |
|
||||
|
||||
Reference in new issue
Block a user