mirror of
https://github.com/stablyai/orca.git
synced 2026-09-24 08:02:33 +00:00
* fix(P1-D): coalesce remote-ref probes, TTL negatives, and bound unsettled keys Keep forge resolution from stampeding git under worktree fan-out, let remotes added mid-session be discovered without a restart, and refuse pathological new-branch waves once the unsettled map is full. * fix(P1-D): stop abandoned probes publishing, and split capacity refusals A coalesced probe abandoned as stale kept running and still wrote its answer to the cache, so a late permanent miss could land over the successor's fresher one. Probes now publish only while they still own the in-flight key. The hosted-review capacity refusal told brand-new branches that an earlier attempt of their own never answered when the refusal was really the unsettled map or the process-wide detached cap; each cap now says what it is. Also caches stable "no such remote" SSH misses under the negative TTL instead of re-spawning the probe on every poll. Co-authored-by: Orca <help@stably.ai> * Bound SSH remote URL probe with deadline to prevent hangs The SSH branch of remote URL probes was unbounded — the relay's bounds are per-phase and reset on every frame, so a relay dribbling output would outlive them. Pass AbortSignal.timeout to the SSH provider's exec call to enforce the same 30s deadline as local probes. Treat AbortError as a transient probe error: it signals unavailable infrastructure (deadline or cancellation), not a negative answer about the remote. --------- Co-authored-by: Orca <help@stably.ai>
17 lines
487 B
TypeScript
17 lines
487 B
TypeScript
export function isStableMissingGitRemoteError(error: unknown): boolean {
|
|
const parts: string[] = []
|
|
if (error instanceof Error) {
|
|
parts.push(error.message)
|
|
}
|
|
if (typeof error === 'object' && error !== null && 'stderr' in error) {
|
|
const stderr = (error as { stderr?: unknown }).stderr
|
|
if (typeof stderr === 'string') {
|
|
parts.push(stderr)
|
|
}
|
|
}
|
|
if (parts.length === 0) {
|
|
parts.push(String(error))
|
|
}
|
|
return /no such remote/i.test(parts.join('\n'))
|
|
}
|