Skip to content

id(web): distinct colon-containing tags collide in home feed aggregation #8495

Closed

Description

@dezren39

Evidence

In pkgs/id/src/web/home.rs:90-98, the home feed builds a tag identity using format!("{key}:{value}"), then uses that rendered label as the deduplication key. Thus key a:b with value c and key a with value b:c both become a:b:c. Colon-containing keys are valid: pkgs/id/src/tags.rs:2817-2818 tests one.

The collision merges distinct tags within a document, reducing its reported tag count, and across documents in home.rs:109-119, inflating popular-tag occurrences and changing rankings. The count is documented at home.rs:45 as the number of documents carrying the exact tag. This is confirmed by code inspection; no runtime reproduction was run.

Acceptance criteria

  • Aggregate and deduplicate using the actual tag identity, not an ambiguous rendered label; display distinct tags unambiguously.
  • Count each exact tag at most once per document and preserve distinct tags with colons in either key or value.
  • Add regression tests for collisions within one document and across documents, including occurrence counts and ranking; preserve ordinary labels where compatible.

Activity

  1. developing-today commented on Nov 11, 2026

    @developing-today
    Contributor
  2. added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 17, 2026
  3. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — task 18678 (lane code-e)

    • Work kind: task/small-fix · Priority: priority/normal (priorities brief line 5, by usefulness — a real correctness bug, small and precisely located) · Effort: effort/s · Kind: kind/bug
    • Fresh state (2026-11-17): issue id(web): distinct colon-containing tags collide in home feed aggregation #8495 OPEN with no labels at all, no hard-stop labels, only comment is the Kaneo link — never triaged, never worked. Defect confirmed live on origin/main c4404b8 at pkgs/id/crates/id-web/src/home.rs:92 (path moved since filing): the label format!("{key}:{value}") is the entry key for subject_tag_times and the tag_occurrences aggregation key, so a:b+c and a+b:c merge within a document (tag_count under-reported) and across documents (occurrence counts inflated, rankings changed) — exactly as filed.
    • First concrete step for the fix: change both maps in home.rs to key on the (key, value) identity, keeping the rendered label only as display, with the within-document collision test first (a:b=c and a=b:c → tag_count 2).
    • Acceptance check: the issue's criteria — aggregation on actual tag identity, each exact tag counted at most once per document, distinct colon tags preserved and displayed unambiguously, regression tests for within- and across-document collisions including counts and ranking, ordinary labels unchanged.
    • Follow-on: task 20155 (small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:8495; packet hidden_files/18678-fix-packet-8495.json). Issue stays OPEN.
  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 17, 2026
  5. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up — task 20155

  6. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · state: fixed + merged

    • Agent: queue worker (repo-worker-code), lane any-e
    • Session / ID: task 20155
    • Found via: queue claim

    Fixed in PR #11248 (merged squash 8648730):

    • Home feed aggregation/dedup now keys on the (key, value) tag identity in both the per-document map and tag_occurrences (pkgs/id/crates/id-web/src/home.rs) — the rendered label is no longer an identity anywhere in the feed path.
    • Display: labels are assigned with the whole feed in view; ordinary labels are unchanged, and identities whose plain label collides with a distinct tag's are shown in the unambiguous pair form (["a:b","c"] vs ["a","b:c"]).
    • Regression tests: within-document (a document carrying both a:b=c and a=b:c yields tag_count 2, both tags listed) and across-document (occurrence counts equal the number of documents carrying each exact tag — 3 vs 1 — and ranking follows the exact counts), plus a label-assignment unit test. The pre-existing feed test's merged-count expectations for this same collision shape were updated to the corrected semantics.
    • cargo test -p id-web --locked: 700 lib + 1 integration passed.

    Closing as fixed by the merge.

  7. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done — task 20155

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

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)status:donetask/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