Skip to content

fix(architecture): map-landscape identifies a checkout by its directory name, not its repository #4554

Closed

Description

@kyle-sexton

Problem

architecture:map-landscape identifies a charted repository by its checkout's directory name, not
by the repository it is. portfolio-facts.sh sets name from basename of the checkout path
(plugins/architecture/skills/map-landscape/scripts/portfolio-facts.sh, the name="$(basename "$repo")"
line), and reference-edges.sh sets each edge's from the same way.

Run from a git worktree or any clone whose directory name differs from the repository name (for
example melodic-software-claude-code-plugins-<slug> for melodic-software/claude-code-plugins),
the subject node is drawn under the directory name. Two runs of the same repository from two
checkouts then produce records with different repository names, so a drift comparison between them
is expected to report one repository removed and another added (not yet reproduced by a test).

Scope already handled

The phantom self-edge half of this (the repository's own owner/repo citations charted as an edge
to a second internal system) is fixed in the PR that links this issue: reference-edges.sh now
also treats the origin remote's repository name as a self-reference.

Proposed fix

Resolve a checkout's identity from its origin remote (owner and repository segments) when one
resolves, falling back to the directory name only when none does, in both collectors, so a node key
and an edge from agree across checkouts. This changes record keys for any consumer whose
committed landscape.json was generated from a differently named checkout, so it needs a CHANGELOG
note about the one-time drift it causes.

Acceptance

  • The same repository charted from two differently named checkouts produces identical records.
  • A checkout with no github.com origin keeps today's directory-name behavior.
  • landscape-record.test.sh, portfolio-facts.test.sh and reference-edges.test.sh cover both.

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Sep 27, 2026
  2. kyle-sexton commented on Sep 29, 2026

    @kyle-sexton
    MemberAuthor

    Refs #4554. The 2026-09-29 audit of the Cursor run found two acceptance gaps here. #5392 delivers both:

    The audit also asked about two known failures in reference-edges.test.sh. The suite is green on origin/main (99 cases, 0 failed, run 2026-09-29) and on the #5392 branch.

    This issue stays closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageNot yet classified. Floor until a type and one priority tier are set.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions