Skip to content

tests: no integration test for DHT iterative FindValue lookup covering k-bucket split, stale-node pruning, and negative probe cache expiry #711

Closed

Description

@alpergundogdu

PR #673 introduces iterative FindValue lookup and a negative probe cache, but there are no integration tests verifying the full lookup path including bucket splits when nodes depart, correct stale-node pruning from the routing table, and that negative cache entries expire after their TTL rather than poisoning future lookups.


Filed via GitDailyReporterBot

Activity

  1. added
    kind:test
    on May 29, 2026
  2. github-actions commented on May 29, 2026

    @github-actions

    🎯 Triage report

    This issue tracks missing integration test coverage for the DHT iterative FindValue lookup path introduced in PR #673. Three specific scenarios are called out: k-bucket split behavior on node departure, stale-node pruning from the routing table, and negative probe cache entry expiry. This is a well-scoped test gap with clear acceptance criteria derivable from ADR 022 and the existing implementation.

    📊 Assessment

    Dimension Value Reasoning
    Type Task Test coverage work with a defined scope — no design decisions needed
    Labels testing, technical, rust, medium Test-only task touching DHT/routing internals; medium priority since the production code ships but coverage is absent
    Coding agent Suitable Three discrete test scenarios, clear behavioral contracts from ADR 022, existing primitives in crates/node/src/dht/ to build on

    🔗 Similar issues

    💡 Notes and suggestions

    Three test scenarios to implement:

    1. k-bucket split on node departure — spawn a multi-node in-process test network (iroh gossip can be run in-process with loopback transport), fill a bucket past k, then drop a node. Verify the routing table evicts the departed entry and that a subsequent FindValue for a hash in that bucket region still converges within the ADR 022 hop limits.

    2. Stale-node pruning — simulate a node that becomes unreachable mid-lookup (drop its handler) and confirm the routing table marks it stale rather than leaving it as a live entry. Assert it's not re-queried within the same lookup pass.

    3. Negative cache expiry — after a has_blob: false probe response for (NodeId, hash), assert that a re-probe within TTL is suppressed, then advance the clock past TTL and assert the entry is gone and the node would be re-queried. Use tokio::time::pause() / advance() for deterministic time control.

    Suggested file: crates/node/tests/dht_integration.rs (or extend existing test modules in crates/node/src/dht/).

    Key handles needed:

    References:

    Generated by Agentic Triage for issue #711 · sonnet46 519.1K · ◷

    Add this agentic workflows to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  3. added
    rust
    on May 29, 2026
  4. self-assigned this
    on May 29, 2026
  5. added a commit that references this issue on May 29, 2026
    32a7d95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:testprio:mediumrust

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions