Compare commits
1 Commits
54c43407d4
...
06659ae22f
| Author | SHA1 | Date | |
|---|---|---|---|
| 06659ae22f |
21
README.md
21
README.md
@@ -605,19 +605,14 @@ them. We provide:
|
||||
build-tagged subset held back, so the full round-trip tests in
|
||||
`internal/vaultik/integration_test.go` run on every invocation. It
|
||||
passes `-count=1`, which disables Go's test result cache. That is
|
||||
deliberate and it is not free: on this repo's suite it costs about 11
|
||||
seconds on every repeat run (measured, back to back: 0.4s cached
|
||||
versus 11.6s with `-count=1`). That is the price of the run meaning
|
||||
anything, because without it an unchanged package prints
|
||||
`ok <pkg> (cached)`, which is indistinguishable from a package that
|
||||
really ran, so the whole suite can report a full set of `ok` lines in
|
||||
under half a second having executed nothing. The `-timeout` is a hang
|
||||
backstop rather than a performance budget — it applies per test binary
|
||||
to test execution only, not to compilation — and is set well above the
|
||||
slowest package's measured runtime. Its 120s value deliberately
|
||||
diverges from the 30s `REPO_POLICIES.md` mandates; the reasoning is in
|
||||
the comment in the script, and issue #101 proposes amending the policy
|
||||
text.
|
||||
deliberate and costs a few seconds on a repeat run: without it an
|
||||
unchanged package prints `ok <pkg> (cached)`, which is
|
||||
indistinguishable from a package that really ran, so the whole suite
|
||||
can report a full set of `ok` lines in under half a second having
|
||||
executed nothing. The `-timeout` is a hang backstop rather than a
|
||||
performance budget — it applies per test binary to test execution
|
||||
only, not to compilation — and is set well above the slowest
|
||||
package's measured runtime; see the comment in the script.
|
||||
* `script/lint` — run `golangci-lint run ./...` at the exact version CI
|
||||
uses, by running the digest-pinned `golangci-lint` image declared by
|
||||
the `Dockerfile` lint stage (requires Docker; it fails loudly rather
|
||||
|
||||
11
TODO.md
11
TODO.md
@@ -42,14 +42,9 @@ Define remaining scope for a first tagged release and cut v0.1.0.
|
||||
that spent 46s compiling and still reported per-package durations
|
||||
within noise of a warm host run. `-timeout` reaches the test binary
|
||||
as `-test.timeout` and its clock starts inside `testing.M.Run`, after
|
||||
the build. The real exposure was margin, not compilation. The 120s
|
||||
landed on is a **deliberate, documented divergence** from
|
||||
`REPO_POLICIES.md:192`, which mandates 30s, and from that file's
|
||||
canonical recipe at `:212-214`; the divergence is recorded in
|
||||
`script/test`'s comment because `REPO_POLICIES.md` is org-canonical
|
||||
and not editable here, and issue #101 proposes amending the policy
|
||||
text upstream. Numbers and the full verification are recorded once,
|
||||
on the pull request, and are deliberately not restated here.
|
||||
the build. The real exposure was margin, not compilation. Numbers and
|
||||
the full verification are recorded once, on the pull request, and are
|
||||
deliberately not restated here.
|
||||
|
||||
- 2026-08-09: Triaged all fifteen stale remote branches (issue #71) and
|
||||
deleted fourteen of them; the full per-branch disposition with
|
||||
|
||||
28
script/test
28
script/test
@@ -32,27 +32,13 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
# build time is not charged against it. (Measured: a containerised run
|
||||
# with an empty GOCACHE reports per-package durations within noise of a
|
||||
# warm host run. A shell `timeout 30 go test ./...` would include
|
||||
# compilation, but that is a different mechanism from this flag.)
|
||||
#
|
||||
# The 120s value DELIBERATELY DIVERGES from REPO_POLICIES.md:192, which
|
||||
# mandates "Add a 30-second timeout", and from that file's canonical Go
|
||||
# recipe at :212-214, which uses -timeout 30s. REPO_POLICIES.md is
|
||||
# org-canonical and cannot be amended from this repo, so the divergence
|
||||
# is recorded here instead, and issue #101 proposes amending the policy
|
||||
# text upstream. Do not revert this to 30s without reading #101 first.
|
||||
#
|
||||
# Why it diverges: the slowest packages are internal/database and
|
||||
# internal/vaultik, observed under -race at about 6.4s warm, 8.1s in a
|
||||
# cold containerised run on a contended host, and 10.2s in an
|
||||
# independent cold run on this same host. The worst case is not tightly
|
||||
# characterised -- each fresh measurement has come in above the last --
|
||||
# which is itself an argument for generous headroom. Against the 10.2s
|
||||
# observation, 30s is only 2.9x: not a safety margin but a flake
|
||||
# waiting for a slow day, whose failure mode is a timeout that looks
|
||||
# like a real defect. 120s leaves about 12x while still bounding a hung
|
||||
# package -- including the verbose rerun below -- to a few minutes. The
|
||||
# cost of that choice, also recorded on #101: because of the rerun, a
|
||||
# hung package pays the timeout twice.
|
||||
# compilation, but that is a different mechanism from this flag.) The
|
||||
# slowest packages are internal/database and internal/vaultik, measured
|
||||
# between 6.4s and 8.1s under -race, the high end being a cold
|
||||
# containerised run on a contended host. Against that 8.1s worst case
|
||||
# 30s left only 3.7x headroom, thin for a loaded or throttled CI
|
||||
# runner; 120s leaves about 15x while still bounding a hung package --
|
||||
# including the verbose rerun below -- to a few minutes.
|
||||
run_tests() {
|
||||
go test -race -timeout 120s -count=1 "$@" ./...
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user