Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

Merge origin/dev into feat/codex-subscription-multi-connection

Alfredo Lopez9f8d8e481a46
diff --cc .cursor/skills/minikube-t0-t1-t2/SKILL.md
index f1f9bfada,02142093e..9f586d493
--- a/.cursor/skills/minikube-t0-t1-t2/SKILL.md
+++ b/.cursor/skills/minikube-t0-t1-t2/SKILL.md
@@@ -26,17 -31,26 +31,34 @@@ Before running anything, verify ALL of
ownership is ambiguous, stop and use a dedicated profile instead.
- [ ] Every `kubectl` you run manually uses `--context=<owned profile>`.
Never change the global kubectl current-context.
+ - [ ] Docker resolves to a local Unix socket or loopback TCP endpoint. The
+ harness pins that endpoint into an empty task-local config; do not use a
+ remote Docker context or copy ambient registry credentials into it.
+ - [ ] Mutating image acquisition/builds use the public Make target/orchestrator
+ and inherit its exact profile lease. Do not call `build-images.sh` or
+ `pull-images.sh` directly; `--verify-only` is the read-only exception.
+ The legacy `setup.sh` path is also lease-protected for every invocation,
+ requires matching explicit profile/context variables, and never uses the
+ shared `clerum-test` profile. Pull configuration values are finite and an
+ empty successful `minikube docker-env` result is a hard failure.
- [ ] Never read `~/.cache/clerum/minikube-profiles/` directly (HARD DENY —
it holds private profile state). The harness reads it for you.
+- [ ] Hold Control UI / Desktop PFs on the host via the first-hand helper
+ (do not search `.local-notes/` for it):
+ `MINIKUBE_PROFILE=<owned-profile> make -f .local-notes/minikube-profiles/branch.mk branch-profile-pf`
+ then `branch-profile-health`. Implementation:
+ `.local-notes/minikube-profiles/branch-profile.sh`. Do not replace
+ that hold with `make minikube-pf-all-bg`. Do not start UI PFs from a
+ sandboxed agent shell. Do not kill this lane's `branch-profile-pf`.
+ `branch-profile-pf-health` stops PFs on EXIT — not a lasting hold.
+ Shell contract-test rule: fixtures that exercise Git/lease state must use a
+ temporary repository via `scripts/tests/lib/minikube-fixture-repo.sh`. Keep the
+ real checkout as the script/Makefile source root, pass the temporary path as
+ `T2_PROJECT_DIR`, and assert that the host checkout's HEAD, branch, and status
+ are unchanged. Never create or restore a branch in the developer checkout to
+ make a detached CI checkout testable.
+
## Step 1 — Plan (read-only)
```bash
@@@ -136,8 -176,19 +184,21 @@@ recovery evidence
## Step 5 — On failure
Failures print a stable code and a next safe command. Repair the FIRST
- reported precondition and re-run the same entry point on the same HEAD.
+ reported precondition on the same HEAD. While debugging T1, use the standalone
+ Real PostgreSQL target; finish with one full certification run. If T0/T1 lane
+ evidence is already green and NP08, health, or Playwright fails, retry with
+ `minikube-t2-runtime` on the same profile instead of repeating T0/T1. NP08 may
+ observe a newer same-binding access token but must never refresh/reissue or
+ consume the Host refresh-token lineage.
Do not widen the command, switch clusters, reset PVCs, or delete locks with a
-live owner. Code-by-code guidance is in `reference.md`.
+live owner. A T1 `next:` line is not permission to operate Docker
+(`docker run`, `docker desktop restart`, port probes). Code-by-code
+guidance is in `reference.md`.
+
+ The active profile lock is `$T2_LOCK_ROOT/<profile>.lock`; stale reclaim uses
+ the sibling `$T2_LOCK_ROOT/<profile>.reclaim`. A killed reclaimer can leave the
+ sibling claim. After verifying that the owner PID, reclaimer process, and all
+ other profile-mutating sessions are gone, recover only the exact paths: use
+ `rmdir -- "$T2_LOCK_ROOT/<profile>.reclaim"` for an empty claim and
+ `rm -rf -- "$T2_LOCK_ROOT/<profile>.lock"` for the lock. If only one exists,
+ operate only on that one. Never remove a live owner/reclaimer or the lock root.
diff --cc .cursor/skills/minikube-t0-t1-t2/reference.md
index c304bcf7b,4e76a9da0..0d3a0bdd0
--- a/.cursor/skills/minikube-t0-t1-t2/reference.md
+++ b/.cursor/skills/minikube-t0-t1-t2/reference.md
@@@ -13,13 -13,11 +13,16 @@@ Companion to `SKILL.md`. Source of trut
product E2E lane (e.g. issue #391 readiness), a separate evidence lane.
- **Do not re-run full `make minikube-t2` to "close T2"** when T0 and T1 are
already green on the same HEAD — use `make minikube-t2-runtime`.
+ - **Do not derive a new profile from the current HEAD.** Resolve the profile
+ through the primary checkout helper. Worktree + branch own profile identity;
+ the exact-head marker owns deployed freshness and `ports.env` is persistent.
- **Do not `ls`/`cat` `~/.cache/clerum/minikube-profiles/`.** Private profile
state (ports, pids, markers). The harness is the only reader.
+- **Do not hunt for UI port-forwards.** First-hand hold:
+ `MINIKUBE_PROFILE=<owned-profile> make -f .local-notes/minikube-profiles/branch.mk branch-profile-pf`
+ (implementation `branch-profile.sh` beside it). Run on the host, not a
+ sandboxed agent shell. `make minikube-pf-all-bg` is a gate refresh only.
+ `branch-profile-pf-health` stops PFs on EXIT. Never shared `:3000`/`:8090`.
- **Do not invent `ADMIN_PASSWORD`** or any credential. When a product E2E
needs it, load it from the primary checkout `.env`; never echo it.
- **Do not reset PVCs** outside the explicit `T2_RESET_PVC=true` +
@@@ -39,30 -53,68 +58,75 @@@
`make minikube-t2-public-boundary` first.
- **Do not weaken fail-loud T1**: no green on unavailable DSN, zero executed
tests, or silently skipped suites; the JSON reporter must be complete and
- green, and the Vitest process must also exit zero.
+ green, must name the exact physical file set, and the Vitest process must
+ also exit zero. Do not override its one-worker/no-file-parallelism contract.
Role-reset suites stay on the throwaway `postgres:16-alpine` (#412), never
shared `control-postgres`.
+- **Do not treat a T1 `next:` line as a Docker repair license.**
+ `REAL_PG_REQUIRED_BUT_UNAVAILABLE` (isolated `postgres:16-alpine` not
+ reachable) still means re-enter `make minikube-t2` or
+ `make minikube-t2-real-postgres` on the owned profile. Forbidden:
+ `docker run` probes, `docker desktop restart` (destroys the Minikube
+ container and the owned profile), published-port experiments, and any
+ invented networking path between plan and verdict.
+ - **Do not let NP08 refresh or reissue the Host lineage.** It may observe a
+ fresher persisted access token only when its Host/recipe binding exactly
+ matches the mounted token. Refresh tokens remain owned by mcp-host.
## Stable failure codes
| Code | Meaning | Safe next step |
| --- | --- | --- |
- | `BOOTSTRAP_REQUIRED` | Profile missing/uninitialized, or the planner produced no transition. Standalone preflight refuses to bootstrap. | Run `make minikube-t2` — its internal planner (`T2_PLAN_MODE=true`) makes `full-bootstrap` reachable and runs the supported setup with `IMAGE_SOURCE=local`. |
- | `HEAD_MARKER_MISMATCH` | Pre-gate marker does not match this worktree/HEAD; the final T2 preflight selected something other than `already-synced`. | Re-run `make minikube-t2` on this HEAD so `pre-gate-sync` updates the marker. Never hand-edit the marker. |
+ | `LOCAL_DEPENDENCY_MISSING` | Node/package-local dependencies, Python, Docker, kubectl, Minikube, or another required local tool is unavailable. | Repair the named local prerequisite first. The T1 preflight runs before expensive T0 work and never auto-installs. |
+ | `UNSUPPORTED_T1_CONCURRENCY` | A caller attempted more than one T1 worker. | Remove the override or set `VITEST_MAX_WORKERS=1`; T1 role/fixture mutation is serial by contract. |
+ | `PROFILE_OWNERSHIP_MISMATCH` | Profile metadata, context, worktree, or branch does not match this lane. | Resolve through the canonical helper. Never adopt, kill, or mutate a foreign/ambiguous profile. |
+ | `PROFILE_LOCK_REQUIRED` | A mutating child did not inherit the exact parent lease. | Invoke the public Make target/orchestrator; do not fabricate or bypass its lock token. |
+ | `DOCKER_ENDPOINT_REQUIRED` / `DOCKER_ENDPOINT_UNSAFE` / `DOCKER_ENDPOINT_MISMATCH` | Docker did not resolve exactly one approved local endpoint, or isolation selected a different endpoint. | Select a local Docker Desktop/rootless context or set an explicit local `DOCKER_HOST`; do not weaken the endpoint check. |
+ | `DOCKER_CONFIG_REQUIRED` / `REGISTRY_AUTH_REQUIRED` | A Docker operation lacks its empty task-local config, or a private pull lacks an explicit readable auth config. | Use the canonical Make/orchestrator path; for a genuinely private source, pass only the intended config directory through `MINIKUBE_DOCKER_AUTH_CONFIG`. |
+ | `MINIKUBE_PULL_CONFIG_INVALID` | Published-image pull parallelism, retry count, or retry delay is outside its finite range. | Correct the override (`parallelism 1-64`, retries 1-10, delay 0-300 seconds); never disable the bound. |
+ | `DOCKER_ENV_UNRESOLVED` | Minikube returned no usable Docker environment, including a successful empty response. | Repair the profile/runtime endpoint and retry the same owned Make target; no image pull may proceed. |
+ | `DOCKER_DEADLINE_INVALID` | A runtime deadline/retry value is malformed or exceeds its finite maximum. | Remove the override or set it within the documented range; do not disable the deadline. |
+ | `BOOTSTRAP_REQUIRED` | Profile missing/uninitialized, or the planner produced no transition. Standalone preflight refuses to bootstrap. | Run `MINIKUBE_PROFILE=<owned> CONTROL_API_REAL_PG_CONTEXT=<owned> make minikube-t2`; its internal planner makes `full-bootstrap` reachable. |
+ | `HEAD_MARKER_MISMATCH` | Pre-gate marker does not match this worktree/HEAD; the final T2 preflight selected something other than `already-synced`. | Re-run the full target on this HEAD so `pre-gate-sync` updates the marker. Never hand-edit the marker. |
+ | `IMAGE_MANIFEST_MISMATCH` | Deployed image provenance or the manifest `generated` stamp does not match the exact marker/worktree state. | Re-run the full target for the same owned profile; do not relabel or hand-edit the manifest. |
-| `PORT_FORWARD_CONFLICT` | A port-forward for this profile is owned by a process not recorded for it (or not a real `kubectl`). | Identify the foreign owner; if it belongs to another lane, stop. Restart forwards via `scripts/minikube/pf-all-stack.sh` for this profile only. |
+| `PORT_FORWARD_CONFLICT` | A port-forward for this profile is owned by a process not recorded for it (or not a real `kubectl`). | Identify the foreign owner; if it belongs to another lane, stop. Do not kill this lane's `branch-profile-pf`. Restore UI PFs with `make -f .local-notes/minikube-profiles/branch.mk branch-profile-pf`. |
| `PROFILE_BUSY` | Profile lock held. Live owner PID → genuinely busy. No valid owner PID → orphaned lock. | Live owner: wait or coordinate; never remove. Orphan: verify no T2 process owns the profile, then remove ONLY `$T2_LOCK_ROOT/<profile>.lock` and retry. Never remove the lock root. |
| `DEVELOPMENT_SCOPE_REQUIRED` | Preflight/final preflight failed a precondition, or T2-only mode was attempted without `already-synced`. | Repair the first reported condition; if T2-only was refused, run full `make minikube-t2`. |
+ | `CERTIFICATION_REQUIRED` | Runtime-only was requested without valid exact-head T0/T1 evidence for the full ownership tuple. | Run the full target once; do not hand-create or copy evidence. |
+ | `SECRET_MISSING` / `CONFIGMAP_MISSING` | A required named runtime input is absent or unreadable. | Reconcile the same owned profile through the full target; never invent values. |
| `ZERO_TESTS_EXECUTED` | A lane was configured off or executed nothing (including a required-but-missing Playwright journey). | Re-run with the lane enabled, or supply the required `T2_PLAYWRIGHT_COMMAND`. |
-| `REAL_PG_REQUIRED_BUT_UNAVAILABLE` | The explicit context, isolated PostgreSQL, DSN route, or exact-head database precondition is unavailable. | Use the standalone T1 target while repairing, then run one full certification. |
++| `REAL_PG_REQUIRED_BUT_UNAVAILABLE` | The explicit context, isolated PostgreSQL, DSN route, or exact-head database precondition is unavailable. | Re-enter `make minikube-t2` or `make minikube-t2-real-postgres` on the owned profile. Do not `docker run`, restart Docker Desktop, or probe published ports. |
+ | `REAL_PG_REPORT_INCOMPLETE` | Vitest JSON did not prove the exact expected physical files. | Repair test selection/reporter output; do not accept suite counters as file identity. |
+ | `REAL_PG_SUITE_FAILED` | Reporter, test assertions, process exit, or parent result contract failed. | Iterate with standalone T1; once green, run full T2 for final exact-head lane evidence. |
| `POSTGRES_NOT_READY` | PostgreSQL precondition failed, or a PVC reset was requested without the exact expected UID. | Fix DB readiness; never guess a PVC UID. |
- | `REAL_PG_REQUIRED_BUT_UNAVAILABLE` | Isolated T1 `postgres:16-alpine` (or the shared-lane DSN/port-forward) did not become reachable. | Confirm Docker Desktop is up, then re-run `make minikube-t2` or `make minikube-t2-real-postgres` on the owned profile. Do not `docker run`, restart Docker Desktop, or probe published ports. |
- | `PROFILE_UNHEALTHY` | A required deployment is unready in a fail-loud check (`T2_PLAN_MODE=false`: standalone preflight or the final exact-head T2), or the opt-in user-facing health command failed. The orchestrator planner never emits this for an unready deployment — it selects `full-reconcile` instead. | Re-run `make minikube-t2` on the same HEAD; the single run reconciles and restores GFS credentials itself. Do not run manual repair scripts between runs. |
+ | `PROFILE_UNHEALTHY` | A required deployment is unready in a fail-loud check (`T2_PLAN_MODE=false`: standalone preflight or the final exact-head T2), the mandatory targeted-sync health command is missing, or a supplied user-facing health command failed or timed out. The orchestrator planner never emits this merely for an unready deployment — it selects `full-reconcile` instead. | For a targeted sync, supply the affected service's profile-owned `T2_HEALTHCHECK_COMMAND`; otherwise repair the reported health failure. Re-run on the same HEAD and profile. Do not run manual repair scripts between runs. |
+ | `NP08_HCC_AUTHORIZATION_FAILED` | The deployed Host-to-HCC authorization journey or cleanup failed after T0/T1 passed. | Repair the first NP08 failure, then use `minikube-t2-runtime` on the exact same profile/HEAD; never refresh/reissue in the test. |
+ | `PLAYWRIGHT_FAILED` | The opt-in user-visible journey failed after runtime and lane evidence passed. | Repair the journey and retry with `minikube-t2-runtime` on the same exact tuple. |
+
+ ## Stale-lock reclaim layout
+
+ The active profile lock is `$T2_LOCK_ROOT/<profile>.lock`. The atomic stale
+ reclaim claim is its sibling `$T2_LOCK_ROOT/<profile>.reclaim`, never a child of
+ the active lock. A reclaimer terminated abruptly may leave that sibling
+ directory, so it is intentionally fail-closed rather than silently adopted.
+
+ Before manual recovery, verify all of the following:
+
+ - the recorded lock owner PID is not alive;
+ - no stale-lock reclaimer process is alive;
+ - no other session is mutating the profile.
+
+ After those checks, operate only on the two exact paths. Prefer `rmdir` for the
+ empty claim:
+
+ ```bash
+ rmdir -- "$T2_LOCK_ROOT/<profile>.reclaim"
+ rm -rf -- "$T2_LOCK_ROOT/<profile>.lock"
+ ```
+
+ If only the claim exists, run only the `rmdir`; if only the lock exists, run
+ only the `rm -rf`. Never remove either path with a live owner/reclaimer and
+ never remove all of `T2_LOCK_ROOT`.
## GFS restore pointers (high level, no secrets)
diff --cc AGENTS.md
index 424ce08ef,f30cede07..ed1d48236
--- a/AGENTS.md
+++ b/AGENTS.md
@@@ -23,27 -32,32 +32,53 @@@ also required when the selected profil
shared fixed localhost ports for branch-owned profiles; use the profile-owned
random port mapping already recorded for that profile.
+## Branch-profile UI port-forwards
+
+First-hand entry point (gitignored helper at repo root — do not search for
+it). Implementation is `.local-notes/minikube-profiles/branch-profile.sh`.
+Do not `ls`/`cat` `~/.cache/clerum/minikube-profiles/`.
+
+```bash
+MINIKUBE_PROFILE=<owned-profile> \
+ make -f .local-notes/minikube-profiles/branch.mk branch-profile-pf
+
+MINIKUBE_PROFILE=<owned-profile> \
+ make -f .local-notes/minikube-profiles/branch.mk branch-profile-health
+```
+
+This is the host-side hold for Control UI / Desktop. Run it on the host, not
+from a sandboxed agent shell. `make minikube-pf-all-bg` is a gate refresh
+only and must not replace `branch-profile-pf`. Do not kill this lane's
+forwards. `branch-profile-pf-health` starts then stops PFs on EXIT — do not
+use it as the lasting hold. Inner `pre-gate-sync` may use
+`--skip-port-forwards`; never pass that globally into `make minikube-t2`.
+
+ Port-forwards are owned by atomic `0600` records bound to the exact profile,
+ context, canonical worktree, namespace, Service, local/remote ports, PID,
+ process start time, and `kubectl` argv. Never kill or adopt a live legacy
+ `/tmp/pf-*.pid` process: it lacks enough provenance and must fail closed.
+ After a user-facing health probe, revalidate the same live process, start time,
+ argv, and binding. A registered but dead/reused/ambiguous pidfile is itself a
+ `PORT_FORWARD_CONFLICT`; it must not disappear from the T2 verdict merely
+ because `ps` no longer lists a child.
+
+ All image acquisition, image builds, and targeted deploys must enter through
+ the documented Make targets or the T2 orchestrator so they inherit the exact
+ live profile mutation lease. Calling `scripts/minikube/build-images.sh` or
+ `scripts/minikube/pull-images.sh` directly is unsupported for mutating work;
+ `--verify-only` is the read-only exception. Docker and Minikube operations must
+ use finite deadlines. Docker endpoint discovery must resolve
+ to an explicit local Unix socket or loopback TCP endpoint before switching to
+ an empty task-local Docker config. Ambient registry credentials are never
+ copied; a private pull requires an explicit `MINIKUBE_DOCKER_AUTH_CONFIG`.
+ The legacy `scripts/minikube/setup.sh` compatibility path follows the same
+ boundary: it requires matching `MINIKUBE_PROFILE` and
+ `CONTROL_API_REAL_PG_CONTEXT`, acquires the branch-owned lease before its first
+ cluster operation for every invocation (with or without `--build`), and never
+ falls back to the shared `clerum-test` profile. The published-image puller
+ rejects invalid parallelism/retry/delay values and an empty successful
+ `minikube docker-env`; neither condition may produce a green acquisition.
+
## Incremental local image updates
For a service-only change in an already healthy profile, rebuild and restart
diff --cc control-api/package-lock.json
index fd104aecc,a9d7c0954..45ba55f30
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@@ -1,12 -1,12 +1,12 @@@
{
"name": "clerum-control-api",
- "version": "0.1.504",
- "version": "0.1.495",
++ "version": "0.1.505",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.504",
- "version": "0.1.495",
++ "version": "0.1.505",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/image-policy": "file:../packages/image-policy",
diff --cc control-api/package.json
index f582d2167,42c3ad733..5885e3303
--- a/control-api/package.json
+++ b/control-api/package.json
@@@ -1,6 -1,6 +1,6 @@@
{
"name": "clerum-control-api",
- "version": "0.1.504",
- "version": "0.1.495",
++ "version": "0.1.505",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --cc control-ui/package-lock.json
index 96ceb6eb7,4ac83d4a1..4f486ae9d
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@@ -1,12 -1,12 +1,12 @@@
{
"name": "clerum-control-ui",
- "version": "0.1.462",
- "version": "0.1.450",
++ "version": "0.1.463",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.462",
- "version": "0.1.450",
++ "version": "0.1.463",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/llm-providers": "file:../packages/llm-providers",
diff --cc control-ui/package.json
index 7e7e7836b,5fef329e3..d52da28b4
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@@ -1,6 -1,6 +1,6 @@@
{
"name": "clerum-control-ui",
- "version": "0.1.462",
- "version": "0.1.450",
++ "version": "0.1.463",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",
diff --cc docs/testing/minikube-t2-runbook.md
index 2768df5df,f4702e599..9be4bf776
--- a/docs/testing/minikube-t2-runbook.md
+++ b/docs/testing/minikube-t2-runbook.md
@@@ -42,31 -46,12 +46,34 @@@ matches HEAD. `make minikube-pre-gate-s
not emit a T2 verdict.
The profile helper that generated the profile remains the source of truth for
- the profile metadata and random localhost port mapping. Do not copy ports from
- another worktree or use shared fixed ports.
+ the profile metadata and random localhost port mapping. Resolve it from the
+ primary checkout `.local-notes/minikube-profiles/branch.mk`. A legacy creation
+ SHA is historical metadata; it does not override stable worktree+branch
+ ownership. Persisted `ports.env` is allocated once. Missing, corrupt, or
+ ambiguous metadata fails closed; never regenerate or copy another lane's ports.
+First-hand entry point (gitignored helper at repo root — do not search for
+it):
+
+```bash
+MINIKUBE_PROFILE=<owned-profile> \
+ make -f .local-notes/minikube-profiles/branch.mk branch-profile-pf
+
+MINIKUBE_PROFILE=<owned-profile> \
+ make -f .local-notes/minikube-profiles/branch.mk branch-profile-health
+```
+
+Implementation: `.local-notes/minikube-profiles/branch-profile.sh`.
+HARD DENY: do not `ls`/`cat` `~/.cache/clerum/minikube-profiles/`.
+This is the host-side hold for Control UI / Desktop. Profile-owned random
+ports only (never shared `:3000`/`:8090`). `make minikube-pf-all-bg` is a
+gate refresh only; it must not replace `branch-profile-pf`. Do not start UI
+PFs from a sandboxed agent shell (hooks/PATH; runners clean children). Run
+the make target on the host. Do not kill this lane's `branch-profile-pf`.
+Inner `pre-gate-sync` may use `--skip-port-forwards`; never pass that
+globally into `make minikube-t2`. `branch-profile-pf-health` starts PFs then
+STOPS them on EXIT — do not use it as the lasting hold.
+
## State transitions
### Bootstrap
@@@ -136,16 -138,12 +160,20 @@@ rmdir -- "$T2_LOCK_ROOT/<profile>.recla
rm -rf -- "$T2_LOCK_ROOT/<profile>.lock"
```
- Never remove a lock with a live owner, and never remove the whole lock root.
+ Use only the command for a path that exists: if only the claim exists, run
+ `rmdir`; if only the lock exists, run `rm -rf`; if both exist, remove the empty
+ claim first and then the stale lock. `rmdir` is preferred for the claim because
+ it must be empty. Never remove either path with a live owner/reclaimer, and
+ never remove the whole lock root.
+After bootstrap or reconcile, `make minikube-t2` calls `pre-gate-sync` with
+`--skip-port-forwards`. Never pass that flag globally into `make minikube-t2`.
+T1 opens its own `control-postgres` port-forward and
+does not inherit Control UI stack forwards. Do not kill this lane's
+`branch-profile-pf`. `t2_process_check` accepts only
+real `kubectl` port-forward PIDs recorded in the profile cache or legacy
+`/tmp/pf-<profile>-*.pid`.
+
## Preconditions and secrets
The runner checks required namespaces, Services, Secret names, ConfigMap names,
@@@ -153,15 -151,29 +181,31 @@@ the `control-postgres` PVC/deployment,
image manifest/source, and real `kubectl port-forward` processes for this
profile. The conflict check is a loose argv pre-filter (`kubectl` as argv0 or
path token plus a later standalone `port-forward` token; flags may sit
- between them) plus a `comm=kubectl` hardening and a PID allowlist.
- Allowed port-forward PIDs live in
- `$HOME/.cache/clerum/minikube-profiles/<profile>/pids/*.pid` (and the
- legacy `/tmp/pf-<profile>-*.pid` files written by `pf-all-stack.sh`).
+ between them), followed by exact `comm`, argv, PID/start-time, profile,
+ context, canonical worktree, Service, and port bindings. Each live process
+ must have exactly one atomic `0600` ownership record under
+ `$HOME/.cache/clerum/minikube-profiles/<profile>/pids/`. A live legacy
+ `/tmp/pf-<profile>-*.pid` record cannot be adopted or killed because it lacks
+ the full binding; dead legacy records may be pruned. Registered pidfiles are
+ also checked when `ps` no longer lists a child, and a successful user-facing
+ health probe is followed by exact process/start-time/argv revalidation.
`make minikube-t2` invokes `pre-gate-sync` with `--skip-port-forwards` so the
-orchestrator does not plant forwards that fail its own T2 check. Secret values
+orchestrator does not plant forwards that fail its own T2 check. The Control
+UI / Desktop hold stays on the host via the first-hand helper above; do not
+replace it with `make minikube-pf-all-bg`. Secret values
- are never printed. The local Real PostgreSQL lane resolves the
+ are never printed.
+
+ Docker endpoint discovery runs before isolation and accepts only an explicit
+ local Unix socket or loopback TCP endpoint. The endpoint is then pinned while
+ Docker uses an empty task-local config; ambient auth, credential helpers,
+ custom headers, and context precedence do not cross that boundary. Public
+ pulls remain unauthenticated. A private pull must opt in with an explicit
+ `MINIKUBE_DOCKER_AUTH_CONFIG`, scoped only to that pull. Docker probes, pulls,
+ builds, Minikube image operations, Minikube status/docker-env, Kubernetes node
+ inventory, and targeted health commands all have validated finite deadlines
+ and process-group cleanup on timeout or interrupt.
+
+ The local Real PostgreSQL lane resolves the
`control-postgres` Secret using the explicit context, constructs its admin DSN
only in process memory, and passes it only to the shared-server suites. Suites
that drop or rewrite cluster-global roles (`db.realPostgresMigration`,
diff --cc host-context-controller/package-lock.json
index 9f10b8432,50434a9be..f406d893c
--- a/host-context-controller/package-lock.json
+++ b/host-context-controller/package-lock.json
@@@ -1,12 -1,12 +1,12 @@@
{
"name": "clerum-host-context-controller",
- "version": "0.1.239",
- "version": "0.1.232",
++ "version": "0.1.240",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-host-context-controller",
- "version": "0.1.239",
- "version": "0.1.232",
++ "version": "0.1.240",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@clerum/image-policy": "file:../packages/image-policy",
diff --cc host-context-controller/package.json
index 37be548c1,d2d6ee4e2..f98cd3935
--- a/host-context-controller/package.json
+++ b/host-context-controller/package.json
@@@ -1,6 -1,6 +1,6 @@@
{
"name": "clerum-host-context-controller",
- "version": "0.1.239",
- "version": "0.1.232",
++ "version": "0.1.240",
"description": "Host Context Controller - provides McpServer CRDs to mcp-host via REST API",
"main": "dist/main.js",
"engines": {
diff --cc scripts/minikube/build-images.sh
index 8eeb8954d,d84393ece..c4cdcbf6d
--- a/scripts/minikube/build-images.sh
+++ b/scripts/minikube/build-images.sh
@@@ -217,6 -290,107 +290,109 @@@ if [ "$SKIP_UIS" = true ]; the
MINIKUBE_BUILD_DESKTOP_IMAGE=false
fi
+ # All images built in this session. Every entry here must have a matching
+ # row in deploy/images.json (via localRef()) -- scripts/tests/test-images-
+ # manifest.sh enforces it. This declaration intentionally precedes every
+ # runtime call so an invalid --only selector cannot acquire a lease or touch a
+ # daemon before it is rejected.
+ ALL_IMAGES=(
+ "clerum/host-context-controller:test"
+ "clerum/workflow-recipes:test"
+ "clerum/workflow-coordinator:test"
+ "clerum/workflow-snippet-runner:test"
+ "clerum/workflow-custom-sdk-e2e:test"
+ "clerum/workflow-plugin-sdk-e2e:test"
+ "clerum/mcp-host:test"
+ "clerum/mcp-host-slim:test"
+ "clerum/mcp-host-full:test"
+ "clerum/mcp-proxy:test"
+ "clerum/nginx-egress-proxy:test"
+ "clerum/gfs-controller:test"
+ "clerum/control-api:test"
+ "clerum/external-rest-api:test"
+ "clerum/rpc-proxy:test"
+ "clerum/webhook-proxy:test"
++ "clerum/codex-llm-proxy:test"
+ "clerum/webhook-gateway:test"
+ "clerum/channel-reader:test"
+ "clerum/workflow-approval-request-reader:test"
+ "clerum/stdio-bridge:test"
+ "clerum/control-ui:test"
+ "clerum/profile-ui:test"
+ "clerum/mock-mcp-server:test"
+ "clerum/mock-stdio-mcp-server:test"
+ "clerum/workspace-files-controller:test"
+ )
+
+ KNOWN_BUILD_NAMES=(
+ hcc
+ wrc
+ workflow-coordinator
+ workflow-snippet-runner
+ workflow-custom-sdk-e2e
+ workflow-plugin-sdk-e2e
+ mcp-host
+ mcp-host-slim
+ mcp-host-full
+ mcp-proxy
+ nginx-egress-proxy
+ gfs-controller
+ control-api
+ external-rest-api
+ rpc-proxy
+ webhook-proxy
++ codex-llm-proxy
+ webhook-gateway
+ channel-reader
+ workflow-approval-request-reader
+ stdio-bridge
+ mock-mcp
+ mock-stdio-mcp
+ workspace-files-controller
+ )
+
+ if [ "$MINIKUBE_BUILD_DESKTOP_IMAGE" = "true" ]; then
+ ALL_IMAGES+=("clerum/mcp-host-desktop:test")
+ KNOWN_BUILD_NAMES+=(mcp-host-desktop)
+ fi
+
+ if [ "$MINIKUBE_BUILD_PLAYWRIGHT_MCP_IMAGE" = "true" ]; then
+ ALL_IMAGES+=("clerum/playwright-mcp-server:test")
+ KNOWN_BUILD_NAMES+=(playwright-mcp)
+ fi
+
+ if [ "$MINIKUBE_BUILD_AIRTABLE_MCP_IMAGE" = "true" ]; then
+ ALL_IMAGES+=("clerum/airtable-mcp-server:test")
+ KNOWN_BUILD_NAMES+=(airtable-mcp)
+ fi
+
+ if [ "$SKIP_UIS" = true ]; then
+ FILTERED_IMAGES=()
+ for image in "${ALL_IMAGES[@]}"; do
+ case "$image" in
+ clerum/control-ui:*|clerum/profile-ui:*) continue ;;
+ *) FILTERED_IMAGES+=("$image") ;;
+ esac
+ done
+ ALL_IMAGES=("${FILTERED_IMAGES[@]}")
+ else
+ KNOWN_BUILD_NAMES+=(control-ui profile-ui)
+ fi
+
+ if [[ "$ONLY_REQUESTED" == true ]]; then
+ SELECTOR_MATCHED=false
+ for candidate in "${ALL_IMAGES[@]}" "${KNOWN_BUILD_NAMES[@]}"; do
+ if [[ "$candidate" == *"$ONLY_SVC"* ]]; then
+ SELECTOR_MATCHED=true
+ break
+ fi
+ done
+ if [[ "$SELECTOR_MATCHED" != true ]]; then
+ printf 'Unknown --only selector: %s\n' "$ONLY_SVC" >&2
+ exit 2
+ fi
+ fi
+
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
diff --cc tests/e2e/package-lock.json
index 7198158b0,2b05ec0ef..6aa3b2259
--- a/tests/e2e/package-lock.json
+++ b/tests/e2e/package-lock.json
@@@ -1,12 -1,12 +1,12 @@@
{
"name": "clerum-e2e-tests",
- "version": "0.1.71",
- "version": "0.1.69",
++ "version": "0.1.72",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-e2e-tests",
- "version": "0.1.71",
- "version": "0.1.69",
++ "version": "0.1.72",
"devDependencies": {
"@types/jsonwebtoken": "^9.0.10",
"@types/node": "^22.0.0",
diff --cc tests/e2e/package.json
index 7ede287f0,9f389a828..fa7c77be8
--- a/tests/e2e/package.json
+++ b/tests/e2e/package.json
@@@ -1,6 -1,6 +1,6 @@@
{
"name": "clerum-e2e-tests",
- "version": "0.1.71",
- "version": "0.1.69",
++ "version": "0.1.72",
"private": true,
"type": "module",
"scripts": {