Skip to content

sightmap: use the shared sightmap library instead of a local YAML walker - #10

Merged
jurassix merged 3 commits into
mainfrom
clint/sightmap-lib-consolidation
Jul 31, 2026
Merged

sightmap: use the shared sightmap library instead of a local YAML walker#10
jurassix merged 3 commits into
mainfrom
clint/sightmap-lib-consolidation

Conversation

@jurassix

@jurassix jurassix commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • internal/sightmap re-implemented the same .sightmap/ YAML flattening the sightmap/sightmap library already owns. Swap Collect to sightmap.Load + Corpus.AllComponents() instead of a hand-rolled walker.
  • Component gains Tags (authored classification labels, e.g. defect), populated now that the library supports them — previously dropped entirely.
  • Behavior change: a child component no longer inherits its parent's source: when it doesn't declare its own, matching the library's existing memory/stability/properties convention. Covered in the changeset.
  • FindRoot (walk-up .sightmap/ discovery) stays local — the library takes a directory directly and has no discovery of its own.
  • Deleted flatten/rawComp/rawFile/toStringSlice/parseFile/findFiles; equivalent coverage now lives in the library (sightmap/sightmap#102).

Dependency note

Pinned github.com/sightmap/sightmap/go to a commit hash (v0.0.0-20260730124557-a6d4dc74210f) rather than a released version — the module's Go tags stop at v0.15.10 and don't cover the go/ subdirectory-module path, so @latest doesn't resolve to anything containing this change yet. That's a known upstream gap, not something to fix here. Re-pin once sightmap/sightmap#101 and #102 land and tag.

jurassix added 3 commits July 30, 2026 13:50
internal/sightmap re-implemented the same .sightmap/ YAML flattening the
sightmap/sightmap library already owns (selector descendant-combinator
composition, memory/tags normalization, $ref expansion) — duplicated logic
that could drift from the library's own semantics. Import the library
instead.

- Collect now calls sightmap.Load + Corpus.AllComponents, projecting each
  match.SightmapComponent onto the existing wire shape. FindRoot (walk-up
  directory discovery) stays local — the library takes a directory
  directly and has none of its own.
- Component gains a Tags field (author classification labels, e.g.
  `defect`), populated via the library now that it supports them.
- Behavior change: a child component no longer inherits its parent's
  source: when it doesn't declare its own, matching the library's existing
  memory/stability/properties convention (only the selector prefix
  cascades). Flagged in the changeset.
- Deleted flatten/rawComp/rawFile/toStringSlice/parseFile/findFiles; their
  test coverage moved to the library (sightmap/sightmap#102).

Pinned to a commit hash for now since sightmap/sightmap's Go module isn't
tagged past v0.15.10 (a subdirectory-module tagging gap tracked upstream).
The previous pin pointed at the pre-rebase commit; the PR was rebased
onto main after this branch was pinned, rewriting its hash. No code
change on either side — same content, new commit object.
sightmap/sightmap#102 merged and v0.17.0 shipped (dual-tagged v0.17.0 +
go/v0.17.0), so the pseudo-version pin from before the release is no
longer needed.
@jurassix
jurassix merged commit bd48d45 into main Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant