Skip to content

Low-severity follow-ups from the 2026-06-10 full-repository review (umbrella) #864

Closed

Description

@thiras

Umbrella for the LOW findings from the 2026-06-10 full-repository review (the follow-up to #845's 2026-06-09 review, focused on code merged since: #828–#834). None is urgent; each is a small, localized fix. Split out individual issues if/when picked up.

Higher-severity findings from the same review: #850–#853 (HIGH); #854–#863 (MEDIUM).

incentive

  • channel.rs:249-292 — apply_voucher accepts amount == last_amount with bytes_delivered advanced and unconditionally overwrites last_signature (:292), but the contract's _requireBytesTrackPayment reverts close/dispute on exactly that shape (ByteAdvanceWithoutPayment). With rate_per_mb = 0 — a legal config (delivery_floor defaults 0; verify_rate blesses zero-rate serving, rate.rs:179-192) — every voucher strands the close path: closeChannel reverts, withdraw reverts NothingToWithdraw, the sweep burns gas, and the channel only exits via expiry + reclaimExpired. No signature history is kept, so there is no fallback voucher. Mirror the contract predicate in apply_voucher (or refuse to overwrite last_signature with a zero-delta voucher; or forbid rate_per_mb == 0 at validation).

node

  • reputation_indexer.rs:250-288,332-336,372 — ChannelSettled processed before its ChannelOpened (same poll window, independent filter streams) resolves client_addr to None; apply_settlement still marks settled_seen, so the client party's reporter credit is dropped permanently with no retry. Park unmatched settled events keyed by channelId and re-process on the matching open (or don't mark seen). (done in fix: batch of six quick-win review follow-ups (#845 #864) #868 — bounded FIFO park-and-re-credit)
  • reputation_indexer.rs:120-128 — IndexerState.channels (every ChannelOpened network-wide, never removed after settlement credit) and settled_seen only grow for the process lifetime. Remove the channel entry once credited; bound settled_seen (rolling window/LRU). (channels entry removal landed in fix: batch of nine quick-win review follow-ups (#845 #864) #867; settled_seen bounded via companion FIFO (MAX_SETTLED_SEEN) in fix: close out remaining LOW review follow-ups (#845 #864) #869 — now fully resolved.)
  • runtime/mod.rs:1243-1256 + gossip/src/service.rs:394-396 — report_drain is gated only on node_to_node_pull_through_enabled; with gossip.subscribe_reputation = false the gossip service returns with no tasks and no log, so outbound reports silently never publish while the ObservationBuffer keeps accumulating (node_origin.rs:473). Warn at bring-up when report_drain.is_some() && !subscribe_reputation (defaults are live; only this opt-out combination is inert).

reputation

  • network.rs:224-316 — the distinct-reporter threshold gates visibility (score()/is_scored() neutral until 3 reporters) but not magnitude: record() folds every accepted report into entry.score pre-threshold, so one staked reporter at the 1/(pair·hour) rate limit can pre-load an extreme score that two one-shot reporters then instantly reveal. Begin accumulating only at the floor, or track per-reporter contributions so no single reporter dominates pre-threshold. (Arguably an ADR 008 design gap as much as code.) (done in fix: batch of six quick-win review follow-ups (#845 #864) #868 — fold gated on the distinct-reporter threshold)
  • network.rs:236-242, coverage.rs:77-84 — NetworkEntry/coverage buckets are created on first report for any 32-byte provider with no existence check against the peer table / staker set, and eviction requires near-neutral and >26 weeks idle. Staked-gated and rate-limited, hence LOW — but defer entry creation to the reporter threshold or validate the provider id. (done in fix: batch of six quick-win review follow-ups (#845 #864) #868 — accept() now drops reports for providers not in the active staker set)

cli

ci

  • .github/workflows/ci.yml:276 — cargo llvm-cov nextest never runs doctests (nor does release.yml or pre-commit), so the compile_fail doctest guard at crates/node/src/receipt_log.rs:112 is dead and any future runnable doctest will silently never execute. Add cargo test --doc --workspace to the test job.

Activity

  1. github-actions commented on Jun 10, 2026

    @github-actions

    🎯 Triage report

    A well-formed umbrella tracking 9 LOW-severity findings from the 2026-06-10 repository review, covering code merged in PRs #828–#834. All items include precise file and line-number references with suggested fixes. This is the direct successor to #845 (2026-06-09 LOW umbrella); higher-severity findings from the same review session are tracked in #850–#863.

    📊 Assessment

    Dimension Value Reasoning
    Type Task Set to match the #845 precedent; umbrella tracking issue for a batch of small, localized fixes
    Labels technical, low (already applied) Existing labels are accurate; no additional labels needed
    Coding agent Not suitable (as umbrella) Split into individual issues first — each sub-item is likely suitable once isolated, given the precise file/line references and clear fix descriptions

    🔗 Similar issues

    💡 Notes and suggestions

    Item breakdown by crate and suitability once split out:

    Crate Item Agent-ready?
    incentive apply_voucher zero-rate channel stranding (channel.rs:249-292) ✅ — fix predicate is specified
    node reputation_indexer event-ordering race, permanent credit drop (rs:250-288) ✅ — park-unmatched pattern is spelled out
    node IndexerState.channels / settled_seen unbounded growth (rs:120-128) ✅ — remove-on-credit + LRU bound
    node Silent report suppression when subscribe_reputation = false (runtime/mod.rs:1243) ✅ — add a startup warn
    reputation Pre-threshold score pre-loading by single reporter (network.rs:224-316) ⚠️ — touches ADR 008; design decision needed before code change
    reputation Unbounded NetworkEntry creation without peer-table validation (network.rs:236) ✅ — defer to reporter threshold or add existence check
    cli Admin/metrics URL ignores DECDN_ADMIN_PORT/DECDN_METRICS_PORT env vars ✅ — resolution order fix is clear
    cli DEFAULT_CONFIG / validate summary missing [gossip], [dht], [security], etc. ✅ — add commented template blocks
    ci Doctests never run; compile_fail guard at receipt_log.rs:112 is dead ✅ — add cargo test --doc --workspace

    Suggested split order: CI doctest and node startup-warn items are the lowest-friction splits (no design ambiguity). The reputation pre-loading item (#5 above) needs an ADR 008 annotation before code changes land.

    Cross-cutting note: The commands/config.rs gap (#842 interaction) and the apply_voucher channel-stranding item are the two findings here with the most user-visible impact, even at LOW severity — consider bumping those to individual issues sooner.

    Generated by Agentic Triage for issue #864 · sonnet46 544.2K · ◷

    Add this agentic workflows to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  2. thiras commented on Jun 10, 2026

    @thiras
    ContributorAuthor

    PR #867 addresses three items: the apply_voucher zero-payment byte-advance documentation, the bring-up warning when a report drain is wired with subscribe_reputation = false, and the cargo test --doc --workspace CI step.

    Partial: the reputation_indexer.rs:120-128 unbounded-growth item is half done — PR #867 removes the channels entry once a settlement is credited, but does not yet bound settled_seen (LRU/rolling window). Left unchecked. The reputation_indexer.rs:250-288 settle-before-open parking item is also untouched.

  3. thiras commented on Jun 10, 2026

    @thiras
    ContributorAuthor

    #868 closed 4 items: reputation_indexer settle-before-open parking (bounded FIFO re-credit), network.rs pre-threshold fold gating, network.rs/coverage.rs non-staked-provider drop, and the CLI DECDN_ADMIN_PORT/DECDN_METRICS_PORT consult.

    Remaining open: reputation_indexer.rs:120-128 is only partially done — the channels entry removal landed in #867, but bounding settled_seen is still outstanding — and commands/config.rs DEFAULT_CONFIG/validate-summary coverage. Keeping the issue open.

  4. self-assigned this
    on Jun 10, 2026
  5. thiras commented on Jun 10, 2026

    @thiras
    ContributorAuthor

    All remaining items resolved in #869 (settled_seen now bounded by a companion FIFO, completing the #867 channels removal; and the full config-surface gap — [gossip]/[security]/[dht.rate_limit]/[receipts] + missing knobs — closed in both DEFAULT_CONFIG and the validate summary). Every box is now ticked; this umbrella can be closed once #869 merges.

  6. thiras commented on Jun 10, 2026

    @thiras
    ContributorAuthor

    All items resolved and merged in #869 (commit e125744). Closing — every box ticked and shipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

prio:low

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions