Repository navigation
use overlayfs for transparent writing - #8
Conversation
b0b710e to
1092b46
Compare
Mostly implmented by claude. Originally this was inspired by `wwctl image shell` command from warewulf https://github.com/warewulf/warewulf but this implementation uses the options from bubblewrap itself.
The y/N prompt is the only gate between the changeset and the real tree, so the summary has to show everything destructive. With the flat 60-entry cap a changeset of 200 additions and 5 deletions displayed 0 of the 5: the deletions fell past the cap and the user was asked to approve a replay of deletes they had never seen. Show every D and R entry unconditionally and apply the cap only to additions and modifications, which are recoverable and are what makes a large changeset unreadable in the first place.
The agent_* functions are only reached through the computed name
"agent_$AGENT_NAME". ShellCheck 0.10+ calls that SC2329 ("never
invoked"), which the directives already covered; older versions report
the same thing as SC2317 ("appears to be unreachable"), which they did
not, so CI failed on every agent function. List both codes.
didvc
left a comment
There was a problem hiding this comment.
Reviewed. Merge when you've confirmed --overlay behaves on your side.
|
Thanks for the contribution, and for the rebase. You've got commit access now. I've also approved #8, so it's clear to merge whenever you're happy with it. Two commits from me on your branch. The change summary was capping at 60 entries, so a changeset with a couple hundred additions hid every deletion behind "... and N more". With 200 additions and 5 deletions it showed 0 of the 5, and you'd be approving a replay of deletes you never saw. Deletions and replaced dirs now always print. The other is a shellcheck fix: CI runs an older version that reports the agent-function warning as SC2317 rather than SC2329, so the directives list both now. My bubblewrap is too old for --overlay, so I can't exercise it at all. You're better placed to confirm it behaves before it lands. Merge when you're satisfied. Master needs a PR and an approval, so nothing lands unreviewed. No obligation to review anyone else's PRs. |
What & why
With
--overlayoption the current directory is mounted via the overlayfs kernel functionality, so that the end of the agent run the used can decide to write the changes back or not.This is a supercharged
--branchoption, with the big advantage that on startup no copy happens.Checklist
shellcheck ai-bwrapis clean--helptext and README updated together (if the CLI surface changed)--dry-run(paste relevant output below if helpful)Notes
Mostly implemented by claude.
Originally this was inspired by
wwctl image shellcommand from warewulf https://github.com/warewulf/warewulf but this implementation is in bash and not golang and reusing the bubblewrap overlayfs implementation.