feat: label pall8t containers and report the labels in ls --json - #65
Open
TakiTake wants to merge 1 commit into
Open
feat: label pall8t containers and report the labels in ls --json#65TakiTake wants to merge 1 commit into
ls --json#65TakiTake wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
TakiTake
force-pushed
the
feat/container-ssh
branch
from
August 23, 2026 23:02
285a444 to
96cdcf6
Compare
`pall8t ls` identified its containers by the `pall8t-` name prefix, which
matched any container a user happened to name that way and carried no
information beyond the name itself. `--json` emitted `{name, status}`, so
a consumer asking "which sandbox serves this herdr pane?" had nothing to
go on.
Every `pall8t run` container now carries provenance labels — version,
project directory, image tag, the herdr pane/workspace/tab and sandbox
mode when running under herdr, and a worktree's main git dir — and
`ls --json` reports them alongside the image. `name` and `status` keep
their shape; the additions are additive.
`is_pall8t_container` selects on the `pall8t.version` label, falling back
to the name prefix so containers from an older pall8t still list during
the upgrade (they are `--rm` foreground sessions, so the fallback can go
after a release).
Label values are sanitised on the way out: 1.2.2's `Parser.labels` splits
on `=` with maxSplits 2 and *throws* on three parts, so a project
directory containing `=` would fail the whole run. Pinned by a test.
Verified live on container 1.2.2: labels round-trip through
`container ls --format json` into `pall8t ls --json`, herdr labels
included, and a label-less container from an older run still lists.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YTFLvjR7dWvxFQfSyBY4Zm
TakiTake
force-pushed
the
feat/container-labels
branch
from
August 23, 2026 23:02
207a82a to
16b653d
Compare
This was referenced Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #55. Stacked on #63 (which is stacked on #62) — only the last commit belongs to this PR; GitHub retargets as the stack merges.
Why
list_pall8tselected onc.name.starts_with("pall8t-"): it matched any container a user named that way, and carried no information beyond the name.pall8t ls --jsonemitted{name, status}, so "which sandbox serves this herdr pane?" had no answer short of parsing container names.What
pall8t runcontainer is labelled:pall8t.version,pall8t.project,pall8t.image,pall8t.worktree.git_dir(when cwd is a worktree), andpall8t.herdr.{pane,workspace,tab,sandbox}when the run started from a herdr pane.pall8t ls --jsonreportsimageandlabelsin addition to the existingname/status— nothing already reading them breaks.is_pall8t_containerselects on thepall8t.versionlabel, with the name prefix kept as a fallback so containers started by an older pall8t still list through an upgrade. They are--rmforeground sessions, so the fallback can go after a release.worktree::main_git_dir) is now done once and used by both the mount and the label, instead of spawning git twice.One thing worth flagging
apple/container 1.2.2's
Parser.labelssplits on=withmaxSplits: 2and throwsinvalid label formaton three parts. A project directory is free to contain an=, so an unsanitisedpall8t.projectlabel would fail the whole run — a launch broken by provenance metadata. Values are sanitised on the way out (=and control characters →_), pinned bylabel_values_cannot_break_the_run.Verification
115 unit tests,
scripts/lint.shclean. The listing parser is tested against captured 1.2.2 JSON, including a container with no labels and someone else's labelled container.Live on container 1.2.2 — a run under a faked herdr pane:
🤖 Generated with Claude Code
https://claude.ai/code/session_01YTFLvjR7dWvxFQfSyBY4Zm