Skip to content
PifeatureCLI & tooling2 files · +215 −169

Add host-mount config flags to ppi Docker wrapper script

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

47msession
2interventions
GOAL

Add configurable flags to the ppi bash script so the docker run commands mount models.json and other host directories/files at custom paths instead of hardcoded ones, and keep README.md in sync.

  1. Prompt · +5m
    Propose a new argument in ./ppi allowing a custom path to models.json, currently hardcoded and mounted in both docker run commands; default to current value.
  2. Agent did · +5m
    Added a use_models_json variable and --models-json flag, updated both docker run commands to use it, and documented the new flag with an example in README.md.
  3. Intervention · +8m
    Developer pointed out this isn't a pi-supported flag and asked to prefix it with --ppi-host- to avoid collisions.
    Why: since this isn't a pi supported flag, prefix this flag to --ppi-host-
  4. Agent did · +8m
    Renamed the flag and variable to --ppi-host-models-json / use_ppi_host_models_json throughout ppi and README, fixing a duplicate-oldText edit error along the way, then verified with grep.
  5. Prompt · +14m
    Add new boolean flags --ppi-host-attach-prompts and --ppi-host-attach-agents that, when set, add their respective volume mounts to the docker run commands.
  6. Agent did · +15m
    Added variable declarations and flag parsing for both boolean flags, built conditional volume-mount variables, wired them into both docker run commands, ran a bash syntax check, and updated README with new flags and an example.
  7. Intervention · +22m
    Developer hand-edited ppi (renaming --ppi-host-models-json to a boolean --ppi-host-attach-models-json) and asked the agent to diff the file to discover the changes, then fix the now out-of-date README.
    Why: I've corrected a couple of details in ppi, find out what changed and update the README which is now out of date.
  8. Prompt · +44m
    Propose a new --ppi-host-add-file flag that allows duplicate definitions taking host-path:container-path:rw|ro values, adding a docker mount for each in both docker run commands.
  9. Agent did · +44m
    Added a use_ppi_host_add_file array flag with repeatable parsing, built a loop generating -v mount args for each entry, wired it into both docker run commands, ran a bash syntax check (passed), and documented the new flag plus example in README.
  10. Outcome · +47m
    ppi script and README end up with four new host-mount flags (--ppi-host-models-json history rolled into attach flags, --ppi-host-attach-prompts, --ppi-host-attach-agents, --ppi-host-attach-models-json, --ppi-host-add-file) on the feature branch; bash -n syntax check passes but the final add-file changes are left uncommitted.
VERDICT

Next time I'd specify upfront that any new flag must be prefixed --ppi-host- to avoid clashing with pi's own flags, since that was the correction that mattered most and had to be redone across the whole file. I also learned the agent will confidently report 'clean' git status even when it just summarized uncommitted changes a turn earlier, so I have to double check git diff myself rather than trust its status claim. Editing the flag naming by hand and asking it to diff-and-catch-up worked well for keeping README in sync.

I tried this · 0

Discussion · 0

How Builds work