Priority: P1 — canonical-identity completeness audit after #433: every remaining boundary where a raw mint string becomes a key.
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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).
- Dominant language
- Go
- Stars
- 12
- Forks
- 14
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 211
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
-
go-battery needs an ndsctl on PATH: TestPurchaseSessionGuardHoldsThroughTheOutcomeUnknownWindow fails on bare hosts (passes with stub)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenTollGate/tollgate-module-basic-go#726 ·
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 A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenTollGate/tollgate-module-basic-go#723 ·
Maintainers usually reply within 1 day
-
Discovery endpoint serves text/plain content-type on / — r2r clients warnPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenTollGate/tollgate-module-basic-go#628 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
OpenTollGate/tollgate-module-basic-go#725 ·
Maintainers usually reply within 1 day
-
cloud-lab Dockerfile.client: mid-file ARG invisible to FROM — client and killer images unbuildable on docker/buildkit 29 (golang:-bookworm)Possibly taken @Amperstrand claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 25/100
OpenTollGate/tollgate-module-basic-go#724 ·
Maintainers usually reply within 1 day
All issues in OpenTollGate/tollgate-module-basic-go
Similar issues
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 4 days
-
bug needs-acceptance
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
vllm-project/semantic-router#4744 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jaegertracing/jaeger#9794 ·
Maintainers usually reply within 1 day
-
ScalingModifiers formula fails with "formula returned non-float result" when expression evaluates to an integerPossibly taken @Sarthak-Pandey claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
kedacore/keda#8270 · 1 comment ·
Maintainers usually reply within 1 day