Skip to content

feat(image): add the code-server lease image pod-crabbox-code - #1

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/code-lease
Nov 5, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/code-lease

Conversation

@aitrawog

@aitrawog aitrawog commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds pod-crabbox-code: the code-server lease image for the Crabbox containerd provider, one of the pod-crabbox-<variant> images tracked by opencharly/opencharly#869 (W5.2). It is the base lease contract (opencharly/pod-crabbox, pinned) plus a pinned code-server release reachable only over the lease's SSH session.

  • charly.yml — the image: base: ghcr.io/opencharly/pod-crabbox:2026.307.1828 (pinned OCI base), user: root (the base's sshd -D is PID 1) with the login user left at the base's crabbox/uid 1000, and distro: [cachyos, arch] + build: [pac] declared explicitly because an external OCI base does not inherit the CachyOS chain.
  • candy/code-server/charly.yml — the variant layer: code-server 4.144.0 fetched from the pinned upstream GitHub release tarball into /usr/local/lib/code-server, the release entry point linked at /usr/local/bin/code-server, and /usr/local/bin/crabbox-start-code exec'ing it with --bind-addr 127.0.0.1:8080 so the editor is reachable only through the lease's SSH session. The candy restates port: [2222] (the base's SSH contract) because an OCI base does not carry its candy chain's port label across the boundary.
  • Six deterministic check: steps — the binary is executable; --version contains 4.144.0; the wrapper is executable and contains the loopback --bind-addr; the inherited lease binaries (sshd, bootstrap.sh, ready) exist; uid 1000 is crabbox; /etc/ssh/sshd_config.d/99-crabbox.conf names Port 2222 and sshd -t parses it.
  • .github/workflows/image.yml — the thin caller of the org reusable: pull_request / workflow_dispatch build only (the reusable derives a ci-<sha> tag and publishes nothing), and a successful tag-on-merge completion publishes the newest v* git tag as the image tag.
  • README.md, AGENTS.md, CHANGELOG/.gitkeep, .gitignore — repo overview, repo guidance, the history directory, and generated-file ignores.

Diff: 7 files, +303/−0 (derived below).

How tested

Every command below ran on this tree, at this head. The tree hash is the instrument: a paste from another tree cannot reproduce it.

# head 2d0d8f0f611ffe5597fb0b451a300dc9a320a207 (git rev-parse HEAD)
# tree ebdd8d5d38b06793b804105240b533b0889d6d2f (git rev-parse HEAD^{tree})
$ git rev-parse HEAD HEAD^{tree} origin/main
2d0d8f0f611ffe5597fb0b451a300dc9a320a207
ebdd8d5d38b06793b804105240b533b0889d6d2f
4f3a89536088603fa7560ef61eb60e99c0e86112

$ git log --oneline origin/main...HEAD
2d0d8f0 feat(image): add the code-server lease image pod-crabbox-code

$ git diff --numstat origin/main...HEAD
70	0	.github/workflows/image.yml
5	0	.gitignore
69	0	AGENTS.md
0	0	CHANGELOG/.gitkeep
37	0	README.md
80	0	candy/code-server/charly.yml
42	0	charly.yml

$ printf "files=%s insertions=%s deletions=%s\n" "$(git diff --numstat origin/main...HEAD | wc -l)" "$(git diff --numstat origin/main...HEAD | awk "{s+=\$1} END {print s}")" "$(git diff --numstat origin/main...HEAD | awk "{s+=\$2} END {print s}")"
files=7 insertions=303 deletions=0

$ git diff --name-status origin/main...HEAD
A	.github/workflows/image.yml
A	.gitignore
A	AGENTS.md
A	CHANGELOG/.gitkeep
A	README.md
A	candy/code-server/charly.yml
A	charly.yml

$ git status --short
(end of git status output)

Static gate

charly box validate is clean, and charly box generate emits a Containerfile that pins the same base and exposes the inherited SSH port:

# head 2d0d8f0f611ffe5597fb0b451a300dc9a320a207; the binary is the umbrella charly worktree build 2026.307.1232 (charly HEAD 1a41472)
$ /home/atrawog/Sync/Atrapub/mo/claude/opencharly/charly/bin/charly version
WARNING: charly is a dev/worktree build (not installed at /usr/bin or /usr/local/bin); NOT loading the installed package's plugins from /usr/lib/charly/plugins (they may be built against a different charly version). Set CHARLY_PLUGIN_DIR to load plugins from a custom location.
2026.307.1232
rc=0

$ /home/atrawog/Sync/Atrapub/mo/claude/opencharly/charly/bin/charly box validate
WARNING: charly is a dev/worktree build (not installed at /usr/bin or /usr/local/bin); NOT loading the installed package's plugins from /usr/lib/charly/plugins (they may be built against a different charly version). Set CHARLY_PLUGIN_DIR to load plugins from a custom location.
charly box validate: OK — checked 1 candy, 1 box, 7 distros, 7 builders; 0 warnings, 0 errors
rc=0

$ /home/atrawog/Sync/Atrapub/mo/claude/opencharly/charly/bin/charly box generate pod-crabbox-code && grep -nE "^(ARG BASE_IMAGE|EXPOSE)" .build/pod-crabbox-code/Containerfile
3:ARG BASE_IMAGE=ghcr.io/opencharly/pod-crabbox:2026.307.1828
33:EXPOSE 2222
rc=0

The 7 distros, 7 builders in that summary is the binary's loaded build vocabulary, not this diff's declarations (the diff declares distro: [cachyos, arch] and build: [pac]). An EMPTY project with no distro/builder declarations reports the identical 7/7, which is what makes the count constant across projects rather than derivable from the changed files:

# head 2d0d8f0f611ffe5597fb0b451a300dc9a320a207
$ cat /tmp/w5b-empty-vocab/charly.yml
defaults:
  registry: ghcr.io/example

$ cd /tmp/w5b-empty-vocab && charly box validate
charly box validate: OK — checked 7 distros, 7 builders; 0 warnings, 0 errors
rc=0

The build and the six checks — the change-class gate

A fresh local build of this tree produced ghcr.io/opencharly/pod-crabbox-code:2026.309.0041, and charly check box pod-crabbox-code ran all six build-scope check: steps against that image: 6 passed, 0 failed, 0 skipped. This executes the pinned download: URL (code-server-4.144.0-linux-amd64.tar.gz) and the --version assertion, not file presence alone:

# head 2d0d8f0f611ffe5597fb0b451a300dc9a320a207
$ /home/atrawog/Sync/Atrapub/mo/claude/opencharly/charly/bin/charly box build pod-crabbox-code

--- Building pod-crabbox-code ---
build_rc=0

$ /home/atrawog/Sync/Atrapub/mo/claude/opencharly/charly/bin/charly check box pod-crabbox-code
charly: listing local images (first run — may take a moment)...
charly: listed 262 local images in 2.766s — consider pruning the image store
charly: resolving project (first run — may take a moment)...
Image: ghcr.io/opencharly/pod-crabbox-code:2026.309.0041
  PASS  check the pinned code-server release is installed and executable  [code-server-binary]  exit=0
  PASS  check code-server reports the pinned version  [code-server-version]  exit=0
  PASS  check the start wrapper binds loopback only and is executable  [code-server-wrapper]  exit=0
  PASS  check the inherited lease SSH contract is present (sshd, bootstrap, readiness hook)  [code-server-lease-binaries]  exit=0
  PASS  check the inherited lease login user is crabbox at uid 1000  [code-server-lease-user]  exit=0
  PASS  check the inherited SSH drop-in names port 2222 and sshd parses it  [code-server-lease-sshd]  exit=0

6 steps: 6 passed, 0 failed, 0 skipped

The reusable image-build.yml builds and publishes; it does not run the box's check: steps, so those were run locally against the freshly built image. On the same head, the CI image workflow's pull_request arm built the image and published nothing, using the documented non-publishing ci-<sha> tag:

# head 2d0d8f0f611ffe5597fb0b451a300dc9a320a207
$ gh run view 41942510920 --repo opencharly/pod-crabbox-code --json conclusion,jobs --jq "{conclusion, jobs: [.jobs[] | {name, conclusion}]}"
{"conclusion":"success","jobs":[{"conclusion":"success","name":"tag"},{"conclusion":"success","name":"image / build"}]}

$ grep -F "##[notice]build-only run" /tmp/w5b-code-imagebuild.log
image / build	UNKNOWN STEP	2026-11-05T00:37:16.7535078Z ##[notice]build-only run (push=false): using the non-publishing tag ci-40d752edcc53

$ grep -F "image tag: ci-" /tmp/w5b-code-imagebuild.log
image / build	UNKNOWN STEP	2026-11-05T00:37:16.7536209Z image tag: ci-40d752edcc53

The baked ai.opencharly.* labels

podman image inspect of the built image shows every ai.opencharly.* label non-empty, and the ai.opencharly.description label (2752 bytes) carries the baked plan and contains both code-server-version and 4.144.0:

# head 2d0d8f0f611ffe5597fb0b451a300dc9a320a207; image built on this tree
$ podman image inspect ghcr.io/opencharly/pod-crabbox-code:2026.309.0041 --format '{{json .Config.Labels}}' | jq -r 'to_entries[] | select(.key|startswith("ai.opencharly.")) | "\(.key) len=\(.value|length)"'
ai.opencharly.box len=16
ai.opencharly.builder.provide len=28
ai.opencharly.builder.use len=140
ai.opencharly.check_level len=7
ai.opencharly.description len=2752
ai.opencharly.gid len=1
ai.opencharly.home len=5
ai.opencharly.info len=144
ai.opencharly.platform.distro len=18
ai.opencharly.platform.format len=7
ai.opencharly.port len=8
ai.opencharly.registry len=18
ai.opencharly.status len=7
ai.opencharly.uid len=1
ai.opencharly.user len=4

$ podman image inspect ghcr.io/opencharly/pod-crabbox-code:2026.309.0041 --format '{{json .Config.Labels}}' | jq -r '."ai.opencharly.description" | [contains("code-server-version"), contains("4.144.0"), length]'
[
  true,
  true,
  2752
]

The pinned base

The base resolves from the public registry without credentials:

# head 2d0d8f0f611ffe5597fb0b451a300dc9a320a207
$ skopeo inspect --no-tags docker://ghcr.io/opencharly/pod-crabbox:2026.307.1828 | jq -r ".Digest"
sha256:1bc279e8b91f3ec4cc3e1fe1a1dc0539829c6e99642116a0de3e4ad6a8305ce4
rc=0

No disposable target

The repo declares no disposable: target, so no R10 bed applies; the change-class gate is the image workflow above:

# head 2d0d8f0f611ffe5597fb0b451a300dc9a320a207
$ grep -rn "disposable:" . --include="*.yml" --include="*.yaml"
grep_rc=1

Rulebook compliance

  • R0 — the change follows the repo's declared skill set: /charly-image:image (the image node), /charly-image:layer (the candy plan), /charly-check:check (the check: surface), and /charly-internals:git-workflow for this PR action.
  • R1 — charly box validate returned 0 warnings, 0 errors, the fresh build succeeded, and all six check: steps passed; no anomaly arose during this change, so nothing was filed.
  • R2 — one repo per image. The lease contract is reused from the base at its pinned tag and probed at this image's boundary, not copied into the variant.
  • R3 — no sleeps, retries, suppressions, or ad-hoc container commands: every assertion is a declared check: step.
  • R4 — the README documents one user-facing command (ssh crabbox@<lease> crabbox-start-code); it needs nothing but the lease's SSH access.
  • R5 — new repo: git diff --name-status above lists only A (additions), so there is no legacy name, path, shim, or stale current documentation to delete.
  • R6 — no destructive git action: the branch is one commit on origin/main (4f3a895); no rebase, no force-push, no history rewrite.
  • R7 — the changed config executed end to end: charly box validate resolved the image and candy, charly box generate emitted the Containerfile, a fresh local build produced ghcr.io/opencharly/pod-crabbox-code:2026.309.0041, and charly check box ran all six check: steps green (6 passed, 0 failed, 0 skipped). The checks fail without the change because the version assertion (4.144.0) and the loopback-bind assertion are specific to the added candy, and the baked ai.opencharly.description label is non-empty and carries code-server-version.
  • R8 — the base is a real public artifact (digest sha256:1bc279e8b91f3ec4cc3e1fe1a1dc0539829c6e99642116a0de3e4ad6a8305ce4), pulled anonymously; no service is mocked.
  • R9 — this repo holds no charly source; the local validation used the umbrella charly worktree's CalVer-stamped build 2026.307.1232 (charly checkout HEAD 1a41472), not a shared install.
  • R10 — the repo declares no disposable: true target (grep above), so no bed applies; the image gate is the image workflow, whose pull_request arm built successfully on this head (run 41942510920, jobs tag and image / build both success, non-publishing tag ci-40d752edcc53), and whose merge-time workflow_run arm publishes ghcr.io/opencharly/pod-crabbox-code:<git-tag>.
  • ADE — the candy ships a description: and six deterministic check: steps, and charly box validate enforces both.
  • Hard cutover — one repo, one image, one PR: no shim, no dual path, no deferred work.

Change classification

  • Class: new repository content (new image, new candy, repo scaffolding). The umbrella declares no pin and no consumer for pod-crabbox-code; the only org reference is the design row in CONTAINERD-IMAGES.md.
  • Breaking change + rollback: none — the repo did not exist on main beyond its bootstrap commit, so no consumer can observe a break. Rollback is a revert of this PR's squash commit; the image tag, once published post-merge, is add-only and is not moved by a revert.

The no-consumer claim, executed against the umbrella tree and the repo's refs:

# umbrella HEAD 92eca90 (git -C <umbrella> rev-parse HEAD)
$ git -C <umbrella> config -f .gitmodules --get-regexp "pod-crabbox-code"
grep_rc=1

$ git -C <umbrella> ls-tree --name-only HEAD > /tmp/w5b-umb-tree.txt; grep -c "^pod-crabbox-code$" /tmp/w5b-umb-tree.txt
0
grep_rc=1

$ grep -i crabbox /tmp/w5b-umb-tree.txt
crabbox
layer-crabbox
plugin-crabbox
pod-crabbox-coordinator
grep_rc=0

The repo serves no tag, so no @github pin at a tag can resolve against it, and the only org-wide reference is the design row:

# umbrella HEAD 92eca90 ; the repo serves no tags
$ git ls-remote --tags https://github.com/opencharly/pod-crabbox-code.git | wc -l
0

$ gh search code --owner opencharly "pod-crabbox-code" --json repository,path --jq ".[] | \"\(.repository.nameWithOwner):\(.path)\""
opencharly/opencharly:CONTAINERD-IMAGES.md
rc=0

Filed issues

None — charly box validate reported 0 warnings and 0 errors, the fresh build succeeded with all six check: steps green, and this change introduced no finding.

Agent: containerd-crabbox-program/w5b · session 8b1c01cf-7f79-4a75-bff8-240415a06208
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

The W5.2 variant that ships a pinned code-server release and a loopback-only
crabbox-start-code wrapper. It imports the base pod-crabbox lease image at a pinned
tag; the release version is the URL's version (CODE_SERVER_VERSION) and the wrapper
binds 127.0.0.1:8080 only.

Relates to opencharly/opencharly#869

Agent: containerd-crabbox-program/w5
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 2d0d8f0f611ffe5597fb0b451a300dc9a320a207 (branch: feat/code-lease)

Change class: new image repo (candy/image + CI config), no disposable: true target declared.

Blocks

  1. A1 / A2 / R10 — the change-class gate's output is not pasted. The body's "How tested" pastes charly box validate (0 warnings), charly box generate (ARG/EXPOSE), skopeo inspect, and greps — but never the actual image / build job output nor the execution of the six check: steps. The body only promises that "the image / build job on the pull_request arm builds the image and publishes nothing." A1 requires pasted output, not a promise; R10 requires a fresh build at ZERO warnings with pasted output for each changed piece. The six checks (code-server-binary, code-server-version asserting 4.144.0, code-server-wrapper, and the three lease probes) are exactly the new runtime behavior of this change, and their pass/fail is unverified — in particular the download: URL .../v4.144.0/code-server-4.144.0-linux-amd64.tar.gz was never exercised, so a bad release tag or asset name would go undetected. Fix: paste the image / build (or charly check box pod-crabbox-code) output at this head showing all six checks passing at zero warnings.

  2. R7 — emitted ai.opencharly.* labels not verified. The charly box generate output is filtered to ^(ARG BASE_IMAGE|EXPOSE) only; the body never asserts the baked ai.opencharly.description/plan labels are present and non-empty after generation/build. R7 requires that verification for generation changes ("an empty or missing label is a FAILURE"). Fix: paste the generated Containerfile's ai.opencharly.* label lines (or docker inspect of the built image) confirming non-empty labels.

  3. R10 tool-limited cross-check — box validate count is not derivable from the diff. The pasted charly box validate reports "checked 1 candy, 1 box, 7 distros, 7 builders", yet the diff declares only distro: [cachyos, arch] (2) and build: [pac] (1) in charly.yml. Reconcile that 7/7 count (or replace it with the real image-build output), since it cannot be reconstructed from the changed files.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@aitrawog

aitrawog commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

RCA — the BLOCK is one defect in the body's evidence, not in the image. All three blocks name the same missed control.

Mechanism. "How tested" pasted the STATIC config gate (charly box validate, plus charly box generate filtered to ^(ARG BASE_IMAGE|EXPOSE)) and promised that the image / build job would build the image. The change's runtime behaviour is the six check: steps, and none of them had been executed when the body was written. Block 3 is the same defect from the other side: box validate's 7 distros, 7 builders is the binary's loaded vocabulary, which I pasted without reconciling against the diff's two distro tags and one package format.

Missed control. My pre-push self-audit treated charly box validate as the change-class gate for an image repo. It is a static schema check; the gate for an image is a fresh build plus charly check box, which EXECUTES the plan's check: steps. Because that gate had not been run, the only honest thing the body could say was a promise — and A1/A2/R10 require pasted output.

Blast radius. Body evidence only: block 1 (A1/A2/R10), block 2 (R7 labels), block 3 (R10 count). The image config itself is correct — no code change follows from this RCA.

Root fix, applied here. (1) A fresh local build on this tree (ghcr.io/opencharly/pod-crabbox-code:2026.309.0041) and charly check box pod-crabbox-code, pasted whole: 6 steps: 6 passed, 0 failed, 0 skipped, which exercises the pinned code-server-4.144.0-linux-amd64.tar.gz download and the version assertion. (2) The baked labels verified from the built image, not the generated file: 15 non-empty ai.opencharly.* labels, ai.opencharly.description 2752 bytes carrying code-server-version. (3) The 7/7 count reconciled by measurement — an empty project with no distro/builder declarations reports the same 7 distros, 7 builders, so the count is vocabulary, not diff. (4) The same head's CI image run (41942510920) is pasted with both jobs success and the non-publishing ci-40d752edcc53 tag.

Control fix. For an image change, the body must carry the build + charly check box output and the built image's label values, and any count in a pasted output that cannot be reconstructed from the changed files is reconciled by an executed measurement before it is pasted.

The fix is body-only; the head does not move, so the failed required run is re-run in place via the REST API after the body is updated and read back.

Agent: containerd-crabbox-program/w5b · session 8b1c01cf-7f79-4a75-bff8-240415a06208
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 2d0d8f0f611ffe5597fb0b451a300dc9a320a207 (branch: feat/code-lease)

Security screen: PASS — no T1–T4 finding; all 7 files are accounted for in the body (no scope mismatch), no secrets/egress, no guardrail weakening, the new image/reusable refs are the org's own (opencharly/.github reusable @main, GitHub release tarball over HTTPS).

Checklist: All applicable rules PASS or NA. Change class = new image repo (candy/image + CI config, no disposable: true target declared; grep pasted rc=1), so the change-class gate is the image build + charly check box, which the body now pastes (6 passed / 0 failed / 0 skipped; fresh 2026.309.0041 build) with the image run 41942510920 green on the pull_request arm; the six check: steps match the diff 1:1 and the download URL is exercised by code-server-version; the baked ai.opencharly.* labels are verified from the built image (15 non-empty, description 2752 B carrying code-server-version); the 7/7 box validate count is reconciled by the empty-project measurement; ADE description:+plan: with deterministic checks present; placement is a candy/image layer — placement: CORRECT.

Comments considered:

  • @github-actions[bot] 6646264565 (BLOCK, A1/A2/R7/R10): findings legitimate at the time; resolved — the current body now pastes the build + charly check box output, the podman image inspect label values, and the vocabulary reconciliation.
  • @aitrawog 6646398985 (RCA): verified — names the missed control (static box validate treated as the change-class gate; the real gate is build + charly check box), evidence pasted, and the fix is body-only with the head unchanged (diff was always correct).

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 5, 2026 00:48
@github-actions
github-actions Bot merged commit bf8b985 into main Nov 5, 2026
7 of 8 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 5, 2026
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.

2 participants