Skip to content

id: design+PoC: friendly-name reference resolution, local store — reference representation, index, ranking (from #2047) #2259

Closed

Description

@dezren39

From the #2047 investigation (friendly-name references)

Investigation #2047 (queue task 3355, result posted on that issue 2026-10-29) produced the resolution-flow design sketch for @/# friendly-name references: viewer-relative resolution, per-store indexes with query fan-out, ranking rules extending the existing petname.rs/aliases.rs philosophy (petname first, contested never silently picked), stored references as stable ID + surface text + locator hints, and seven worked ambiguity cases. This issue is the design + proof of concept step for the local half. It is not the permanent feature — nothing production is built on the unreviewed sketch (program rule, epic #2056).

Scope

  1. Spec (doc in pkgs/id/doc/): reference object representation (target ID, sigil kind, surface, locator hints), the per-store index contents (titles, alias tag claims, tags, petnames, full text), and the candidate/ranking data types.
  2. PoC: resolution over the local store only in the notes/documents surface — type @/# + phrase, get ranked candidates with provenance, insert a stored reference, render it (including renamed-target and cleared-target states from the id: investigate: friendly-name references — @/# phrase resolution via cross-service search (zettelkasten / Mnote model) #2047 sketch).

Out of scope

Cross-store fan-out and locator fetch (v2, its own issue after this PoC), hosted-store search, any change to aliases.rs display rules.

Acceptance criteria


Program: ID platform expansion, epic #2056. Parent investigation: #2047. Related: #2048 (Zettelkasten layer design), #2030 (visibility — search must not leak private objects).

Activity

  1. added
    priority/highImportant and time-sensitive
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 30, 2026
  4. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Protocol gap — missing agent note

    🤖 Agent note · escalated

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-10-30T12:12Z
    • Found via: monitor reconciliation
    • Task: Protocol check (protocol §6 / Duty 4): this issue is held via a live queue claim (task 3415, worker repo-worker-code, claimed ~2026-10-30T11:52Z, lease live at check time) and now carries queue/claimed + work/assigned + status/in-progress (the monitor repaired those labels this run — the issue still carried queue/queued + status/needs-triage while the task was claimed), but no comment on this issue contains the required agent-note:v1 footer. The holding agent did not leave the required agent note.
    • Expectation: The holder posts a standard agent note (protocol §2) at its next transition, naming its task, state, and what "done" looks like. This gap itself needs a human/Muse review of why the protocol was not followed — a claimed item with no note is invisible to GitHub-only observers ("who holds this?" could not be answered from GitHub until the monitor repaired the labels).
    • Links: queue task 3415 (repo-health-code-pilot)

    Labels added this pass: user/review, meta/protocol-gap.

  5. added
    user/reviewNeeds a user-look: Muse reviews first and handles what it can
    meta/protocol-gapAn agent touched this without the required agent-note comment or labels; needs review of why
    on Oct 30, 2026
  6. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Triage result — design+PoC friendly-name reference resolution, local store (#2259, queue task 3415)

    🤖 Agent note · picked up + triaged

    Verdict — CONFIRMED, scope stands on current main; split to an implementation follow-up

    • No hard stops. Labels at claim (fresh, 2026-10-30T13:18Z): user/review, priority/high, queue/claimed, work/assigned, status/in-progress, app/id, meta/protocol-gap — no held, user/owned, do-not-merge, or do-not-auto-edit. The user/review was reviewed by this worker first, per protocol: the input design sketch is the completed id: investigate: friendly-name references — @/# phrase resolution via cross-service search (zettelkasten / Mnote model) #2047 investigation result (posted on id: investigate: friendly-name references — @/# phrase resolution via cross-service search (zettelkasten / Mnote model) #2047, 2026-10-29), and proceeding with a local-store PoC under the epic epic: ID platform expansion — apps, comms, currency, hosting, boards (2026-10-28 directive, LIST 6–15) #2056 program rule (nothing production built on the unreviewed sketch) needs no new decision from Drew. Not escalated.
    • Grounding anchors still exist on current main (verified via gh api contents, 2026-10-30): pkgs/id/src/petname.rs and pkgs/id/src/aliases.rs (the naming philosophy the id: investigate: friendly-name references — @/# phrase resolution via cross-service search (zettelkasten / Mnote model) #2047 sketch extends: petname first, contested never silently picked), plus pkgs/id/src/tag_index.rs, pkgs/id/src/search.rs, and pkgs/id/src/documents.rs as the local index/search/documents surfaces the PoC builds on.
    • One spec-location correction: pkgs/id/doc on main is a symlink to ../../doc (repo-root doc/, which holds the dated design/feature docs, e.g. 2026-10-07T00-20-00Z_feature_petnames_invites). A spec landed "in pkgs/id/doc/" therefore lands in the repo-root doc/ tree and should follow that dated-name convention; the implementation follow-up must state the resolved path explicitly instead of treating pkgs/id/doc/ as a real directory.
    • Acceptance criteria are buildable as one PoC slice, unchanged: (1) spec doc (reference representation: target ID + sigil kind + surface + locator hints; per-store index contents; candidate/ranking types), (2) local-store-only PoC in the notes/documents surface demonstrating ranked candidates with provenance, stored-reference insert + render, renamed-target and cleared-target states, and the duplicate-title / contested-alias cases with no silent picks, (3) findings note on this issue (what the PoC proved, what cross-store fan-out still owes), (4) no production resolution feature merged under this issue. Cross-store fan-out stays out of scope (its own later issue).

    Disposition

    Triage complete. An implementation follow-up (small_fix, Phase: spec + local PoC) is enqueued from this triage; this issue stays open as the tracking issue for that work, per its own acceptance criteria.

    🤖 Agent note · done (triage)

    • Agent: queue worker (repo-worker-code), lane E
    • Session / ID: queue task 3415
    • Result: triaged — scope confirmed on current main, one spec-location correction (doc symlink), implementation follow-up enqueued.
  7. 71 remaining items

  8. added a commit that references this issue on Nov 1, 2026
  9. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    Design note: local friendly-name reference design.

  10. added 2 commits that reference this issue on Nov 2, 2026
  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    RULING (Muse, acting for Drew, 2026-11-03): option (a) — a worker round on PR #2756: address the unresolved Codex findings (verify on the laptop; Codex is usage-walled), land or explicitly close the PoC, and unstick task 3982. A fresh fix task is enqueued for the PR round; task 3415 resumes once #2756 merges/closes.

  12. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: done — findings posted, issue dispositioned (closed as completed)
    task: 6830 (repo-health-code-pilot; worker repo-worker-code; lane code-c)

    Findings — what the PoC proved

    All four acceptance criteria are met:

    1. Spec landed and linked. Spec slice merged as PR id: spec for friendly-name reference resolution, local store (#2259) #2742 (doc/2026-10-30T13-25-00Z_design_friendly_name_references.md, verified present on main); design record followed in PR design(id): #2259 friendly-name references #3829 (merged 2026-11-02) and was linked from this issue 2026-11-01.
    2. PoC demonstrates local resolution per the id: investigate: friendly-name references — @/# phrase resolution via cross-service search (zettelkasten / Mnote model) #2047 sketch. PR id: local-store PoC for friendly-name reference resolution (#2259) #2756 merged 2026-11-02 (merge commit 4b6d1f93); pkgs/id/src/references.rs verified present on main (39,214 B). It implements the spec's Reference (stable target Hash + sigil + authored surface + locator hints, markdown degradation with parse round-trip), LocalIndex::resolve tier ranking with provenance (petname tier first for @, then exact alias claim, exact title, prefix, token, full-text; boosts never cross tiers), and all four render states (Resolved, Renamed, Cleared, Unresolved-for-viewer). No silent picks: a surface claimed by ≥2 targets is Contested, Resolution::single() refuses ties/contested tops, insert_unambiguous errors instead of guessing. CI tests named in the PR cover: petname-outranks-claim, tier ordering, duplicate-title grouping + no auto-pick, contested-alias no silent pick, insert+render + markdown round-trip, renamed-target, cleared-target, unresolved-for-another-viewer, sigil separation.
    3. This note is the findings note the PR promised on merge ("The findings note goes on id: design+PoC: friendly-name reference resolution, local store — reference representation, index, ranking (from #2047) #2259 when this merges") — it was the one deliverable still owed; task 3982's chain stalled on PR id: local-store PoC for friendly-name reference resolution (#2259) #2756's Codex findings, the 2026-11-03 ruling chose option (a) (worker round on the PR), and the PR subsequently landed.
    4. No production resolution feature claimed or merged — the PoC module is self-contained and production-isolated, per the issue's scope.

    What fan-out still owes (v2)

    Cross-store fan-out, locator fetch, and hosted-store search were out of scope here by design. They are now tracked as issue #5178, which also carries the one still-open Drew decision from the 2026-11-01 design note — Q1, document identity ((a) DocumentRecord.id revision-level references vs (b) a stable logical note ID) — since v2's reference representation depends on it.

    Closing #2259 as completed.

  13. removed
    status/blockedQueue or user escalation state
    queue/queuedHas a queued task in the Supabase agent queue
    user/escalatedQueue or user escalation state
    queue/blockedQueue or user escalation state
    work/assignedQueue worker lifecycle state
    on Nov 3, 2026
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)meta/protocol-gapAn agent touched this without the required agent-note comment or labels; needs review of whypriority/highImportant and time-sensitive

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions