GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(note_links): project_links validates target/pin before the head check — a superseded link with a bad pin or unknown target fails the whole projection · Issue #4358 · developing-today/code

id(note_links): project_links validates target/pin before the head check — a superseded link with a bad pin or unknown target fails the whole projection #4358

New issue
Copy link
New issue
Copy link
Closed
#4585
Closed
id(note_links): project_links validates target/pin before the head check — a superseded link with a bad pin or unknown target fails the whole projection#4358
#4585
Copy link
Assignees
dezren39
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)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 2, 2026
Issue body actions

Summary

project_links (pkgs/id/src/note_links.rs, added by PR #4131 for issue #3816) validates a link's target and pin before checking whether the link's asserting revision is still a head of its source note. A link asserted by a superseded revision contributes nothing to the projection — the function drops it with continue — but only after the target/pin checks have had the chance to fail the entire projection. One stale link with a bad pin or a not-yet-known target therefore takes down every link and backlink in the store, even though the link itself would have been silently dropped.

Evidence (verified this run)

Code order in project_links (pkgs/id/src/note_links.rs, main @ a205ae3):

  1. source note lookup → UnknownSource error
  2. revision-of-source check → RevisionNotOfSource error
  3. target note lookup → UnknownTarget error
  4. pin check → PinNotOfTarget error
  5. only then: if !source_note.heads.contains(revision) { continue; }

Laptop probe (worktree ~/git/fleet/probe-2026-11-02-laneA-notelinks, note_links.rs byte-identical to main, md5 594803d785fafc1ad0c82deffaf306dc; source note created then revised so revision 10 is superseded by head 11):

  • superseded link pinning a revision of a different note → Err(PinNotOfTarget) — projection fails
  • superseded link naming an unknown target → Err(UnknownTarget) — projection fails
  • control: the same bad pin asserted by the head revision → Err(PinNotOfTarget) (correct)
  • control: a well-formed superseded link → Ok, 0 edges (dropped as intended)

Why it matters

The projection is derived from applied events, including events that arrive via sync before the notes they reference (the prune path in pkgs/id/src/event_store/mod.rs already special-cases link references so a rebuild after prune does not fail with UnknownTarget). A single stale or early link should not be able to blank the whole link/backlink view for a store. Head-asserted links must keep failing loudly — their errors are real — but links that are not part of the projection at all should be dropped before their target/pin validity is judged.

Acceptance criteria

  • project_links drops a link whose asserting revision is not a head of its source note without erroring on that link's target existence or pin validity (the source/revision-of-source checks needed to establish headship still apply).
  • A link asserted by a head revision with an unknown target or a pin that is not a revision of the target still fails the projection with UnknownTarget / PinNotOfTarget (existing behaviour, covered by existing tests).
  • New tests in pkgs/id/src/note_links.rs cover: superseded link + bad pin → Ok with the link dropped; superseded link + unknown target → Ok with the link dropped.
  • Existing note_links tests pass (cargo test for the id package on the laptop or CI).

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Nov 2, 2026
  2. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator (lane A, new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a, run 2026-11-02 06:35 CST
    • Found via: filed this run
    • Task: Filed after verifying on the laptop that project_links errors the whole projection on a superseded link's bad pin / unknown target (probe: ~/git/fleet/probe-2026-11-02-laneA-notelinks on the laptop; controls confirmed head-asserted bad pins still error and well-formed superseded links drop silently).
    • Expectation: effort/s — triage confirms the check order on current main and routes the fix (drop non-head links before target/pin validation, plus the two new tests in the acceptance criteria).
    • Links: queue packet packet-4358-triage.json (repo-health-code-pilot)
  3. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 2, 2026
  4. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: repo-worker-code (OpenChamber scheduled lane c29174f1-48e0-4b13-b4ff-9b73ab67e9ab)
    • Session / ID: task 6226
    • Found via: atomic claim from repo-health-code-pilot
    • Task: Confirm current-main validation order for project_links and route the fix; scope is triage only.
    • Next: Revalidate on a fresh laptop worktree, then post evidence and route the fix.
    • Links: queue task 6226 · id(note_links): project_links validates target/pin before the head check — a superseded link with a bad pin or unknown target fails the whole projection #4358
  5. 8 remaining items

  6. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 2, 2026
  7. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    agent-note:v1
    event: picked_up
    task: 6409 (repo-health-code-pilot; OpenChamber scheduled lane; lane 7b47536b-c162-444c-be8a-3a9538cc4cb5)
    state: picked up by atomic queue claim.
    verified: Fresh GitHub state: #4358 OPEN; no hard-stop labels; no PR found matching #4358 in title/body.
    next: inspect task worktree/branch state, fast-forward local main, then implement the scoped check reorder and two regression tests.

  8. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
  9. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    agent-note:v1
    event: done
    task: 6409 (repo-health-code-pilot; OpenChamber scheduled lane; lane 7b47536b-c162-444c-be8a-3a9538cc4cb5)
    state: queue task completed as pr_opened; issue #4358 remains OPEN.
    change: project_links now drops non-head assertions after source/revision validation and before target/pin validation; added regressions for superseded bad-pin and unknown-target links.
    verified: cargo test --lib note_links --quiet — 13 passed, 0 failed. PR #4585 is OPEN at bf94b96; basic check was QUEUED at fresh verification, CodeRabbit NEUTRAL.
    next: CI runs on PR #4585; no queue claim held. Formatting check reports existing unrelated formatting drift; git diff --check passed.

  10. github-actions
    assigned
    dezren39
    on Nov 3, 2026
  11. dezren39
    added
    queue/queuedHas a queued queue task
    on Nov 3, 2026
  12. developing-today commented on Nov 3, 2026

    @developing-today
    developing-todayBot
    on Nov 3, 2026 – with developing.today
    Contributor
    More actions

    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

  13. dezren39
    closed this as completedin #4585on Nov 3, 2026
  14. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    agent-note:v1
    event: done
    task: 8389 (repo-health-code-pilot; OpenChamber scheduled lane aea12c82-c5af-4e5a-9b66-f8e360f87177)
    state: triage resolved — the already-open fix PR was verified and merged; issue #4358 CLOSED (completed).
    found: prior lane task 6409 had already implemented the scoped fix and opened PR #4585; no new implementation was needed.
    verified: fresh origin/main (b7d274c) still validated target/pin before the head check — bug live at triage time. PR #4585 diff moves the !heads.contains(revision) { continue; } skip to directly after the source/revision-of-source checks, leaving head-asserted target/pin errors intact, and adds both acceptance tests (test_a_superseded_link_with_a_bad_pin_is_dropped, test_a_superseded_link_with_an_unknown_target_is_dropped). PR was CLEAN/MERGEABLE, basic: OpenCode metered-provider guard passed, CodeRabbit neutral.
    ci-note: .github/workflows/id-check.yml has no pull_request trigger by design (commit 285e425, "no PR triggers"); the id suite runs on main push, so no PR-tier id check is expected for pkgs/id changes.
    merged: PR #4585 → merge commit de39ee8 on main at 2026-11-03T19:44:33Z; main now drops superseded links before target/pin validation.
    tests: originating lane ran cargo test --lib note_links --quiet on the PR head — 13 passed, 0 failed.
    next: none; id main-tier checks run on the merge commit. No queue claim held.

  15. dezren39
    removed
    queue/queuedHas a queued queue task
    status/triagedTriaged and routed (see agent note)
    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

  • @dezren39
    dezren39

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)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.