Repository navigation
v0.8.0
Routing
--min-size light|medium|heavy(that class or larger) and--size C[,C](one of these classes) onlanq run
(single,--shards,--dry-run) andlanq health. They do not go together. A machine's size is itssize:in
machines.ymlwhen it has one, else the probed class (under 6 GB light; 16 GB or more with 4 cores heavy; else
medium).- Optional machine key
size: light|medium|heavy: declare a 16 GB laptopmediumto keep heavy jobs off it, or a
machine whose memory cannot be probed. Without it nothing changes. - New permanent reason codes
wrong_size(the machine's size does not match) andsize_unknown(no declared size and
no reported memory). A declared size is judged from the config alone, so a job no machine can ever take for its
size ends at once with 75 andretryable: false, before any ssh. --on m[,m]onlanq run(also--shards,--dry-run) andlanq health: only these machines, matched ignoring
case; an unknown name is refused (exit 2) before any network. It only narrows: capabilities, size,--mem, holds,
allowed hours, slots and wake rules all still apply. A pinned machine that is busy or held isNoCapacity
(retryable: true, waits out--wait); one that can never take the job ends at once (retryable: false).
Suggested next steps keep--on,--sizeand--min-sizeand never drop them.
Plan files
lanq run --planruns the jobs oflanq.ymlat the repository top (--plan-file PATHfor another file):
version: 1, optionaldefaults:, and up to 32jobs:, each onelanq runline (command,dir,needs,
mem,sizeormin_size,on,timeout,shards,target_minutes,shard_retries,fail_fast,fetch)
plusafter:to order them. Jobs run side by side on one snapshot of the repository and give one result.- Every job is checked as its own
lanq runline before anything is sent (allowlist, allowed directories, flags,
command-line and payload secret scans, the Windows rule): one refusal refuses the plan (2), and a job no machine can
ever take ends it with 75 before the snapshot. - A job whose
after:job did not complete isSkipped. Others keep running unless--fail-fast(running jobs are
cancelled and cleaned up, the rest skipped).--waitcounts only while no job of the plan holds a slot. --only a,bruns only those jobs;--dry-runprints each job's equivalentlanq runline and what it would do now
(WouldRun,WouldWait,Pending,NoCapacity), sending nothing;--jsonprints one object with ajobsarray.
Exit 0 only when every job completed, else the first failed job's own code, then 2, 124, 70, 75, 130.lanq.ymlhas no keys for hosts, ssh, keys, env, paths, wake, priority or policy: unknown keys are refused with the
line and a did-you-mean, and machine settings are pointed back tomachines.yml. YAML anchors, aliases and merge
keys are refused (share values withdefaults:). A job can do nothing itslanq runline could not.- Guide: https://github.com/jangolath/lanqueue/blob/main/docs/PLANS.md
Windows workers
&and|in arguments are allowed when the program is a native.exe(dotnet test --filter "A|B"): a bare name
or a path with no extension or.exe, notcmdor a package-manager shim (npm,npx,pnpm,yarn,
corepack). The worker checks again before starting anything: when the name resolves there (withpath_prepend:)
to anything but an.exe, nothing runs and the job isRejected(2) naming what it found."<>^%stay
refused for every program.- Workers whose build account is denied WMI/CIM now work: memory falls back to .NET (
GlobalMemoryStatusEx), load to
twoGetSystemTimessamples, and with no source at alllanq healthshowsload ?and load never holds the
machine. Each job runs in a Windows job object, so a timeout, Ctrl+C, a stale slot or cleanup ends the whole process
tree without WMI (taskkillstays the fallback). lanq doctor --remoteshows awmiWARN for such a worker, with what the owner could grant.
Setup
lanq initwithout--configwrites the per-user config file lanq reads without flags
(%APPDATA%\lanq\machines.yml,~/.config/lanq/machines.yml), creating the folder; never the current folder.- When the
dotnetcheck fails (dotnet --versionnow needs an SDK: a runtime-only install counts as missing),
lanq doctor --remotesearches the worker's usual and private install folders (read-only, about five seconds) and
names thepath_prepend:andDOTNET_ROOTlines to add;lanq makeready --addproposes them in the entry it shows.
lanq still never edits a config or a worker'sPATHby itself.
Behaviour changes
-
lanq health --json:sizeis the effective size (the machine'ssize:when set, else the probe), and every row
gainssizeSource(probeorconfig) andloadKnown(falsewhen the worker could not measure its load). The
text line changes only for a machine withsize:((size: medium in machines.yml; probe: heavy)). -
jobs.jsonllines of a plan run gain optionalplanJob(the job's name) andplanRun(shared by one plan run);
vstays 2. -
Jobs of a plan run get
LANQ_PLAN_JOB=<name>in their environment. -
On Windows, processes a job leaves running (build servers, for example) now end with the job.
-
lanq initno longer writes./machines.yml(see Setup). -
Loading a config now checks the Windows job script at its largest (a job given
&or|, the longest plan job
name), so a Windows machine whoseenv:leaves no room for such a job is refused at load instead of at run time. -
With no per-user config folder (no usable
HOME/APPDATA),lanq initand config lookup exit 2 and name
--config/LANQ_CONFIG; a relativeXDG_CONFIG_HOMEis ignored.
Security
- Windows workers run lanq's helper script (
work_root/bin) only when its SHA-256 matches lanq's own copy, and lanq
rewrites it before each job if it changed, so a job cannot plant code in later jobs' wrapper, stop, cleanup or doctor
scripts, or stop a cleanup before it frees the slot. - The job wrapper's
LANQ_EXITandLANQ_WINARGSlines carry a per-run random value that is not in the job's
environment, so a job that prints them is ordinary output, not a refusal or an exit code. lanq.ymlrefuses YAML anchors and aliases (&name,*name) with their line number, so an alias-bomb file cannot
hang lanq.
Fixed
- Windows workers denied WMI showed
ram ?, a silentload 0.00and sizeunknown, and a timeout, stop or stale-slot
cleanup could leave the job's process tree running. dotnetpassedlanq doctor --remoteon a worker with only a .NET runtime, and the job then failed with "No .NET
SDKs were found".- With
--planand--wait 0, a job no longer endsNoCapacitywhen a sibling frees the slot just after the job saw
it taken; it looks again first (also for jobs with shards). - When several plan jobs fail, the plan exits with the first failed job's own exit code in
lanq.ymlorder, whatever
order they were launched in. - When a Windows job times out, its process tree is walked before the job object is ended, so a grandchild started
before the job object took hold is stopped too.
Full changelog: https://github.com/jangolath/lanqueue/blob/main/CHANGELOG.md
What's Changed
- v0.7.0: doctor/stats --json, timing-aware shards, job log hardening, logs pruning by @jangolath in #12
Full Changelog: v0.7.0...v0.8.0