Skip to content

pr 387#399

Merged
skulidropek merged 5 commits into
mainfrom
pr-387
Jun 12, 2026
Merged

pr 387#399
skulidropek merged 5 commits into
mainfrom
pr-387

Conversation

@skulidropek

Copy link
Copy Markdown
Member
  • Initial commit with task details
  • fix(api): hide browser-connection MCP helpers from task manager

konard and others added 3 commits June 8, 2026 07:55
Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #383
The Rust browser MCP helpers (`browser-connection` /
`docker-git-browser-connection`) run on an allocated pty, so
`hasInteractiveTty` classified each one as a visible `ssh` terminal.
That flooded the container task manager with many identical
`browser-connection --project ... --network container:...` rows
(issue #383).

Classify these helper processes as internal `system` tasks so they are
hidden by default (includeDefault=false) and only shown when system
processes are explicitly requested.

Fixes #383
@skulidropek

skulidropek commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

AI Session Backup

Commit: fb435b5
Status: skipped
Message: No session directories found.

git status

On branch pr-387
nothing to commit, working tree clean

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@skulidropek, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 38 minutes and 56 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 344904de-1e5b-445f-acc9-927547168b20

📥 Commits

Reviewing files that changed from the base of the PR and between fb435b5 and 3c3573c.

📒 Files selected for processing (2)
  • packages/api/src/services/container-tasks-core.ts
  • packages/api/tests/container-tasks-core.test.ts
📝 Walkthrough

Краткое описание

В PR добавлена новая эвристика в container-tasks-core.ts для классификации процессов browser-helper (browser-connection, docker-git-browser-connection) как системных задач. Это позволяет скрывать их при includeDefault=false и явно включать при includeDefault=true с типом kind="system".

Изменения

Классификация browser-helper процессов

Слой / Файлы Описание
Детектирование и классификация browser-helper команд
packages/api/src/services/container-tasks-core.ts
Добавлена функция commandSuggestsBrowserHelper для распознавания команд browser-connection и docker-git-browser-connection (строки 30–36). В classifyProcess добавлена ранняя проверка, возвращающая "system" для таких процессов (строки 59–61). Обновлен комментарий-инвариант перед buildContainerTasks, отражающий новое поведение исключения browser helper'ов при includeDefault=false (строка 91).
Тестирование классификации
packages/api/tests/container-tasks-core.test.ts
Добавлен тестовый сценарий (строки 34–57), проверяющий что процессы с командой browser-connection и docker-git-browser-connection классифицируются как "system" и скрываются при includeDefault=false, но включаются при includeDefault=true.

🎯 2 (Простой) | ⏱️ ~10 минут

🚥 Pre-merge checks | ✅ 5 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning Заголовок 'pr 387' не описывает основное изменение в pull request. Он использует только номер PR без указания на суть изменений. Используйте описательный заголовок, который отражает суть изменений, например: 'fix(api): hide browser-connection MCP helpers from task manager' или 'Classify browser-connection processes as system tasks to hide from task manager'.
Description check ⚠️ Warning Описание PR неполное. Отсутствуют обязательные разделы шаблона: 'Source TZ / Issues', 'Requirements Alignment' и 'Verification'. Присутствует только краткая информация без структурирования. Заполните все разделы шаблона описания: укажите связанные issues, требования, область видимости, безопасность и способ проверки изменений.
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Requirements Alignment ✅ Passed container-tasks-core.ts classifies browser-connection/docker-git-browser-connection as kind='system' and includeDefault=false filters out system; test added to assert helpers are hidden unless incl...
Security Regression ✅ Passed Изменения только в классификации процессов (фиксированный regex по строке команды) и тестах; нет shell/Docker/FS операций, записи файлов или работы с секретами/PII.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr-387

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@skulidropek

skulidropek commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

AI Session Backup

Commit: fb435b5
Status: skipped
Message: No session directories found.

git status

On branch pr-387
nothing to commit, working tree clean

@skulidropek

skulidropek commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

AI Session Backup

Commit: fb435b5
Status: skipped
Message: No session directories found.

git status

On branch pr-387
nothing to commit, working tree clean

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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/api/src/services/container-tasks-core.ts`:
- Around line 30-36: Add a repository-style functional comment above the new
classification rule (browserConnectionPattern and commandSuggestsBrowserHelper)
containing the required fields: CHANGE, WHY, QUOTE or n/a, REF, SOURCE or n/a,
FORMAT THEOREM, PURITY (mark CORE or SHELL), EFFECT signature if PURITY is
SHELL, INVARIANT describing the pattern’s assumptions, and COMPLEXITY
(time/space); place it immediately above the const browserConnectionPattern
declaration and reference both browserConnectionPattern and
commandSuggestsBrowserHelper in the comment so reviewers can see the intent and
constraints for the new browser-helper classification.
🪄 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: 01d2f309-8f47-46e8-a191-389c780917a6

📥 Commits

Reviewing files that changed from the base of the PR and between fbc50eb and fb435b5.

📒 Files selected for processing (2)
  • packages/api/src/services/container-tasks-core.ts
  • packages/api/tests/container-tasks-core.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: Build
  • GitHub Check: Test
  • GitHub Check: E2E (OpenCode)
  • GitHub Check: E2E (Clone cache)
  • GitHub Check: E2E (Clone auto-open SSH)
  • GitHub Check: E2E (Login context)
  • GitHub Check: Types
  • GitHub Check: E2E (Runtime volumes + SSH)
  • GitHub Check: E2E (Browser command)
  • GitHub Check: Lint
  • GitHub Check: Final build (ubuntu-latest)
  • GitHub Check: Final build (macos-latest)
  • GitHub Check: Final build (windows-latest)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Implement Functional Core, Imperative Shell (FCIS) pattern: CORE layer contains only pure functions with immutable data and mathematical operations; SHELL layer isolates all effects (IO, network, database). Strict dependency direction: SHELL → CORE (never reverse).
Never use any, unknown, eslint-disable, ts-ignore, or as type assertions (except in rigorously justified cases with documentation). Always use exhaustive union type analysis through .exhaustive() pattern matching.
All external dependencies must be wrapped through typed interfaces and injected via Effect-TS Layer pattern. Never call external services directly from CORE functions.
Use monadic composition with Effect-TS for all effects: Effect<Success, Error, Requirements>. Compose effects through pipe() and Effect.flatMap(). Implement dependency injection via Layer pattern. Handle errors without try/catch blocks.
All functions must be pure in the CORE layer: no side effects (logging, console output, IO operations, mutations). Separate all side effects into the SHELL layer.
Use exhaustive pattern matching with Effect.Match instead of switch statements. Example: Match.value(item).pipe(Match.when(...), Match.exhaustive).
Document all functions with comprehensive TSDoc including: @pure (true/false), @effect (required services), @invariant (mathematical invariants), @precondition, @postcondition, @complexity (time and space), @throws Never (errors must be typed in Effect).
Use functional comment markers for code clarity: CHANGE (brief description), WHY (mathematical/architectural justification), QUOTE(ТЗ) (requirement citation), REF (RTM or message ID), SOURCE (external source with quote), FORMAT THEOREM (∀x ∈ Domain: P(x) → Q(f(x))), PURITY (CORE|SHELL), EFFECT (Effect type signature), INVARIANT (mathematical invariant), COMPLEXITY (time/space).
Define all external service dependencies as Context.Tag classes with fully typed methods returning Effect types. Example: `class Da...

Files:

  • packages/api/tests/container-tasks-core.test.ts
  • packages/api/src/services/container-tasks-core.ts
**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.test.{ts,tsx}: Implement property-based testing using fast-check for mathematical properties and invariants. Example: fc.property(fc.array(messageArbitrary), (messages) => isChronologicallySorted(sortMessagesByTimestamp(messages))).
Mock external dependencies in unit tests using Effect's testing utilities. Run tests without Effect runtime for speed. Example: Effect.provide(MockService), Effect.runPromise.

Files:

  • packages/api/tests/container-tasks-core.test.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Forbidden constructs in CORE code: any, eslint-disable, ts-ignore, async/await, raw Promise chains (then/catch), Promise.all, try/catch for logic control, console.*, switch statements (use Match with .exhaustive() instead)
All functions must use Effect-TS for composing effects: Effect<Success, Error, Requirements>. No direct async/await, Promise chains, or try/catch in product logic.
Functional comments must include: CHANGE, WHY, QUOTE(ТЗ) or n/a, REF, SOURCE or n/a, FORMAT THEOREM, PURITY (CORE|SHELL), EFFECT signature for SHELL functions, INVARIANT, and COMPLEXITY.
All data mutations must use immutable patterns (ReadonlyArray, readonly properties, Object.freeze); mutation in SHELL only when absolutely necessary and documented.

Files:

  • packages/api/tests/container-tasks-core.test.ts
  • packages/api/src/services/container-tasks-core.ts
**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Property-based tests (fast-check) must verify mathematical invariants; unit tests must use Effect test utilities without async/await.

Files:

  • packages/api/tests/container-tasks-core.test.ts
**/*.{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/api/tests/container-tasks-core.test.ts
  • packages/api/src/services/container-tasks-core.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/api/tests/container-tasks-core.test.ts
  • packages/api/src/services/container-tasks-core.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/api/tests/container-tasks-core.test.ts
  • packages/api/src/services/container-tasks-core.ts
**/*

⚙️ CodeRabbit configuration file

**/*: Ты строгий ревьюер SPEC DRIVEN DEVELOPMENT.

Перед выводами изучи README.md, другие *.md файлы, linked issues,
PR description, PR comments/discussion и релевантную кодовую базу.

Сверь изменения с исходным ТЗ/спекой и обсуждением. Флагай любой уход
от спеки, недокументированное изменение поведения, отсутствие тестов
для заявленного поведения и security-риск. Если спека не видна,
попроси автора добавить ее в issue или PR description.

Проверь решение с точки зрения формальной верификации: какие инварианты,
предусловия и постусловия можно доказать математически, а где доказуемость
слабая. Оцени решение с точки зрения теории игр: устойчивы ли стимулы,
нет ли выгодного обхода правил, и какое решение было бы сильнее.

Files:

  • packages/api/tests/container-tasks-core.test.ts
  • packages/api/src/services/container-tasks-core.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/api/tests/container-tasks-core.test.ts
  • packages/api/src/services/container-tasks-core.ts
🧠 Learnings (1)
📚 Learning: 2026-05-18T07:43:38.131Z
Learnt from: skulidropek
Repo: ProverCoderAI/docker-git PR: 313
File: packages/api/src/services/panel-cloudflare-tunnel.ts:123-135
Timestamp: 2026-05-18T07:43:38.131Z
Learning: In this repo’s ProverCoderAI/docker-git architecture, it is intentional for service modules under packages/api/src/services/ to call Node.js APIs directly (e.g., fs, child_process, fetch). Do not treat direct Node API usage in these service modules as a dependency-injection (DI) violation. This codebase provides the NodeContext at the program boundary (entry point) rather than injecting Context.Tag/Layer services into individual service modules; reviewers should only flag DI/context issues if the expected boundary setup is missing.

Applied to files:

  • packages/api/src/services/container-tasks-core.ts
🔇 Additional comments (2)
packages/api/src/services/container-tasks-core.ts (1)

59-61: LGTM!

Also applies to: 91-91

packages/api/tests/container-tasks-core.test.ts (1)

34-56: Inspect container-tasks-core tests for missing fast-check/Effect patterns and any async/await: In packages/api/tests/container-tasks-core.test.ts, confirm there’s no async/await/Promise-chains and that property-based invariants use fast-check while Effectful units use Effect testing utilities (e.g., it.effect, Effect.provide, Effect.runPromise); add/adjust where the rules aren’t met.

Comment thread packages/api/src/services/container-tasks-core.ts Outdated
@skulidropek

skulidropek commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

AI Session Backup

Commit: fb435b5
Status: skipped
Message: No session directories found.

git status

On branch pr-387
nothing to commit, working tree clean

…test for browser-helper classifier

- Replace prose comment above browserConnectionPattern with full
  CHANGE/WHY/FORMAT THEOREM/PURITY/INVARIANT/COMPLEXITY block per
  project conventions (CodeRabbit review on PR #399)
- Add fast-check property-based test covering bare and absolute-path
  variants of browser-connection / docker-git-browser-connection:
  ∀ cmd ∈ helperCommands: hidden when includeDefault=false,
  kind="system" when includeDefault=true

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@skulidropek

skulidropek commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

AI Session Backup

Commit: fc40a9e
Status: skipped
Message: No session directories found.

git status

On branch pr-387
nothing to commit, working tree clean

…omments and fast-check test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@skulidropek skulidropek merged commit 5effa47 into main Jun 12, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants