Skip to content

Test/concurrent make test - #300

Merged
v0lkan merged 2 commits into
mainfrom
test/concurrent-make-test
Jul 18, 2026
Merged

Test/concurrent make test#300
v0lkan merged 2 commits into
mainfrom
test/concurrent-make-test

Conversation

@v0lkan

@v0lkan v0lkan commented Jul 18, 2026

Copy link
Copy Markdown
Member

No description provided.

v0lkan added 2 commits July 17, 2026 08:27
The -p 1 flag serialized all test packages as a workaround for shared
state, at the cost of making every full suite run several times slower
than it needed to be. The blockers are gone: the sqlite-backed test
packages isolate their data directories per run through TestMain
(SPIKE_NEXUS_DATA_DIR pointing at a temporary directory), no test binds
a fixed network port, and environment variables are per-process, so
package-level parallelism cannot leak state between packages.

Remove the flag and document why concurrency is safe now. Verified with
back-to-back full-suite runs under -race with zero failures.

Spec: TBD
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
The regressions this month (the boot-order deadlock, the policy
get-by-name break, the restore flow) were caught by hand or by the
live drill, never by tests: nothing exercised the seams between state,
persist, and recovery. Slice A of specs/integration-tests.md closes
that gap inside the normal suite.

The new app/nexus/internal/state/integration package walks the state
layer through its whole life against the real sqlite stack: initialize
and verify the root key is cached; write a secret and a policy; prove
a duplicate Initialize neither recomputes key material nor recreates
the backend (the pre-existing secret stays readable); export operator
recovery shards; zero the root key to simulate total crash; restore
through the real RestoreBackingStoreFromPilotShards path using only a
threshold-sized shard subset; verify the recovered key equals the
original and the pre-crash data reads back; and exercise deletion and
undeletion on the restored state.

The restore path reaches for a SPIFFE source after initializing state;
the test sets a malformed SPIFFE_ENDPOINT_SOCKET so that step fails at
validation instead of dialing the missing agent forever, and recovers
the expected log.FatalErr panic via SPIKE_STACK_TRACES_ON_LOG_FATAL.
The missing SVID-acquisition timeout that makes the unbounded dial
possible is tracked as its own Phase 5 task.

Slice B (Pilot behavior against an uninitialized or unreachable Nexus)
stays open on the spec's questions about build-tagged live tests.

Spec: specs/integration-tests.md
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
@v0lkan v0lkan self-assigned this Jul 18, 2026
@v0lkan
v0lkan merged commit 01954f8 into main Jul 18, 2026
14 checks passed
@v0lkan
v0lkan deleted the test/concurrent-make-test branch July 18, 2026 17:49
v0lkan added a commit that referenced this pull request Jul 26, 2026
CI on main fails at the "Go - Lint" job, which runs `make audit` and so
includes govulncheck. The failure is not caused by a code change. Run
#300 (2026-07-18) passed and run #301 (2026-07-25) failed, but the merge
in between never touched go.mod or go.sum, and golang.org/x/text was
v0.37.0 on both sides. The advisory was published in the interval, so
the build broke on a timer rather than on a commit.

GO-2026-5970 is an infinite loop on invalid input in golang.org/x/text.
It is called rather than merely present, reached through
recovery.sendShardsToKeepers -> net.Post -> norm.Form.*, so govulncheck
exits non-zero and takes the job with it.

Bumps x/text v0.37.0 -> v0.39.0, which fixes it, and x/net v0.55.0 ->
v0.56.0 to clear the uncalled GO-2026-5942 in the same pass. `go mod
tidy` transitively lifts x/crypto to v0.53.0, x/sys to v0.46.0, and
x/term to v0.44.0. No application code changes.

One finding is deliberately left behind. GO-2026-5932 reports that
golang.org/x/crypto/openpgp is unmaintained and unsafe by design, with
no fixed version: the package is deprecated, not patched, so no bump can
clear it. It arrives transitively and SPIKE does not call it, so
govulncheck exits 0 with it present.

That makes Round 1's "zero vulnerabilities total, not merely zero
called" criterion unreachable, so the spec amends it rather than
silently missing it. The standing bar is now zero *called*
vulnerabilities plus a recorded justification for every uncalled one
left in place, with clearing uncalled findings still preferred wherever
a fixed version exists.

Verified with the same command CI runs: `make audit` exits 0, `make
test` passes on the upgraded graph, and `go build ./...` is clean.

Spec: specs/vuln-remediation.md

Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
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.

1 participant