mol-dog-stale-db formula renders literal {{var}} placeholders into the step script: warn-threshold test errors with "integer expected" #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source:
examples/bd/dolt/formulas/mol-dog-stale-db.toml(pack sha pinned in city.toml:3b3b89f201; formula_hash 8ed7c1cc16708a4ac70d2b470375dac84acc62dd9ca24d2ef23f70a4eceb80b6)Observed: the
cleanupstep script reaches the agent with literal{{warn_threshold}}and{{max_orphans_for_sql}}in the text. The template engine did not substitute the formula vars. Measured on the 2026-09-11 04:49Z run of wisp gs-jk08ay (session bd.dog-1):Line 210 is
if [ "$ORPHAN_TOTAL" -ge "{{warn_threshold}}" ]. The same literal also appears in--max-orphan-dbs "{{max_orphans_for_sql}}"on the apply line, so a run that actually reaches the apply branch would pass the literal string as the flag's value, not a number.Consequence today: the test errored, the shell treats the errored condition as false, and the maintenance-warning notice was skipped. Harmless only because the scan found 0 orphans. On a run with orphans, the warning notice and possibly the apply guard flag are both wrong.
Expected: the rendered step script carries the resolved var values (this run:
5and20), or fails closed at render time instead of shipping mustache text.Workaround used: none. The run completed and the wisp was closed (
orphans=0, applied=0, escalated=0); the failed warning test is the only symptom.Note: the pinned pack does not reach the city until someone deliberately re-pins the sha, so a fix here is inert until then.