Skip to content

Building from a source checkout ​

Problems building, testing and releasing Spalto from a source checkout. These checks run in a development checkout, not on a production node.

make race reports TestAntivirusSkipsRefusedFiles: not refused ​

  • Cause: this file-upload fixture has a 1 ms module budget and fail-open behavior. Race instrumentation and scheduling under load can exceed that budget. A full race run failed here once during UI work; ten isolated repetitions then passed. Timing is the likely cause, not confirmed by this assertion alone.
  • Check: run go test -race -tags re2_cgo ./internal/modules/files -run '^TestAntivirusSkipsRefusedFiles$' -count=10, then make race. Keep the original failure output for comparison.
  • Fix: retry without competing builds. If it persists, report it with the full output for backend diagnosis. Do not raise the budget, skip the case or loosen its assertion.

Go build or tests report embed dist/...: no such file or directory ​

  • Cause: make ui is rebuilding the embedded assets while Go compiles internal/webui. Vite replaces the dist directory during a build.
  • Check: look for a concurrent UI build and a missing dist/index.html or hashed assets.
  • Fix: finish make ui first, then run make build test race lint. Do not run Go checks concurrently with the UI build. Rebuild Go after the new assets exist.

make ui or make ui-test prints npm warn EBADENGINE ​

  • Cause: Node does not match the versions supported by the installed UI tooling. Node 25, for example, is outside the declared ranges for Vite, Vitest and jsdom.
  • Check: run node --version and compare it with the warning's required range.
  • Fix: select the documented Node 24 LTS prerequisite on PATH, then rerun the target. Do not change dependencies or suppress engine checks to hide the warning.

UI typecheck rejects a test fixture's items: string ​

  • Cause: TypeScript widened a settings fixture's items: "rule" to string, but SettingField.items accepts a fixed set of names. Both make ui and make ui-test typecheck tests too.
  • Check: TS2345 in settings.test.ts, with items incompatible with SettingField.
  • Fix: annotate the fixture as SettingField so its literal is checked against the schema. Keep the validation assertions and rerun the two UI targets one after the other.

Lint prints Failed to persist facts to cache ​

  • Cause: the lint cache directory is outside the agent's writable sandbox.
  • Check: look for operation not permitted and the cache path in the warning. Lint may still report zero issues, but it could not save its analysis cache.
  • Fix: allow the same make lint command to use its normal cache through the agent's command approval flow, then check the result again.

Git cannot create a worktree's index.lock: Operation not permitted ​

  • Cause: the worktree's Git metadata lives in the parent checkout, outside the agent's writable sandbox. Files in the worktree can still be edited.
  • Check: git status and git rev-parse --git-dir. Check whether the lock path is outside the writable roots. This permission error does not mean a stale lock exists.
  • Fix: rerun the same staging or commit command through the agent's approval flow so it can access the shared metadata. Do not delete locks or reset the working tree.

make sbom or make build fails with "missing go.sum entry" ​

  • Cause: the checked-in module checksums or the local module cache do not cover the selected graph. The generator runs go list -m -json -tags re2_cgo -mod=readonly all and reports its stderr. It does not repair lockfiles.
  • Check: run that command from the repository root. Check git diff -- go.mod go.sum, and confirm the checkout has both lockfiles. Network or checksum-cache permission errors appear in the same stderr.
  • Fix: restore the matching lockfiles if they were accidentally omitted. For an intended dependency change, run go mod download, review the checksum changes, then retry make sbom. If a transitive module still lacks checksums, use go mod download all and review the result. A sandbox may require approval to write Go's checksum cache. Do not disable checksum verification.

make sbom fails with "npm lockfile out of date" ​

  • Cause: web/package.json and the lock root differ, a pinned direct version differs, a production dependency is missing or marked dev-only, or a production package has no version or source. Only npm lockfile version 3 is supported.
  • Check: inspect git diff -- web/package.json web/package-lock.json. Run npm ci in web to check npm's lockfile consistency. The generator checks the required production closure and exact direct pins, but does not resolve semver ranges or replace npm's checks.
  • Fix: restore the matching lockfile, or, for an intended dependency change, regenerate it with npm install --package-lock-only in web. Review it, run npm ci, then rerun make sbom. New dependencies still require owner approval.

make sbom fails with "differs from Makefile pins" or "missing release pin" ​

  • Cause: a CRS or bot VERSION record differs from its Makefile version or archive hash, or a required Makefile pin was removed. Envoy's version comes directly from the Makefile.
  • Check: compare the named VERSION file with CRS_TAG and CRS_SHA256, or BOTS_COMMIT and BOTS_SHA256, in the Makefile.
  • Fix: use make update-crs or make update-bots for the intended pin, then rerun make sbom. Do not hand-edit the vendored files. Restore an accidentally removed pin.

make sbom fails with "license files changed since review" ​

  • Cause: a bundled component's license, NOTICE or copyright files differ from the SHA-256 recorded when its license was reviewed. A file was added, removed or edited under the same version, or a local module cache or node_modules copy was modified.
  • Check: the message lists new, changed or missing files. Compare the file in the module cache (go env GOMODCACHE) or web/node_modules/<package> with the tracked text in internal/sbom/catalog/texts/. Run go mod verify, or npm ci in web, to rule out a locally modified copy.
  • Fix: if the copy was modified, restore it (go clean -modcache then go mod download, or npm ci). If upstream really changed the files, read them, update the license and hashes from make sbom-review in the review file, update docs/oss-components.md, and rerun make sbom. Never copy hashes without reading them.

About and licenses shows "bundled component ... has an invalid SPDX license expression" ​

  • Cause: a newly bundled component uses an SPDX license identifier that the checker does not know yet. The checker accepts only the identifiers listed in spdxIDs in internal/sbom/license.go, so the release inventory is refused and the page shows the error instead of the list. Seen with the Inter font (OFL-1.1) on 2026-11-13.
  • Check: make sbom-check prints the same message. Confirm that the identifier is on the official SPDX license list (spdx.org/licenses).
  • Fix: if it is a real SPDX identifier, add it to spdxIDs with a TestLicenseKind case, then rebuild (make build, or make demo-restart for the demo). If it is not on the list, write the license as a LicenseRef- identifier with its reviewed text instead. Run make sbom-check after adding any bundled dependency.

make sbom fails with "not available on this host" or "neither on this host nor in the tracked catalog" ​

  • Cause: a bundled component's license files are needed, but its source is absent. A linked Go module is not in the module cache, or a UI package is not installed in web/node_modules (or another version is installed), and the tracked catalog has no reviewed copy (a new or unreviewed component). For the Go standard library, the Go installation lacks LICENSE or PATENTS (these are also looked up one level above go env GOROOT).
  • Check: the message names the component. Run go mod download <module>@<version>. For npm, run ls web/node_modules/<package>/package.json.
  • Fix: run go mod download or make ui (which runs npm ci), then make sbom, then make sbom-review to review the new component.

make lint fails in sbom-check with "tracked inventory is stale" ​

  • Cause: a dependency, pin, review file or the generator changed without regenerating, or a tracked notices or catalog file was edited by hand. Lines above the error name each differs, missing or stale path.
  • Check: git status THIRD_PARTY_NOTICES.md internal/sbom/catalog.
  • Fix: run make sbom, review the diff, and commit the notices, catalog and review files together with the dependency change.

