Appearance
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, thenmake 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 uiis rebuilding the embedded assets while Go compilesinternal/webui. Vite replaces the dist directory during a build. - Check: look for a concurrent UI build and a missing
dist/index.htmlor hashed assets. - Fix: finish
make uifirst, then runmake 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 --versionand compare it with the warning'srequiredrange. - 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"tostring, butSettingField.itemsaccepts a fixed set of names. Bothmake uiandmake ui-testtypecheck tests too. - Check:
TS2345insettings.test.ts, withitemsincompatible withSettingField. - Fix: annotate the fixture as
SettingFieldso 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 permittedand 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 lintcommand 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 statusandgit 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 alland 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 retrymake sbom. If a transitive module still lacks checksums, usego mod download alland 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.jsonand 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. Runnpm ciinwebto 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-onlyinweb. Review it, runnpm ci, then rerunmake sbom. New dependencies still require owner approval.
make sbom fails with "differs from Makefile pins" or "missing release pin"
- Cause: a CRS or bot
VERSIONrecord 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
VERSIONfile withCRS_TAGandCRS_SHA256, orBOTS_COMMITandBOTS_SHA256, in the Makefile. - Fix: use
make update-crsormake update-botsfor the intended pin, then rerunmake 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_modulescopy was modified. - Check: the message lists
new,changedormissingfiles. Compare the file in the module cache (go env GOMODCACHE) orweb/node_modules/<package>with the tracked text ininternal/sbom/catalog/texts/. Rungo mod verify, ornpm ciinweb, to rule out a locally modified copy. - Fix: if the copy was modified, restore it (
go clean -modcachethengo mod download, ornpm ci). If upstream really changed the files, read them, update the license and hashes frommake sbom-reviewin the review file, updatedocs/oss-components.md, and rerunmake 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
spdxIDsininternal/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-checkprints 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
spdxIDswith aTestLicenseKindcase, then rebuild (make build, ormake demo-restartfor the demo). If it is not on the list, write the license as aLicenseRef-identifier with its reviewed text instead. Runmake sbom-checkafter 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 lacksLICENSEorPATENTS(these are also looked up one level abovego env GOROOT). - Check: the message names the component. Run
go mod download <module>@<version>. For npm, runls web/node_modules/<package>/package.json. - Fix: run
go mod downloadormake ui(which runsnpm ci), thenmake sbom, thenmake sbom-reviewto 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,missingorstalepath. - 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 verifyin 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.jsonandtools/sbom/external.json.make sbom-reviewlists 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 testthroughgrepwithoutpipefail, so the target's exit code was grep's..SHELLFLAGSdoes not help on macOS, where GNU Make 3.81 ignores it. - Fix: the piped recipes start with
set -o pipefail;(withSHELL := /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
+positivelayer's rules (benchRulesintest/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 withcustomer.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
uptimebefore 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+positiveoutlier 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 ... refusedincludes the verdict.evaluation hook missing or unstablerefers 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/perfwritable. 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_paranoidin thewaap-haVM, andperf --version. - Fix: run the profiling command with
sudoinside the VM. Use the software event-e cpu-clock:uif the virtual CPU has no usable hardware cycles counter. Keep the binary unstripped for symbols. Ifperfis missing, install the matchinglinux-toolspackage 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-freshclamservice after the packages are installed. Runningfreshclamby 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(adaily.cvdordaily.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
freshclamwhile it runs. If the run fails withinspect.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 orgo.modhas an older go-re2: rungo mod downloadfrom this repository. - The warning
ISO C++ forbids converting a string constant to 'char*'fromcre2.cppis 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+dirtyversion. 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, orrelease 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, andnpm ciinweb. 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 usingmake 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, orunsafe 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 re2andgo 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.sha256files. - 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 forgz.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)andgz.OS, and confine temporary catalog writes withos.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 -mforvcs.time. - Fix: build from the Git checkout with
make release, optionally settingSOURCE_DATE_EPOCHto 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 sbomorwaap licensesexits 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 informationalso 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 runningmake sbom. Never edit the embedded catalog or substitute another node's inventory. - Other responses: 400
format must be cyclonedx or spdxmeans fixformat. 404unknown componentmeans 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 gatereports a command failure ordiffers from bundle. - Cause: the built binary's embedded release view disagrees with the generated documents.
- Check: run
waap sbom,waap sbom -format spdxandwaap licensesfrom 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 sbomandwaap licenseson 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 racereportssignal: killedforwaap/cmd/waap, ormake lintreports an uncheckedl.delLockedor an unusederrNotLinux. - 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 raceto 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.