Skip to content

Field findings from the first real legacy migrations: stale-vintage stamp dispatch, silent wiki-absent session start, README memory-path snippet #78

Description

@psaboia

Three small defects surfaced while migrating real adopted hosts (paper-atomizer, PRs #110/#111 there) and verifying the fresh-clone onboarding flow. None is covered by existing fixtures because each needs a version/environment combination the sandboxes don't reproduce.

1. adopt's --stamp-missing-templates dispatch runs the HOST's init-wiki.sh, which may predate the flag

The already-present branch (adopt.sh, added in #76) calls bash wiki/init-wiki.sh --stamp-missing-templates — the host's copy. On a legacy host that copy is an older REFUSEd vintage that rejects the unknown flag:

  • Observed on paper-atomizer (June-28 vintage): Unknown option → exit 1 → Edge-Types.md not stamped; only the adopt-log detail (stamp-missing-templates exited 1) records it.
  • The H3/H4 fixtures miss this because their hosts receive the current init-wiki via ADD; the failing combination is pre-existing wiki + pre-flag init-wiki (REFUSE), which only real hosts have.

Fix: the stamp step should invoke the template clone's init-wiki.sh (cwd = target) so stamping is independent of host vintage. Red-first fixture: a host staged with a pinned pre-flag init-wiki (same technique as _fixtures/legacy-update-from-template.sh).

Workaround used in the field: run the stamp again after update-from-template.sh has synced init-wiki to current.

2. session-start.sh is silent when the wiki is absent

When python3 is missing, ensure-wiki.py's registered command no-ops by design (command -v python3 … || true) — but then nothing else speaks up. Observed in a fresh clone without the wiki: session-start.sh prints the generic orientation block (its own comments call blocks 2–3 "skipped silently") and never says the wiki is missing or how to get it. Contrast: when python3 exists and the clone fails, ensure-wiki.py emits an explicit instruction naming the exact clone command.

Fix: when the index/log blocks are skipped because the wiki directory is absent, emit one line mirroring ensure-wiki.py's failure message ("wiki not found at wiki/.wiki/ — clone it with git clone <url>"). A silent skip looks identical to a healthy minimal session.

3. claude-code README's verification snippet computes the memory path with tr '/._' '---'

wiki/agents/claude-code/README.md ("Personal memory seeded?" check) uses ENCODED=$(pwd | tr '/._' '---') — a simplification of lw_claude_project_slug (scripts/lib/claude.sh), which replaces any non-alphanumeric byte and appends a base36 hash for paths >200 chars. A repo path containing other special characters makes the README's ls point at a directory that doesn't exist while setup.sh --seed-memory writes to the correct one.

Fix: have the snippet call the real helper (source scripts/lib/common.sh; lw_memory_dir "$PWD") instead of re-deriving the encoding.

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