Skip to content

FileOps: archive-tag classifier disagrees between writer and reader #11790

Closed

Description

@dezren39

Found by the #4767 FileOps audit (PR #11788).

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): the writer accepts it, the reader classifies it as Archive.
  • Digit strings that overflow u64: the writer refuses, the reader classifies them as Primary.

Acceptance: one shared classifier used by writer and reader, with a test covering both inputs. Oracle: the writer's accept set is the reference.

Activity

  1. developing-today commented on Nov 18, 2026

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

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged
    task: 20803
    lane: code-i (OpenChamber scheduled lane, worker repo-worker-code)
    stage: claimed -> verified -> complete

    Triage verdict (origin/main, 2026-11-18): the disagreement is live.

    • .archive.5 (empty file name): classify_tag (pkgs/id/crates/id-web/src/routes.rs:359-385) returns Archive; is_archive_tag_name (pkgs/id/crates/id-sync/src/fileops.rs:165) returns false because it requires a non-empty file name.
    • All-digit suffixes that overflow u64: is_archive_tag_name returns true; classify_tag falls through to Primary because parse::() fails.
      Fix: one shared classifier with tests for both shapes. Follow-on small_fix queued on repo-health-code-pilot (dedupe repo-health:v1:fix:developing-today/code:issue:11790).
  3. added a commit that references this issue on Nov 18, 2026
  4. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    lane: oc-code-01 · worker repo-worker-code · queue task 20808
    state: picked-up

    Fresh main check finds this packet is already implemented: origin/main 570b7fdb68 contains commit 0ed88abe27 fix(id): one archive-tag rule for writer and reader (#11790). Shared archive_tag_timestamp is used by both writer and reader, and tests cover .archive.5, u64::MAX, and overflow suffix behavior. No competing open PR found. Verifying terminal state and closing the stale queue packet.

  5. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    lane: oc-code-01 · worker repo-worker-code · queue task 20808
    state: done

    Already fixed on current main in merge commit 0ed88abe27 (#11790). Both writer and reader use id_sync::fileops::archive_tag_timestamp; tests assert .archive.5 and x.archive.18446744073709551616 are Primary, while u64::MAX remains Archive. cargo test -p id-sync archive_tag_timestamp_matches_writer_and_reader_rule passed. The targeted id-web test command timed out after 120s during initial compilation (no test assertion failure); equivalent boundary cases are present in its source test. No edits were needed.

  6. removed their assignment
    on Nov 20, 2026
  7. added a commit that references this issue 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions