chore: close quality-gate coverage gaps (#1689) (#1766)
Some checks failed
Run install, format, lint, build, and test on every push / build (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish-github-container-registry (push) Has been cancelled

Closes #1689. Typecheck cli/tui src, add a core/ format+lint gate, and gate core/json + core/client coverage. See PR #1766 for the full review history.
This commit is contained in:
Cliff Hall 2026-07-24 17:20:12 -04:00 • committed by GitHub
commit 373f346e5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1827,9 +1827,12 @@ export class InspectorClient extends InspectorClientEventTarget {
// a future modern-family revision would negotiate a different string, and
// the two must not disagree. The raw channel only runs on a connected modern
// session, so this is always set; the constant is a defensive fallback.
/* v8 ignore next -- fallback only if getProtocolVersion() is unset, which
can't happen on the connected modern session this runs on. */
const protocolVersion = this.getProtocolVersion() ?? MODERN_PROTOCOL_VERSION;
/* v8 ignore start -- fallback only if getProtocolVersion() is unset, which
can't happen on the connected modern session this runs on. Bracketed so
the ignore is reflow-proof however prettier splits the statement. */
const protocolVersion =
this.getProtocolVersion() ?? MODERN_PROTOCOL_VERSION;
/* v8 ignore stop */
return {
...params,
_meta: {
@ -1861,9 +1864,7 @@ export class InspectorClient extends InspectorClientEventTarget {
...message,
result: {
resultType: "complete",
content: [
{ type: "text", text: `Modern task ${task.taskId} created` },
],
content: [{ type: "text", text: `Modern task ${task.taskId} created` }],
_meta: { [MODERN_TASK_HANDLE_META]: task },
},
};
@ -1906,7 +1907,9 @@ export class InspectorClient extends InspectorClientEventTarget {
const raw = await new Promise<unknown>((resolve, reject) => {
const timer = setTimeout(() => {
this.pendingRawWireRequests.delete(id);
reject(new Error(`Raw request "${method}" timed out after ${timeoutMs} ms`));
reject(
new Error(`Raw request "${method}" timed out after ${timeoutMs} ms`),
);
}, timeoutMs);
this.pendingRawWireRequests.set(id, { resolve, reject, timer });
transport.send(message).catch((err: unknown) => {
@ -4443,7 +4446,10 @@ export class InspectorClient extends InspectorClientEventTarget {
this.modernReconnectTimer = undefined;
// Disconnect/unsubscribe may have raced the timer — bail if the reconnect
// is no longer wanted.
if (isTerminalStatus(this.status) || this.subscribedResources.size === 0) {
if (
isTerminalStatus(this.status) ||
this.subscribedResources.size === 0
) {
return;
}
this.refreshModernSubscription(true).catch(() =>