Compare commits

Author SHA1 Message Date
sneak 3d615ef612 Make script/test fail on flaky failures and enable -race (closes #32)
check / check (push) Failing after 1m45s
script/test ended with `go test ./... || go test -v ./...`, so the
verbose rerun's exit status became the script's. A test that failed
once and passed on the retry produced exit 0, and since the Dockerfile
runs `make test` and CI runs script/cibuild, flaky failures were
invisible repo-wide.

Replace that with the pattern from REPO_POLICIES.md: run
`go test -timeout 30s -race -cover ./...`, and on failure rerun
verbosely and then exit 1, so the rerun is diagnostic only and can
never turn a failed run green. `go vet ./...` still runs first; the
script stays POSIX sh with set -eu, the CGO_ENABLED=1 export, and the
repo-root cd idiom.

Enabling -race surfaced a genuine timing conflict rather than a data
race: no package that ran to completion reported one, but internal/cli
now exceeds the 30s timeout because the 99MB/100MB boundary cases in
secrets_size_test.go are about 10x slower under race instrumentation.
Measured in the CI-equivalent container (script/cibuild, with the
memlock ulimit): 18.7s for the make test layer without -race, versus
internal/cli alone needing roughly 55-60s with it. Neither the flags
nor the tests were weakened to hide this; the conflict is filed as #52
for a decision.
2026-08-09 05:03:54 +00:00
clawbotandsneak 6e5e0db999 Add .editorconfig (closes #27) (#28)
check / check (push) Successful in 42s
Adds `.editorconfig`, copied verbatim from `sneak/dnswatcher` (`root = true`; space/4/lf/utf-8/trim/final-newline, with `[Makefile]` overriding to tab). secret had none. Resolves #27.

`make check` is green on the host (`0 issues`, all packages pass). Note: `docker build .` fails only on a pre-existing, environmental `memguard` `mlock` / `RLIMIT_MEMLOCK` issue in the 10MB-secret test — it reproduces identically on pristine `origin/main` with this file removed, and secret's real CI sets the memlock ulimit for it. A static config file cannot affect Go tests, so this change is clean; the container ulimit is a separate pre-existing concern.

Left open for review (not merged).

Co-authored-by: sneak <sneak@sneak.berlin>
Reviewed-on: #28
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
2026-08-07 17:46:27 +02:00
sneak e0e5ae68a4 scripts-to-rule-them-all (#26)
check / check (push) Successful in 38s
Reviewed-on: #26
Co-authored-by: sneak <sneak@sneak.berlin>
Co-committed-by: sneak <sneak@sneak.berlin>
2026-07-07 02:13:44 +02:00
3 changed files with 26 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[Makefile]
indent_style = tab
+9
View File
@@ -25,6 +25,15 @@ Bring the repo into policy compliance in one commit:
# Completed Steps
- 2026-08-09: `script/test` now runs
`go test -timeout 30s -race -cover ./...` and, on failure, reruns
verbosely and then exits non-zero, so a test that fails once and
passes on the retry can no longer produce a green build (closes #32).
Enabling `-race` showed the suite cannot meet the 20-second policy
budget: `internal/cli` exceeds the 30-second timeout because the
99MB/100MB boundary cases in `secrets_size_test.go` run roughly 10x
slower under race instrumentation. No flags were weakened and no
tests skipped; the conflict is tracked in #52 for a decision.
- 2026-07-07 Adopted scripts-to-rule-them-all: `script/` entrypoints,
Makefile shims, README Entrypoints section
- 2026-03-11: Secure Enclave unlocker for hardware-backed secret
+5 -1
View File
@@ -9,7 +9,11 @@ main() {
# CGO is required (Makefile exports this too)
export CGO_ENABLED=1
go vet ./...
go test ./... || go test -v ./...
# The rerun is diagnostic only: `exit 1` keeps the script failing
# even if a flaky test passes on the second attempt.
go test -timeout 30s -race -cover ./... || \
{ echo "--- Rerunning with -v for details ---"; \
go test -timeout 30s -race -v ./...; exit 1; }
}
main "$@"