Skip to content

FDR-0019: support //name system-scope repos (drop the XDGSystem CheckSupported reject) #280

@friedenberg

Description

@friedenberg

Context

repo_id.CheckSupported (go/internal/bravo/repo_id/main.go) currently rejects
XDGSystem-location ids (//name). Dropping that reject to actually support
system-scope repos needs work in both madder and dodder — it is not a pin
bump. Split out of #274 (which is now just the safe EffectiveName delegation);
deferred per maintainer decision (system is the least-used scope).

Why it's blocked (case b)

Dodder deliberately routes cwd/system-location ids into madder's
MakeDefaultAndInitialize via repo_id.EffectiveId (which preserves the
location type) — see command_components_dodder/env_repo.go:42-55. The comment
there is explicit: system is gated by CheckSupported "to keep the explicit 501
rather than silently resolving to the user tree if the gate is ever relaxed." So
a //name id reaching madder's MakeDefaultAndInitialize panics
Err501NotImplemented for LocationTypeXDGSystem today.

Required work

  1. madder: wire XDGSystem resolution into MakeDefaultAndInitialize
    (go/internal/echo/env_dir/construction.go) so a system-location id resolves
    to the system root instead of 501-ing. Add JSON content negotiation for read-only HTTP API clients #230 shipped //name for the
    serve/discovery/system-temp paths but not this constructor. (madder owner has
    offered to pick this up — the symmetric "resolve LocationTypeXDGSystem"
    change.)
  2. dodder: make the local working copy path scope-aware. MakeLocalWorkingCopy
    (command_components_dodder/local_working_copy.go) uses
    env_dir.MakeDefault(EffectiveName), which drops the location — so even after
    madder's fix, //name would mis-resolve to a user repo on the
    show/query/edit path. It needs the same location-aware branch
    env_repo.go already has (cwd/system -> MakeDefaultAndInitialize(EffectiveId)).
  3. Then drop the XDGSystem reject in repo_id.CheckSupported and offer //name
    in -repo_id completion.

Dependencies

  • madder pin must include the XDGSystem MakeDefaultAndInitialize wiring (a tag
    past go/v0.3.42).
  • Coordinate with the madder owner before starting.

:clown: via clown 0.3.12+5220e30 — amarbel-llc/clown@5220e30

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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