MCPcopy
hub / github.com/codeaashu/claude-code / posInt

Function posInt

src/commands/review/reviewRemote.ts:181–186  ·  view source on GitHub ↗
(v: unknown, fallback: number, max?: number)

Source from the content-addressed store, hash-verified

179 unknown
180 > | null>('tengu_review_bughunter_config', null)
181 const posInt = (v: unknown, fallback: number, max?: number): number => {
182 if (typeof v !== 'number' || !Number.isFinite(v)) return fallback
183 const n = Math.floor(v)
184 if (n <= 0) return fallback
185 return max !== undefined && n > max ? fallback : n
186 }
187 // Upper bounds: 27min on wallclock leaves ~3min for finalization under
188 // RemoteAgentTask's 30min poll timeout. If GB is set above that, the
189 // hang we're fixing comes back — fall to the safe default instead.

Callers 1

launchRemoteReviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected