Repository navigation
fix(ci,github-runner,k8s): NFC collision keys, manifest size cap, drop audit, runner group, restore detail (D-1130, D-1131, D-1132, D-1180, D-0632) - #481
Conversation
… collide (D-1130)
…s too large (D-1131)
…Verify count otherwise (D-1132)
…gerprint alias cannot collide or exceed 63 bytes (D-0632)
…stered-group API calls
|
Review fix 96d93c0: K8s wiki and codes.go now describe the category-only human error output (no masked line text); github-runner README states the real status cost (1 request for repo scope, 2 for org scope, plus one per extra 100-entry page). Doc-only; k8s go vet and tests pass with -mod=vendor. |
…trust guards, so renaming the runner cannot bypass the registered-group check (D-1180)
|
Review fix: the registered-group check now also verifies the registration persisted in the runner dir ( |
Rows
D-1130 (ci authz):
foldKeynow NFC-normalizes (before and after the case fold), soé(U+00E9) ande+U+0301 collide ascollision.foldon APFS/HFS+. Addsgolang.org/x/text v0.42.0(unicode/norm,transform) tofree/ciand its vendor tree; hashes match the same version already infree/cdc/go.sum. TestTestExtractor_NormalizationCollisionRefusedfails on the oldpath.go("want collision.fold, got nil") and passes now.D-1131 (ci cache manifest):
EncodeManifestno longer HTML-escapes (&was 6 bytes) and refuses any document over the 8 MiB decode cap (a control byte still costs 6 bytes, so the cap check is needed as well).TestEncodeManifestStaysDecodablefails on the old encoder (25,481,575 bytes) and passes now.D-1132 (ci store):
Backend.CacheDropnow returns(dropped bool, err); the store readsRowsAffectedand writes thecache.entry.droppedaudit row only when a row was removed;Verifycounts only real drops. Interface and callers updated (entries, specs, remote). New assertions inTestCacheEntriesDropOnlyRemovesTheRowThatWasRead(0 audit rows for a lost-race drop, 1 for a real one) andTestVerifyDoesNotCountADropThatRemovedNothing. Note: the signature change means these tests do not compile on the old code; the audit-row assertion is the behavioural check.D-1180 (github-runner): with org scope, once the configured group passes, the guard lists the group's runners and, if the runner is not in it, the org's runners. A runner registered in another group is refused as
runner_group_mismatch(409; start/status stop a running runner likerunner_group_public); an unregistered runner passes. Registration/install setRegistering/TRUST_REGISTERING=trueso a re-install can move the runner. Done in both the Go service andactions/trust.sh(rc 4), with README update. New Go tests (mismatch, in-group, unregistered, registering, Start stops the runner) and 4 shell tests; the mismatch tests fail with the check disabled.D-0632 (k8s): two parts.
HumanDetailno longer echoes any text of the pg_restore error line (quoted masking missed unquoted values in custom exception text). It prints only fixed words for allowlisted categories, or "text withheld". The human line label is now[error category: ...]. Tests cover an unquoted secret in the unit and the cmd restore test.nself_fp_<oid>_<n>, the firstnin 0..1600 not equal to a column name (max 1600 columns, alias < 30 bytes, so no 63-byte truncation collision). Not run against postgres: the machine has no postgres or docker. The unit test checks the SQL text; the docker integration test (NSELF_K8S_PG_TEST=1) gets a newshadow3table with a 63-byte column named like the old alias. Please let CI or a docker host run that test.Commands
free/ci:go build ./...,go vet -mod=vendor ./...,go test -mod=vendor ./.... All packages pass exceptcmd/agentTestServeStdioExitsNonZeroWithE663OnAProdStackMarkerandinternal/legacyTestSecretsEnvLiveKeyGateTrackedValueOnly; both fail identically on a clean origin/main (environment: global gitignore / prod marker).free/github-runner:go vet -mod=vendor ./...,go test -mod=vendor ./...pass;bash tests/github-runner.test.sh71/71 pass.free/k8s:go vet -mod=vendor ./...,go test -mod=vendor ./...pass (integration test skipped).