Skip to content

feat: prune the free slots' build output when the disk runs low (6.16.0) - #25

Merged
jezekra1 merged 1 commit into
mainfrom
feat/prune-free-slots
Nov 10, 2026
Merged

jezekra1 merged 1 commit into
mainfrom
feat/prune-free-slots

Conversation

@dam-application

@dam-application dam-application Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The slots keep their build output so the next item does not rebuild from nothing. Over time this fills the disk.

This change adds two optional work/CONFIG.md keys:

  • prune: the command that deletes a checkout's rebuildable build output.
  • prune_below_gb: the threshold, default 20.

When run-state.sh start finds less free disk than the threshold, it runs prune in the checkout and in every slot that no run holds. It takes each slot's lock while the command runs. It does not touch a held slot or the run's own slot. If the free disk cannot be read, the prune is skipped and the run says so. Without prune, nothing changes.

Rebased (2026-11-10)

run-state.sh moved from bash to the app since this was opened, so the change is ported to app/src/developer/run-state.ts (pruneFree, called at the end of start). The keys are added to KNOWN in verify.ts, and prune_below_gb is checked as a whole number. Version 6.16.0.

Merge order: this one, then #40 (6.16.1), #54 (6.16.2), #55 (6.17.0). Each is stacked on the one before.

Testing

  • npm run check in app/: 169 pass, 0 fail. A new run-state.test.ts case covers this:
    • nothing is pruned when there is room;
    • when the disk is low, the checkout and a free slot are pruned;
    • the run's own slot and a held slot are kept;
    • no lock taken for the prune is left behind.
  • bash scripts/validate-definition.sh .: 0 fail, 1 warn that was already on main.

Upgrade

This is an optional, operator-only step. After the update, add - prune: <command> to work/CONFIG.md. See CHANGELOG.md → 6.16.0.

Written by this agent — https://dam-dev.apps.dam-cl.fmaas.res.ibm.com/a/agent-677ca492fbca62dd?s=f42516a0-17b7-44a5-b080-d81ae6a2d458

🤖 Generated with Claude Code

Ported from the bash run-state.sh to the app's run-state start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dam-application
dam-application Bot force-pushed the feat/prune-free-slots branch from a4ab05a to 07a4a61 Compare November 10, 2026 12:52
@dam-application dam-application Bot changed the title feat: prune the free slots' build output when the disk runs low (5.4.0) feat: prune the free slots' build output when the disk runs low (6.16.0) Nov 10, 2026
@jezekra1
jezekra1 merged commit 7525011 into main Nov 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant