Skip to content

pkgs/dht crate split — step 1: extract dht-rotation (leaf) #8956

Closed

Description

@dezren39

pkgs/dht crate split — step 1: extract dht-rotation (leaf)

Umbrella: #8954 (#8954)

Template: doc/2026-11-01T16-53-00Z_design_id_crate_split/2026-11-01T16-53-00Z_design_id_crate_split.md (design of record for the pkgs/id split, from #3195). Worked example: pkgs/id umbrella #3447, step issues #4403-#4411. Program: fleet-wide crate-splitting program (Drew's order, 2026-11-11); this issue set comes from the Part 2 inventory, 2026-11-12.

Scope

Move the secret-rotation derivation (the SecretRotation trait impl + sha2 derive in src/main.rs, ~lines 10-23) into a new member crate dht-rotation. It must end with zero iroh dependencies. The node setup consumes it through the crate path. Add unit tests for the derive function (fixed inputs -> fixed 32-byte output) as part of this step — it is currently untested pure logic.

Acceptance

Acceptance discipline (from the id template; applies to every step):

  • One PR per step; no step bundles another step's extraction.
  • Full test suite green on that PR. Baseline is recorded in step 0 (this project currently has 0 tests, so the gate is: cargo test passes, the workspace builds clean, and any tests added by a step pass).
  • Behavior-preserving: no functional changes, no dependency version bumps, no renames beyond the crate-path moves in scope.
  • Facade re-exports where consumers exist: the facade crate keeps the pre-split public paths working for the whole migration, and a step is complete only when the moved code exists solely in its new crate (the old location holds at most the re-export). The 2026-11-12 inventory found no external/Nix consumers of this project (grep of *.nix outside the project dir: no hits); the known consumer is the project's own binary/lib entry points.
  • Never leave main red: a step that cannot go green stops and reports here instead of merging partial state.

Activity

  1. developing-today commented on Nov 12, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    state: triaged
    lane: any-b, worker: repo-worker-code, task 18778

    Triage verdict for #8956 (checked fresh this shift, 2026-11-17): real, ready, well-scoped — routed as the step-1 implementation packet.

    • On origin/main, pkgs/dht is still a single-crate project (Cargo.toml, Cargo.lock, src/main.rs only); the secretrotation impl + sha2 derive sits at src/main.rs ~lines 10–23 exactly as the issue describes, and no dht-rotation crate exists. Umbrella pkgs/dht crate split #8954 is OPEN.
    • Work kind: task/small_fix (behavior-preserving extraction). Priority: priority/normal. Effort: effort/m.
    • One question the implementer must settle first, recorded on the follow-on packet: the trait's home is the distributed_topic_tracker crate — the new crate's relationship to it must be arranged so the zero iroh dependencies requirement actually holds (verify with cargo tree evidence on the PR).
    • Acceptance check (the issue's own discipline): one PR for this step only; cargo test passes and the workspace builds clean; moved code exists solely in the new crate (old location at most a re-export); derive unit tests (fixed inputs → fixed 32-byte output) added and green.
    • Follow-on packet enqueued: task 20241 (kind small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:8956, status queued).
  3. added
    task/small_fixQueue packet kind: implement a small scoped change
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    on Nov 17, 2026
  4. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    state: parked
    lane: any-o, worker: repo-worker-code, task 20241

    Fresh ownership/check revalidation (2026-11-17): #8956 is OPEN and assigned to Drew; canonical PR #11297 is OPEN on code-20241-dht-rotation, authored by Drew. Its only check currently shown is CodeRabbit (NEUTRAL); the pending workspace test is not a reason to touch a Drew-owned PR.

    Task 20241 parked for 30 minutes due to the active Drew-owned PR. Resume only after the PR is merged/closed or task ownership is explicitly handed off. No branch/worktree changes made.

  5. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    and removed on Nov 17, 2026
  6. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Fresh revalidation: #8956 remains OPEN and assigned to Drew; canonical PR #11297 remains OPEN and Drew-authored. Only neutral CodeRabbit is visible and mergeability is UNKNOWN. Hard-stop: no branch/worktree changes and no test execution against the protected work. Task 20241 parked; resume after merge/closure or explicit ownership handoff.

  7. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 17, 2026
  8. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    state: blocked (typed dependency block, not a park)
    lane: any-n, worker: repo-worker-code, task 20241

    Fresh revalidation (2026-11-17T16:46Z): #8956 is OPEN; canonical PR #11297 is OPEN, non-draft, authored by Drew on code-20241-dht-rotation, mergeable state MERGEABLE, only check shown is CodeRabbit (NEUTRAL).

    This task was parked twice by earlier lanes (any-o 15:48Z, code-i 16:23Z) for the same Drew-owned-PR conflict, and each re-claim just produced another 30-minute park. Replaced that loop with a typed dependency block on developing-today/code#11297 (recheck 30 min, max TTL 24h): the broker releases the task itself when the PR merges or closes, so no lane needs to burn a claim rediscovering it.

    Hard stop respected: no branch, no worktree, no test run against the protected work, no parallel PR.

    On release: if #11297 merged, verify pkgs/dht gained the dht-rotation member on main and close as already_done; if it closed unmerged, reassess ownership before any implementation.

  9. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    kind: done
    task: 20241
    actor: openchamber scheduled lane code-h (repo-worker-code)
    summary: Step 1 is on main. PR #11297 merged 2026-11-17T21:54:43Z (merge 0fe15f1); pkgs/dht/dht-rotation exists on origin/main. Task 20241 completed as already_done. Issue left OPEN for owner to close.

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

Metadata

Metadata

Assignees

Labels

effort/mMedium: expected under 1 day of workepic/crate-splitsEpic: crate-splits - all issues of this effort carry itpriority/normalOrdinary priority (the default)status:donetask/small_fixQueue packet kind: implement a small scoped change

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions