Priority: P1 — canonical-identity completeness audit after #433: every remaining boundary where a raw mint string becomes a key.
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 32/100
Direzione di ricerca
Start by tracing the listed boundaries in src/tollwallet/tollwallet.go, src/config_manager, src/merchant/{lightning.go,merchant.go}, and src/cli/, then audit gonuts wallet.go as specified. Build the requested boundary inventory and check each key, comparison, and persistence path for canonical mint identity. Done means all rows are fixed or justified, the property and integration tests pass, and the stated failure-injection cases are covered.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Priority: P1 — canonical-identity completeness audit after #433: every remaining boundary where a raw mint string becomes a key.
Problem
#433 fixed canonicalization for the wallet wrapper (registry keys, MintURLMatches, read-side alias merge in balances/drain). The class is wider than that fix: several persistence and comparison boundaries still key or match on raw or partially-normalized strings, and gonuts-internal maps key by their own url.Parse().String() discipline (which preserves trailing slashes), so wrapper-canonical ≠ internal-canonical unless proven at every hand-off.
Why it matters
#480 proved the concrete cost: one trailing-slash difference in one storage layer forked the derivation counter lineage. Every boundary not proven canonical is a future phantom-balance / rejected-token / split-wallet incident. The audit should produce a checked inventory, not another spot fix.
Current behavior — candidate boundaries to verify (source refs)
src/tollwallet/tollwallet.go:143-177— wrapper registry is canonical; butw.wallet.AddMint(canonical)hands to gonuts which re-keys internally (wallet/wallet.gow.mints[url.Parse(u).String()]) — prove no spelling can reach gonuts that re-parses differently.- Lightning quotes (
src/merchant/lightning.go,quote_store.go) — is the quote record'sMintURLcanonical at write, and matched canonically at grant time? src/config_manager— config load/normalize: are accepted_mints canonicalized at load (write-side) or only at use? (#481's fix direction also touches this set.)- Reseller/upstream flows (
src/upstream_session_manager, merchant Fund/CreatePaymentToken paths) — mint URL provenance is config vs upstream advertisement vs token; check all three converge. - Drain journal keys + CLI wallet path selection (
src/cli/server_drain*.go). merchant.go calculateAllotmentmint lookup — currentlyMintURLMatches? verify (pricing by wrong spelling = mispriced payment).
Desired invariant
A mint URL crosses exactly one canonicalization boundary (as early as possible — config load and token decode), and every key, comparison, persistence, and log line downstream uses the canonical form. Internal library maps either share the form or are proven isomorphic.
Proposed scope
- Produce the boundary inventory as a table (boundary, current form, canonical?, test) in the PR.
- Fix the non-canonical ones; add
normalizeMintURLcalls at config load (write-side) so stored config converges too. - Property test: for a fuzz set of spellings, registry + gonuts map + quote store + pricing lookup all resolve to one identity.
Areas / files
src/tollwallet/tollwallet.go, src/config_manager, src/merchant/{lightning.go,merchant.go}, src/cli/, gonuts wallet.go (map-key audit only).
Acceptance criteria
- Inventory table merged; all rows green or explicitly waived with rationale.
- Property test in CI; mixed-spelling cloud-lab config lane passes (register, pay, quote, drain under alias spellings).
Required tests
- Unit: boundary table; property/fuzz spellings.
- Integration: alias-spelling lane (config mixed-case + token canonical).
Failure-injection tests
- Re-register under alias at runtime (config reload) → single wallet, single DB identity.
- Quote created under spelling A, grant looked up under spelling B → found.
Compatibility
Write-side config canonicalization changes stored config files — one-time, idempotent, release-note it.
Dependencies
G03's gonuts storage canonicalization (aligned forms).
Out of scope
- Rust repo (its own issue, Amperstrand/tollgate-module-basic-rust#10).
- Lingua principale
- Go
- Stelle
- 12
- Fork
- 14
- Merge medio
- 1g 6h
- PR unite (30g)
- 217
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenTollGate/tollgate-module-basic-go
-
go-battery needs an ndsctl on PATH: TestPurchaseSessionGuardHoldsThroughTheOutcomeUnknownWindow fails on bare hosts (passes with stub)Forse già presa @Amperstrand l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenTollGate/tollgate-module-basic-go#726 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
rebrand-literal-gutter: uhttpd section-vocabulary check trips on a COMMENT (uhttpd.luci in 92-tollgate-admin-setup:178)Forse già presa @Amperstrand l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenTollGate/tollgate-module-basic-go#723 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
OpenTollGate/tollgate-module-basic-go#768 ·
I maintainer di solito rispondono entro 1 giorno
-
Four drift fences for tests/contract/ (+ test.yml clean-container lane + pre-commit wiring)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
OpenTollGate/tollgate-module-basic-go#767 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
OpenTollGate/tollgate-module-basic-go#763 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OpenTollGate/tollgate-module-basic-go
Issue simili
-
[correctness][missing-coverage][sort] Strict uniqueness checks lack numeric-key equivalence coverageAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 69/100
SpecterOps/Janus#6 · 1 commento ·
-
Service process inherits the caller's cwd at first use, holding that folder open on Windows (EBUSY)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
[docs] Media elements cannot load from a custom protocol (video/audio report MEDIA_ERR_SRC_NOT_SUPPORTED)Forse già presa @vst93 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno