Shared bbolt-failure classifier in tollwallet — one parser for degraded-mode reasons and wallet-check verdicts (follow-up from #741/#743 reviews)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
Research direction
Start by reading IsStorageMmapUnsupported in tollwallet (mmap_compat.go) and mapWorkerOutcome in src/cmd/tollgate-cli/wallet_check.go, which are the two parsers to merge. Design the shared ClassifyStorageFailure and its class enum in tollwallet/storage_failure.go, keeping worker-process isolation for any bbolt open used by checks. Done when both consumers become thin adapters over the shared classifier and the existing classifier table and seeded-corruption tests pass against it.
Written by the indexing model from the issue text.
Description
Summary
#741's review (follow-up 2) + #743's review (fragility note) converge on the same structural point: two ad-hoc parsers of bbolt failure modes will drift. Today the corruption-vs-unsupported distinction exists in two places:
- #741:
tollwallet.IsStorageMmapUnsupported— errno-chain/errno-text classification for storage unsupported (degraded-mode entry, honest error strings); - #743:
src/cmd/tollgate-cli/wallet_check.go— open-error vs check-findings vs worker-death verdicts for corruption (the crash-isolatedwallet check).
A shared classifier in tollwallet should serve both: one place that turns a bbolt-layer error (or worker outcome) into the named failure classes — storage-unsupported (#583 jffs2/mmap), corrupt-or-unreadable (open/check/panic/SIGBUS shapes), locked (#742's ErrWalletLocked), absent, other — with each consumer mapping classes to its surface (degraded-mode reason strings vs CLI verdicts/exit codes).
Constraints to carry (from the reviews)
- The corruption classes must keep worker-process isolation wherever bbolt is actually opened for checking (#743's fragility note: running bbolt Open in-process for a check command reintroduces the panic-on-corruption surface the worker exists to contain).
errors.Isfirst, errno-text fallback stays necessary while gonuts wraps with%v(#743's audit note).- Consumers: degraded-mode entry +
walletUnavailableReason()(#741),wallet checkverdict mapping (mapWorkerOutcome) + any future status surface (see the sibling follow-up #824).
Proposed
tollwallet/storage_failure.go (or extend mmap_compat.go): exported ClassifyStorageFailure(err error) StorageFailureClass + the class enum; #741's boolean and #743's verdict mapping become thin adapters over it. Tests: the existing classifier table (#741) + the seeded-corruption matrix (#743) both re-pointed at the shared classification.
References
- Review asks: #741 review (follow-up 2), #743 review (fragility note)
- Dominant language
- Go
- Stars
- 12
- Forks
- 14
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 239
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenTollGate/tollgate-module-basic-go
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenTollGate/tollgate-module-basic-go#833 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
OpenTollGate/tollgate-module-basic-go#813 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenTollGate/tollgate-module-basic-go#804 ·
Maintainers usually reply within 1 day
-
go-battery needs an ndsctl on PATH: TestPurchaseSessionGuardHoldsThroughTheOutcomeUnknownWindow fails on bare hosts (passes with stub)Possibly taken @Amperstrand claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenTollGate/tollgate-module-basic-go#726 · 2 comments ·
Maintainers usually reply within 1 day
-
rebrand-literal-gutter: uhttpd section-vocabulary check trips on a COMMENT (uhttpd.luci in 92-tollgate-admin-setup:178)Possibly taken @Amperstrand claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenTollGate/tollgate-module-basic-go#723 ·
Maintainers usually reply within 1 day
All issues in OpenTollGate/tollgate-module-basic-go
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Add SolentaPossibly taken @sharmao07 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
slavakurilyak/awesome-ai-agents#760 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
agent-review-finding bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jordansmall/spindrift#5281 ·
Maintainers usually reply within 1 day