The SBOM or notices say "to verify" ​

  • Cause: the selected Go or npm version has no review entry (npm shows the lockfile's declaration as "declared ..."), upstream terms are unresolved, or an external system or data version is unpinned. Generation succeeds and preserves the uncertainty. A bundled component must not stay to verify in a release.
  • Check: open the component's license or source link and compare docs/oss-components.md, tools/sbom/go-licenses.json, tools/sbom/npm-licenses.json and tools/sbom/external.json. make sbom-review lists the bundled ones with their files.
  • Fix: verify the license at the selected version, update the appropriate catalog and register, and regenerate. Record unresolved findings in the agent handbook's handoff note. Runtime downloads and unused candidates are labelled; they are not bundled data.

make e2e (or corpus, crs, bench-e2e) printed FAIL but exited successfully ​

  • Cause: earlier recipes piped go test through grep without pipefail, so the target's exit code was grep's. .SHELLFLAGS does not help on macOS, where GNU Make 3.81 ignores it.
  • Fix: the piped recipes start with set -o pipefail; (with SHELL := /bin/bash). When reading old logs, check the summary lines (--- FAIL).

make bench-e2e fails at once with bench-positive.test ...: status 403, reasons ... ​

  • Cause: the +positive layer's rules (benchRules in test/e2e/bench_test.go) do not admit one of the benchmarked requests. Each POST to / is either a form or a JSON order, so a parameter marked required there refuses the other kind (pos.param.missing). The first run of the layer hit this with customer.id.
  • Check: the reasons in the failure name the rule ID, the parameter and the expectation.
  • Fix: correct the rule in benchRules, and make it required only on the endpoint where every request has the parameter. Do not relax the pre-check: a refused request would measure the block path, not inspection.

Benchmark rows jump between runs, or one layer has a single outlier ​

  • Cause: other work on the machine (another build, a VM, an indexer). The latency test shares the CPUs with Envoy and the inspection service.
  • Check: run uptime before and after. Compare the same row on the other layers in the same run. In the first two macOS runs of the positive-model benchmark, the load average was about 5 and each run had one +positive outlier that a quiet third run did not repeat.
  • Fix: rerun on an idle machine (stop VMs not in use) and compare layers within one run.

make bench-inspect fails or leaves the baseline unchanged ​

  • Cause: a benign shape was refused, the Coraza debug hook stopped emitting rule entries, samples were incomplete or inconsistent, or the output could not be written.
  • Check: read stderr and the captured stdout. benign ... refused includes the verdict. evaluation hook missing or unstable refers to untimed diagnostic requests. The writer requires five samples for every shape and all four metrics.
  • Fix: check the rule or configuration, or the upstream logging change, before rerunning. Do not bypass the verdict check or fabricate a count. For filesystem errors, make test/perf writable. A failed benchmark never publishes a partial baseline.

Linux perf record reports Operation not permitted ​

  • Cause: the profiling VM restricts perf events (kernel.perf_event_paranoid).
  • Check: cat /proc/sys/kernel/perf_event_paranoid in the waap-ha VM, and perf --version.
  • Fix: run the profiling command with sudo inside the VM. Use the software event -e cpu-clock:u if the virtual CPU has no usable hardware cycles counter. Keep the binary unstripped for symbols. If perf is missing, install the matching linux-tools package inside the VM only. No host setting or product limit needs changing.

make e2e-icap fails before the tests: freshclam errors, or no ICAP answer ​

  • Cause: ClamAV's signatures are downloaded by the clamav-freshclam service after the packages are installed. Running freshclam by hand at the same time fails with "Failed to lock the log file". Without signatures, c-icap's virus_scan service does not answer.
  • Check: in the VM, ls /var/lib/clamav (a daily.cvd or daily.cld), systemctl status clamav-freshclam, and /var/tmp/waap-ha/icap/server.log.
  • Fix: wait for the service (the script waits up to 5 minutes), and never run freshclam while it runs. If the run fails with inspect.sock not created, the VM was busy compiling: run the target again.

cre2.cpp: 'strlen' was not declared in this scope (Linux, newer GCC) ​

  • Cause: go-re2 before v1.11.0 relied on <cstring> being included indirectly. GCC on Ubuntu 26.04 no longer does. Fixed upstream (go-re2 PR #227, release v1.11.0).
  • Fix: none needed with this repository's go.mod (go-re2 v1.13.0). If you see it, your module cache or go.mod has an older go-re2: run go mod download from this repository.
  • The warning ISO C++ forbids converting a string constant to 'char*' from cre2.cpp is harmless (upstream code).

make release refuses a dirty working tree ​

  • Symptom: dirty working tree; commit changes or set ALLOW_DIRTY=1.
  • Cause: tracked edits or untracked files would make the release differ from its commit.
  • Check: git status --short, including untracked files.
  • Fix: review and commit the intended changes. For a local trial only, run ALLOW_DIRTY=1 make release; its binary has a +dirty version. Do not hide edits.

make release refuses build information, reviews, hashes or dependency references ​

  • Symptom: no reviewed catalog entry, no module checksum, complete reviewed license texts, fails its reviewed hash, invalid SPDX license expression, invalid purl, unknown target, unversioned replacement, or release requires stamped waap build information.
  • Cause: the linked binary is outside the reviewed catalog, a reviewed text is damaged, metadata is malformed, or the binary was built without VCS stamping. Local replacements do not identify releasable source. npm integrity errors indicate a missing, malformed or non-SHA-512 digest in the lockfile.
  • Check: go version -m <binary>, git diff -- tools/sbom, make sbom-check, and npm ci in web. Match the named component and version, including replacements.
  • Fix: restore damaged reviewed files. For an intended update, review the actual upstream texts and hashes, regenerate with make sbom, and commit. Build from the Git checkout using make release. Restore lockfiles from the intended commit if they are corrupt. Do not manufacture checksums, reuse another version's review or relax the gate.

make release refuses SOURCE_DATE_EPOCH, RE2 version or archive paths ​

  • Symptom: invalid SOURCE_DATE_EPOCH or commit time, invalid SOURCE_DATE_EPOCH, invalid RE2 package version, unsafe product version, or unsafe archive path.
  • Cause: the epoch is not an integer between 0 and 253402300799, RE2's pkg-config record is missing or malformed, or artifact names contain an unsafe path or control character.
  • Check: inspect SOURCE_DATE_EPOCH, pkg-config --modversion re2 and go version -m.
  • Fix: unset the epoch to use the commit time, or supply valid Unix seconds. Repair the system RE2 or pkg-config installation. Build from a checkout with a valid version tag. Do not rename unsafe metadata into archive paths.

Release regeneration or reproducibility differs ​

  • Symptom: release SBOM or notices differ when regenerated from catalog, or two release runs produce different .sha256 files.
  • Cause: catalog or model drift, changed source or embedded UI, different build settings, different Go or native library toolchains, or non-deterministic archive data.
  • Check: compare the commit, ALLOW_DIRTY, SOURCE_DATE_EPOCH, go version -m, dist/release-sbom.cdx.json, the notices, the unpacked payload checksums and the tar headers.
  • Fix: repeat on the same clean commit, host, toolchain and RE2 installation. If the library regeneration gate still fails, preserve the outputs and report it. Never bypass the gate or weaken the identity test.

Release tooling fails lint during development ​

  • Symptom: errorlint rejects err == io.EOF, staticcheck reports QF1008 for gz.Header.OS, or gosec flags a temporary catalog write.
  • Cause: wrapped errors need errors.Is, and the gzip header is embedded.
  • Check: make lint, using the named file and line.
  • Fix: use errors.Is(err, io.EOF) and gz.OS, and confine temporary catalog writes with os.Root. Rerun lint without disabling the checks.

SPDX output refuses a missing creation time ​

  • Symptom: SPDX requires SOURCE_DATE_EPOCH or a valid binary vcs.time.
  • Cause: SPDX 2.3 requires a creation time, and the binary has neither an embedded release epoch nor a valid VCS time. No wall-clock fallback is used.
  • Check: inspect go version -m for vcs.time.
  • Fix: build from the Git checkout with make release, optionally setting SOURCE_DATE_EPOCH to a valid UTC Unix second. Keep the same epoch for reproducible builds. Concurrent downloads must remain identical; keep the differing files and build details if they disagree.

Local inventory commands or system API downloads fail ​

  • Symptom: waap sbom or waap licenses exits 1, or a system download returns 500.
  • Cause: missing build information, a missing reviewed linked module, or damaged catalog texts. release requires stamped waap build information also occurs in unstamped builds.
  • Check: waap version, go version -m /path/to/waap, and the error body. Check the actual node addressed: HA downloads describe that node's binary.
  • Fix: use a binary from make release. Rebuild after updating reviews and running make sbom. Never edit the embedded catalog or substitute another node's inventory.
  • Other responses: 400 format must be cyclonedx or spdx means fix format. 404 unknown component means use the exact name in the About component table. 401 means log in, or supply a management API token. These endpoints are authenticated management endpoints, and they are not served as product metadata on the data-plane listener.

Release runtime inventory gate fails ​

  • Symptom: runtime inventory gate reports a command failure or differs from bundle.
  • Cause: the built binary's embedded release view disagrees with the generated documents.
  • Check: run waap sbom, waap sbom -format spdx and waap licenses from the unpacked binary, redirecting output to files, then compare the SHA-256 values with the bundle files.
  • Fix: keep the failing outputs, the build information and the toolchain versions for diagnosis. Rebuild from the intended clean commit. Do not bypass the gate.

About and licenses cannot load or download a document ​

  • Symptom: the view or a download shows an API error, or a session expiry returns to the login page.
  • Cause: management authentication ended, or this node cannot form its release inventory.
  • Check: run waap version, waap sbom and waap licenses on the same node. Check the system API status and error, and the build-information checks above.
  • Fix: log in again after a session expiry. For a catalog error, use a verified release binary. A scoped viewer opens System, About and licenses directly. Compare files from the same binary: a normal source build and a release build can differ in build tags, trimpath, RE2 metadata and an embedded epoch.
  • Source link without an open action: the metadata is not an HTTPS URL without credentials (or it has credentials). It remains text, and no script, data or relative URL is opened.

Linux acceptance hits memory or HA lint failures ​

  • Symptom: Linux make race reports signal: killed for waap/cmd/waap, or make lint reports an unchecked l.delLocked or an unused errNotLinux.
  • Cause: the 6 GiB test VM can run out of memory when heavy race-test packages run together. The two lint findings predate the current change and appear only in a Linux build.
  • Check: inspect the kernel OOM records (sudo dmesg) and the exact lint file and line.
  • Fix: run GOFLAGS=-p=1 make race to serialize packages while keeping every test and the race detector. Keep Linux acceptance open until a focused HA change resolves both lint findings. Do not suppress linters or ignore address-removal errors to pass.