What was wrong:cleanStartupError in internal/cli/app.go cut every startup error at its last "): " to drop the annotations fx adds (function names with file and line). The blob_size_limit message contains (... size spread): itself, so info, snapshot create and snapshot list printed only need at least N bytes, without naming the setting.
What changed: it now calls dig.RootCause, from the library fx is built on. That unwraps fx's own error layers and returns the error the failing function returned, whole, so a config error reads as it does from database delete. An error fx did not wrap comes back unchanged.
go.uber.org/dig was already in the build through fx; go.mod now lists it as a direct requirement.
Test:TestCleanStartupError starts a real fx app on a config with chunk_size: 10MB and blob_size_limit: 30MB and expects the full config message.
Judgement call: the old table fed plain strings that only looked like fx output. The fix rightly leaves such a string whole, so those cases were replaced by the real-app test; the plain-error case stays as its own test.
Judgement call: the test sets chunk_size itself so the expected byte count does not depend on the default.
Partly verified: go.mod was edited by hand into the form go mod tidy gives; tidy itself was not run.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/vaultik/issues/320.
**What was wrong:** `cleanStartupError` in `internal/cli/app.go` cut every startup error at its last `"): "` to drop the annotations fx adds (function names with file and line). The `blob_size_limit` message contains `(... size spread): ` itself, so `info`, `snapshot create` and `snapshot list` printed only `need at least N bytes`, without naming the setting.
**What changed:** it now calls `dig.RootCause`, from the library fx is built on. That unwraps fx's own error layers and returns the error the failing function returned, whole, so a config error reads as it does from `database delete`. An error fx did not wrap comes back unchanged.
`go.uber.org/dig` was already in the build through fx; `go.mod` now lists it as a direct requirement.
**Test:** `TestCleanStartupError` starts a real fx app on a config with `chunk_size: 10MB` and `blob_size_limit: 30MB` and expects the full config message.
Judgement call: the old table fed plain strings that only looked like fx output. The fix rightly leaves such a string whole, so those cases were replaced by the real-app test; the plain-error case stays as its own test.
Judgement call: the test sets `chunk_size` itself so the expected byte count does not depend on the default.
Partly verified: `go.mod` was edited by hand into the form `go mod tidy` gives; tidy itself was not run.
Model: opus-5-5
clawbot
self-assigned this 2026-10-14 00:52:56 +02:00
A startup error was cut at its last "): " to drop the annotations fx
adds, so the blob_size_limit message, which itself contains
"(... size spread): ", lost everything but "need at least N bytes".
cleanStartupError now uses dig.RootCause, from the library fx is built
on, which removes exactly those annotations and returns the error
underneath unchanged.
The test starts a real fx app on a config whose blob_size_limit is below
the minimum. The old cases fed it plain strings that only looked like fx
output; such an error is now rightly left whole, so they are replaced.
go.uber.org/dig, already required through fx, becomes a direct
requirement in go.mod.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #320.
What was wrong:
cleanStartupErrorininternal/cli/app.gocut every startup error at its last"): "to drop the annotations fx adds (function names with file and line). Theblob_size_limitmessage contains(... size spread):itself, soinfo,snapshot createandsnapshot listprinted onlyneed at least N bytes, without naming the setting.What changed: it now calls
dig.RootCause, from the library fx is built on. That unwraps fx's own error layers and returns the error the failing function returned, whole, so a config error reads as it does fromdatabase delete. An error fx did not wrap comes back unchanged.go.uber.org/digwas already in the build through fx;go.modnow lists it as a direct requirement.Test:
TestCleanStartupErrorstarts a real fx app on a config withchunk_size: 10MBandblob_size_limit: 30MBand expects the full config message.Judgement call: the old table fed plain strings that only looked like fx output. The fix rightly leaves such a string whole, so those cases were replaced by the real-app test; the plain-error case stays as its own test.
Judgement call: the test sets
chunk_sizeitself so the expected byte count does not depend on the default.Partly verified:
go.modwas edited by hand into the formgo mod tidygives; tidy itself was not run.Model: opus-5-5
Review passed.
Model: opus-5-5