fix(mesh): name the absent teapot in the route-level missing-need error too

assertNeedsSatisfiable is a separate check from topoSort, so it didn't
get the note threaded into finalizeGraph -- a handler-level @needs
against an absent teapot's token read as a typo or a forgotten
export: true, which is worse than the pre-task behavior (the boot used
to throw naming the teapot). Thread missingNote through and soften
"local or mesh" to "local or connected mesh" when it's set, so the
message doesn't claim a search that never happened.

Also tightens two test assertions that only passed because "mesh"
happened to appear inside the unrelated "(local or mesh)" wording, and
removes adopt()'s now-fully-unused attempt parameter in mesh/link.ts
instead of leaving it underscored.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-09-12 15:40:24 -05:00
1 parent 3b680480ab
commit 4e8aacb6b7
3 files changed
+47 -9

No files matched your search

+3 -3
View File
@@ -451,7 +451,7 @@ export function connectLink(args: {
};
/** Adopt an established session, or refuse it when its manifest no longer backs the graph. */
const adopt = (session: Session, _attempt: number): boolean => {
const adopt = (session: Session): boolean => {
const missing = missingFromManifest(link.manifest, session.manifest);
if (missing.length > 0) {
@@ -491,7 +491,7 @@ export function connectLink(args: {
return;
}
if (!adopt(session, attempt)) scheduleRetry(attempt);
if (!adopt(session)) scheduleRetry(attempt);
} catch {
// openSession's own abort listener already scheduled the retry through `onEnd`; a rejection
// that never opened a socket (a bad URL, DNS) needs one scheduled here instead.
@@ -501,7 +501,7 @@ export function connectLink(args: {
return openSession(sessionArgs(() => endSession(0))).then((session) => {
link.manifest = session.manifest;
adopt(session, 0);
adopt(session);
return link;
});