Commit Graph
5 Commits
Author SHA1 Message Date
Daniel SamsonandClaude Sonnet 4.6 6325a87670 review fixes: safe reload warnings, idiomatic @field, range-check guard, e2e FIFO assert
CI / test (pull_request) Successful in 3m20s
- reloadConfig: use a local ArrayList per reload instead of the shared
  ctx.config_deprecations — the previous approach could reallocate the
  backing array into the short-lived reload arena, causing use-after-free
  on successive reloads when warning counts grew between reloads
- fromDoc: replace unsafe @ptrFromInt/@offsetOf arithmetic with &@field,
  which is idiomatic Zig and carries no extra risk; remove the incorrect
  comment claiming @field materialises a copy
- problems(): fix the out.items.len == 0 range-check guard to count only
  non-warning (error) items so a deprecated setting no longer suppresses
  the range check for the rest of the document; add regression test
- deprecations now typed as []Problem throughout (env-var warnings carry
  key/message/is_warning like file-level ones) so callers have full context
- e2e: assert b1 never leaves QUEUED while a1 is running (true FIFO check)
- sections table shared by fromDoc and checkDoc eliminates drift risk
  between the two section lists; problemNodes refactored to ArrayList
  single-pass; isDeprecatedKey inlined; isDeprecatedEnvName comment added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-11-12 14:38:30 +00:00
Daniel Samson 18c77a6e96 e2e: assert config show --defaults has no load levels
CI / test (pull_request) Successful in 3m22s
Completes the last phase-6 item of issue #2: the defaults check now
explicitly asserts max_high_jobs is absent from the output, not just
that the old assertion is gone.
2026-11-12 11:47:27 +00:00
Daniel Samson 3a4c4fa326 daemon: flush deprecation warnings into the log at startup
CI / test (pull_request) Successful in 3m18s
The re-exec'd daemon inherits the buffered stderr writer over
logs/zag.log from main.zig, so the deprecation warnings printed by
Context.loadConfigOnce stayed in the buffer until the process
exited and 'zag service logs' showed nothing right after starting
with an old config. Flush stderr right after printing the
warnings so they reach the log at startup, as the issue requires.

e2e now starts the daemon with a config that still carries the
deprecated load-level settings and asserts the warnings are in the
log while the daemon is running; the settings themselves are
ignored, so the effective config is unchanged for the rest of
the suite.
2026-11-12 10:40:41 +00:00
Daniel Samson 4abc94f681 load levels: remove load levels from model, config, CLI, IPC, tests, docs
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.
2026-11-12 10:07:30 +00:00
Daniel SamsonandClaude Sonnet 5.5 9d08e4d3fd feat: zag CLI with all commands, human/JSON/XML output and e2e smoke test (M5)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 13:47:34 +01:00