On this page

0250. Record the source path in registry lock entries

Context

An index lock entry's resolved source can be the same for distinct manifest package paths when their hosts map to the same root. Matching only the resolved root and path can reuse a pin after the manifest changes its package identity.

Decision

Every v2 index+ entry records the manifest's canonical pkg = "<host>/<seg>/<name>" immediately after source. It applies only when pkg equals the manifest's pkg. The pkg is package identity (0237), not endpoint, mirror or credential data; 0240's exclusion of those data still holds. source retains the resolved root and package path.

Readers accept legacy v2 index entries without pkg but treat them as stale, as they do entries with a different pkg: offline and read-only operations report E0935; online fetch re-resolves and rewrites them. A first online re-fetch of a legacy entry skips the E1077 changed-hash guard once; this is acceptable because RG1.2 is unreleased.

Alternatives considered

Consequences

Host changes re-resolve even when both hosts map to the same root. Existing unrelated pins survive legacy migration, at the cost of the one-time hash-guard exception.