Repository navigation
feat(sdk): workflowkit (lobster IR helpers + lowering), nested plan desugar/resugar, systemd timer - #333
Conversation
Adds sdk/workflowkit — the engine-agnostic workflow IR library the workflow
engine plugins build on:
- expr.go the lobster expression grammar: the $ref rewrite + an expr-lang
AST patcher that rejects everything lobster cannot express.
- template.go ${arg} substitution + the LOBSTER_ARG_* naming.
- args.go ResolveArgs / ResolveTaskDir / MergedEnv, moved from plugin-task.
- closure.go the depends_on closure, moved from plugin-task (cycles named).
- validate.go ValidatePipeline: exec-arm XOR, co-fields, unique ids incl.
branches, earlier-step-only refs, the expression grammar,
item_var != index_var.
- lower.go Lower: the pipeline -> (.lobster, generated charly.yml) pair.
- cron.go CronToOnCalendar, the ONE cron -> systemd conversion.
- graph.go mermaid / dot / ascii renderings of the dataflow graph.
Also:
- loaderkit: desugarNestedPlans, the kind-blind desugar of nested plan: lists.
- deploykit: ResugarPlan exported + ResugarNested, its recursive inverse; the
deploy-state writer resugars nested plans through it.
Assisted-by: Claude Code Anthropic Claude Opus 4.5 (fully tested and validated)
…l helpers The workflow lowering needs a scheduled engine run: a systemd user .timer plus the ONESHOT service it activates. deploykit gains systemd_timer.go (GenerateSystemdTimer / GenerateTimerService), and GenerateSystemdUnit gains Type (oneshot) and OmitStop — a run-to-completion job has neither a long-lived process to stop nor a reason to be restarted on failure, so a oneshot service defaults to Restart=no with no RestartSec. kit.EnableUnit / kit.ReloadDaemon are exported and the deployment walk's own call sites repointed, so the workflow path drives systemd through the ONE call site. Tests: golden unit/timer text (deploykit/testdata/*.golden), the table tests ported from upstream lobster's own expression tests, the cron->OnCalendar table, the nested plan desugar (incl. an inline entity's plan), and a ResugarNested round-trip. go.mod: spec v0.2026276.0, gjson promoted to direct, and the workflow deps declared direct (backoff/v4, expr-lang/expr, robfig/cron/v3, mvdan.cc/sh/v3, emicklei/dot). Assisted-by: Claude Code Anthropic Claude Opus 4.5 (fully tested and validated)
…nimported deps
Three findings from the sdk#331 review.
1. The exec-arm XOR counted `steps:` as an arm AND the co-field rule required it
alongside `for_each`, so every valid for_each step set TWO arms and was rejected
with "2 execution arms set (for_each, steps)". `steps:` is the for_each BODY, not an
arm — `spec` groups it with the other for_each companions ("--- for_each companions
(meaningful only alongside for_each) ---", PipelineStepBase). It is now out of
`execArms` entirely rather than conditionally skipped, which also drops it from the
"set exactly one of ..." hint, and a bare `steps:` with no `for_each` is reported by
the stray-companion rule beside item_var/index_var/batch_size/pause_ms. `parallel` is
unaffected: it is its own arm via `parallelBranches > 0`.
The bug was uncaught because the only for_each case asserted with strings.Contains,
where a stray arm error passes. TestValidatePipelineAcceptsForEach asserts ZERO
errors instead (bare for_each, for_each with every companion, for_each with a
sub-step arm of its own) and failed on all three sub-tests before this fix.
2. cron.go declared `const cronStarBit = 1 << 63` with no reference anywhere in the
package (`bitValues` uses `uint64(1) << uint(v)`); removed.
3. go.mod listed `cenkalti/backoff/v4` and `mvdan.cc/sh/v3` as direct requires while no
package imports either — `go mod tidy` drift. Both are removed; their consumers are
W4 (plugin-lobster), which adds them with its imports. `go mod tidy` is now a no-op
(`go mod tidy -diff` is empty).
Gate: gofmt -l . (clean), go vet ./..., go test ./... -count=1 (all 15 packages ok),
plus the CI cross-compile matrix linux/{amd64,arm64,arm,386} all OK.
Assisted-by: Claude Code Anthropic Claude Opus 4.5 (fully tested and validated)
…t the doc example
Two sdk#331 round-3 findings, both in cron.go.
1. The CronToOnCalendar doc example claimed "*/15 9-17 * * Mon-Fri" lowers to
"... 09..17:0/15:00". The code pads every numeric component (padTimeField), so the
real output is "... 09..17:00/15:00", matching the file's own {"*/5 * * * *",
"*:00/05:00"} row. Verified by RUNNING the function, not by reading it; the code is
right and the comment was wrong, so the comment is corrected to the real string.
2. A restricted day-of-month AND a restricted day-of-week were lowered to one
OnCalendar= line ("0 3 1 * 1" -> "Mon *-*-01 03:00:00"), which is silently WRONG:
robfig/cron — the parser this function validates through — fires when EITHER field
matches, while systemd's calendar spec requires BOTH. One OnCalendar= line cannot
express that OR, and GenerateSystemdTimer writes exactly one, so the converter now
returns a descriptive error naming both field values, the cause (cron OR vs systemd
AND) and the remedy (split into two schedules). Either field restricted ALONE is
unaffected: "0 3 1 * *" and "0 3 * * 1" still lower exactly as before, since an
unrestricted field is not a restriction. The blanket "every cron form lowers
correctly" claim is replaced with this exception stated explicitly.
Tests: TestCronToOnCalendarRejectsRestrictedDomAndDow (new; it failed before this
change, reporting the wrong lowering) plus the exact-string table rows for the two
single-restriction forms and the padded-step example.
Gate: gofmt -l . (mute), go vet ./..., go test ./... -count=1 (all 15 packages ok,
loaderkit included with main's #332 changes).
Assisted-by: Claude Code Anthropic Claude Opus 4.5 (fully tested and validated)
…at exists sdk#331 round 4 (R1, comment vs reality). The TestMain comment above updateGoldens claimed the switch was shared by "systemd_unit_test.go / systemd_timer_test.go". Neither is true: systemd_timer_test.go does not exist anywhere, and systemd_unit_test.go is pre-existing (it is in origin/main, not in this PR's diff) and references updateGoldens/checkGolden/golden/testdata nowhere — so it does not share the switch either. Both the unit and timer golden tests live in systemd_test.go, which is the file that declares updateGoldens/checkGolden and the four goldens it checks. Comment only; no code, no golden and no assertion changes. Gate: gofmt -l . (mute), go vet ./..., go test ./... -count=1 (all 15 packages ok). Assisted-by: Claude Code Anthropic Claude Opus 4.5 (fully tested and validated)
…rify it
sdk#331 round 5 — the same silent-mis-lowering class as the DOM+DOW rejection, at a
different point of CronToOnCalendar. numField inferred CONTIGUITY from the first gap
alone (`step := vals[1]-vals[0]; if step == 1 { ... }`), so any list whose first two
values are consecutive but which has a later gap rendered as a `..` range covering
values cron never asked for — the schedule then fires MORE often than authored:
"0 1,2,3,5 * * *" -> "*-*-* 01..05:00:00" (also fires at 04)
"0,1,2,5 * * * *" -> "*-*-* *:00..05:00" (also fires at 03, 04)
The `..` branch now verifies its property over the WHOLE set with a loop, mirroring the
`lo/step` branch that already did exactly that. The `..` rendering is kept (it is
load-bearing: `*/15 9-17 * * Mon-Fri` legitimately renders `09..17:00/15:00`), and a
non-contiguous list still falls back to the exact comma list.
numField's doc comment named only two of its three renderings — it never promised a
`..` range, which is how the code came to contradict its own doc. It now names all
three and states the rule the whole function follows: every shortcut asserts a property
of the whole value set and verifies it, because one inferred from a partial observation
widens the schedule.
Blast-radius audit of every rendering path in this file for the same class (a property
inferred from a partial observation), each verdict stated in the code where it belongs:
- numField `*` — correct: bitValues is monotonic over [lo,hi] and visits each
value once, so the result is sorted, unique and bounded; with
those three properties, len==hi-lo+1 IS the whole range. Recorded
on bitValues, which establishes the invariant the shortcut uses.
- numField `lo/step` — correct: verifies uniformity with a real loop, requires
vals[0]==lo, and `last+step > hi` is exactly the systemd
"unbounded from lo to the field end" condition — a short run
(0,6,12,18 in hours -> 00/06) still reaches the end, a run that
stops early falls back to the comma list.
- pad2List — correct: a total map over every value (fmt.Sprintf("%02d")) with
no length or gap inference at all, so day-of-month and month
lists are exact by construction and never widen; pinned by the
new non-contiguous DOM and month rows.
- padTimeField — correct: rewrites every maximal digit run, so a whole comma list
pads (0,1,2,5 -> 00,01,02,05), while `*`, `..`, `/`, `,` and `-`
pass through verbatim.
- DOW name join — correct: maps every element of the sorted, 0..6-bounded set and
joins; cron 7-as-Sunday is not reachable here because robfig's
own parser rejects it loudly ("end of range (7) above maximum
(6)"), which is an error, not a silent widening.
- bitValues — correct: it is where the invariant originates (see above).
Tests: TestCronToOnCalendar gains one non-contiguous list per field (hour, minute,
day-of-month, month) plus a contiguous control proving the `..` range survives. The
hour and minute rows failed against 0593f7c exactly as predicted; the DOM and month
rows pass before and after, which is the empirical proof that pad2List has no shortcut.
Gate: gofmt -l . (mute), go vet ./..., go test ./... -count=1 (all 15 packages ok),
go mod tidy -diff (empty), cross-compile linux/{amd64,arm64,arm,386} all OK.
Assisted-by: Claude Code Anthropic Claude Opus 4.5 (fully tested and validated)
Review — BLOCKHead SHA: Change class: library/SDK code (additive) — new Comment thread: empty (0 comments) — nothing to re-derive; no maintainer sign-off is required for this non-security-machinery change. Security screen: PASS (no T1–T4 finding). No secrets/egress, no guardrail weakening, no scope mismatch — every diff item is named in the body; the three new modules ( Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — PASSHead SHA: Security screen: PASS Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
Wave W1 of the workflow-IR work: the
sdkhalf of makingkind:pipelinespeak lobstersyntax while executing the full charly plugin grammar.
Tracks
opencharly/charly#758(the workflow-IR epic) — this is wave W1 of its producer-first chain.sdk/workflowkit(NEW, 8 files) — the kind-blind IR helpers the lobster engine and thelowering both build on:
expr.go(lobster$refgrammar overexpr-lang/expr+ gjson),template.go(
${arg}+LOBSTER_ARG_*),args.go(ResolveArgs/ResolveTaskDir),closure.go(DFS cycle path),
validate.go(ValidatePipeline),lower.go(Lower),cron.go(CronToOnCalendar),graph.go(mermaid/dot/ascii), plus 8 test files and6
.goldenfixtures.loaderkit/parse.go—desugarNestedPlans: a recursive, kind-blind desugar of any nestedplan:sequence of mappings, stopping at member-kind keys.deploykit—resugarPlan→ exportedResugarPlan; newResugarNested(node, primaries)(the recursive inverse);
SystemdUnitConfiggainsType/OmitStop; newsystemd_timer.gowithGenerateSystemdTimer+GenerateTimerService.kit—enableUnit/reloadDaemonexported asEnableUnit/ReloadDaemon, internalcallers repointed.
workflowkit—deploykit/systemd_test.goplus its fourdeploykit/testdata/*.golden(systemd-oneshot.service,systemd-unit.service,systemd-timer.service,systemd-timer.timer), andloaderkit/nested_desugar_test.go.go.mod/go.sum— exactly five direct requires change: specv0.2026273.203→v0.2026276.0(the W0 tag);tidwall/gjson v1.19.0promoted to direct; and threeadditions, each with an importing file in this diff —
expr-lang/expr v1.17.8(expr.go),robfig/cron/v3 v3.0.1(cron.go),emicklei/dot v1.11.0(graph.go).go mod tidy -diffis empty.
Three decisions worth naming, each taken from a live read rather than an assumption:
deploykit, not in the new plugin.GenerateSystemdUnitemits
Type=simplewith a conditionalExecStop, and its argv escaper is unexported.A timer-triggered job needs a oneshot with no stop. Putting
GenerateSystemdTimerindeploykitreuses that escaper without exporting an escaping primitive into the publicAPI.
charly.ymlflat-imports the project'scharly.ymlBY FILE PATH. Theloader reads a flat (non-
@) import entry straight withos.ReadFileand never joins itagainst a directory, so a flat import pointing at a directory silently fails; only an
@-namespaced entry is stat'ed and joined with the unified file name. A file path is theone form that works. The generated file carries that reasoning as a comment.
--output, never plugin-task's internal--json.--jsonisplugin-task's user-facing listing shape;
--output(added by W3) is the final step'sraw stdout, which is what lobster's
$id.jsonmust parse. W1's own goldens assertgenerated text only, so no live flag is needed at this gate.
Lowerproduces theenv: {REF_n: $id.path}+-p REF_n="$REF_n"pair so a lobster refreaches the charly step shell-safely, and quotes
charly:argv withspec.ShellQuote(no hand-rolled quoting).
Review round 1 — BLOCK, all four findings fixed in ONE commit (
f8ab8cc)The first verdict blocked. Every finding is addressed in a single commit; none was re-argued.
validateStepBaselistedstepsamong themutually-exclusive
execArms, whilespec.PipelineStepBasegroupsstepsunder"--- for_each companions (meaningful only alongside for_each) ---" — it is the for_each body,
not an arm. Every valid
for_eachstep therefore set two arms and was rejected with2 execution arms set (for_each, steps), i.e. the validator rejected every valid for_eachpipeline. The PR's own tests missed it because the one for_each case asserted with
strings.Contains, which masked the spurious error. Fix:stepsis removed fromexecArmsandmoved into the existing stray-companion rule (guarded by
v.forEach == ""besideitem_var/index_var/batch_size/pause_ms), so a baresteps:with nofor_eachis stillrejected — one rule for all five companions.
parallelis untouched (its own arm viaparallelBranches > 0).cron.go'sconst cronStarBit = 1 << 63was referenced by nothing;bitValuesreconstructs the bit-set from the field width, so it had no use site.go.moddrift removed.cenkalti/backoff/v4andmvdan.cc/sh/v3were direct requires with noimporting file in the diff. Their consumers are W4 (
plugin-lobster), which adds them togetherwith their imports.
go mod tidy -diffis now empty; 10 stalego.sumlines went with them.workflowkit… 9 files … plus 5 testfiles"; the diff adds 8 source files and 8 test files (6 goldens, which was right).
New test
TestValidatePipelineAcceptsForEach(3 sub-tests: bare for_each; for_each with everycompanion; for_each whose sub-steps carry arms of their own). It asserts zero errors, not a
substring. It FAILED against
641f074with exactly the spurious-arm error:and passes at
f8ab8cc, together with the pre-existingTestValidatePipelineRulestable includingits new
steps_without_for_eachcase.Review round 2 — two A1 body findings, both fixed here
Round 2 blocked on the body alone; it re-derived all four round-1 findings against
f8ab8ccandmarked every one fixed (
stepsout ofexecArms+ the zero-error test;cronStarBitgone;the two unimported requires gone; the counts reconciled), and recorded
placement: CORRECT. Bothround-2 findings were mine and are corrected in this revision:
go.modbullet was stale against the commit it describes — it still listedcenkalti/backoff/v4andmvdan.cc/sh/v3as added, the two the round-1 fix removed. It nownames exactly the five requires that change.
deploykit/systemd_test.go, its fourdeploykit/testdata/*.golden, orloaderkit/nested_desugar_test.go. All are now listed.Full file accounting — 35 files,
+2911/-27:workflowkit_test.go+ 6.golden= 22deploykitdeploy_nodeform.go,systemd_unit.go(M);systemd_timer.go,systemd_test.go(A); 4testdata/*.golden(A) = 8loaderkitparse.go(M),nested_desugar_test.go(A) = 2kitwalk.go(M) = 1go.mod,go.sum(M) = 2Review round 3 — BLOCK on the merged head
7bfa61d: two CODE findingsPlacement re-confirmed CORRECT; every round-1 and round-2 finding re-derived as fixed.
Round 3 raised two code findings, both in
workflowkit/cron.go, and both fixed in ONE commit(
a5b81bf):The doc example stated an output the code cannot produce. The comment claimed
"*/15 9-17 * * Mon-Fri" -> "Mon,Tue,Wed,Thu,Fri *-*-* 09..17:0/15:00".padTimeFieldzero-padsevery numeric component of a rendered field, so the minute step start is
00, not0— and thefile's own table already proved the convention (
{"*/5 * * * *", "*-*-* *:00/05:00"}). Theexample also padded the hours (
09..17) while leaving the minute step unpadded: internallyinconsistent, not merely stale. Verified by running the function, not by reasoning:
The code was right and the comment was wrong, so the comment was corrected and an
exact-string table row now pins the documented example.
A silently WRONG lowering at cron's divergence from systemd.
0 3 1 * 1lowered toMon *-*-01 03:00:00— a restricted day-of-month and a restricted day-of-week on oneOnCalendar=line. That is wrong semantics: robfig/cron — the parser this function validatesthrough — fires when EITHER field matches when both are restricted, while systemd's
OnCalendar=requires BOTH. A single line cannot express cron's OR, so the output wascorrect-looking and wrong, and the doc's blanket claim that "every cron form lowers correctly"
was false exactly there.
Fix: reject with a descriptive diagnostic, not a second line and not a chosen
interpretation.
CronToOnCalendarreturns a singlestringandGenerateSystemdTimer(
deploykit/systemd_timer.go:63) writes exactly oneOnCalendar=%sline by documentedcontract, so emitting two alternatives would change both APIs — out of scope for this wave. The
guard is
if !domAll && !dowAll(domAll= all 31 days,dowAll= all 7), so it fires onlywhen both fields are restricted; an unrestricted field is not a restriction, and the
single-restriction forms are pinned byte-for-byte in the table:
New test
TestCronToOnCalendarRejectsRestrictedDomAndDow— asserts an error, that it quotesthe expression, names both field values, and explains the either/both divergence with the
"split it into two schedules" remedy. It FAILED against
7bfa61d:and passes at
a5b81bf, with the fullTestCronToOnCalendartable (19 rows) green.The doc's blanket claim is gone, replaced by the three working examples plus an explicit
paragraph naming the rejected form, why it is rejected, and that single-restriction forms are
unaffected.
No in-repo caller is affected: the only non-test references to
CronToOnCalendarare docreferences in
deploykit/systemd_timer.go, whose contract (it receives a pre-resolvedOnCalendarstring) already places the resolution — and therefore the possible error — at thecaller, which is W4's.
Review round 4 — BLOCK on
a5b81bf: ONE finding, a wrong commentEverything else re-derived as fixed. The round-4 verdict re-derived all four round-1 findings,
both round-2 A1 findings, and all four round-3 findings as fixed at
a5b81bf; verified theaccounting then in force (
+2881/-27) as truthful against the 35 file headers — theround-5 fix later added
+30lines, taking the total to+2911/-27; and confirmed theanalysed on a live systemtier as honest, not inflated. Security screen PASS, placementCORRECT.
The one block was R1 — comment ↔ reality,
deploykit/systemd_test.go:12, which read:// systemd_unit_test.go / systemd_timer_test.go share this `-update` switch: ...Both named files were wrong, and I verified it against the tree rather than taking it on trust:
systemd_timer_test.godoes not exist anywhere.systemd_unit_test.godoes exist but is pre-existing (present inorigin/main, absent fromthis PR's diff) and references
updateGoldens/checkGolden/golden/testdatanowhere — so it does not share the switch either.
updateGoldensis declared and used only indeploykit/systemd_test.go, which checks exactlyfour goldens.
grep -rn 'updateGoldens\|checkGolden' deploykit/now returns eight hits, all insystemd_test.go.Fixed in
0593f7c— a three-line comment change and nothing else:This is the second consecutive round blocked on the same defect class, and it is worth naming
because it is where this wave's remaining risk lives: round 3 blocked on a
cron.gocommentasserting an output the code could not produce; round 4 blocks on a
systemd_test.gocommentasserting files that do not exist. Both are comments asserting state that does not hold — and a
reader believes them. In an otherwise-clean 35-file wave, the residue was in the prose, not the
code. Every comment in this diff that names a file, symbol, or output has now been checked against
the tree.
Review round 5 — BLOCK, and the finding was a REAL bug (
6052e1f)The gate auto-closed the predecessor on this verdict. The finding was valid and is fixed here.
workflowkit/cron.gonumFieldinferred contiguity from the FIRST gap only. The..branch readstep := vals[1] - vals[0]and, onstep == 1, emitted a RANGE — so any list whose first two valuesare consecutive but which has a later gap rendered as a range covering values cron never asked for.
The schedule fires more often than authored:
This is the same silent-mis-lowering class as the round-3 DOM+DOW finding, at a different point of
the same function — and the sibling
lo/stepbranch directly above it verifies its property with aloop while the
..branch merely assumed it.numField's own doc comment named only*andlo/stepand said "else a comma list", so the code contradicted its own doc as well as
CronToOnCalendar's"lists, ranges, steps and names all lower correctly".
Fix 1 — the
..branch now verifies contiguity over the whole set, mirroring the/stepbranch'sexisting shape:
The
..rendering is kept — it is load-bearing (*/15 9-17 * * Mon-Frilegitimately renders09..17:00/15:00) — and a non-contiguous list falls back to the exact comma list.Fix 2 —
numField's doc comment now names all three renderings (*,lo..hifor a contiguousrun,
lo/step, else a comma list) and states the rule the function now follows.Fix 3 — the blast-radius audit (the duty the round-3 fix skipped). Every rendering path in
cron.gowas audited for the same class — a property inferred from a partial observation — with astated verdict:
numField's*branch (correct —bitValuesis monotonic and visits each value once,so the result is sorted/unique/bounded, and with those properties count-equals-range is the whole
range); the
lo/stepbranch (correct — verifies uniformity, requiresvals[0] == lo, andlast+step > hiencodes systemd's "unbounded fromloto the field end");pad2List(correct — atotal
%02dmap with no length or gap inference at all);padTimeField(correct — rewrites everydigit run, so a whole comma list pads, while
*,..,/,,and-pass through); the DOW join(correct — and cron's
7-as-Sunday is unreachable because robfig's parser rejects it loudly). Nothird instance of the class was found.
Fix 4 — the class is now pinned per field, so no field can silently widen:
{"0 1,2,3,5 * * *", "*-*-* 01,02,03,05:00:00"}, // non-contiguous HOUR {"0,1,2,5 * * * *", "*-*-* *:00,01,02,05:00"}, // non-contiguous MINUTE {"0 3 1,2,3,5 * *", "*-*-01,02,03,05 03:00:00"}, // non-contiguous DAY-OF-MONTH {"0 3 1 1,2,3,5 *", "*-01,02,03,05-01 03:00:00"}, // non-contiguous MONTH {"0-5 * * * *", "*-*-* *:00..05:00"}, // contiguous control: `..` keptThe hour and minute rows failed against
0593f7cexactly as predicted:The DOM and month rows pass before and after — the empirical proof that
pad2Listhas no shortcut.How tested — final head
6052e1f(branchfeat/workflow-ir-w1)mainadvanced while this PR was open (PR #332, which also touchesloaderkit/parse.go), so thebranch was brought up to date with
gh pr update-branch(never a force-push), producing the mergecommit
7bfa61d. Because the two changes shareloaderkit/parse.go, the gate below was re-run onthe merged tree, not carried over from the pre-merge head. The round-3 fix (
a5b81bf) thentouched only
workflowkit/cron.goandworkflowkit/cron_test.go, and the round-4 fix (0593f7c)only a three-line comment in
deploykit/systemd_test.go, and the round-5 fix (6052e1f) onlyworkflowkit/cron.goandworkflowkit/cron_test.go— so the diff against the updatedmainremains 35 files,
+2911/-27, the same 35-file list (+29from the round-3 fix and the+30contiguity check from the round-5 fix; round 4 changed no line counts).
Ran exactly this repo's CI gate on the final committed tree
(
GOWORK=off GOTMPDIR=~/.cache/go-tmp TMPDIR=/tmp/cs):The three
crontests on this head:TestCronToOnCalendar,TestCronToOnCalendarRejectsBadInput,and the new
TestCronToOnCalendarRejectsRestrictedDomAndDow— allPASS. TheLowergoldens areTestLowerGolden,TestLowerCharlyStep,TestLowerNestedPlan,TestLowerRejectsInvalid. The repoalso carries a
cross-compilejob; it was re-run on this head too —linux/{amd64,arm64,arm,386}with
CGO_ENABLED=0→OKon all four.go mod tidy -diffis empty on this head (rc=0).R10 — the assembled bed is CARRIED to W6, and this is NOT a waiver. This repo is a pure
library with no
charly.yml; the beds that gate it (B1/B2/B3/B5) composeplugin-lobsterandthe
plugin-pipelinecutover, neither of which exists until W4/W6. The bed thereforecannot run against this tag, and W6 must paste B1/B2/B3/B5 against it; if anything there
fails, the failure reopens this scope rather than W6's. No library waiver is claimed.
Rulebook compliance
Every rule R0–R10 is answered below; none is left implicit.
charly's own rulebook (charly/AGENTS.md) was read for the R-rules this section answers.(
systemd_unit.go,walk.go,cli.go,migrations.cue), not inferred. The two round-3findings were both R1 items and are fixed rather than narrated: the
cron.goexample thatstated an output the code cannot produce, and the DOM+DOW lowering that silently encoded
systemd's AND where cron means OR.
sdkthe cutover is complete — the moved helpers existexactly once, here. The duplicate copies live in
plugin-task, a different repository; theirdeletion is W3, a named, sequenced PR that is blocked on this tag and cannot land before it.
That is a cross-repo producer/consumer sequence, not a deferral, a partial rename, or a hidden
follow-up inside this repo.
resugarPlanis exported and its caller repointed rather thanduplicated; the desugar/resugar pair is one implementation each.
Lowerand the validator are thesingle implementation of their behaviour, consumed by more than one plugin.
import:constraint was solved by using the loader's real contract, not by writing around it.The DOM+DOW case is rejected with a diagnostic rather than silently mis-lowered — a loud
failure, not a workaround.
directions on the round-3 findings, by first establishing which side holds the intent:
the
0/15example was a prose error (the code's00/15padding is intended and its owntable proves it), so the comment was corrected; the DOM+DOW lowering was a code defect, so
the code was fixed and the doc's blanket "every cron form lowers correctly" claim was
narrowed to match. No doc was edited to hide a bug.
shadowed by copies; the retired forms are removed in the same change, not left alongside.
main. TheBEHINDbranchwas recovered with
gh pr update-branch, never a force-push.(
6052e1f), never on a plan, a description, or an edited working state:gofmt -l .,go vet ./...,go test ./... -count=1,go mod tidy -diffand the four-target cross-compilewere all re-run on that exact commit and their output is pasted verbatim above.
./charly/bin/charly task verifyis the umbrella's pinning gate and has nosdk-localmeaning —
sdkis not the umbrella root and records no gitlinks; the umbrella runs it at its owntask syncwave, and this PR pins nothing.lowered
charly.yml, theworkflow.lobstertext, and the systemd unit/timer text — is pinned byan exact golden file (
TestLowerGolden,TestLowerCharlyStep,TestLowerNestedPlan, and thefour
deploykit/testdata/*.golden), so a change in emitted bytes fails the gate rather thanshipping. The stronger check, running the generated
charly.ymlthroughcharly box validate, is a bed step in B1'spipeline-emit-loweringand therefore belongs to thecarried bed (see R10), not to this repo's unit gate; this PR does not claim it.
sdkis a pure Go library with nocharly.ymland no binary; this change builds and installs nothing, so there is no worktree-local binary whose
version or gitlink consistency could drift.
to W6 by name, and W6 must paste B1/B2/B3/B5 against this tag.
R3 is transiently open, deliberately.
plugin-taskstill holds its own copies ofresolveParams/resolveTaskDir/expandVars/closure. Deleting them is W3's step, in adifferent repo; until W3 lands the two copies coexist by design, not by oversight.
Change classification
analysed on a live system— the changed code paths (the lowering,the expression grammar, the desugar/resugar pair, the timer generator) are executed live by
the unit and golden tests with retained output, but the full R10 bed did not pass and is
carried to W6 as stated above.
Agent:
workflow-ir· sessionsession_01MSxu48GQwoQuBkfwQrkntkAssisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)