Fix docker-git auth claude login failing after successful OAuth login#440
Fix docker-git auth claude login failing after successful OAuth login#440konard wants to merge 18 commits into
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: ProverCoderAI#439
📝 WalkthroughWalkthroughДобавлен пакет ChangesClaude OAuth flow и интеграция
Controller compose extra overlay support
Workspace, сборка и CI
Sequence Diagram(s)sequenceDiagram
participant authClaudeLogin
participant runClaudeLoginFlow
participant runClaudeOauthLoginWithPrompt
participant runClaudeDockerOauth
participant claudeLocalOauthSmoke
authClaudeLogin->>runClaudeLoginFlow: captureToken / persistToken / probeToken
runClaudeLoginFlow->>runClaudeOauthLoginWithPrompt: envToken, image, containerPath
runClaudeOauthLoginWithPrompt->>runClaudeDockerOauth: run docker OAuth flow
runClaudeDockerOauth->>claudeLocalOauthSmoke: save token and probe ping
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
docker-git auth claude login created and persisted the OAuth token, then ran a 'claude -p ping' probe and hard-failed (exit 1) on any non-zero probe exit, discarding an otherwise successful login. Transient probe failures (network, rate limit, token propagation delay) must not invalidate a saved token. The probe failure is now logged as a warning, mirroring authClaudeStatus. Adds a regression test asserting the token is persisted even when the probe returns non-zero. Fixes ProverCoderAI#439
Working session summaryAll functional CI checks pass. The remaining E2E jobs are still running (slow integration tests for unrelated flows), and the only failure is SummaryI fixed issue #439 — Root causeIn
The probe makes a live API call, so a transient failure (network hiccup, rate limit, freshly-issued token still propagating) invalidated an otherwise successful login. This was also inconsistent with FixTreat the failing post-login probe as a warning instead of a hard error, mirroring Verification
PR: #440 (updated and marked ready for review). This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $4.620513📊 Context and tokens usage:
Total: (4.0K new + 101.7K cache writes + 5.6M cache reads) input tokens, 31.8K output tokens, $4.620513 cost 🤖 Models used:
📎 Log file uploaded as Gist (2166KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.3K new + 34.3K cache writes + 871.7K cache reads) input tokens, 8.8K output tokens, $1.015964 cost 🤖 Models used:
📎 Log file uploaded as Gist (2977KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 2)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
🔄 Auto-restart-until-mergeable Log (iteration 2)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.5K new + 21.3K cache writes + 562.5K cache reads) input tokens, 7.4K output tokens, $0.696650 cost 🤖 Models used:
📎 Log file uploaded as Gist (3734KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 3)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
CI status — only failing check is an external CodeRabbit billing limitI reviewed the failing CI and verified the code state on
Why the
|
🔄 Auto-restart-until-mergeable Log (iteration 3)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.2K new + 26.2K cache writes + 536.9K cache reads) input tokens, 7.4K output tokens, $0.731452 cost 🤖 Models used:
📎 Log file uploaded as Gist (4493KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 4)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Working session summaryEverything is verified and in order. Here's my assessment: ConclusionThe code fix for issue #439 is complete and correct. The only failing CI check, CodeRabbit, is an external billing/account limit — not a code problem. Verification done this session
Why CodeRabbit is red (and unfixable by code)CodeRabbit's own comment confirms: "Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab…" This requires an org admin to enable the add-on (or waiting out the rate-limit window). No source change can make it pass. The stale CodeRabbit "Requirements Alignment" note about The fix itself (treating a failing post-login API probe as a warning rather than a hard error, mirroring Iteration 3 already posted a detailed PR comment explaining the CodeRabbit billing situation, so I'm not adding a redundant duplicate. There is nothing further to fix on the code side — the PR is ready pending the org's CodeRabbit billing resolution. This summary was automatically extracted from the AI working session output. |
🔄 Auto-restart-until-mergeable Log (iteration 4)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.0K new + 23.2K cache writes + 248.8K cache reads) input tokens, 4.6K output tokens, $0.485599 cost 🤖 Models used:
📎 Log file uploaded as Gist (5185KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 5)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
🔄 Auto-restart-until-mergeable Log (iteration 5)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (10.5K new + 24.1K cache writes + 406.4K cache reads) input tokens, 5.6K output tokens, $0.637494 cost 🤖 Models used:
📎 Log file uploaded as Gist (5925KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
packages/lib/src/usecases/auth-claude-oauth.ts (1)
172-180: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winЛогируйте failed probe как warning.
Сейчас warning есть только для non-zero
setup-token; еслиclaude -p pingвернул non-zero, login успешно возвращает token молча, хотя заявленное поведение — warning-only probe failure.Минимальный фикс
if (result.exitCode !== 0) { yield* _( Effect.logWarning( `claude setup-token returned exit=${result.exitCode}, but OAuth token was captured; continuing.` ) ) } + if (result.probeStatus._tag === "ClaudeDockerProbeFailed") { + yield* _( + Effect.logWarning( + `claude -p ping failed with exit=${result.probeStatus.exitCode}; OAuth token was saved. Run docker-git auth claude status to verify later.` + ) + ) + } return result.tokenAs per path instructions, README requires “warning-only” behavior after token persistence so users can verify later via
docker-git auth claude status.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/lib/src/usecases/auth-claude-oauth.ts` around lines 172 - 180, In `auth-claude-oauth.ts`, the `ClaudeDockerOauthTokenCaptured` path only warns for a non-zero `setup-token` exit, but it should also surface a failed `claude -p ping` probe as a warning while still returning the captured token. Update the token-capture flow around the `result._tag` handling so the probe result is checked and any non-zero probe exit is logged via `Effect.logWarning`, preserving the warning-only behavior before returning from the auth use case.Source: Path instructions
packages/auth-oauth/src/claude-local-smoke.ts (1)
89-95: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winСоздавайте
.oauth-tokenсразу с приватными правами.
writeFile(..., "utf8")создаёт файл с правами, зависящими от umask, и доchmodтокен может кратко оказаться читаемым. Передайтеmode: claudeOauthTokenFileModeвwriteFile; отдельныйchmodможно оставить как защиту в глубину.Минимальный фикс
- await writeFile(tokenPath, formatClaudeOauthTokenFile(token), "utf8") + await writeFile(tokenPath, formatClaudeOauthTokenFile(token), { + encoding: "utf8", + mode: claudeOauthTokenFileMode + }) await chmod(tokenPath, claudeOauthTokenFileMode)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/auth-oauth/src/claude-local-smoke.ts` around lines 89 - 95, The token persistence flow in persistClaudeLocalOauthToken currently writes the .oauth-token file with default permissions before tightening them, so update the writeFile call to create the file with claudeOauthTokenFileMode immediately and keep the follow-up chmod as a defense-in-depth safeguard. Use the existing persistClaudeLocalOauthToken and claudeOauthTokenFileMode symbols to locate the change.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/app/src/docker-git/controller-compose.ts`:
- Around line 143-149: The overlay validation in controllerCompose currently
only checks fs.exists, so directories can still pass as a “verified extra
compose overlay.” Update the check around extraOverlayPath in controllerCompose
to require a regular file (not just existence) before returning it, and keep the
controllerBootstrapError path for anything else. Make sure the logic in this
branch proves the intended precondition for the extra compose overlay using the
existing symbols fs.exists, mapComposePathError, and controllerBootstrapError.
In `@packages/auth-oauth/src/claude-docker-oauth.ts`:
- Around line 286-289: The token persistence in writeCapturedToken relies on
writeFile mode and then chmod, but that does not safely handle an existing token
file at the same accountPath. Update the writeCapturedToken flow in
claude-docker-oauth.ts to write the OAuth token to a new temporary file with
restrictive permissions (0600) and then atomically rename it into place, or
otherwise ensure permissions are tightened before any token content is
persisted.
In `@packages/auth-oauth/tests/claude-docker-oauth.test.ts`:
- Around line 47-49: Temporary auth directories created by mkdtemp in the oauth
tests are never cleaned up, so the test run leaves behind .oauth-token data in
/tmp. Update the test setup around the accountPath creation in both relevant
test cases to use Effect.acquireRelease so the directory is always removed after
assertions, and release it with rm(..., { recursive: true, force: true }) using
the same accountPath variable.
In `@packages/lib/src/usecases/auth-claude.ts`:
- Around line 58-61: The token file creation in auth-claude.ts leaves a brief
window with default permissions because writeFileString() happens before chmod()
in the Effect.gen flow. Update the token persistence logic around
claudeOauthTokenPath/tokenPath so the file is created with mode 0o600
immediately, or write to a temporary file with restricted permissions and
atomically rename it, instead of relying on a separate chmod afterward.
In `@packages/lib/tests/usecases/auth-claude-local.test.ts`:
- Around line 19-21: The test fixtures in auth-claude-local.test.ts use
token-shaped strings that look like real Claude secrets even though the test
only needs distinct values for env-key priority and value propagation. Replace
the oauthTokenPrefix/oauthToken/lowerPriorityToken fixtures with clearly
neutral, non-secret placeholder strings in the same test setup so any failed
expect output or CI diff cannot resemble or expose credentials. Keep the
assertions and flow around the existing test cases unchanged; only adjust the
fixture values referenced by the test.
In `@scripts/e2e/auth-claude-login.sh`:
- Around line 24-29: The auth Claude login e2e script currently injects a stable
DOCKER_GIT_CLAUDE_OAUTH_TOKEN, but it does not verify that this marker never
appears in LOG_FILE. Update auth-claude-login.sh to add a negative assertion
after the flow completes, using the existing LOG_FILE and the token marker
string, so the test fails if the token is echoed to stdout/stderr. Keep the
check close to the current compose override setup and reuse the existing login
flow identifiers in the script to locate the right spot.
---
Outside diff comments:
In `@packages/auth-oauth/src/claude-local-smoke.ts`:
- Around line 89-95: The token persistence flow in persistClaudeLocalOauthToken
currently writes the .oauth-token file with default permissions before
tightening them, so update the writeFile call to create the file with
claudeOauthTokenFileMode immediately and keep the follow-up chmod as a
defense-in-depth safeguard. Use the existing persistClaudeLocalOauthToken and
claudeOauthTokenFileMode symbols to locate the change.
In `@packages/lib/src/usecases/auth-claude-oauth.ts`:
- Around line 172-180: In `auth-claude-oauth.ts`, the
`ClaudeDockerOauthTokenCaptured` path only warns for a non-zero `setup-token`
exit, but it should also surface a failed `claude -p ping` probe as a warning
while still returning the captured token. Update the token-capture flow around
the `result._tag` handling so the probe result is checked and any non-zero probe
exit is logged via `Effect.logWarning`, preserving the warning-only behavior
before returning from the auth use case.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cf7d78e7-1ec6-4b25-904b-e58566d554ba
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (19)
.github/workflows/check.ymlpackages/app/src/docker-git/controller-compose.tspackages/app/tests/docker-git/controller-compose.test.tspackages/auth-oauth/package.jsonpackages/auth-oauth/src/claude-docker-oauth.tspackages/auth-oauth/src/claude-local-smoke.tspackages/auth-oauth/src/claude-oauth-token.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/auth-oauth/tests/claude-local-smoke.test.tspackages/auth-oauth/tests/claude-oauth-token.test.tspackages/lib/src/usecases/auth-claude-local.tspackages/lib/src/usecases/auth-claude-login-flow.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/lib/tests/usecases/auth-claude-login-flow.test.tspackages/lib/tests/usecases/auth-claude-login.test.tsscripts/e2e/_lib.shscripts/e2e/auth-claude-login.sh
📜 Review details
⏰ Context from checks skipped due to timeout. (10)
- GitHub Check: E2E (Runtime volumes + SSH)
- GitHub Check: E2E (Clone auto-open SSH)
- GitHub Check: E2E (Claude auth login)
- GitHub Check: E2E (Clone cache)
- GitHub Check: E2E (Browser command)
- GitHub Check: Test
- GitHub Check: E2E (OpenCode)
- GitHub Check: Lint
- GitHub Check: E2E (Login context)
- GitHub Check: Final build (windows-latest)
🧰 Additional context used
📓 Path-based instructions (15)
**/*.{sh,bash,py,js,ts,jsx,tsx,go,java,rb,php}
📄 CodeRabbit inference engine (Custom checks)
Fail if changed files introduce command injection or unsafe shell/process execution with user-controlled input
Files:
scripts/e2e/_lib.shpackages/auth-oauth/tests/claude-oauth-token.test.tspackages/lib/tests/usecases/auth-claude-login-flow.test.tsscripts/e2e/auth-claude-login.shpackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/auth-oauth/tests/claude-local-smoke.test.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/app/tests/docker-git/controller-compose.test.tspackages/lib/src/usecases/auth-claude-login-flow.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/lib/src/usecases/auth-claude-local.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-oauth-token.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/auth-oauth/src/claude-local-smoke.tspackages/lib/src/usecases/auth-claude.ts
**/*.{py,js,ts,jsx,tsx,go,java,rb,php,sh,bash,c,cpp}
📄 CodeRabbit inference engine (Custom checks)
Fail if changed files introduce path traversal or writes outside intended project/container state directories
Files:
scripts/e2e/_lib.shpackages/auth-oauth/tests/claude-oauth-token.test.tspackages/lib/tests/usecases/auth-claude-login-flow.test.tsscripts/e2e/auth-claude-login.shpackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/auth-oauth/tests/claude-local-smoke.test.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/app/tests/docker-git/controller-compose.test.tspackages/lib/src/usecases/auth-claude-login-flow.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/lib/src/usecases/auth-claude-local.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-oauth-token.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/auth-oauth/src/claude-local-smoke.tspackages/lib/src/usecases/auth-claude.ts
**/*.{js,ts,jsx,tsx,py,java,go,rb,php,sh,bash,yml,yaml,json,env*,toml,cfg,config,dockerfile,dockerignore}
📄 CodeRabbit inference engine (Custom checks)
Fail if changed files expose credentials, tokens, private-keys, or PII in source, generated config, logs, or CI output
Files:
scripts/e2e/_lib.shpackages/auth-oauth/tests/claude-oauth-token.test.tspackages/lib/tests/usecases/auth-claude-login-flow.test.tsscripts/e2e/auth-claude-login.shpackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/auth-oauth/package.jsonpackages/auth-oauth/tests/claude-local-smoke.test.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/app/tests/docker-git/controller-compose.test.tspackages/lib/src/usecases/auth-claude-login-flow.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/lib/src/usecases/auth-claude-local.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-oauth-token.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/auth-oauth/src/claude-local-smoke.tspackages/lib/src/usecases/auth-claude.ts
**/{setup,install,config,*.sh,*.md}
📄 CodeRabbit inference engine (README.md)
Ensure default projects directory is ~/.docker-git
Files:
scripts/e2e/_lib.shscripts/e2e/auth-claude-login.sh
**/{.git*,config*,*.sh,docker-compose*}
📄 CodeRabbit inference engine (README.md)
Use git credential helper to automatically select correct token by host for HTTPS clone/push operations
Files:
scripts/e2e/_lib.shscripts/e2e/auth-claude-login.sh
**/{browser*,server*,.env*,*.sh}
📄 CodeRabbit inference engine (README.md)
Allow DOCKER_GIT_WEB_HOST environment variable to restrict web access to 127.0.0.1
Files:
scripts/e2e/_lib.shscripts/e2e/auth-claude-login.sh
**
⚙️ CodeRabbit configuration file
**: РОЛЬ: Математик-программист, специализирующийся на формально верифицируемой функциональной архитектуре.ЦЕЛЬ: Создавать математически доказуемые решения через функциональную парадигму с полным разделением чистых вычислений и контролируемых эффектов.
МОДЕЛЬ РАССУЖДЕНИЯ:
- Не выдавать “личные мнения”. Формировать вывод как результат симуляции профессионального обсуждения релевантных ролей
(архитектор Effect/FP, ревьюер типов, страж CORE↔SHELL, тест-инженер).- Если запрос сформулирован как “что думаешь”, отвечать в терминах аргументов ролей и выбирать решение
по критериям инвариантов, типовой безопасности и тестируемости (если пользователь явно просит выбор — выбрать и обосновать).ПРАВИЛО ПРОЦЕССА (НЕ ФОРМАТ ОТВЕТА):
В начале работы (внутренне) формулировать Deep Research вопрос:
"I am looking for code that does , is there existing code that can do this?"
Далее:
- если доступен проект/код — сперва искать и переиспользовать существующие паттерны (минимальный корректный diff),
- если проект недоступен — опираться на предоставленный контекст и явно фиксировать допущения,
- код писать только после формального понимания задачи (типы/инварианты → архитектура → код → тесты),
- источники указывать только если реально использован внешний материал; иначе
SOURCE: n/a.ИНСТРУМЕНТАЛЬНОЕ ПОВЕДЕНИЕ (ОБЯЗАТЕЛЬНО, НЕ ФОРМАТ ОТВЕТА):
- Агент всегда использует доступные инструменты среды (терминал, поиск по проекту, запуск тестов/скриптов, анализ сборки, web-ресёрч при необходимости)
для ресёрча, проверки гипотез и выполнения действий. Приоритет: проверяемость, воспроизводимость, минимальный риск.- Агент не предлагает “гайд” как замену действия. Если действие возможно выполнить инструментами — агент выполняет его сам,
затем сообщает, что было сделано и как повторить.- Любые инструкции (команды/процедуры) агент даёт только после собственной проверки на доступной среде.
Если проверить невозможно — явно фиксирует ограничение и перечисляе...
Files:
scripts/e2e/_lib.shpackages/auth-oauth/tests/claude-oauth-token.test.tspackages/lib/tests/usecases/auth-claude-login-flow.test.tsscripts/e2e/auth-claude-login.shpackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/auth-oauth/package.jsonpackages/auth-oauth/tests/claude-local-smoke.test.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/app/tests/docker-git/controller-compose.test.tspackages/lib/src/usecases/auth-claude-login-flow.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/lib/src/usecases/auth-claude-local.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-oauth-token.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/auth-oauth/src/claude-local-smoke.tspackages/lib/src/usecases/auth-claude.ts
**/*
⚙️ CodeRabbit configuration file
**/*: Ты строгий ревьюер SPEC DRIVEN DEVELOPMENT.Перед выводами изучи README.md, другие *.md файлы, linked issues,
PR description, PR comments/discussion и релевантную кодовую базу.Сверь изменения с исходным ТЗ/спекой и обсуждением. Флагай любой уход
от спеки, недокументированное изменение поведения, отсутствие тестов
для заявленного поведения и security-риск. Если спека не видна,
попроси автора добавить ее в issue или PR description.Проверь решение с точки зрения формальной верификации: какие инварианты,
предусловия и постусловия можно доказать математически, а где доказуемость
слабая. Оцени решение с точки зрения теории игр: устойчивы ли стимулы,
нет ли выгодного обхода правил, и какое решение было бы сильнее.
Files:
scripts/e2e/_lib.shpackages/auth-oauth/tests/claude-oauth-token.test.tspackages/lib/tests/usecases/auth-claude-login-flow.test.tsscripts/e2e/auth-claude-login.shpackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/auth-oauth/package.jsonpackages/auth-oauth/tests/claude-local-smoke.test.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/app/tests/docker-git/controller-compose.test.tspackages/lib/src/usecases/auth-claude-login-flow.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/lib/src/usecases/auth-claude-local.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-oauth-token.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/auth-oauth/src/claude-local-smoke.tspackages/lib/src/usecases/auth-claude.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: FUNCTIONAL CORE: Write only pure functions with immutable data and mathematical operations in core modules; no side effects, mutations, or external service calls
IMPERATIVE SHELL: Isolate all side effects (IO, network, database, environment/process) in a thin SHELL layer; CORE never calls SHELL, only SHELL → CORE
Never useanytype annotation in TypeScript; useunknownonly at SHELL boundaries for decoding, never exportunknownoutside boundary modules
Never useastype assertions in normal code; only permitasin a single 'axiomatic' module (brands, constructors, constants) after which types flow safely without casts
Always use exhaustive pattern matching for union types through.exhaustive()orMatch.exhaustive()from effect-ts; never use switch statements or unhandled type branches
Use Effect<Success, Error, Requirements> monad from effect-ts for all effects; compose through pipe() and Effect.flatMap(); never use async/await, raw Promise chains (then/catch), or Promise.all in product code
Interoperate with Promise/exceptions only in SHELL through Effect.try/Effect.tryPromise with typed error mapping; never leave raw exceptions or untyped errors in the domain
Use Effect.acquireRelease + Effect.scoped for resource management with guaranteed finalization; never manage resources with try/finally or manual cleanup
All external services (database, HTTP, environment) must be accessed through Effect-based interfaces and Layer-based dependency injection; never call external APIs directly
Provide comprehensive TSDoc comments with mathematical notation:@pure,@effect,@invariant,@precondition,@postcondition,@complexity,@throws, and CHANGE/WHY/REF/SOURCE/FORMAT THEOREM functional comment markers
No console.*, process direct calls, or untyped environment access in product code; all such operations must be abstracted through Layer-based services in SHELL
Boundary data from external sources (HTTP, database, environment) must be decoded/valida...
Files:
packages/auth-oauth/tests/claude-oauth-token.test.tspackages/lib/tests/usecases/auth-claude-login-flow.test.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/auth-oauth/tests/claude-local-smoke.test.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/app/tests/docker-git/controller-compose.test.tspackages/lib/src/usecases/auth-claude-login-flow.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/lib/src/usecases/auth-claude-local.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-oauth-token.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/auth-oauth/src/claude-local-smoke.tspackages/lib/src/usecases/auth-claude.ts
**/*.test.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.test.{ts,tsx}: Write property-based tests using fast-check (fc.property) to verify mathematical invariants; unit tests must use Effect test utilities without async/await
Every bug fix must be accompanied by a reproducing test case; the test must fail before the fix and pass after; document the Proof of Fix with root cause and solution
Files:
packages/auth-oauth/tests/claude-oauth-token.test.tspackages/lib/tests/usecases/auth-claude-login-flow.test.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/auth-oauth/tests/claude-local-smoke.test.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/app/tests/docker-git/controller-compose.test.ts
**/{browser*,server*,app*,*.ts,*.js}
📄 CodeRabbit inference engine (README.md)
Web version must listen on 0.0.0.0 by default for accessibility across LAN devices
Files:
packages/auth-oauth/tests/claude-oauth-token.test.tspackages/lib/tests/usecases/auth-claude-login-flow.test.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/auth-oauth/tests/claude-local-smoke.test.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/app/tests/docker-git/controller-compose.test.tspackages/lib/src/usecases/auth-claude-login-flow.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/lib/src/usecases/auth-claude-local.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-oauth-token.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/auth-oauth/src/claude-local-smoke.tspackages/lib/src/usecases/auth-claude.ts
**/{cli*,command*,auto*,*.ts,*.tsx}
📄 CodeRabbit inference engine (README.md)
Implement auto-mode agent selection logic to choose Claude, Codex, Gemini, or Grok randomly from available authorized providers, or allow forced selection with --auto=
Files:
packages/auth-oauth/tests/claude-oauth-token.test.tspackages/lib/tests/usecases/auth-claude-login-flow.test.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/auth-oauth/tests/claude-local-smoke.test.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/app/tests/docker-git/controller-compose.test.tspackages/lib/src/usecases/auth-claude-login-flow.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/lib/src/usecases/auth-claude-local.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-oauth-token.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/auth-oauth/src/claude-local-smoke.tspackages/lib/src/usecases/auth-claude.ts
**/.github/workflows/*.{yml,yaml}
📄 CodeRabbit inference engine (Custom checks)
Fail if changed files introduce unsafe GitHub Actions configuration such as unsafe
pull_request_target, or unnecessary write permissions
Files:
.github/workflows/check.yml
**/{.env*,auth*,config*,setup*}
📄 CodeRabbit inference engine (README.md)
Store authentication tokens in env-file as GIT_AUTH_TOKEN__ / GIT_AUTH_USER__
Files:
packages/lib/tests/usecases/auth-claude-login-flow.test.tsscripts/e2e/auth-claude-login.shpackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/lib/src/usecases/auth-claude-login-flow.tspackages/lib/src/usecases/auth-claude-local.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
**/{package*.json,requirements*.txt,setup.py,setup.cfg,Pipfile,Pipfile.lock,pyproject.toml,pom.xml,build.gradle,Gemfile,Gemfile.lock,go.mod,go.sum,composer.json,Cargo.toml,Cargo.lock}
📄 CodeRabbit inference engine (Custom checks)
Fail if dependency or package-manager changes materially increase supply-chain risk without justification
Files:
packages/auth-oauth/package.json
🧠 Learnings (2)
📚 Learning: 2026-06-10T10:21:51.286Z
Learnt from: konard
Repo: ProverCoderAI/docker-git PR: 386
File: packages/app/tests/docker-git/gridland-react-singleton.test.ts:0-0
Timestamp: 2026-06-10T10:21:51.286Z
Learning: In `packages/app/tests/docker-git` tests that inspect the `packages/terminal` workspace (e.g., for React-related versions), remember that `react-dom` is intentionally declared as a `devDependency` in `packages/terminal` (the terminal exports components but does not render to the DOM itself). Therefore, test assertions should not require `react-dom` to appear in `dependencies`; when resolving versions, accept either `dependencies` or `devDependencies` (as `resolveDepVersion` does in `gridland-react-singleton.test.ts`).
Applied to files:
packages/app/tests/docker-git/controller-compose.test.ts
📚 Learning: 2026-05-22T21:08:18.083Z
Learnt from: skulidropek
Repo: ProverCoderAI/docker-git PR: 344
File: packages/app/src/docker-git/controller-compose.ts:34-40
Timestamp: 2026-05-22T21:08:18.083Z
Learning: In this repo’s docker-git controller compose generation, `${DOCKER_GIT_CONTROLLER_BUILD_SKILLER:-1}` should be treated as standard bash parameter expansion: when `DOCKER_GIT_CONTROLLER_BUILD_SKILLER` is unset, it defaults to the string "1". There is no "-1" mode. The runtime contract enforced by `packages/app/src/docker-git/controller-compose.ts` is: unset / "1" / "true" => output "1"; "0" / "false" => output "0". If review code shows branching/behavior for "-1" or any numeric value other than this 0/1 contract, flag it. Also ensure the Dockerfile ARG `DOCKER_GIT_CONTROLLER_BUILD_SKILLER` stays consistent with default `1`.
Applied to files:
packages/app/src/docker-git/controller-compose.ts
🪛 Shellcheck (0.11.0)
scripts/e2e/auth-claude-login.sh
[info] 67-67: Expressions don't expand in single quotes, use double quotes for that.
(SC2016)
🔇 Additional comments (10)
packages/app/src/docker-git/controller-compose.ts (1)
16-23: LGTM!Also applies to: 250-265, 290-292
scripts/e2e/_lib.sh (1)
28-28: LGTM!.github/workflows/check.yml (1)
260-263: LGTM!packages/auth-oauth/src/claude-oauth-token.ts (1)
5-15: LGTM!Also applies to: 38-46, 116-247
packages/auth-oauth/src/claude-docker-oauth.ts (1)
8-23: LGTM!Also applies to: 92-103, 217-272, 297-359, 361-377, 391-391
packages/auth-oauth/src/claude-local-smoke.ts (1)
14-18: LGTM!Also applies to: 117-169, 268-282
packages/lib/src/usecases/auth-claude-oauth.ts (1)
47-90: LGTM!Also applies to: 105-166
packages/auth-oauth/tests/claude-oauth-token.test.ts (1)
1-70: LGTM!Also applies to: 85-138, 163-201
packages/auth-oauth/tests/claude-docker-oauth.test.ts (1)
19-43: LGTM!Also applies to: 129-172
packages/auth-oauth/tests/claude-local-smoke.test.ts (1)
3-83: LGTM!
|
CI update for 875fbd5: all GitHub Actions checks are passing, including Check/Test/Lint/E2E and Final Build. The only remaining non-passing status is external CodeRabbit: "Prepaid credits exhausted — enable usage-based reviews". This requires maintainer/billing action outside the codebase. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (1.0M + 22.0M cached) input tokens, 106.8K output tokens, $36.933939 cost 🤖 Models used:
📎 Log file uploaded as Gist (11455KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
|
CI update for de50520: all GitHub Actions checks are passing on the latest PR head, including Check/Test/Lint/Types/Build/E2E, Final Build, Checking Dependencies, and Snapshot. The only remaining failing status is external CodeRabbit: "Prepaid credits exhausted — enable usage-based reviews". I addressed the actionable CodeRabbit review comments in commit de50520, but this status requires maintainer/billing action outside the codebase. |
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (14546KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 2)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
CI status after syncing with
|
🔄 Auto-restart-until-mergeable Log (iteration 2)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (17385KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 3)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/lib/src/usecases/auth-claude-oauth.ts (1)
212-215: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy liftНе читайте
process.envнапрямую из usecase.Этот shortcut делает env-token глобальным runtime-входом для
auth claude login. Вынесите чтениеDOCKER_GIT_CLAUDE_OAUTH_TOKENв shell/Layer boundary и передавайте уже декодированное значение в flow; так тестовая compose-инъекция останется управляемой зависимостью, а не скрытым process-side effect.As per coding guidelines, “No console.*, process direct calls, or untyped environment access in product code; all such operations must be abstracted through Layer-based services in SHELL”.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/lib/src/usecases/auth-claude-oauth.ts` around lines 212 - 215, The shortcut in authClaudeOAuth usecase reads process.env directly, which violates the shell-boundary rule and makes the token a hidden runtime side effect. Move the DOCKER_GIT_CLAUDE_OAUTH_TOKEN lookup out of the usecase into the shell/Layer boundary, then inject the already-decoded token into the flow and update readClaudeOauthTokenFromEnv/authClaudeOAuth to consume the provided value instead of accessing process.env.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/app/src/docker-git/controller-compose-files.ts`:
- Around line 91-106: The GPU overlay validation in requireGpuOverlayPath only
checks fs.exists, so a directory named docker-compose.gpu.yml can still pass
bootstrap; update it to mirror the DOCKER_GIT_CONTROLLER_COMPOSE_EXTRA_FILE path
by verifying the path with stat and requiring File before returning it,
otherwise fail with the same bootstrap error flow. For formal verification, make
the precondition explicit that the overlay path must be an existing regular
file, the invariant that only File paths are accepted, and the postcondition
that the function returns either a valid file path or ControllerBootstrapError;
add a regression test covering the directory-as-overlay case.
---
Outside diff comments:
In `@packages/lib/src/usecases/auth-claude-oauth.ts`:
- Around line 212-215: The shortcut in authClaudeOAuth usecase reads process.env
directly, which violates the shell-boundary rule and makes the token a hidden
runtime side effect. Move the DOCKER_GIT_CLAUDE_OAUTH_TOKEN lookup out of the
usecase into the shell/Layer boundary, then inject the already-decoded token
into the flow and update readClaudeOauthTokenFromEnv/authClaudeOAuth to consume
the provided value instead of accessing process.env.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 82b8b682-5f97-43dd-a257-267cfcaf579f
📒 Files selected for processing (12)
packages/app/src/docker-git/controller-compose-files.tspackages/app/src/docker-git/controller-compose.tspackages/app/tests/docker-git/controller-compose-fixture.tspackages/app/tests/docker-git/controller-compose.test.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/auth-oauth/src/claude-local-smoke.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/lib/tests/usecases/auth-claude-login.test.tsscripts/e2e/auth-claude-login.sh
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
- GitHub Check: E2E (OpenCode)
- GitHub Check: E2E (Clone cache)
- GitHub Check: E2E (Clone auto-open SSH)
- GitHub Check: E2E (Login context)
- GitHub Check: Final build (windows-latest)
🧰 Additional context used
📓 Path-based instructions (13)
**/*.{sh,bash,py,js,ts,jsx,tsx,go,java,rb,php}
📄 CodeRabbit inference engine (Custom checks)
Fail if changed files introduce command injection or unsafe shell/process execution with user-controlled input
Files:
packages/app/src/docker-git/controller-compose-files.tsscripts/e2e/auth-claude-login.shpackages/lib/tests/usecases/auth-claude-local.test.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/app/tests/docker-git/controller-compose-fixture.tspackages/lib/src/usecases/auth-claude.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-local-smoke.tspackages/app/tests/docker-git/controller-compose.test.ts
**/*.{py,js,ts,jsx,tsx,go,java,rb,php,sh,bash,c,cpp}
📄 CodeRabbit inference engine (Custom checks)
Fail if changed files introduce path traversal or writes outside intended project/container state directories
Files:
packages/app/src/docker-git/controller-compose-files.tsscripts/e2e/auth-claude-login.shpackages/lib/tests/usecases/auth-claude-local.test.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/app/tests/docker-git/controller-compose-fixture.tspackages/lib/src/usecases/auth-claude.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-local-smoke.tspackages/app/tests/docker-git/controller-compose.test.ts
**/*.{js,ts,jsx,tsx,py,java,go,rb,php,sh,bash,yml,yaml,json,env*,toml,cfg,config,dockerfile,dockerignore}
📄 CodeRabbit inference engine (Custom checks)
Fail if changed files expose credentials, tokens, private-keys, or PII in source, generated config, logs, or CI output
Files:
packages/app/src/docker-git/controller-compose-files.tsscripts/e2e/auth-claude-login.shpackages/lib/tests/usecases/auth-claude-local.test.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/app/tests/docker-git/controller-compose-fixture.tspackages/lib/src/usecases/auth-claude.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-local-smoke.tspackages/app/tests/docker-git/controller-compose.test.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: FUNCTIONAL CORE: Write only pure functions with immutable data and mathematical operations in core modules; no side effects, mutations, or external service calls
IMPERATIVE SHELL: Isolate all side effects (IO, network, database, environment/process) in a thin SHELL layer; CORE never calls SHELL, only SHELL → CORE
Never useanytype annotation in TypeScript; useunknownonly at SHELL boundaries for decoding, never exportunknownoutside boundary modules
Never useastype assertions in normal code; only permitasin a single 'axiomatic' module (brands, constructors, constants) after which types flow safely without casts
Always use exhaustive pattern matching for union types through.exhaustive()orMatch.exhaustive()from effect-ts; never use switch statements or unhandled type branches
Use Effect<Success, Error, Requirements> monad from effect-ts for all effects; compose through pipe() and Effect.flatMap(); never use async/await, raw Promise chains (then/catch), or Promise.all in product code
Interoperate with Promise/exceptions only in SHELL through Effect.try/Effect.tryPromise with typed error mapping; never leave raw exceptions or untyped errors in the domain
Use Effect.acquireRelease + Effect.scoped for resource management with guaranteed finalization; never manage resources with try/finally or manual cleanup
All external services (database, HTTP, environment) must be accessed through Effect-based interfaces and Layer-based dependency injection; never call external APIs directly
Provide comprehensive TSDoc comments with mathematical notation:@pure,@effect,@invariant,@precondition,@postcondition,@complexity,@throws, and CHANGE/WHY/REF/SOURCE/FORMAT THEOREM functional comment markers
No console.*, process direct calls, or untyped environment access in product code; all such operations must be abstracted through Layer-based services in SHELL
Boundary data from external sources (HTTP, database, environment) must be decoded/valida...
Files:
packages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/app/tests/docker-git/controller-compose-fixture.tspackages/lib/src/usecases/auth-claude.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-local-smoke.tspackages/app/tests/docker-git/controller-compose.test.ts
**/{browser*,server*,app*,*.ts,*.js}
📄 CodeRabbit inference engine (README.md)
Web version must listen on 0.0.0.0 by default for accessibility across LAN devices
Files:
packages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/app/tests/docker-git/controller-compose-fixture.tspackages/lib/src/usecases/auth-claude.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-local-smoke.tspackages/app/tests/docker-git/controller-compose.test.ts
**/{cli*,command*,auto*,*.ts,*.tsx}
📄 CodeRabbit inference engine (README.md)
Implement auto-mode agent selection logic to choose Claude, Codex, Gemini, or Grok randomly from available authorized providers, or allow forced selection with --auto=
Files:
packages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-local.test.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/app/tests/docker-git/controller-compose-fixture.tspackages/lib/src/usecases/auth-claude.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-local-smoke.tspackages/app/tests/docker-git/controller-compose.test.ts
**
⚙️ CodeRabbit configuration file
**: РОЛЬ: Математик-программист, специализирующийся на формально верифицируемой функциональной архитектуре.ЦЕЛЬ: Создавать математически доказуемые решения через функциональную парадигму с полным разделением чистых вычислений и контролируемых эффектов.
МОДЕЛЬ РАССУЖДЕНИЯ:
- Не выдавать “личные мнения”. Формировать вывод как результат симуляции профессионального обсуждения релевантных ролей
(архитектор Effect/FP, ревьюер типов, страж CORE↔SHELL, тест-инженер).- Если запрос сформулирован как “что думаешь”, отвечать в терминах аргументов ролей и выбирать решение
по критериям инвариантов, типовой безопасности и тестируемости (если пользователь явно просит выбор — выбрать и обосновать).ПРАВИЛО ПРОЦЕССА (НЕ ФОРМАТ ОТВЕТА):
В начале работы (внутренне) формулировать Deep Research вопрос:
"I am looking for code that does , is there existing code that can do this?"
Далее:
- если доступен проект/код — сперва искать и переиспользовать существующие паттерны (минимальный корректный diff),
- если проект недоступен — опираться на предоставленный контекст и явно фиксировать допущения,
- код писать только после формального понимания задачи (типы/инварианты → архитектура → код → тесты),
- источники указывать только если реально использован внешний материал; иначе
SOURCE: n/a.ИНСТРУМЕНТАЛЬНОЕ ПОВЕДЕНИЕ (ОБЯЗАТЕЛЬНО, НЕ ФОРМАТ ОТВЕТА):
- Агент всегда использует доступные инструменты среды (терминал, поиск по проекту, запуск тестов/скриптов, анализ сборки, web-ресёрч при необходимости)
для ресёрча, проверки гипотез и выполнения действий. Приоритет: проверяемость, воспроизводимость, минимальный риск.- Агент не предлагает “гайд” как замену действия. Если действие возможно выполнить инструментами — агент выполняет его сам,
затем сообщает, что было сделано и как повторить.- Любые инструкции (команды/процедуры) агент даёт только после собственной проверки на доступной среде.
Если проверить невозможно — явно фиксирует ограничение и перечисляе...
Files:
packages/app/src/docker-git/controller-compose-files.tsscripts/e2e/auth-claude-login.shpackages/lib/tests/usecases/auth-claude-local.test.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/app/tests/docker-git/controller-compose-fixture.tspackages/lib/src/usecases/auth-claude.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-local-smoke.tspackages/app/tests/docker-git/controller-compose.test.ts
**/*
⚙️ CodeRabbit configuration file
**/*: Ты строгий ревьюер SPEC DRIVEN DEVELOPMENT.Перед выводами изучи README.md, другие *.md файлы, linked issues,
PR description, PR comments/discussion и релевантную кодовую базу.Сверь изменения с исходным ТЗ/спекой и обсуждением. Флагай любой уход
от спеки, недокументированное изменение поведения, отсутствие тестов
для заявленного поведения и security-риск. Если спека не видна,
попроси автора добавить ее в issue или PR description.Проверь решение с точки зрения формальной верификации: какие инварианты,
предусловия и постусловия можно доказать математически, а где доказуемость
слабая. Оцени решение с точки зрения теории игр: устойчивы ли стимулы,
нет ли выгодного обхода правил, и какое решение было бы сильнее.
Files:
packages/app/src/docker-git/controller-compose-files.tsscripts/e2e/auth-claude-login.shpackages/lib/tests/usecases/auth-claude-local.test.tspackages/auth-oauth/src/claude-docker-oauth.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/app/tests/docker-git/controller-compose-fixture.tspackages/lib/src/usecases/auth-claude.tspackages/app/src/docker-git/controller-compose.tspackages/auth-oauth/src/claude-local-smoke.tspackages/app/tests/docker-git/controller-compose.test.ts
**/{setup,install,config,*.sh,*.md}
📄 CodeRabbit inference engine (README.md)
Ensure default projects directory is ~/.docker-git
Files:
scripts/e2e/auth-claude-login.sh
**/{.env*,auth*,config*,setup*}
📄 CodeRabbit inference engine (README.md)
Store authentication tokens in env-file as GIT_AUTH_TOKEN__ / GIT_AUTH_USER__
Files:
scripts/e2e/auth-claude-login.shpackages/lib/tests/usecases/auth-claude-local.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
**/{.git*,config*,*.sh,docker-compose*}
📄 CodeRabbit inference engine (README.md)
Use git credential helper to automatically select correct token by host for HTTPS clone/push operations
Files:
scripts/e2e/auth-claude-login.sh
**/{browser*,server*,.env*,*.sh}
📄 CodeRabbit inference engine (README.md)
Allow DOCKER_GIT_WEB_HOST environment variable to restrict web access to 127.0.0.1
Files:
scripts/e2e/auth-claude-login.sh
**/*.test.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.test.{ts,tsx}: Write property-based tests using fast-check (fc.property) to verify mathematical invariants; unit tests must use Effect test utilities without async/await
Every bug fix must be accompanied by a reproducing test case; the test must fail before the fix and pass after; document the Proof of Fix with root cause and solution
Files:
packages/lib/tests/usecases/auth-claude-local.test.tspackages/auth-oauth/tests/claude-docker-oauth.test.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/app/tests/docker-git/controller-compose.test.ts
🧠 Learnings (2)
📚 Learning: 2026-05-22T21:08:18.083Z
Learnt from: skulidropek
Repo: ProverCoderAI/docker-git PR: 344
File: packages/app/src/docker-git/controller-compose.ts:34-40
Timestamp: 2026-05-22T21:08:18.083Z
Learning: In this repo’s docker-git controller compose generation, `${DOCKER_GIT_CONTROLLER_BUILD_SKILLER:-1}` should be treated as standard bash parameter expansion: when `DOCKER_GIT_CONTROLLER_BUILD_SKILLER` is unset, it defaults to the string "1". There is no "-1" mode. The runtime contract enforced by `packages/app/src/docker-git/controller-compose.ts` is: unset / "1" / "true" => output "1"; "0" / "false" => output "0". If review code shows branching/behavior for "-1" or any numeric value other than this 0/1 contract, flag it. Also ensure the Dockerfile ARG `DOCKER_GIT_CONTROLLER_BUILD_SKILLER` stays consistent with default `1`.
Applied to files:
packages/app/src/docker-git/controller-compose-files.tspackages/app/src/docker-git/controller-compose.ts
📚 Learning: 2026-06-10T10:21:51.286Z
Learnt from: konard
Repo: ProverCoderAI/docker-git PR: 386
File: packages/app/tests/docker-git/gridland-react-singleton.test.ts:0-0
Timestamp: 2026-06-10T10:21:51.286Z
Learning: In `packages/app/tests/docker-git` tests that inspect the `packages/terminal` workspace (e.g., for React-related versions), remember that `react-dom` is intentionally declared as a `devDependency` in `packages/terminal` (the terminal exports components but does not render to the DOM itself). Therefore, test assertions should not require `react-dom` to appear in `dependencies`; when resolving versions, accept either `dependencies` or `devDependencies` (as `resolveDepVersion` does in `gridland-react-singleton.test.ts`).
Applied to files:
packages/app/tests/docker-git/controller-compose.test.ts
🔇 Additional comments (8)
scripts/e2e/auth-claude-login.sh (1)
16-16: LGTM!Also applies to: 25-29, 78-80
packages/auth-oauth/src/claude-docker-oauth.ts (1)
1-1: LGTM!Also applies to: 288-303
packages/lib/src/usecases/auth-claude-oauth.ts (1)
180-186: LGTM!packages/lib/src/usecases/auth-claude.ts (1)
53-82: LGTM!Also applies to: 288-288
packages/lib/tests/usecases/auth-claude-local.test.ts (1)
19-20: LGTM!packages/lib/tests/usecases/auth-claude-login.test.ts (1)
6-8: LGTM!Also applies to: 17-17, 133-159, 197-199, 209-213, 215-261
packages/auth-oauth/tests/claude-docker-oauth.test.ts (1)
1-1: LGTM!Also applies to: 44-48, 50-53, 103-107, 129-129
packages/auth-oauth/src/claude-local-smoke.ts (1)
94-98: 🔒 Security & PrivacyКомментарий неактуален:
accountPathсоздаётся черезmkdtemp(...)в уникальном временном каталоге, поэтомуwriteFile(tokenPath, ...)не перезаписывает чужой путь и здесь не нужен дополнительный temp-file rename.> Likely an incorrect or invalid review comment.
|
Status update for head
Proof of fix and local verification details are included in the PR description. |
🔄 Auto-restart-until-mergeable Log (iteration 3)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (22679KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 4)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Reject directory-valued docker-compose.gpu.yml before constructing docker compose arguments. Proof of fix: tests/docker-git/controller-compose.test.ts failed before the stat check and now passes with the new directory-as-overlay regression.
Retry transient Bun dependency installation failures in CI setup before failing the job. Proof of fix: CI job 84095018943 failed while downloading @effect/platform during bun install; local shell syntax and bun install --frozen-lockfile both pass after adding bounded retries.
|
GitHub Actions are green on head |
🔄 Auto-restart-until-mergeable Log (iteration 4)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Repository (26654KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 5)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
packages/lib/tests/usecases/auth-claude-login.test.ts (1)
195-229: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winЗафиксируйте инвариант probe-поведения через
fc.property.Сейчас фикс подтверждён несколькими примерами, но инвариант PR — что после захвата токена login не откатывается из-за
probe— остаётся непроверенным на произвольных non-empty token / exit code. Для*.test.tsздесь нужен property-based тест, иначе Proof of Fix остаётся частичным.As per coding guidelines, "
**/*.test.{ts,tsx}: Write property-based tests using fast-check (fc.property) ... Every bug fix must be accompanied by a reproducing test case ... document the Proof of Fix ...". As per path instructions, "Флагай ... отсутствие тестов для заявленного поведения".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/lib/tests/usecases/auth-claude-login.test.ts` around lines 195 - 229, The current `authClaudeLogin` coverage only proves the probe/token behavior with a couple of fixed examples; add a fast-check property test in this `*.test.ts` suite to lock in the invariant that a successfully created OAuth token is still persisted regardless of the post-login probe exit code. Reuse the existing `runLoginAndReadToken`, `withTempDir`, and `withPatchedEnv` setup, and express the assertion with `fc.property` over non-empty token input and arbitrary non-zero/zero probe exits so the proof of fix is exercised generically, not just by the two example cases.Sources: Coding guidelines, Path instructions
packages/app/src/docker-git/controller-compose-files.ts (2)
33-39: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winВынесите чтение env за typed SHELL boundary.
Line 39 читает
process.envнапрямую. Из-за этогоloadControllerComposeExtraPath()зависит от неявного глобального состояния процесса, хотя остальная функция уже оформлена как Effect-сервисная граница. Сюда лучше передавать уже декодированное значение env или получать его через отдельный Layer/decoder.As per coding guidelines, "No console.*, process direct calls, or untyped environment access in product code; all such operations must be abstracted through Layer-based services in SHELL" and "Boundary data from external sources (HTTP, database, environment) must be decoded/validated through
@effect/schemaor typed decoders before entering the domain".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/app/src/docker-git/controller-compose-files.ts` around lines 33 - 39, `loadControllerComposeExtraPath` is reading `process.env` directly, which violates the typed SHELL boundary and couples the effect to global process state. Refactor this function to accept the already-decoded env value through a Layer/service or decoder-based input, and keep `controllerComposeExtraFileEnvKey` handling outside the domain-facing logic. Ensure the boundary source is validated/decoded before reaching `loadControllerComposeExtraPath`, and remove any direct `process.env` access from this product code path.Source: Coding guidelines
20-21: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winОбщий mapper ошибок подменяет реальный путь сбоя.
mapComposePathError()всегда пишет проdocker-compose.yml, хотя Lines 47-58 и 108-117 используют его и для extra/GPU overlay. ПриEACCES/I/O ошибке bootstrap укажет не на тот файл, и диагностика уйдёт в ложный след.🔧 Предлагаемый фикс
-const mapComposePathError = (error: PlatformError): ControllerBootstrapError => - controllerBootstrapError(`Failed to resolve docker-compose.yml path.\nDetails: ${String(error)}`) +const mapComposePathError = ( + targetPath: string, + error: PlatformError +): ControllerBootstrapError => + controllerBootstrapError(`Failed to resolve ${targetPath}.\nDetails: ${String(error)}`)-const isExists = yield* _(fs.exists(extraOverlayPath).pipe(Effect.mapError(mapComposePathError))) +const isExists = yield* _( + fs.exists(extraOverlayPath).pipe( + Effect.mapError((error) => mapComposePathError(extraOverlayPath, error)) + ) +)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/app/src/docker-git/controller-compose-files.ts` around lines 20 - 21, The shared mapper in mapComposePathError() hardcodes docker-compose.yml, which mislabels failures coming from extra and GPU overlay compose files. Update the error construction so the resolved path is passed into mapComposePathError() from the call sites in controllerComposeFiles logic, and include that specific path in the controllerBootstrapError message instead of a fixed filename. Make sure the callers around the extra/GPU overlay handling use the same mapper but supply the correct file identifier for each failure.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/actions/setup/action.yml:
- Around line 60-70: The retry loop around bun install in the setup action only
handles immediate failures and can hang indefinitely on a stuck install. Update
the run block in the action workflow to wrap the bun install call with a local
timeout inside the existing retry loop, so each attempt is bounded and can fail
fast before retrying. Keep the change localized to the setup step that invokes
bun install, preserving the current retry and backoff behavior while ensuring a
hung install cannot block e2e-auth-claude-login.
In `@packages/lib/src/usecases/auth-claude.ts`:
- Around line 286-289: The authClaudeLogin flow is now accepting a global
DOCKER_GIT_CLAUDE_OAUTH_TOKEN override in the main login use case, which should
remain test-only. Remove the envToken wiring from
runClaudeOauthLoginWithPrompt/authClaudeLogin and keep token injection confined
to the compose overlay or test shell path so the normal OAuth flow cannot be
bypassed by process environment.
---
Outside diff comments:
In `@packages/app/src/docker-git/controller-compose-files.ts`:
- Around line 33-39: `loadControllerComposeExtraPath` is reading `process.env`
directly, which violates the typed SHELL boundary and couples the effect to
global process state. Refactor this function to accept the already-decoded env
value through a Layer/service or decoder-based input, and keep
`controllerComposeExtraFileEnvKey` handling outside the domain-facing logic.
Ensure the boundary source is validated/decoded before reaching
`loadControllerComposeExtraPath`, and remove any direct `process.env` access
from this product code path.
- Around line 20-21: The shared mapper in mapComposePathError() hardcodes
docker-compose.yml, which mislabels failures coming from extra and GPU overlay
compose files. Update the error construction so the resolved path is passed into
mapComposePathError() from the call sites in controllerComposeFiles logic, and
include that specific path in the controllerBootstrapError message instead of a
fixed filename. Make sure the callers around the extra/GPU overlay handling use
the same mapper but supply the correct file identifier for each failure.
In `@packages/lib/tests/usecases/auth-claude-login.test.ts`:
- Around line 195-229: The current `authClaudeLogin` coverage only proves the
probe/token behavior with a couple of fixed examples; add a fast-check property
test in this `*.test.ts` suite to lock in the invariant that a successfully
created OAuth token is still persisted regardless of the post-login probe exit
code. Reuse the existing `runLoginAndReadToken`, `withTempDir`, and
`withPatchedEnv` setup, and express the assertion with `fc.property` over
non-empty token input and arbitrary non-zero/zero probe exits so the proof of
fix is exercised generically, not just by the two example cases.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2e0a905f-b644-4c17-ad85-23d3e54d0a5c
📒 Files selected for processing (10)
.changeset/fix-claude-auth-login-probe.md.github/actions/setup/action.ymlpackages/app/src/docker-git/controller-compose-files.tspackages/app/tests/docker-git/controller-compose.test.tspackages/container/src/core/templates/dockerfile-prelude.tspackages/container/tests/core/templates.test.tspackages/lib/src/shell/claude-oauth-env.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.tspackages/lib/tests/usecases/auth-claude-login.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (10)
- GitHub Check: E2E (Claude auth login)
- GitHub Check: E2E (Runtime volumes + SSH)
- GitHub Check: Final build (windows-latest)
- GitHub Check: E2E (Clone auto-open SSH)
- GitHub Check: E2E (OpenCode)
- GitHub Check: E2E (Login context)
- GitHub Check: E2E (Browser command)
- GitHub Check: E2E (Clone cache)
- GitHub Check: Lint
- GitHub Check: Test
🧰 Additional context used
📓 Path-based instructions (10)
**/*.{sh,bash,py,js,ts,jsx,tsx,go,java,rb,php}
📄 CodeRabbit inference engine (Custom checks)
Fail if changed files introduce command injection or unsafe shell/process execution with user-controlled input
Files:
packages/lib/src/shell/claude-oauth-env.tspackages/container/tests/core/templates.test.tspackages/container/src/core/templates/dockerfile-prelude.tspackages/app/tests/docker-git/controller-compose.test.tspackages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
**/*.{py,js,ts,jsx,tsx,go,java,rb,php,sh,bash,c,cpp}
📄 CodeRabbit inference engine (Custom checks)
Fail if changed files introduce path traversal or writes outside intended project/container state directories
Files:
packages/lib/src/shell/claude-oauth-env.tspackages/container/tests/core/templates.test.tspackages/container/src/core/templates/dockerfile-prelude.tspackages/app/tests/docker-git/controller-compose.test.tspackages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
**/*.{js,ts,jsx,tsx,py,java,go,rb,php,sh,bash,yml,yaml,json,env*,toml,cfg,config,dockerfile,dockerignore}
📄 CodeRabbit inference engine (Custom checks)
Fail if changed files expose credentials, tokens, private-keys, or PII in source, generated config, logs, or CI output
Files:
packages/lib/src/shell/claude-oauth-env.tspackages/container/tests/core/templates.test.tspackages/container/src/core/templates/dockerfile-prelude.tspackages/app/tests/docker-git/controller-compose.test.tspackages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: FUNCTIONAL CORE: Write only pure functions with immutable data and mathematical operations in core modules; no side effects, mutations, or external service calls
IMPERATIVE SHELL: Isolate all side effects (IO, network, database, environment/process) in a thin SHELL layer; CORE never calls SHELL, only SHELL → CORE
Never useanytype annotation in TypeScript; useunknownonly at SHELL boundaries for decoding, never exportunknownoutside boundary modules
Never useastype assertions in normal code; only permitasin a single 'axiomatic' module (brands, constructors, constants) after which types flow safely without casts
Always use exhaustive pattern matching for union types through.exhaustive()orMatch.exhaustive()from effect-ts; never use switch statements or unhandled type branches
Use Effect<Success, Error, Requirements> monad from effect-ts for all effects; compose through pipe() and Effect.flatMap(); never use async/await, raw Promise chains (then/catch), or Promise.all in product code
Interoperate with Promise/exceptions only in SHELL through Effect.try/Effect.tryPromise with typed error mapping; never leave raw exceptions or untyped errors in the domain
Use Effect.acquireRelease + Effect.scoped for resource management with guaranteed finalization; never manage resources with try/finally or manual cleanup
All external services (database, HTTP, environment) must be accessed through Effect-based interfaces and Layer-based dependency injection; never call external APIs directly
Provide comprehensive TSDoc comments with mathematical notation:@pure,@effect,@invariant,@precondition,@postcondition,@complexity,@throws, and CHANGE/WHY/REF/SOURCE/FORMAT THEOREM functional comment markers
No console.*, process direct calls, or untyped environment access in product code; all such operations must be abstracted through Layer-based services in SHELL
Boundary data from external sources (HTTP, database, environment) must be decoded/valida...
Files:
packages/lib/src/shell/claude-oauth-env.tspackages/container/tests/core/templates.test.tspackages/container/src/core/templates/dockerfile-prelude.tspackages/app/tests/docker-git/controller-compose.test.tspackages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
**/{browser*,server*,app*,*.ts,*.js}
📄 CodeRabbit inference engine (README.md)
Web version must listen on 0.0.0.0 by default for accessibility across LAN devices
Files:
packages/lib/src/shell/claude-oauth-env.tspackages/container/tests/core/templates.test.tspackages/container/src/core/templates/dockerfile-prelude.tspackages/app/tests/docker-git/controller-compose.test.tspackages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
**/{cli*,command*,auto*,*.ts,*.tsx}
📄 CodeRabbit inference engine (README.md)
Implement auto-mode agent selection logic to choose Claude, Codex, Gemini, or Grok randomly from available authorized providers, or allow forced selection with --auto=
Files:
packages/lib/src/shell/claude-oauth-env.tspackages/container/tests/core/templates.test.tspackages/container/src/core/templates/dockerfile-prelude.tspackages/app/tests/docker-git/controller-compose.test.tspackages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
**
⚙️ CodeRabbit configuration file
**: РОЛЬ: Математик-программист, специализирующийся на формально верифицируемой функциональной архитектуре.ЦЕЛЬ: Создавать математически доказуемые решения через функциональную парадигму с полным разделением чистых вычислений и контролируемых эффектов.
МОДЕЛЬ РАССУЖДЕНИЯ:
- Не выдавать “личные мнения”. Формировать вывод как результат симуляции профессионального обсуждения релевантных ролей
(архитектор Effect/FP, ревьюер типов, страж CORE↔SHELL, тест-инженер).- Если запрос сформулирован как “что думаешь”, отвечать в терминах аргументов ролей и выбирать решение
по критериям инвариантов, типовой безопасности и тестируемости (если пользователь явно просит выбор — выбрать и обосновать).ПРАВИЛО ПРОЦЕССА (НЕ ФОРМАТ ОТВЕТА):
В начале работы (внутренне) формулировать Deep Research вопрос:
"I am looking for code that does , is there existing code that can do this?"
Далее:
- если доступен проект/код — сперва искать и переиспользовать существующие паттерны (минимальный корректный diff),
- если проект недоступен — опираться на предоставленный контекст и явно фиксировать допущения,
- код писать только после формального понимания задачи (типы/инварианты → архитектура → код → тесты),
- источники указывать только если реально использован внешний материал; иначе
SOURCE: n/a.ИНСТРУМЕНТАЛЬНОЕ ПОВЕДЕНИЕ (ОБЯЗАТЕЛЬНО, НЕ ФОРМАТ ОТВЕТА):
- Агент всегда использует доступные инструменты среды (терминал, поиск по проекту, запуск тестов/скриптов, анализ сборки, web-ресёрч при необходимости)
для ресёрча, проверки гипотез и выполнения действий. Приоритет: проверяемость, воспроизводимость, минимальный риск.- Агент не предлагает “гайд” как замену действия. Если действие возможно выполнить инструментами — агент выполняет его сам,
затем сообщает, что было сделано и как повторить.- Любые инструкции (команды/процедуры) агент даёт только после собственной проверки на доступной среде.
Если проверить невозможно — явно фиксирует ограничение и перечисляе...
Files:
packages/lib/src/shell/claude-oauth-env.tspackages/container/tests/core/templates.test.tspackages/container/src/core/templates/dockerfile-prelude.tspackages/app/tests/docker-git/controller-compose.test.tspackages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
**/*
⚙️ CodeRabbit configuration file
**/*: Ты строгий ревьюер SPEC DRIVEN DEVELOPMENT.Перед выводами изучи README.md, другие *.md файлы, linked issues,
PR description, PR comments/discussion и релевантную кодовую базу.Сверь изменения с исходным ТЗ/спекой и обсуждением. Флагай любой уход
от спеки, недокументированное изменение поведения, отсутствие тестов
для заявленного поведения и security-риск. Если спека не видна,
попроси автора добавить ее в issue или PR description.Проверь решение с точки зрения формальной верификации: какие инварианты,
предусловия и постусловия можно доказать математически, а где доказуемость
слабая. Оцени решение с точки зрения теории игр: устойчивы ли стимулы,
нет ли выгодного обхода правил, и какое решение было бы сильнее.
Files:
packages/lib/src/shell/claude-oauth-env.tspackages/container/tests/core/templates.test.tspackages/container/src/core/templates/dockerfile-prelude.tspackages/app/tests/docker-git/controller-compose.test.tspackages/app/src/docker-git/controller-compose-files.tspackages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
**/*.test.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.test.{ts,tsx}: Write property-based tests using fast-check (fc.property) to verify mathematical invariants; unit tests must use Effect test utilities without async/await
Every bug fix must be accompanied by a reproducing test case; the test must fail before the fix and pass after; document the Proof of Fix with root cause and solution
Files:
packages/container/tests/core/templates.test.tspackages/app/tests/docker-git/controller-compose.test.tspackages/lib/tests/usecases/auth-claude-login.test.ts
**/{.env*,auth*,config*,setup*}
📄 CodeRabbit inference engine (README.md)
Store authentication tokens in env-file as GIT_AUTH_TOKEN__ / GIT_AUTH_USER__
Files:
packages/lib/tests/usecases/auth-claude-login.test.tspackages/lib/src/usecases/auth-claude-oauth.tspackages/lib/src/usecases/auth-claude.ts
🧠 Learnings (2)
📚 Learning: 2026-06-10T10:21:51.286Z
Learnt from: konard
Repo: ProverCoderAI/docker-git PR: 386
File: packages/app/tests/docker-git/gridland-react-singleton.test.ts:0-0
Timestamp: 2026-06-10T10:21:51.286Z
Learning: In `packages/app/tests/docker-git` tests that inspect the `packages/terminal` workspace (e.g., for React-related versions), remember that `react-dom` is intentionally declared as a `devDependency` in `packages/terminal` (the terminal exports components but does not render to the DOM itself). Therefore, test assertions should not require `react-dom` to appear in `dependencies`; when resolving versions, accept either `dependencies` or `devDependencies` (as `resolveDepVersion` does in `gridland-react-singleton.test.ts`).
Applied to files:
packages/app/tests/docker-git/controller-compose.test.ts
📚 Learning: 2026-05-22T21:08:18.083Z
Learnt from: skulidropek
Repo: ProverCoderAI/docker-git PR: 344
File: packages/app/src/docker-git/controller-compose.ts:34-40
Timestamp: 2026-05-22T21:08:18.083Z
Learning: In this repo’s docker-git controller compose generation, `${DOCKER_GIT_CONTROLLER_BUILD_SKILLER:-1}` should be treated as standard bash parameter expansion: when `DOCKER_GIT_CONTROLLER_BUILD_SKILLER` is unset, it defaults to the string "1". There is no "-1" mode. The runtime contract enforced by `packages/app/src/docker-git/controller-compose.ts` is: unset / "1" / "true" => output "1"; "0" / "false" => output "0". If review code shows branching/behavior for "-1" or any numeric value other than this 0/1 contract, flag it. Also ensure the Dockerfile ARG `DOCKER_GIT_CONTROLLER_BUILD_SKILLER` stays consistent with default `1`.
Applied to files:
packages/app/src/docker-git/controller-compose-files.ts
🔇 Additional comments (5)
.changeset/fix-claude-auth-login-probe.md (1)
5-19: LGTM!packages/container/tests/core/templates.test.ts (1)
211-211: LGTM!packages/container/src/core/templates/dockerfile-prelude.ts (1)
87-87: 🩺 Stability & Availability
commit/main.patchкорректно резолвится дляmain, блокера здесь нет.> Likely an incorrect or invalid review comment.packages/lib/src/usecases/auth-claude.ts (1)
64-85: LGTM!packages/app/tests/docker-git/controller-compose.test.ts (1)
82-160: LGTM!
|
Fresh GitHub Actions on head |
🔄 Auto-restart-until-mergeable Log (iteration 5)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Repository (33336KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
|

Summary
packages/auth-oauthso token parsing, redaction, Docker OAuth, and local smoke behavior are testable independently.packages/libClaude login token persistence path: write the secret to a0600temporary file inside the account directory, atomically rename it to.oauth-token, and clean up the temp directory.28381937969: reduce nested Effect calls in token cleanup forLint, and replace Dockerfile cache-bustingADD https://api.github.com/...with publicgithub.com/.../commit/main.patchto avoid unauthenticated GitHub API 403s during E2E Docker builds.Proof of fix
claude setup-tokencould capture and persist a valid OAuth token, butauthClaudeLoginstill failed the whole login when the live post-login probe exited non-zero. The remaining CodeRabbit-relevant gap was thatpackages/libstill wrote token content directly to the final.oauth-tokenpath, so an existing symlink/final target could receive secret bytes instead of being atomically replaced.unicorn/max-nested-callson the cleanup expression inauth-claude.ts, and Docker build failureinvalid response status 403while fetchingapi.github.com/repos/ProverCoderAI/plan-to-git/commits/mainfrom generated project Dockerfiles.packages/libnow persists.oauth-tokenthrough a private temp file plus atomic rename; cleanup is a named Effect value; generated project Dockerfiles use the public commit patch URL for cache invalidation instead of the GitHub API.replaces an existing token symlink without writing the secret to the symlink targetfails on the old implementation withfinalTokenWrites === 1; after the fix it passes and proves the symlink target remains unchanged while the final token path becomes a regular0600file. Fresh GitHub Actions on88da06294ba2fbf9b5fcbfe28136b01e32d3bfbbpass forCheck,Final Build,Snapshot, andChecking Dependencies.Mathematical guarantees
env(extra)=p -> regular_file(resolve(p))beforedocker compose -f resolve(p)is constructed.captured(token) -> exists(account/.oauth-token) && mode(account/.oauth-token)=0600before probe interpretation.captured(token) && docker_probe_failed(exit) -> login_success && warning(exit).persist(token, finalPath) -> write(secret, tempPath0600) && rename(tempPath0600, finalPath) && not write(secret, finalPath).plan_to_git_branch_moves(main) -> docker_ADD(commit_patch(main)) changes without api.github.com quota dependency.e2e_log(LOG_FILE) -> not contains(LOG_FILE, DOCKER_GIT_CLAUDE_OAUTH_TOKEN_MARKER).Verification
Local:
git diff --checkbash -n scripts/e2e/auth-claude-login.shbun run --cwd packages/container test -- tests/core/templates.test.ts(54 tests)bun run --cwd packages/container typecheckbun run --cwd packages/container lint:effectbun run --cwd packages/lib test -- tests/usecases/auth-claude-login.test.ts(regression failed before the persistence fix, then passed)bun run --cwd packages/lib typecheckbun run --cwd packages/lib lint:effectbun run --cwd packages/auth-oauth test -- tests/claude-docker-oauth.test.ts tests/claude-local-smoke.test.tsbun run --cwd packages/lib test -- tests/usecases/auth-claude-login.test.ts tests/usecases/auth-claude-local.test.tsbun run --cwd packages/lib test(239 tests)bun run typecheckbun run buildCI on head
88da06294ba2fbf9b5fcbfe28136b01e32d3bfbb:Checkrun28382891173: success, includingLintandE2E (Runtime volumes + SSH).Final Buildrun28382891213: success on macOS, Ubuntu, and Windows.Snapshotrun28382891133: success.Checking Dependenciesrun28382891228: success.Local limitation: full
bun run --cwd packages/container lintandbun run --cwd packages/lib lintcrash in this runner before linting files because Nodev20.20.2loadseslint-plugin-unicorn@67withTypeError: roleStyles.keys(...).map is not a function. The GitHub Actions runner executes these lint jobs successfully; the fresh CI run above is the authoritative lint verification.CodeRabbit review threads/comments are addressed in code. The only remaining red PR status is external:
CodeRabbitreportsPrepaid credits exhausted — enable usage-based reviews, which requires maintainer/billing action outside the repository diff.Fixes #439
Fixes #440
Additional CodeRabbit fix: GPU overlay regular-file invariant
DOCKER_GIT_CONTROLLER_GPU=allaccepted an existingdocker-compose.gpu.ymldirectory because GPU overlay resolution checked onlyexists, so the typed bootstrap boundary could pass an invaliddocker compose -fargument.requireGpuOverlayPathnow requiresfs.stat(...).type === "File"and fails withControllerBootstrapErrorbefore Docker Compose is invoked.rejects GPU compose overlay paths that are directoriesfailed before the fix with a successfulControllerComposeFilesresult and now passes.Verification added in commit
5dc13bcc:bun --cwd packages/app vitest run tests/docker-git/controller-compose.test.ts(9 passed; the new test failed before the fix)bun run --cwd packages/app typecheckbun run --cwd packages/app lint:effectbun run typecheckgit diff --checkAdditional CI fix: retry Bun dependency install
28384357354, job84095018943(E2E (Local package CLI)), failed during setup witherror: Fail extracting tarball for "@effect/platform"while runningbun install --frozen-lockfile. The failure happened before repository tests/build logic and is consistent with a transient package download/extraction failure..github/actions/setupaction now retriesbun install --frozen-lockfileup to three times with bounded sleeps before failing, preserving the frozen lockfile invariant while making setup resilient to transient registry/tarball extraction failures.ci-logs/job-84095018943-e2e-local-package-cli.log; the retry shell fragment passesbash -n, localbun install --frozen-lockfilesucceeds without lockfile changes, and commit06a4e2a5triggers a fresh CI run for end-to-end verification.Verification added in commit
06a4e2a5:bash -non the setup retry shell fragmentbun install --frozen-lockfilegit diff --checkFinal CI verification on head
06a4e2a5GitHub Actions created at
2026-06-29T15:48:05Zall pass:Checkrun28384656977: success, including the previously failingE2E (Local package CLI)job.Final Buildrun28384657012: success on Ubuntu, macOS, and Windows.Snapshotrun28384656962: success.Checking Dependenciesrun28384656995: success.Remaining non-repository status:
CodeRabbit:Prepaid credits exhausted — enable usage-based reviews. All actionable CodeRabbit review comments found in PR review comments are addressed in code; this remaining status requires maintainer/billing action outside the repository diff.Additional CodeRabbit fix: OAuth env boundary
runClaudeOauthLoginWithPromptstill readDOCKER_GIT_CLAUDE_OAUTH_TOKENthroughprocess.env, leaving a hidden runtime input inside the shared Docker OAuth runner instead of passing decoded boundary data explicitly.packages/lib/src/shell/claude-oauth-env.ts;authClaudeLoginpassesenvTokenintorunClaudeOauthLoginWithPrompt, and the shared runner no longer reads global process state.uses a decoded docker-git OAuth env token without running setup-tokenpersists the env token, assertssetup-tokenis not invoked, and still verifies the ping probe path.Verification added in commit
bc1da978:bun run --cwd packages/lib test -- tests/usecases/auth-claude-login.test.ts(5 tests)git diff --checkbun run --cwd packages/lib typecheckbun run --cwd packages/lib lint:effectbun run --cwd packages/lib test(240 tests)bun run typecheckbun run buildAdditional CodeRabbit follow-up: timeout and env override
bc1da978:bun installretries did not bound a hung install attempt, andauthClaudeLoginacceptedDOCKER_GIT_CLAUDE_OAUTH_TOKENas a production bypass aroundclaude setup-token..github/actions/setup/action.ymlnow wraps eachbun install --frozen-lockfileattempt in a portable 20-minute bash timer; Claude production login no longer reads or accepts an env-token shortcut, and the regression test now proves that the env var does not bypass setup-token capture.8abc88d2adds the negative env-token regression and passed the verification below.Verification added in commit
8abc88d2:bun run --cwd packages/lib test -- tests/usecases/auth-claude-login.test.ts(5 tests)bash -n <(sed -n '60,90p' .github/actions/setup/action.yml | sed 's/^ //')git diff --checkbun run --cwd packages/lib typecheckbun run --cwd packages/lib lint:effectbun run --cwd packages/lib test(240 tests)bun run typecheckbun run buildLocal note:
bun run --cwd packages/lib lintstill crashes before code diagnostics while loadingeslint-plugin-unicornwithTypeError: roleStyles.keys(...).map is not a function; CILintis the authoritative check for this environment-sensitive linter path.Additional CI fix: e2e-only Claude setup-token wrapper
DOCKER_GIT_CLAUDE_OAUTH_TOKENshortcut was removed,scripts/e2e/auth-claude-login.shstill injected only that env var. Fresh run28387220960, job84104893072, proved the regression: the job reached the real Claude OAuth prompt and the script failed with exit124after timeout.docker-git-auth-claude:latest setup-tokenanddocker-git-auth-claude:latest -p ping, emits parser-compatible synthetic setup-token output, forces the warning probe path, and delegates all other Docker invocations to/usr/bin/docker. ProductionauthClaudeLoginstill has no env-token bypass.ci-logs/check-28387220960-claude-auth.log; the failure lines show the real Claude sign-in URL prompt followed bye2e/auth-claude-login: docker-git auth claude login failed (exit: 124). Fresh CI on headaedf7d3c6a803e80f588dd90a7e835cfc61e3773passes the sameE2E (Claude auth login)job and all other Actions.Verification added in commit
aedf7d3c:bash -n scripts/e2e/auth-claude-login.shsk-ant-...marker: extraction succeeds and redacted output does not contain the markerbun --cwd packages/auth-oauth test tests/claude-oauth-token.test.ts tests/claude-docker-oauth.test.ts(18 tests)bun run --cwd packages/lib test -- tests/usecases/auth-claude-login.test.ts(5 tests)git diff --checkFresh GitHub Actions on head
aedf7d3c6a803e80f588dd90a7e835cfc61e3773:Checkrun28388765352: success, includingE2E (Claude auth login).Final Buildrun28388765272: success on Ubuntu, macOS, and Windows.Snapshotrun28388765405: success.Checking Dependenciesrun28388765341: success.Remaining non-repository status:
CodeRabbit:Prepaid credits exhausted — enable usage-based reviews. Current unresolved, non-outdated CodeRabbit review threads: none. This status requires maintainer/billing action outside the repository diff.