GeezerVison is showing github.com — 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) · Issue #4766 · developing-today/code
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) #4766Done 4 / 44 of 4 issues completedDone 4 / 44 of 4 issues completed DescriptionDesign: 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:
- 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).
- 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)".
- 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)
- Rule 1 — one canonical name. Every entry point resolves names through the same validation, and a stored name is never padded: leading/trailing whitespace is refused with
InvalidName, not trimmed (pinning id(fileops): put stores names verbatim while rename/copy targets are trimmed — padded names create untargetable twin files #4102's open choice — trimming at the store silently renames a user's file; surfaces that want to be forgiving trim before calling, as the web handlers already do). validate_target stops trimming.
- Rule 2 — the archive namespace is reserved at the writer.
validate_name/validate_target refuse any name where is_archive_tag_name (:155 — the readers' existing spelling, unsigned ASCII digits per id(web): classify_tag timestamp parsers accept non-canonical spellings — non-padded, '+'-signed and over-wide components classify as Auto/Archive with the canonical instant #4329) is true, with a distinguishable error (pinning 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's primary acceptance over its metadata-only alternative: the prefix scan and classify_tag are load-bearing readers, and reservation is one check at the one gate every surface funnels through). Non-numeric lookalikes (a.archive.notes) remain valid user files.
- Rule 3 — archive references are ownership, and ownership moves only when the source name ceases to exist.
archive_existing keeps them off the archive and restores them to the live name (landed, id(fileops): repeated-replacement archive removal test fails — delete reports 1 archive instead of 2 #4574); rename moves them (source name gone — correct, unchanged); copy excludes them — the destination starts with no archive references except the archive.replace for a file the copy itself replaced (:480). The exclusion sits next to ARCHIVE_IDENTITY_TAG_KEYS so the next metadata-duplicating operation inherits the question, not the bug.
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).
Sub-issuesCollapse Sub-issuesSub-issues4 of 44 of 4 Issues completedLoading 4 sub-issues Activityadded 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, 2026dezren39 commented on Nov 3, 2026
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. dezren39 commented on Nov 3, 2026 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 dezren39 commented on Nov 8, 2026 🤖 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.
dezren39 commented on Nov 12, 2026 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.
dezren39 commented on Nov 17, 2026 🤖 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.
dezren39 commented on Nov 17, 2026 🤖 Agent note · triaged — correction to the closure proposal: Phase 4 child #4767 is still open
- Agent: queue worker (repo-worker-code), lane code-a shift
- Session / ID: queue task 19815 (small_fix, follow-on of triage task 18285)
- Task: task 19815 for issue 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 — design epic: one name, one owner (pkgs/id FileOps)
- Fresh check (2026-11-17, this shift): issue 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, labels include kind/design, epic, status/triaged — no hard-stop labels. No open PR references 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.
- Correction: the 2026-11-12 program-tending note and triage task 18285 (2026-11-17) both read this epic as ready for owner closure (9 of 9 tracked children closed). The formal sub-issue list disagrees: sub-issues 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, id(fileops): copy inherits the source's archive references — deleting the copy hard-deletes the source's archives #4761, and id(fileops): put stores names verbatim while rename/copy targets are trimmed — padded names create untargetable twin files #4102 are closed, but Phase 4 (audit) of #4766 — closing name-inference and metadata-transfer inventory + contract statement for pkgs/id FileOps #4767 — "Phase 4 (audit) of 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 — closing name-inference and metadata-transfer inventory + contract statement for pkgs/id FileOps" — is OPEN (updated 2026-11-17T02:45Z) and carries queue/queued, i.e. its own queue task is already in the pool. The epic therefore still has a live remainder and should NOT be closed yet.
- Verdict: keep 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. The remaining work is exactly Phase 4 (audit) of #4766 — closing name-inference and metadata-transfer inventory + contract statement for pkgs/id FileOps #4767 Phase 4, already routed via its queue/queued task — no new packet created (dedupe). When Phase 4 (audit) of #4766 — closing name-inference and metadata-transfer inventory + contract statement for pkgs/id FileOps #4767 closes, this epic's closure proposal stands and the next program-tending pass can close it.
dezren39 commented on Nov 19, 2026 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.
dezren39 commented on Nov 25, 2026 Closing as complete (lane 2, 2026-11-25). The 2026-11-17 correction named Phase 4 (#4767) as the one open child. #4767 has since closed as completed on 2026-11-23. All four phases the design names are now closed as completed:
No open PR references this epic. The design's "open questions" (deleting an archive by exact name, a first-class archive listing) were recorded there as non-phase items with no consumer filed. If one of them needs doing, it should be its own issue.
Generated by Claude Code
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|