oficina / equipo Public

hosted: gate the testdata and python3 tests, record their mutations

make hosted-image-check now runs TestScanSkipsGoTestdata,
TestDropGoTestdata and TestPinsCarryContainmentSuiteTools. The progress
record lists the follow-up's mutation checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 22fc85c0c20734e27146356fc01846bb9106507f parent 8229f9e
3 files changed, +16 −2
  • Makefile +1 −1
  • docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md +14 −0
  • internal/hostedimage/scanallow_test.go +1 −1

CI failed — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/hosted-runners-2: Type  Size Avail | ext4   96G   84G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   84G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.6s
ci-box: codex: fetched and verified in 3.7s
ci-box: codex-code-mode-host: fetched and verified in 1.4s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
ci-box: tofu: fetched and verified in 1.6s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.8s
ci-box: pi: installed and verified in 7.6s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.7s
ci-box: clone deepened in 6.3s
ci-box: file times set from content: 4051 files, 303 directories
ci-box: ready in 20.4s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
--- FAIL: TestReleaseCopyReviewed (0.09s)
    task_pages_test.go:236: COPY REVIEW REQUIRED: copy-status.py verify found copy pending review or stale bookkeeping
FAIL
rastrillo-budget/v1 ran 88ms
FAIL	amadan.net/oficina/equipo/internal/equipotest	0.235s
FAIL
make: *** [Makefile:324: copy-release-check] Error 1

amadan: step copy failed: exit status 2

amadan: job failed at step copy — its output is above, not at the tail of this log
diff --git a/Makefile b/Makefile
index c7088ee8..93996a56 100644
--- a/Makefile
+++ b/Makefile
@@ -241,7 +241,7 @@ gitleaks:
# .amadan/ci.d/15-hosted-image runs it on CI.
hosted-image-check:
go run $(GITLEAKS) dir --no-banner --redact --config .gitleaks.toml infra/hosted/image
- CGO_ENABLED=0 go test ./internal/hostedimage -run '^(TestManifestPinsEverything|TestBuildReproducible|TestBuildChecksPins|TestImageInputsHaveNoSecrets|TestBuildScansPayload|TestScanAllowExact|TestScanAllowBindsRule|TestScanAllowMatchDigest|TestScanOverLimitBoundToContainer|TestCheckedInScanAllow|TestBuildNeedsGitleaksConfig|TestImageLayoutMatchesContainmentSuite|TestScanIgnoresGitleaksAllowances|TestScanRPMScriptlets|TestScanNestedArchives|TestScanPathRules|TestScanV7Tar|TestRPMExpansionBudget)$$' -count=1
+ CGO_ENABLED=0 go test ./internal/hostedimage -run '^(TestManifestPinsEverything|TestBuildReproducible|TestBuildChecksPins|TestImageInputsHaveNoSecrets|TestBuildScansPayload|TestScanAllowExact|TestScanAllowBindsRule|TestScanAllowMatchDigest|TestScanOverLimitBoundToContainer|TestCheckedInScanAllow|TestScanSkipsGoTestdata|TestDropGoTestdata|TestPinsCarryContainmentSuiteTools|TestBuildNeedsGitleaksConfig|TestImageLayoutMatchesContainmentSuite|TestScanIgnoresGitleaksAllowances|TestScanRPMScriptlets|TestScanNestedArchives|TestScanPathRules|TestScanV7Tar|TestRPMExpansionBudget)$$' -count=1
# hosted-infra-check is the OpenTofu for the hosted stack (infra/hosted):
# plan-check.py's tests on fresh-plan fixtures, then each root formatted,
diff --git a/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md
index 5826f724..65da49e8 100644
--- a/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md
+++ b/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md
@@ -3229,3 +3229,17 @@ Mutation checks (each restored from a copy and the file compared to the original
- hostedContainment without Hosted: `go test ./cmd/equipo-runner -run '^TestHostedContainmentUsesHostedPin$' -count=1` FAILED at hosted_test.go:222.
- manifest.json still pinning the Debian build (red before the repin): `go test ./internal/hostedimage -run TestManifestPinsEverything -count=1` FAILED at manifest_test.go:195 "checked-in bwrap=0dfa36b9..., want the hosted build 1ebd5a3d...".
- The chain test's runner built without -tags hostedchain: `make hosted-chain-test` FAILED (TestChainHostedCheckPasses, TestChainFailingCheck, TestChainNewModule: "the step ended and its VMs stopped with proof: not within 3m0s"; the VM runner's log: err=namespace_bubblewrap_digest).
+
+### Follow-up rulings (python3, Go testdata, plan3test budget)
+
+- python3 pinned: python3, python3-libs, gdbm-libs, python3-pip-wheel and python3-setuptools-wheel from AL2023 2023.12.20261102 (pkgIds from the primary database checked against repomd.xml, rpm -K against key D832C631). The image built locally from the dry run's bundle (podman, the pinned base, offline) passes the Dockerfile, and its own containment suite run in its own root filesystem passes but for one test that needs /var not to be the caller's (an artifact of the extracted root filesystem).
+- The Dockerfile deletes /usr/local/go/src/**/testdata after unpacking the toolchain; the scan skips the same members (goTestdata). 43 testdata allowances dropped, 2 python3 ones added: 31 remain.
+- internal/plan3test's size record is 12059 (8ed317b6).
+
+Mutation checks (each restored from a copy; tests pass again):
+
+- tar walk without the testdata skip: `go test ./internal/hostedimage -run '^TestScanSkipsGoTestdata$' -count=1` FAILED at scan_test.go:558 "Build with keys only in go/src testdata = ... go/src/cmd/vendor/x/testdata/deep/key.txt ... (private-key)".
+- DropGoTestdata without dotglob: `-run '^TestDropGoTestdata$'` FAILED at scan_test.go:602 "go/src/.hidden/testdata/k: kept true, but the scan skips it: true".
+- Dockerfile.tmpl without the `{{.DropGoTestdata}}` line: `-run '^TestDropGoTestdata$'` FAILED at scan_test.go:586 "the Dockerfile does not drop the Go tree's testdata right after unpacking it".
+- a checked-in allowance moved under go/src/x/testdata: `-run '^TestCheckedInScanAllow$'` FAILED at scanallow_test.go:57 "the image deletes the Go tree's testdata, so the scan never reads it".
+- pins.json without python3-libs (renamed pythonX-libs): `-run '^TestPinsCarryContainmentSuiteTools$'` FAILED at assemble_test.go:344 "pins.json carries no python3-libs-3.* package".
diff --git a/internal/hostedimage/scanallow_test.go b/internal/hostedimage/scanallow_test.go
index c197a3b8..fffec98d 100644
--- a/internal/hostedimage/scanallow_test.go
+++ b/internal/hostedimage/scanallow_test.go
@@ -104,7 +104,7 @@ func TestCheckedInScanAllow(t *testing.T) {
// builds with the checked-in allowances, and the same inputs with one new
// secret in the runner are refused for that finding alone. It needs the
// real inputs (the Go toolchain, the packages, the built binaries), so it
-// runs only when given a bundle, and takes minutes (go test -timeout 30m).
+// runs only when given a bundle, and takes minutes (go test -timeout 40m).
func TestScanAssembledInputs(t *testing.T) {
bundle := os.Getenv("EQUIPO_HOSTED_IMAGE_BUNDLE")
if bundle == "" {