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 — aggregator: registry merge wipes a session's model/title/directory when a later sparse record omits them — the durable store forgets what it knew · Issue #1560 · developing-today/code

aggregator: registry merge wipes a session's model/title/directory when a later sparse record omits them — the durable store forgets what it knew #1560

New issue
Copy link
New issue
Copy link
Closed
#2931
Closed
aggregator: registry merge wipes a session's model/title/directory when a later sparse record omits them — the durable store forgets what it knew#1560
#2931
Copy link
Assignees
dezren39
Labels
app/aggregatorPackage/app: aggregator (pm-stack 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 Oct 28, 2026
Issue body actions

Summary

mergeRecords in the aggregator's session registry wipes fields the stored record already knows whenever a later incoming record for the same session omits them. A sparse re-read of a session erases its model, title, and directory, nulls its parentId, and degrades its display label from the session title to the raw session id — and because the merged set is persisted to the durable registry store, the loss is permanent, not just in-memory.

Evidence (verified on main a120b9a9, 2026-10-27)

Root cause — pm-stack/aggregator/src/registry.ts:115-133: the merge is { ...prev, ...r, ... } with special cases only for startedAt, tokensTotal (max), taskRefs (union), and lastSeenAt (newest). The function's own doc comment (registry.ts:110-114) states the contract: "every other field takes the incoming value when present". But records built by recordFromSessionEntry (registry.ts:31-52) always carry the keys model/title/directory/tokensTotal — with undefined values when the source entry omits them — and a spread copies undefined-valued keys, so "absent" incoming fields overwrite present stored ones. label is always present on an incoming record, but recordFromSessionEntry falls back to the raw session id when the entry has no title (registry.ts:40), so a title-less re-read also replaces a good label with ses_….

Sparse incoming records are a real shape, not a hypothetical: sources/opencode.ts:171-178 (mapOne) builds entries with title: s.title, directory: s.location?.directory, model: s.model?.id — all legitimately absent for some sessions — and sources/live.ts:965 feeds those entries through recordFromSessionEntry into mergeIntoRegistry (sources/live.ts:614-631), which persists the merged set with JSON.stringify to the registry file, dropping the wiped keys from the durable store.

Reproduction — Bun 1.4.2 probe driving the real registry.ts (sha256 52c524d5…, identical on both machines; probe + log in the fleet's run records):

  • Stored record (from a full entry): model="model-a", title="Fix the thing …", directory="/home/user/project", parentId="ses_parent", label="Fix the thing …", tokensTotal=500, lastSeenAt=11:00Z.
  • Incoming: same session, newer lastSeenAt=12:00Z, no title/model/directory/parent (the mapOne sparse shape).
  • Merged result: model=undefined, title=undefined, directory=undefined, parentId=null, label="ses_1" — while the special-cased fields behaved exactly as documented (tokensTotal stayed 500, lastSeenAt advanced, startedAt kept). The persisted JSON has no model key at all.
  • Control: an incoming record that does carry model="model-b" correctly replaces the stored model (and tokens rise to 700) — present-value-wins works; only absent-value handling is broken.

Existing test coverage (test/slice3.test.ts, "merge keeps the record, maxes cumulative tokens, unions task refs") only merges records derived from the same full entry shape, so the sparse-incoming case is untested.

Why it matters

The registry is the durable identity store behind the /sessions page (#906 §3): its whole purpose is that "a session stays in the registry after it expires out of the attention feed". Every live read merges feed + laptop records into that store, so any session that is ever re-read through a sparser source permanently loses its model, title, directory, and parent linkage, and its display name regresses to a raw session id — the exact durability the store exists to provide is silently undone by the merge itself.

Acceptance criteria

  • Merging an incoming record whose model/title/directory are undefined preserves the stored values; an incoming parentId of null does not erase a stored non-null parent unless that is an explicitly decided and documented semantic.
  • A title-less incoming record does not degrade a stored label that came from a title.
  • Fields the incoming record actually carries still win (present-value-wins), and the existing special cases (tokensTotal max, lastSeenAt newest, startedAt earliest, taskRefs union) keep working.
  • A regression test in the aggregator suite merges a sparse incoming record (built via recordFromSessionEntry from an entry omitting title/model/directory) over a full stored record and asserts the stored fields survive; the existing slice3 merge test still passes.
  • The fix's treatment of each SessionRecord field is consistent with the doc comment's "when present" contract (update the comment if any field is deliberately exempted).

Activity

Next
  1. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-606

  2. 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/aggregatorPackage/app: aggregator (pm-stack in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane A, slug new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a run 2026-10-27 20:35 CDT
    • Found via: filed this run
    • Task: Filed this issue after verifying the merge-wipe with a Bun probe driving the real registry.ts on the laptop (sparse incoming record erases model/title/directory, nulls parentId, degrades label; control with present values passes).
    • Expectation: effort/s — triage pins the per-field "when present" semantics (esp. parentId null), then the fix + sparse-merge regression test land via the queue lane.
    • Links: queue packet packet-1560.json (repo-health-code-pilot, triage)
  4. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 28, 2026
  6. 13 remaining items

  7. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Oct 31, 2026
  8. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked (CI pending)

    • Agent: queue worker (repo-worker-code), openchamber scheduled lane
    • Session / ID: queue task 1827
    • State: fix implemented + regression test green; PR fix(aggregator): sparse registry merge preserves stored fields (#1560) #2931 open (branch queue/1827-1560-registry-merge-sparse, worktree ~/git/fleet/1827 at 9813b78 + fix commit 9775b3b). Only CodeRabbit/neutral had reported after ~5min poll; main CI checks not yet in.
    • Resume: read PR check state fresh; merge only if checks green + diff matches intent; else address failures in the same worktree.
    • Tests: slice3 19pass/1fail (pre-existing routes unique fail, identical on clean main); full aggregator suite 529pass/7fail (all 7 pre-existing on clean main).
  9. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 31, 2026
  10. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane A shift
    • Session / ID: queue task 1827 (resume)
    • Found via: queue claim — PR fix(aggregator): sparse registry merge preserves stored fields (#1560) #2931 already exists from the prior holder (openchamber-scheduled-lane)
    • Task: Verify PR fix(aggregator): sparse registry merge preserves stored fields (#1560) #2931 against the triage ruling (diff + aggregator tests on the laptop), then merge under standing criteria — pm-stack has no PR CI (ci: no pull_request workflow covers pm-stack/** — projector/aggregator changes merge with zero PR CI #2936) — or park with the gap named.
    • Expectation: done = PR fix(aggregator): sparse registry merge preserves stored fields (#1560) #2931 merged, aggregator: registry merge wipes a session's model/title/directory when a later sparse record omits them — the durable store forgets what it knew #1560 closed, task completed as fixed_merged; or parked with exact resume conditions.
    • Links: PR fix(aggregator): sparse registry merge preserves stored fields (#1560) #2931
  11. dezren39
    added a commit that references this issue on Oct 31, 2026

    Merge pull request #2931 from developing-today/queue/1827-1560-regist…

    d72c889
  12. dezren39
    closed this as completedin #2931on Oct 31, 2026
  13. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 31, 2026
  14. dezren39 commented on Oct 31, 2026

    @dezren39
    dezren39
    on Oct 31, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), Lane A shift
    • Session / ID: queue task 1827 (resume)
    • Found via: queue claim — PR fix(aggregator): sparse registry merge preserves stored fields (#1560) #2931 already existed from the prior holder
    • Task: PR fix(aggregator): sparse registry merge preserves stored fields (#1560) #2931 merged — merge commit d72c889. Verified before merging: the diff is exactly the triage ruling (undefined incoming fields skipped, incoming parentId null treated as absent, stored label preserved when the incoming title is absent, startedAt/tokensTotal/taskRefs/lastSeenAt special cases kept) plus the specified regression test; Codex review of the head completed with no findings; pm-stack has no PR CI (ci: no pull_request workflow covers pm-stack/** — projector/aggregator changes merge with zero PR CI #2936), so verification was the laptop aggregator suite — the aggregator: registry merge wipes a session's model/title/directory when a later sparse record omits them — the durable store forgets what it knew #1560 test passes and the full suite's failure set is identical to clean main (7 pre-existing pages-manifest/attention failures, none from this change).
    • Expectation: done — issue closed by the merge; task 1827 completed as fixed_merged.
    • Links: PR fix(aggregator): sparse registry merge preserves stored fields (#1560) #2931
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/aggregatorPackage/app: aggregator (pm-stack 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.