Skip to content

Design: one name, one owner — a file's name is canonical, its archive namespace is reserved, and its archives belong to exactly one file (pkgs/id FileOps) #4766

Open
3 of 4 issues completed

Description

@dezren39

Design: one name, one owner — a file's name is canonical, its archive namespace is reserved, and its archives belong to exactly one file (pkgs/id FileOps)

Design doc: files/designs/code-id-fileops-name-archive-ownership.md in the keep-the-four-repos-healthy goal workspace. Grounded at origin/main a8aa52dc.

Problem

A "file" in pkgs/id is a name (an iroh-blobs tag) plus metadata tags, and FileOps (pkgs/id/src/fileops.rs) is the single implementation every surface calls — built so the operations could not drift apart (module doc, fileops.rs:1-10). Inside that single implementation, three things about a name were never stated as one contract, on top of a five-fix history (#1612, #2462, #2856, #2862, #4574 — closed today) in which every archive defect was patched at the site that exposed it:

  1. What a name may be. validate_name (fileops.rs:221) refuses empty/rooted/traversal names, but put stores a padded name verbatim while validate_target (:240) trims — padded twins that rename/copy can never target (id(fileops): put stores names verbatim while rename/copy targets are trimmed — padded names create untargetable twin files #4102) — and the archive shape <name>.archive.<digits> that FileOps itself mints (claim_archive_name, :166) is not reserved, so a user file with that shape is classified as an archive, hard-deleted by deleting a different file, and can silently overwrite a genuine archive (id(fileops): archive tag namespace is not reserved — a user file named <name>.archive.<digits> is misclassified as an archive, hard-deleted by delete(<name>), and a put to an existing archive's name silently overwrites it #4720).
  2. What an archive reference is. archive.rename/archive.replace values are ownership records: delete (:496) follows them and hard-deletes every archive they name. The codebase already knows they must not travel carelessly — ARCHIVE_IDENTITY_TAG_KEYS (:32-44) keeps them off an archive subject during archive_existing, because letting one travel "orphans every earlier archive from the live file's delete (id(fileops): repeated-replacement archive removal test fails — delete reports 1 archive instead of 2 #4574)".
  3. Who may own one. That reasoning was never applied to copy: FileOps::copy (:443) duplicates all source metadata via copy_all_tags (:465) with no exclusions, so a copy becomes a second owner of the source's archives and deleting the copy hard-deletes the source's archived versions while the source still exists (id(fileops): copy inherits the source's archive references — deleting the copy hard-deletes the source's archives #4761, probe-verified).

The contract (recorded decisions)

Phases (adopted origins — no parallel issues filed)

Open questions (in the design doc, not phases)

Deleting an archive by its exact name (legitimate today, unfiled as misused); writer/reader agreement for archives of names containing .archive. in a non-numeric position (Phase 4 probes it); a first-class archive listing (feature, no consumer filed).

Activity

  1. added
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    epicMeta-issue grouping multiple items (org Project Type=Epic)
    kind/designA design proposal (design-architect): multi-step, phased, decision-bearing
    on Nov 3, 2026
  2. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Design architect, pass 42 (2026-11-02): this issue is the design of record for the pkgs/id FileOps name/archive-ownership contract. Design doc: files/designs/code-id-fileops-name-archive-ownership.md (keep-the-four-repos-healthy goal workspace); central register entry added in files/potential-projects.md (status: proposed).

    Phases are the ADOPTED origin issues, linked as sub-issues (verified count=4): Phase 1 = #4720 (reserved archive namespace at the writer), Phase 2 = #4761 (copy excludes the source's archive references), Phase 3 = #4102 (one canonical name — padding refused at FileOps), Phase 4 = #4767 (closing audit, gated on Phases 1–3, triage packet enqueued this run). No parallel implementation issues were filed.

    Recorded decisions the phases inherit: padding is REFUSED at FileOps, not trimmed (surfaces trim before calling); the namespace is RESERVED at the writer using the readers' existing is_archive_tag_name spelling, not replaced by metadata-only archives; archive references move only when the source name ceases to exist (rename moves them, copy never inherits them). Triage: do not re-scope or split the origins against these pins — flag genuine blockers here instead.

  3. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  4. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  5. 19 remaining items

  6. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    Partial verification — staying open (2026-11-07 done-task-only audit, tracking: #7016).

    Queue task(s) [8432] were marked done, and some work did land:

    No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder re-queued as triage task 11703.

  7. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  8. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done — triage verdict (task 12699)

    • Agent: queue worker (repo-worker-code), lane code-d
    • Session / ID: task 12699
    • Found via: queue claim (triage follow-on from task 12177)

    Fresh re-verification this shift (all reads this run, current GitHub state):

    Verdict: issue #4766 is not fully satisfied, confirming the task 12177 verdict, but the entire remainder is already routed through its adopted origin issues (issue #4761 / PR #4764, and issue #4767). Creating a new small_fix packet scoped to this issue's remainder would duplicate that live work, so no new packet is filed. Issue #4766 stays open as the design of record until issue #4761 lands and the Phase 4 audit (issue #4767) completes. Task 12699 completes as triaged.

  9. added
    epic/id-programReprioritization program epic (2026-11-12)
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
  10. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    Program tending — epic completion (tracking: #1352)

    • Child progress: 9 of 9 children closed (0 open).
    • Last movement: 2026-11-12T07:04:01Z.
    • All recorded children are closed. Proposing closure of this epic: if more work belongs here, reopen a child or say what remains and this stays open.
  11. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

    • Agent: repo queue worker (repo-worker-code), lane code-i (openchamber-scheduled-lane)
    • Session / ID: task 18285 (triage)
    • Found via: scheduled queue claim; fresh GitHub state
    • Verdict: all 9 child issues are closed per the 2026-11-12 program-tending note. No open PR matches this epic. The epic is ready for owner closure, and no code remainder or packet is created here. The owner should close it or name the remaining work.
  12. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — correction to the closure proposal: Phase 4 child #4767 is still open

  13. dezren39 commented on Nov 19, 2026

    @dezren39
    MemberAuthor

    Program tending — epic completion (tracking: #1352)

    • Child progress: 9 of 9 children closed (0 open).
    • Last movement: 2026-11-17T08:47:17Z.
    • All recorded children are closed. Proposing closure of this epic: if more work belongs here, reopen a child or say what remains and this stays open.
  14. removed their assignment
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)epicMeta-issue grouping multiple items (org Project Type=Epic)epic/id-programReprioritization program epic (2026-11-12)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobstatus/triagedTriaged and routed (see agent note)task/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions