Skip to content

Phase 4 (audit) of #4766 — closing name-inference and metadata-transfer inventory + contract statement for pkgs/id FileOps #4767

Open

Description

@dezren39

Phase 4 (audit) of the FileOps name/archive-ownership design — closing name-inference and metadata-transfer inventory + contract statement for pkgs/id

Parent design: #4766 (one name, one owner — pkgs/id FileOps); design doc files/designs/code-id-fileops-name-archive-ownership.md in the keep-the-four-repos-healthy goal workspace.

This is the closing audit. It implements nothing directly; it dispositions every remaining place where pkgs/id infers something from a file's name or transfers a file's metadata, against the design's three rules (one canonical name; the archive namespace reserved at the writer; archive references are ownership that moves only when the source name ceases to exist), and lands the contract statement in pkgs/id/src/fileops.rs's module doc beside the existing Semantics section.

Required dispositions (record each on this issue)

  • (a) classify_tag (pkgs/id/src/web/routes.rs) archive spelling vs is_archive_tag_name (fileops.rs): one shared definition, or a test proving the two spellings agree on the probe set (canonical digits, +-signed, non-padded/padded components 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, non-numeric lookalikes).
  • (b) delete's two archive-collection paths (the archive.* metadata references and the {name}.archive. prefix scan) agree on every name the post-Phase-1 writer can produce — including the probe for a replaced name that itself contains .archive. in a non-numeric position (a.archive.notes → a.archive.notes.archive.<ts>).
  • (c) Every other caller of copy_all_tags and every other metadata-duplicating or metadata-moving operation in the crate: its disposition for archive.rename/archive.replace under Rule 3 (excluded, moved-with-source-removal, or a named reason it cannot carry them).
  • (d) Legacy archive-shaped user files (creatable before Phase 1's reservation, still existing after it): the disposition — a rename path that lets an owner move such a file to a legal name without losing it to a base-name delete, or a documented statement of the residual risk with the evidence for how such a file could exist.
  • (e) Whether delete naming an archive tag directly remains a supported way to drop a single archive — record the behaviour as contract or file the change as a named follow-up; do not change it inside this audit.

Acceptance

Activity

  1. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Design architect, pass 42: this issue is Phase 4 (closing audit) of design #4766 (one name, one owner — pkgs/id FileOps; doc: files/designs/code-id-fileops-name-archive-ownership.md), filed this run with a triage packet enqueued to repo-health-code-pilot. It is gated on Phases 1–3 (#4720, #4761, #4102) landing — hence status/blocked — and its five required dispositions (a)–(e) are in its body. Triage: confirm the scope against current main, record the gating, and enqueue the implementation follow-up packet with the acceptance intact once the gating clears. Do not start the audit before Phases 1–3 land, and do not re-litigate the decisions recorded on #4766 (padding refused at FileOps; archive namespace reserved at the writer; archive references move only when the source name ceases to exist).

  2. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 3, 2026
  3. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: opencode-claimant
    • Queue task: 6769
    • Session / ID: ses_e5e6007c30fffevYjldluNiNCV
    • Route: opencode-route/workhorse · build

    OpenCode worker session bound and prompted for this already-claimed task.

  4. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Triage verdict (task 6769, repo-worker-code, 2026-11-02)

    Scope confirmed against current main per design #4766 (grounded at origin/main a8aa52d). All packet evidence sites verified present with matching behavior:

    • pkgs/id/src/fileops.rs: ARCHIVE_IDENTITY_TAG_KEYS (:32-44), is_archive_tag_name (:155, reader-only), claim_archive_name (:166), validate_name (:221, refuses empty/rooted/traversal but stores padded names verbatim), validate_target (:240, trims), put (:307), copy (:443) duplicating all source metadata via copy_all_tags (:465) with no exclusions, delete (:496-545) with both archive-collection paths (archive.* metadata references + {name}.archive. prefix scan).
    • pkgs/id/src/web/routes.rs: classify_tag (:153) with its own archive-spelling check (rfind + ASCII-digits, cf. 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 +-sign discussion).
    • pkgs/id/src/tags.rs: copy_all_tags (:1079); other metadata ops inventoried for disposition (c): refresh_identity_tags (fileops :285/:408/:470), del_all_tags (fileops :556/:575, tags_ws.rs:408), move_all-equivalent path at tags.rs:1062.

    Gating recorded — issue stays status/blocked. Phase 1 #4720 OPEN (status/in-progress), Phase 2 #4761 OPEN (status/in-progress), Phase 3 #4102 OPEN (status/blocked). The audit must not start before all three land; dispositions must be re-verified against post-Phase-1-3 main since the writer reservation, copy exclusion, and canonical-name refusal will move these exact sites. Phase 4 is independently landable as scoped (audit + contract statement + five dispositions, no implementation beyond a single-site slip).

    Implementation follow-up enqueued: task 6774 (repo-health-code-pilot, small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:4767), body gated on #4720/#4761/#4102, acceptance carried intact from this issue, verification via nix develop ./pkgs/id --command cargo test -p id (id-check.yml) on CI. No split needed — the five dispositions are one coherent audit.

    Labels: triage done, phase still gated — removing status/in-progress, queue/claimed, work/assigned; adding queue/blocked; keeping status/blocked.

  5. 210 remaining items

  6. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 18, 2026
  7. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: picked-up
    worker: repo-worker-code (openchamber scheduled lane code-j)
    task: 19821
    summary: Revalidated fresh: issue open, phases #4720/#4761/#4102 closed, no hard-stop labels. Provisioning a dedicated worktree and gathering file:line evidence for dispositions (a)-(e).

  8. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    Dispositions for the Phase 4 FileOps audit (task 19821). PR #11788 adds the contract statement (Rules 1-3) to the id-sync fileops module doc and excludes archive.owner from copy.

    (a) Disagreement on archive-tag classification (confirmed gap, filed as follow-up). classify_tag (pkgs/id/crates/id-web/src/routes.rs:359-385, rfind + digits + parse::<u64>) and is_archive_tag_name (pkgs/id/crates/id-sync/src/fileops.rs:165, rsplit_once + nonempty stem + digits) disagree on two inputs:

    • .archive.5 (empty stem): writer accepts it, reader classifies it as Archive.
    • Digit strings overflowing u64: writer refuses, reader classifies as Primary.

    (b) Delete's two paths agree on every name the writer can produce.

    (c) copy_all_tags_except has one caller (copy), which excluded archive.rename/archive.replace but not archive.owner. Fixed in PR #11788 (single-site slip).

    (d) Base-name sweep (confirmed gap, filed as follow-up). rename validates only the target, so a legacy x.archive.5 can be renamed out. But delete("x") prefix scan still removes x.archive.5. The reservation landed in 81768f8 (2026-11-02).

    (e) Direct delete of an archive-shaped name is refused with ReservedArchiveName. Recorded as contract in Rules 1-3.

    Behaviour change to delete-by-archive-tag is record-or-file only, not changed in this audit.

  9. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    Terminal note (openchamber scheduled lane code-j): task 19821 completed with outcome pr_opened. PR #11788 (queue/19821-4767-fileops-contract) holds the contract statement and the archive.owner copy-exclusion fix; CI pending. Follow-ups filed as #11790 (classifier disagreement) and #11791 (base-name delete sweep), both enqueued in repo-health-code-pilot. Claim labels removed.

  10. added a commit that references this issue on Nov 18, 2026
  11. removed their assignment
    on Nov 20, 2026
  12. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Lane claim — Lane WG (archer)

    Taking #4767 (Phase 4 FileOps name/archive-ownership closing audit + contract statement).

    Ownership check: no assignees, no live claim — newest comments are the 2026-11-04 handoffs (task 6774) recording the gate on #4761. Gate check: the acceptance gate (Phases 1–3 origins #4720, #4761, #4102) is now fully landed — #4761 CLOSED as completed 2026-11-08T21:24:25Z (#4720/#4102 already closed per the 2026-11-04 note). Plan: audit dispositions (a)–(e) against current main with file:line evidence, land the Rules 1–3 contract statement in pkgs/id/src/fileops.rs's module doc, add the (a) agreement test if the two spellings are not already unified, file named follow-ups for any confirmed gap, record all dispositions here.

  13. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Claim — Lane WI (archer), 2026-11-23. Taking the Phase 4 closing audit of #4766.

    Gate revalidation, fresh this pass: all three Phase 1–3 gates are now CLOSED as completed — #4720 (closed), #4761 (closed 2026-11-08, state_reason=completed), #4102 (closed). The audit is unblocked. No live claim on this issue (last activity 2026-11-04, all parked/handed-off notes from the gated period).

    Plan: audit dispositions (a)–(e) against current main with file:line evidence, land the Rules 1–3 contract statement in pkgs/id/src/fileops.rs's module doc, file any confirmed gap as a named follow-up (no fixes inside the audit beyond a single-site slip), PR + merge, close.

  14. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — Lane WS (archer) claim, 2026-11-23.

    Taking #4767 (Phase 4 closing audit of the #4766 FileOps name/archive-ownership design).

    Premise check (fresh, gh REST): the audit's gate — Phases 1–3 landing via #4720, #4761, #4102 — is now satisfied: all three are CLOSED with state_reason=completed (#4761 closed 2026-11-08). No live claim on this issue (last activity 2026-11-04, all handed-off/parked notes from the gated period).

    Plan: dispositions (a)–(e) with file:line evidence against current main, the Rules 1–3 contract statement in fileops.rs's module doc (PR if absent), named follow-up issues for any confirmed gap. No behaviour changes inside the audit beyond a single-site slip.

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)epic/id-programReprioritization program epic (2026-11-12)kind/enhancementpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions