Skip to content

Commit 1572520

Browse files
committed
fix(metadata-protocol): a bare doc read's environment entry keeps the layered read's code layer empty after the bare-name fallback
The bare-name artifact fallback of the layered read now skips a bare doc read that answers the environment's own entry, as it skips the bare action read's judged answer: the artifact lookup's first composite is the holder registered first, which that read never serves. Claude-Session: https://claude.ai/code/session_01ADHkmNkZcGApqG4pHHMLeY Co-authored-by: Claude <noreply@anthropic.com>
1 parent bc6c83b commit 1572520

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/metadata-protocol/src/protocol-meta-layered-reads.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,11 @@ export async function getMetaItemLayered(host: Pick<ProtocolHost, 'artifactLockL
456456
// read answered `code` = the base's `fr-FR` before a restart and
457457
// `null` after it (404 on `/layers`), with a dependent's `en-US` row
458458
// stored. A named member is never answered here (its own lookups ran).
459-
if (code === null && member === undefined && bareActionAnswer === undefined) {
459+
// [#34248] Nor is a bare doc read's environment entry: beside two
460+
// enabled holders that entry is the read's answer, and the artifact
461+
// lookup's first composite is the holder registered first, which the
462+
// read never serves (as for the bare action read's judged answer).
463+
if (code === null && member === undefined && bareActionAnswer === undefined && bareDocEnvironmentEntry === undefined) {
460464
code = host.lookupArtifactItem(request.type, request.name, request.packageId) ?? null;
461465
}
462466
}

0 commit comments

Comments
 (0)