Skip to content

feat(core): add apply-all command to bulk-update all docker-git projects#175

Merged
skulidropek merged 3 commits intoProverCoderAI:mainfrom
konard:issue-164-56f6399aa833
Mar 22, 2026
Merged

feat(core): add apply-all command to bulk-update all docker-git projects#175
skulidropek merged 3 commits intoProverCoderAI:mainfrom
konard:issue-164-56f6399aa833

Conversation

@konard
Copy link
Contributor

@konard konard commented Mar 22, 2026

Summary

Fixes #164

  • Adds a new apply-all CLI command (alias: update-all) that iterates over all discovered docker-git projects and runs docker compose up with port check on each
  • Individual project failures (port conflicts, env file errors, missing configs) are logged as warnings without aborting the batch — the command continues to the next project
  • Follows the same architectural pattern as the existing down-all command

Changes

  • packages/lib/src/core/domain.ts: Add ApplyAllCommand interface and include it in the Command union type
  • packages/lib/src/usecases/projects-apply-all.ts: New use case that discovers all projects via loadProjectIndex(), then runs runDockerComposeUpWithPortCheck() on each, catching per-project errors gracefully
  • packages/lib/src/usecases/projects.ts: Export applyAllDockerGitProjects from barrel
  • packages/app/src/docker-git/cli/parser.ts: Register apply-all and update-all command aliases
  • packages/app/src/docker-git/program.ts: Wire ApplyAll to the use case handler
  • packages/app/src/docker-git/cli/usage.ts: Add apply-all to help text
  • packages/app/tests/docker-git/parser.test.ts: Add test for apply-all and update-all parsing

Usage

docker-git apply-all    # Apply config and refresh all containers
docker-git update-all   # Alias for apply-all

Математические гарантии

Инварианты:

  • ∀p ∈ Projects: applyAll(p) → updated(p) ∨ warned(p)
  • Individual project errors do not abort the batch

Предусловия:

  • Docker daemon is accessible

Постусловия:

  • All projects with valid configs have their managed files synced and containers refreshed
  • Projects with broken configs or port conflicts are skipped with warnings

Сложность:

  • Время: O(n) где n = |projects|

Verification

  • pnpm check (typecheck passes)
  • pnpm --filter ./packages/app test (59 tests pass)
  • pnpm --filter ./packages/lib typecheck (passes)

Test plan

  • Parser correctly recognizes apply-all command
  • Parser correctly recognizes update-all alias
  • Typecheck passes for all packages
  • All existing tests continue to pass

🤖 Generated with Claude Code

konard and others added 2 commits March 22, 2026 12:47
Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: ProverCoderAI#164
- Add ApplyAllCommand domain type for the new CLI command
- Create projects-apply-all.ts use case that iterates all discovered
  docker-git projects and runs docker compose up with port check
- Register apply-all and update-all aliases in CLI parser
- Wire command handler in program dispatcher
- Update usage text with apply-all description
- Add parser test for apply-all and update-all aliases
- Individual project failures (port conflicts, env errors, missing
  configs) are logged as warnings without aborting the batch

Fixes ProverCoderAI#164

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard changed the title [WIP] Сделать команду которая сама на все контейнеры применит новые настройки feat(core): add apply-all command to bulk-update all docker-git projects Mar 22, 2026
@konard konard marked this pull request as ready for review March 22, 2026 12:58
@konard
Copy link
Contributor Author

konard commented Mar 22, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $5.558533
  • Calculated by Anthropic: $3.293287 USD
  • Difference: $-2.265247 (-40.75%)

🤖 Models used:

  • Tool: Claude
  • Requested: opus
  • Main model: Claude Opus 4.6 (claude-opus-4-6)
  • Additional models:
    • Claude Haiku 4.5 (claude-haiku-4-5-20251001)

📎 Log file uploaded as Gist (1769KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Contributor Author

konard commented Mar 22, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@skulidropek
Copy link
Contributor

Как выглядит команда?

@skulidropek skulidropek merged commit 06e0845 into ProverCoderAI:main Mar 22, 2026
12 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