/**
 * Classify the opposite endpoint of one entity-graph edge.
 *
 * This is the single endpoint-accounting rule behind impact's W1.4
 * `unreachableEdges` count and context's reference-closure verdict. A resolved
 * edge is reachable only when both the code-node map and the live-entity join
 * contain its opposite endpoint; neither consumer gets to weaken that rule.
 */
export function classifyEntityEdgeEndpoint(edge, direction, nodes, live, ignoreNodeId) {
    if (edge.status !== 'resolved')
        return { status: 'unresolved' };
    const nodeId = direction === 'out' ? edge.to : edge.from;
    if (!nodeId)
        return { status: 'unreachable' };
    if (nodeId === ignoreNodeId)
        return { status: 'ignored', nodeId };
    if (!nodes.has(nodeId))
        return { status: 'unreachable', nodeId };
    const entity = live.byNodeId.get(nodeId);
    return entity ? { status: 'reachable', nodeId, entity } : { status: 'unreachable', nodeId };
}
//# sourceMappingURL=edge-accounting.js.map