Conversation
Contributor
💥 Breaking changes detected !!Either this PR or a previous PR not released yet introduced breaking changes, be careful when merging. ✔️ Code generated!
📊 Benchmark resultsBenchmarks performed on the method using a mock server, the results might not reflect the real-world performance.
|
Fluf22
force-pushed
the
feat/worktree-better-support
branch
from
June 3, 2026 21:03
f00115b to
036baab
Compare
Fluf22
force-pushed
the
feat/worktree-better-support
branch
3 times, most recently
from
June 4, 2026 18:28
2f94506 to
61a23d2
Compare
Fluf22
marked this pull request as ready for review
June 9, 2026 13:53
- Remove hardcoded container_name from docker-compose.yml - Add content-addressed image tags for build-once-run-many - Add COMPOSE_PROJECT_NAME scoping per worktree - Switch from 'docker exec' to 'docker compose exec' in common.ts - Add slot-based CTS port offsetting (Java generator + test server) - Add .env.docker for persistent compose config - Add docker:teardown command - Add extra_hosts for Linux host.docker.internal support
- Fix clients.schema.json enum to match new service names - Restore debug port mapping with per-slot offset (APIC_DEBUG_PORT) - Add port offset to 7 hand-written manual test files - Extract PORTS_PER_SLOT constant in TS with cross-language SYNC markers - Remove redundant COMPOSE_PROJECT_NAME derivation from common.ts - Source .env.docker in teardown.sh instead of re-deriving - Warn on slot change to re-run CTS generation - Fix offsetPorts() to use explicit types and copy-on-write - Replace silent exception swallowing with targeted catches + warnings
…tralization - Centralize port assignments in ports.ts, replace magic numbers across 14 test server files - Switch from file-based to env-var-based port offset (CTS_PORT_OFFSET) in Java generator and all language test files - Rename config field dockerImage -> dockerService to match semantics - Derive PORTS_PER_SLOT from ports.ts in slot.sh (eliminates hardcoded copy) - Add vitest CI check (portsSync.test.ts) to validate Java generator constants stay in sync - Register LoggingTests.cs as hand-written in generation.config.mjs - Fix operator precedence bug in slot.sh stale-entry cleanup
- Unify on CTS_PORT_OFFSET env var as single runtime input for port offset (index.ts now reads env var / .env.docker instead of .apic-worktree-slot) - Extract offsetPortsInString helper in TestsClient.java - Add CONTAINER_DEBUG_PORT constant in common.ts - Add SYNC comments to hand-written test files - Tighten slot.sh PORTS_PER_SLOT regex - Guard against missing .env.docker in run()
Fluf22
force-pushed
the
feat/worktree-better-support
branch
from
June 23, 2026 09:11
2e2ca5a to
9b1ba2a
Compare
ports.ts is now the one contiguous port list (debug + CTS servers); slot.sh and the Java generator derive the per-slot offset from it. Folds the two stray test servers and the debug port into the list (fixes the cross-slot port collision), drops the local .apic-worktree-slot file for the central registry, and keys the Compose project on the slot.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enable N worktrees to operate Docker simultaneously with full isolation.
What this does
COMPOSE_PROJECT_NAME), so containers don't collide.slot × 21, enabling parallel test execution.yarn docker:teardownstops containers and releases the slot.Changes
docker-compose.ymlcontainer_name, addimagetags +extra_hostsscripts/docker/setup.sh.env.dockerscripts/docker/teardown.shscripts/docker/slot.shscripts/common.tsdocker exec→docker compose --env-file .env.docker execscripts/config.tsgetDockerImage→getDockerServiceconfig/clients.config.jsonapic_base→base,apic_ruby→ruby,apic_swift→swiftgenerators/.../TestsClient.javacustomHostsscripts/cts/testServer/index.tsPORT_OFFSETinsetupServer().gitignore.apic-worktree-slot,.env.dockerpackage.jsondocker:teardownscriptHow it works
Slot assignments are tracked in
~/.config/apic/worktree-slots.json. Stale entries (deleted worktrees) are auto-reclaimed.Migration
Run
yarn docker:setup— existing containers with hardcoded names (apic_base, etc.) can be removed manually when convenient.