Repository navigation
fix(antigravity-local): remove 180s printTimeout cutoff and align permission/sandbox/monitor handling - #766
Merged
Conversation
…andbox & monitor handling
Contributor
|
🔍 OpenCodeReview found 2 issue(s) in this PR.
|
Comment on lines
64
to
70
| : eff( | ||
| "adapterConfig", | ||
| "dangerouslySkipPermissions", | ||
| config.dangerouslySkipPermissions === true || config.bypassPermissions === true, | ||
| typeof config.dangerouslySkipPermissions === "boolean" | ||
| ? config.dangerouslySkipPermissions | ||
| : config.bypassPermissions === true, | ||
| ) |
Contributor
There was a problem hiding this comment.
중첩 삼항 연산자가 사용되었습니다 (isCreate 삼항식 내부에 typeof 체크 삼항식이 중첩). 프로젝트 규칙상 중첩 삼항식은 허용되지 않습니다. 레거시 폴백 로직을 컴포넌트 수준의 변수로 추출하면 가독성이 좋아지고, 서버 측 resolveAntigravityBypassPermissions와 동일한 우선순위 규칙(canaonical 필드 우선 → legacy bypassPermissions 폴백)을 미러링한다는 의도도 명확해집니다.
Suggestion:
Suggested change
| : eff( | |
| "adapterConfig", | |
| "dangerouslySkipPermissions", | |
| config.dangerouslySkipPermissions === true || config.bypassPermissions === true, | |
| typeof config.dangerouslySkipPermissions === "boolean" | |
| ? config.dangerouslySkipPermissions | |
| : config.bypassPermissions === true, | |
| ) | |
| const skipPermissionsEffective = | |
| typeof config.dangerouslySkipPermissions === "boolean" | |
| ? config.dangerouslySkipPermissions | |
| : config.bypassPermissions === true; | |
| return ( | |
| // ... | |
| checked={ | |
| isCreate | |
| ? values!.dangerouslySkipPermissions | |
| : eff("adapterConfig", "dangerouslySkipPermissions", skipPermissionsEffective) | |
| } |
Comment on lines
+98
to
+99
| value={eff("adapterConfig", "printTimeout", String(config.printTimeout ?? ""))} | ||
| onCommit={(v) => mark("adapterConfig", "printTimeout", v.trim() || undefined)} |
Contributor
There was a problem hiding this comment.
Print timeout 값이 검증 없이 그대로 커밋되며, 이후 resolveAntigravityPrintTimeout(packages/adapters/antigravity-local/src/server/args.ts)이 빈 문자열이 아닌 모든 문자열을 그대로 agy --print-timeout 값으로 전달합니다. 단위 없는 600, 10min, 5 minutes 같은 형식 오류 입력은 조용히 저장되고, 런타임에 CLI 파싱 실패라는 원인 파악이 어려운 형태로만 노출됩니다. 힌트에 명시된 형식(예: 0s, 600s, 10m)을 커밋 시점에 간단히 검증하거나, 단위 없는 숫자는 초 단위로 정규화하는 것을 권장합니다.
Suggestion:
Suggested change
| value={eff("adapterConfig", "printTimeout", String(config.printTimeout ?? ""))} | |
| onCommit={(v) => mark("adapterConfig", "printTimeout", v.trim() || undefined)} | |
| value={eff("adapterConfig", "printTimeout", String(config.printTimeout ?? ""))} | |
| onCommit={(v) => { | |
| const trimmed = v.trim(); | |
| // 힌트에 명시된 형식(예: 0s, 600s, 10m)만 허용 | |
| if (trimmed && !/^\d+(\.\d+)?(ms|s|m|h)?$/.test(trimmed)) return; | |
| mark("adapterConfig", "printTimeout", trimmed || undefined); | |
| }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Diagnosed and fixed why
antigravity_localruns failed after switching to explicit models (e.g.gemini-4-hydrogen-high/gemini-4-argon-medium):--print-timeoutcutoff:ui/build-config.tshardcodedac.printTimeout = "180s"andexecute.tsdefaulted to180s, ignoringTimeout (sec)(config.timeoutSec) and killing multi-turn runs withDEADLINE_EXCEEDEDat 3 minutes.resolveAntigravityPrintTimeout()to honor explicitprintTimeout/printTimeoutSec, inherit positivetimeoutSec, yield to--print-timeoutinextraArgs, and otherwise default to0s(unbounded turn wait, matchingagyCLI default and other local adapters'timeoutSec = 0).buildAntigravityLocalConfigto settimeoutSec = 0instead ofprintTimeout = "180s", and exposedPrint timeoutinAntigravityLocalAdvancedFieldsso existing saved180svalues are visible and editable in the UI.dangerouslySkipPermissionsandsandboxUI/runtime mismatches:execute.tspreviously readbypassPermissionsbeforedangerouslySkipPermissions, silently ignoring Edit-UI toggles whenbypassPermissions: falseremained from agent creation. AddedresolveAntigravityBypassPermissions()preferring canonicaldangerouslySkipPermissions.AntigravityLocalAdvancedFieldsEnable sandboxdefault check toconfig.sandbox === true(matching runtimeasBoolean(config.sandbox, false)instead of!== false).sir_flash_lite) denials:agy --printexecution notes warning agents against rawenvdumps (PAPERCLIP_API_KEYSignal D trigger) and unnecessaryBypassSandbox: truerequests when--sandboxis disabled (which trigger interactiveaskprompts auto-denied in headless mode).extractAntigravityMonitorDenial()inresolveAntigravityFailure()to reportMonitor ... FINISHED: triggered=truereasons instead of generic empty-response errors.Verification
pnpm --filter @paperclipai/adapter-antigravity-local build && typechecknpx vitest run packages/adapters/antigravity-local(3 files, 27 tests passed)npx vitest run server/src/__tests__/antigravity-local-adapter-environment.test.ts server/src/__tests__/antigravity-models.test.ts ui/src/components/AgentConfigForm.model-dropdown.test.tsx(3 files, 14 tests passed)pnpm --filter @paperclipai/ui typecheck&pnpm --filter @paperclipai/server typecheck&pnpm run check:write-chokepoint