Agent kit for working on canonical/chisel-releases. Cross-agent skills + scripts for authoring and reviewing chisel slice definition files.
81
85%
Does it follow best practices?
Impact
75%
Average score across 5 eval scenarios
Low
Low-risk findings worth noting
Integration tests in chisel-releases use spread to validate slices inside ephemeral containers.
spread.yaml # project config (backends, global prepare)
tests/spread/integration/<pkg>/task.yaml # per-package test
tests/spread/lib/ # shared helpers (on PATH via spread.yaml)install-slices helperUse tests/spread/lib/install-slices in spread tasks to prepare each independent
slice installation set:
rootfs="$(install-slices <pkg>_<slice> [<pkg2>_<slice2> ...])"chisel cut succeeds. The SDF parses, dependencies resolve, files extract. This is what the install-slices CI check validates.chroot + commands prove the sliced rootfs actually works. This is what spread tests validate.Both layers are required. A slice that installs but doesn't function is rejected. When local tools or backends are unavailable, report that layer as unverified; static checks cannot substitute for it.
Every authored package, including pure-library and data-only packages, gets a
tests/spread/integration/<pkg>/task.yaml. Test depth depends on the contents:
Use _scaffold-test.py only when creating a new task. Replace all placeholders
with real assertions or justified representative tests. Run _check-test.py
after writing or changing a task, then review assertions and coverage manually
and run the suite. Apply kb/_verification.md to the results.
Sliced rootfs is minimal. Tests that need more than bare files must set up the chroot:
| Need | Pattern |
|---|---|
| Network (DNS) | cp /etc/resolv.conf "${rootfs}/etc/" |
/dev/null | mkdir -p "${rootfs}/dev" && touch "${rootfs}/dev/null" |
/bin/sh | ln "${rootfs}/bin/bash" "${rootfs}/bin/sh" (or whichever shell is available) |
/proc/self/exe (Java) | mkdir -p "${rootfs}/proc/self" && ln -sf <java-binary> "${rootfs}/proc/self/exe" (see openjdk task.yaml) |
bins slice must prove its binaries actually work.bins and scripts, both need tests.chroot "$rootfs" /usr/lib/foo/helper 2>&1 | grep -Fiq "usage". A binary name appearing in a file is not an execution check./dev/null, /bin/sh, or DNS, fix the environment per the chroot patterns table above -- do not retreat to file-existence checks.https://example.com) is accepted upstream -- copy resolv.conf in per the chroot patterns table.Recurring review nits:
--arch "$chisel_arch" from install-slices on v3+ branches -- it was a v2-era workaround. Older (v1/v2) branches may still want it."$rootfs" (no trailing-slash/brace noise), quote every variable, and use bash arrays rather than string-joined args.grep -Fiq (-F literal, -i case-insensitive, -q quiet).sleeps or unbounded retry loops -- bound every wait with a timeout so spread can't hang.trap cleanup EXIT to umount anything you bind-mounted (/dev, /proc). Some tools need /proc mounted in the chroot (see systemd/test_standard.sh).spread.yaml configures two backends:
.github/workflows/spread.yaml sets backend: "lxd") across a self-hosted
runner matrix: X64, ARM64, S390X, PPC64EL.spread.yaml, but not what the CI job drives.