Skip to content

Context rescue S5: hide a wiki page's source memory while the page's memory is shown (#59) #164

Done

Description

@gosha70

Why

Part of #59, Phase 2: "recall collapses promoted and imported chains", and its finding D8: "wiki import doesn't supersede its source". S1 (#128) left imported-page collapse out because nothing linked a page back to the memory it came from ("needs provenance metadata"). S1–S4 (#128, #134, #147, #153) are built; this is the slice after them.

What memkernel does today (main at 3ba5c72)

  • Export writes memkernel_ref, memkernel_sha256 and memkernel_hash_scheme on every draft page (src/memkernel/wiki/sync.py:403-406).
  • Import reads only corrects: (sync.py:843), which supersedes the named memory when a curator corrects it. A page approved without corrects: becomes a new memory, and its source stays live beside it, so recall and the hook blocks can show both.
  • Promoted chains collapse in the hook blocks (src/memkernel/lifecycle.py, _distinct) and are left out of promotion candidates (src/memkernel/core/services.py:1558). MCP recall collapses neither chain.

Owner's decisions (2026-11-25)

  • Hide the source; don't supersede it.
  • Link only when the named memory is live, in the project scope, and its hash matches the page's memkernel_sha256 under memkernel_hash_scheme.
  • A page without memkernel_ref gets no link.
  • corrects wins over memkernel_ref.
  • The spec says whether a hidden source stays a promotion candidate, and whether wiki-studio's ADR-0002 should register memkernel_ref.
  • Hook latency goes to Phase 4, not S5.
  • Order: S5's spec PR, then Lifecycle suite: a discriminating lc-wiki task set and a governed-composition arm (design from wiki-studio 0.8.1) #90's build, then S5's build.

Out of scope

Spec: to follow. Related: #59, #128, #48.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions