Skip to content
Pi · claude-sonnet-4-20250514featureDevOps1 file · +45 −20

Add Makefile check-update target for pi-mono releases

Session from combust-labs_pi-mono-docker on Hugging Face by rgruchalski · Apache-2.0 · condensed by Coders Talk

13msession
1interventions
GOAL

Add a make target that checks GitHub for the latest pi-mono release via HTTP and compares it to the current version, then wire build args and repo detection through the Makefile.

  1. Prompt · +1m
    Add a makefile target to check for update to the pi-mono repository via GitHub API, preferably using an HTTP call
  2. Agent did · +1m
    Added check-update target to Makefile using GitHub API, ran it to test
  3. Fail · +2m
    check-update failed: wrong GitHub repo path (pi-runtim/pi-mono) returned 404
  4. Agent did · +2m
    Searched GitHub API for the correct repo (badlogic/pi-mono), updated Makefile URL, verified check-update now reports v0.67.6 → v0.68.1
  5. Prompt · +4m
    Add PI_MONO_GIT_REPO from Containerfile to Makefile, pass it explicitly during build, use version from Makefile
  6. Agent did · +5m
    Extracted PI_MONO_GIT_REPO from Containerfile into Makefile and passed both build args explicitly to docker build
  7. Intervention · +6m
    Developer asked whether export was actually needed for the new variable
    Why: I wanted to make sure we weren't adding unnecessary make syntax before moving on.
  8. Prompt · +8m
    Make check-update infer the repository from PI_MONO_GIT_REPO instead of hardcoding it
  9. Fail · +8m
    Repo-parsing sed regex broke inside the Makefile due to line-continuation and escaping issues, causing repeated curl 404s and sed errors
  10. Agent did · +10m
    Switched to bash parameter expansion to strip .git suffix, fixed the target, verified output, logged full repo URL, then committed the Makefile changes and amended the commit with the correct model nickname
  11. Outcome · +13m
    1 commit (Makefile, +27/-2) landed on main, working tree clean, check-update working end-to-end
VERDICT

Next time I'd specify the exact GitHub org/repo up front instead of letting the agent guess and hit a 404 first. The intervention that mattered most was asking 'are you sure you need export here' - it caught an unnecessary Make construct before it became noise, and the later fix for the sed/line-continuation bug in the Makefile only worked because I made it verify with `make -n` and `cat -A` rather than trusting the first attempt.

I tried this · 0

Discussion · 0

How Builds work