Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix: address PR 416 adversarial findings
Alfredo Lopez4d54b7947b1d
diff --git a/.gitignore b/.gitignoreindex 02b789b6d..605ea62ab 100644--- a/.gitignore+++ b/.gitignore@@ -97,6 +97,10 @@ docs/analysis/.local-notes/.ralph/plans/+# AutoResearch session outputs (local-only; may contain workstation paths)+autoresearch.*+autoresearch.runs/+# Agent session transcripts can contain internal infrastructure details.session-ses_*.mddiff --git a/Makefile b/Makefileindex ecbe24d04..376106c29 100644--- a/Makefile+++ b/Makefile@@ -264,17 +264,36 @@ minikube-deploy-all-body:@# acquisition recorded. It runs HERE, after minikube-detect-k8s-api-ip@# above, because an overridden tag renders from a copy of deploy/ that must@# already contain the generated k8s-api-ip.yaml.+ @set -o pipefail; \render_dir="$$(bash scripts/minikube/image-mode.sh --render-dir)" && \if [ "$(MINIKUBE_GFS_MUTATION)" = "true" ]; then \kubectl --context=$(MINIKUBE_PROFILE) kustomize "$$render_dir" | kubectl --context=$(MINIKUBE_PROFILE) apply -f -; \else \- kubectl --context=$(MINIKUBE_PROFILE) kustomize "$$render_dir" | python3 scripts/minikube/filter-gfs-resources.py | kubectl --context=$(MINIKUBE_PROFILE) apply -f -; \+ filtered_manifest="$$(mktemp "$${TMPDIR:-/tmp}/evenfire-gfs-filter.XXXXXX")"; \+ trap 'rm -f -- "$$filtered_manifest"' EXIT; \+ if ! kubectl --context=$(MINIKUBE_PROFILE) kustomize "$$render_dir" | python3 scripts/minikube/filter-gfs-resources.py >"$$filtered_manifest"; then \+ echo "[minikube-deploy-all] failed to render or filter the non-GFS overlay" >&2; exit 1; \+ fi; \+ if [ -s "$$filtered_manifest" ]; then \+ kubectl --context=$(MINIKUBE_PROFILE) apply -f "$$filtered_manifest"; \+ else \+ echo "[minikube-deploy-all] filtered overlay contains no non-GFS resources; skipping apply"; \+ fi; \fiCONTEXT=$(MINIKUBE_PROFILE) bash deploy/scripts/apply-inter-service-tokens.sh@if [ "$(MINIKUBE_GFS_MUTATION)" = "true" ]; then \$(KC) apply -f deploy/overlays/minikube/instances/; \else \- python3 scripts/minikube/filter-gfs-resources.py deploy/overlays/minikube/instances/*.yaml | $(KC) apply -f -; \+ filtered_manifest="$$(mktemp "$${TMPDIR:-/tmp}/evenfire-gfs-instances-filter.XXXXXX")"; \+ trap 'rm -f -- "$$filtered_manifest"' EXIT; \+ if ! python3 scripts/minikube/filter-gfs-resources.py deploy/overlays/minikube/instances/*.yaml >"$$filtered_manifest"; then \+ echo "[minikube-deploy-all] failed to filter the non-GFS instance resources" >&2; exit 1; \+ fi; \+ if [ -s "$$filtered_manifest" ]; then \+ $(KC) apply -f "$$filtered_manifest"; \+ else \+ echo "[minikube-deploy-all] filtered instances contain no non-GFS resources; skipping apply"; \+ fi; \fi@# Kustomize reapplies the persisted mcp-host ConfigMap, which can overwrite@# CLERUM_AUTH_JWT_PUBLIC_KEY with an older repo value. Always re-sync from@@ -341,7 +360,7 @@ minikube-deploy-crds-body:T2_SKIP_LOCK=true T2_LOCK_TOKEN="$(T2_LOCK_TOKEN)" \bash scripts/minikube/require-t2-mutation-lock.shkubectl --context=$(MINIKUBE_PROFILE) apply -f deploy/base/namespaces.yaml- @if [ "$(MINIKUBE_GFS_MUTATION)" = "false" ]; then \+ @if [ "$(MINIKUBE_GFS_MUTATION)" != "true" ]; then \echo "[minikube-deploy-crds] GFS CRD mutation disabled for this non-T2 gate"; \helm upgrade --install --skip-crds --kube-context=$(MINIKUBE_PROFILE) clerum-crds ./charts/clerum-crds; \for crd in ./charts/clerum-crds/crds/*.yaml; do \@@ -392,7 +411,7 @@ minikube-gen-keys-body:@T2_PROJECT_DIR="$(CURDIR)" T2_PROFILE="$(MINIKUBE_PROFILE)" T2_CONTEXT="$(MINIKUBE_PROFILE)" \T2_SKIP_LOCK=true T2_LOCK_TOKEN="$(T2_LOCK_TOKEN)" \bash scripts/minikube/require-t2-mutation-lock.sh- @scripts/minikube/generate-keys.sh+ @scripts/minikube/generate-keys.sh@if [ -f deploy/minikube/secrets/jwt-signing-keys.yaml ]; then \$(KC) apply -f deploy/minikube/secrets/jwt-signing-keys.yaml; \else \@@ -451,11 +470,12 @@ minikube-sync-auth-key-body:.PHONY: minikube-sync-auth-key-if-presentminikube-sync-auth-key-if-present: ## Sync JWT public key only when minikube auth resources already exist- @if [ -z "$(T2_LOCK_TOKEN)" ]; then echo "Skipping auth key sync (canonical T2 profile lock is not held)."; exit 0; fi@if ! $(KC) get secret rpc-proxy-secrets -n rpc-proxy >/dev/null 2>&1; then \echo "Skipping auth key sync (rpc-proxy-secrets not found yet)."; \elif ! $(KC) get configmap mcp-host-config -n mcp-host >/dev/null 2>&1; then \echo "Skipping auth key sync (mcp-host-config not found yet)."; \+ elif [ "$(T2_MUTATION_LOCK_WRAPPED)" = "true" ]; then \+ $(MAKE) --no-print-directory minikube-sync-auth-key-body; \else \$(MAKE) --no-print-directory minikube-sync-auth-key; \fidiff --git a/autoresearch.ideas.md b/autoresearch.ideas.mddeleted file mode 100644index 581ad421e..000000000--- a/autoresearch.ideas.md+++ /dev/null@@ -1,3 +0,0 @@-# AutoResearch Ideas--- [ ] Record the next scoped hypothesis after each packet.diff --git a/autoresearch.jsonl b/autoresearch.jsonldeleted file mode 100644index 423c18dc1..000000000--- a/autoresearch.jsonl+++ /dev/null@@ -1,2 +0,0 @@-{"asi": {"evidence": "Configuration recorded", "hypothesis": "Session setup", "next_action_hint": "Run doctor, then next.", "rollback_reason": ""}, "baseline_policy": "initial", "baseline_policy_source": "explicit", "benchmark_command": "PYTHONDONTWRITEBYTECODE=1 bash scripts/tests/test-minikube-profile-readiness.sh", "checks_command": "bash scripts/tests/test-minikube-t2-scenarios.sh", "commit_paths": [], "created_at": "2026-08-21T08:47:13+00:00", "delta": null, "direction": "lower", "entry_type": "config", "generation_spine_enabled": true, "goal": "Reduce Minikube startup overhead while preserving strict branch-profile ownership and readiness gates", "hard_gates": {"eval_harness_unchanged": true, "finite_primary_metric": true, "fresh_packet": true, "no_eval_gaming": true, "no_scope_violation": true, "no_secret_leak": true, "tests_pass": true}, "metric": "evenfire_minikube_healthy_start_calls", "minimum_delta": 0.0, "scope": "scripts/minikube/start.sh,scripts/minikube/t2-common.sh,scripts/minikube/profile-readiness.sh,scripts/tests/test-minikube-profile-readiness.sh,scripts/tests/test-minikube-t2-scenarios.sh", "scorecard_id": "ralph_autoresearch_v1", "scorecard_path": "/Users/alfredolopez/Documents/GitHub/codex-ralph-vault-loop/config/scorecards/ralph_autoresearch_v1.yaml", "scorecard_version": 1, "segment_id": "reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z", "status": "config"}-{"asi": {"evidence": "Logged from latest packet evidence", "hypothesis": "Manual AutoResearch packet", "next_action_hint": "Read state, inspect ASI, and choose the next scoped packet.", "rollback_reason": ""}, "baseline": 0.0, "baseline_policy": "initial", "commit_paths": [], "created_at": "2026-08-21T09:11:18+00:00", "delta": 0.0, "description": "", "direction": "lower", "entry_type": "packet", "hard_gates": {"eval_harness_unchanged": true, "finite_primary_metric": true, "fresh_packet": true, "no_eval_gaming": true, "no_scope_violation": true, "no_secret_leak": true, "tests_pass": true}, "last_run_path": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.last-run.json", "metric": "evenfire_minikube_healthy_start_calls", "metrics": {"evenfire_minikube_healthy_start_calls": 0.0, "evenfire_minikube_partial_start_calls": 1.0}, "scorecard_id": "ralph_autoresearch_v1", "scorecard_version": 1, "segment_id": "reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z", "status": "keep"}diff --git a/autoresearch.last-run.json b/autoresearch.last-run.jsondeleted file mode 100644index c8b8b22c8..000000000--- a/autoresearch.last-run.json+++ /dev/null@@ -1,62 +0,0 @@-{- "asi_template": {- "evidence": "candidate_patch=captured (tracked_diff_detected); metrics=evenfire_minikube_healthy_start_calls=0.0, evenfire_minikube_partial_start_calls=1.0; baseline=0.0; delta=0.0; hard_gates=all true.",- "family": "autoresearch",- "hypothesis": "The captured candidate may improve the configured goal: Reduce Minikube startup overhead while preserving strict branch-profile ownership and readiness gates.",- "lane": "local",- "next_action_hint": "Review the candidate evidence, metric delta, and hard gates before logging a keep/discard decision.",- "risk": "candidate_requires_review",- "rollback_reason": "Revert the scoped candidate changes if validation fails or the candidate is discarded."- },- "baseline": 0.0,- "baseline_policy": "initial",- "baseline_policy_source": "explicit",- "candidate_patch": {- "decision_required": true,- "reason": "tracked_diff_detected",- "status": "captured"- },- "checks": {- "returncode": 0- },- "command_returncode": 0,- "cwd": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire",- "delta": 0.0,- "freshness_fingerprint": "29e5278281304861c420dafd107ec9356e235561cca873d4810051983cbdc52a",- "generation": {- "files": {- "asi": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/asi.json",- "candidate_patch": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/candidate.patch",- "checks": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/checks.json",- "command": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/command.json",- "decision": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/decision.json",- "hard_gates": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/hard_gates.json",- "improvement": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/improvement.md",- "manifest": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/manifest.json",- "metrics": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/metrics.json",- "scan_report": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/scan_report.json",- "stderr_preview": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/benchmark.stderr.preview.txt",- "stdout_preview": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/benchmark.stdout.preview.txt",- "trace": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/trace.json"- },- "generation_id": "gen_001",- "path": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001"- },- "hard_gates": {- "eval_harness_unchanged": true,- "finite_primary_metric": true,- "fresh_packet": true,- "no_eval_gaming": true,- "no_scope_violation": true,- "no_secret_leak": true,- "tests_pass": true- },- "metric": "evenfire_minikube_healthy_start_calls",- "metrics": {- "evenfire_minikube_healthy_start_calls": 0.0,- "evenfire_minikube_partial_start_calls": 1.0- },- "ok": true,- "primary_metric_present": true,- "segment_id": "reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z"-}diff --git a/autoresearch.md b/autoresearch.mddeleted file mode 100644index 01f264a52..000000000--- a/autoresearch.md+++ /dev/null@@ -1,18 +0,0 @@-# AutoResearch: Reduce Minikube startup overhead while preserving strict branch-profile ownership and readiness gates--## Objective-Reduce Minikube startup overhead while preserving strict branch-profile ownership and readiness gates--## Metric-- Primary: evenfire_minikube_healthy_start_calls (lower is better)-- Baseline policy: initial--## Scope-scripts/minikube/start.sh,scripts/minikube/t2-common.sh,scripts/minikube/profile-readiness.sh,scripts/tests/test-minikube-profile-readiness.sh,scripts/tests/test-minikube-t2-scenarios.sh--## Commands-- Benchmark: `PYTHONDONTWRITEBYTECODE=1 bash scripts/tests/test-minikube-profile-readiness.sh`-- Checks: `bash scripts/tests/test-minikube-t2-scenarios.sh`--## Safety-Codex main decides. Scorecards and gates decide keep/discard. RED content must not be logged.diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/asi.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/asi.jsondeleted file mode 100644index e552d52bb..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/asi.json+++ /dev/null@@ -1,9 +0,0 @@-{- "evidence": "candidate_patch=captured (tracked_diff_detected); metrics=evenfire_minikube_healthy_start_calls=0.0, evenfire_minikube_partial_start_calls=1.0; baseline=0.0; delta=0.0; hard_gates=all true.",- "family": "autoresearch",- "hypothesis": "The captured candidate may improve the configured goal: Reduce Minikube startup overhead while preserving strict branch-profile ownership and readiness gates.",- "lane": "local",- "next_action_hint": "Review the candidate evidence, metric delta, and hard gates before logging a keep/discard decision.",- "risk": "candidate_requires_review",- "rollback_reason": "Revert the scoped candidate changes if validation fails or the candidate is discarded."-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/benchmark.stderr.preview.txt b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/benchmark.stderr.preview.txtdeleted file mode 100644index e69de29bb..000000000diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/benchmark.stdout.preview.txt b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/benchmark.stdout.preview.txtdeleted file mode 100644index 473a509f3..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/benchmark.stdout.preview.txt+++ /dev/null@@ -1,3 +0,0 @@-METRIC evenfire_minikube_healthy_start_calls=0-METRIC evenfire_minikube_partial_start_calls=1-PASS: strict profile readiness and healthy-profile startup reusediff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/candidate.patch b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/candidate.patchdeleted file mode 100644index 320c69982..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/candidate.patch+++ /dev/null@@ -1,16 +0,0 @@-Makefile | 73 +++++++++++++++++------ deploy/scripts/converge-control-db-after-reset.sh | 19 ++++++- deploy/scripts/provision-gfs-runtime.sh | 6 +-- deploy/scripts/reconcile-gfs-deploy-credentials.sh | 18 +++---- scripts/minikube/pre-gate-sync.sh | 3 +-- scripts/minikube/start.sh | 25 +++++++-- scripts/minikube/sync-auth-key.sh | 68 +++++++++++++-------- scripts/minikube/t2-common.sh | 28 ++++++---- scripts/tests/test-gfs-deploy-contract.sh | 56 ++++++++++++++---- scripts/tests/test-minikube-makefile.sh | 9 ++-- scripts/tests/test-minikube-pre-gate-shadow.sh | 5 +-- .../tests/test-minikube-sync-auth-key-durable.sh | 8 +++- scripts/tests/test-minikube-sync-auth-key.sh | 8 +++- scripts/tests/test-minikube-t2-contract.sh | 5 +-- scripts/tests/test-minikube-t2-scenarios.sh | 9 +++- 15 files changed, 269 insertions(+), 71 deletions(-)diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/checks.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/checks.jsondeleted file mode 100644index d7fe282f5..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/checks.json+++ /dev/null@@ -1,6 +0,0 @@-{- "benchmark_returncode": 0,- "checks": {- "returncode": 0- }-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/command.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/command.jsondeleted file mode 100644index 7941cc50a..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/command.json+++ /dev/null@@ -1,10 +0,0 @@-{- "benchmark_command": "PYTHONDONTWRITEBYTECODE=1 bash scripts/tests/test-minikube-profile-readiness.sh",- "checks_command": "bash scripts/tests/test-minikube-t2-scenarios.sh",- "cwd": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire",- "env_allowlist": [- "PYTHONDONTWRITEBYTECODE",- "RALPH_AUTORESEARCH_GENERATION_SPINE"- ],- "timeout": 120-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/decision.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/decision.jsondeleted file mode 100644index d375bbbd9..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/decision.json+++ /dev/null@@ -1,9 +0,0 @@-{- "baseline": 0.0,- "baseline_policy": "initial",- "candidate_patch_status": "captured",- "decision_required": true,- "delta": 0.0,- "reason": "candidate_review_pending",- "status": "pending"-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/hard_gates.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/hard_gates.jsondeleted file mode 100644index 585e58047..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/hard_gates.json+++ /dev/null@@ -1,9 +0,0 @@-{- "eval_harness_unchanged": true,- "finite_primary_metric": true,- "fresh_packet": true,- "no_eval_gaming": true,- "no_scope_violation": true,- "no_secret_leak": true,- "tests_pass": true-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/improvement.md b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/improvement.mddeleted file mode 100644index 88142ec07..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/improvement.md+++ /dev/null@@ -1,25 +0,0 @@-# AutoResearch Packet Synthesis--- Goal: Reduce Minikube startup overhead while preserving strict branch-profile ownership and readiness gates-- Recommendation status: candidate-review-required-- Candidate patch: `captured` (tracked_diff_detected)-- Primary metric: `evenfire_minikube_healthy_start_calls=0.0`-- Emitted metrics: evenfire_minikube_healthy_start_calls=0.0, evenfire_minikube_partial_start_calls=1.0-- Baseline: 0.0-- Delta: 0.0-- Hard gates: all true--## Evidence-The packet completed the configured benchmark and checks and captured their metric and hard-gate results.--## Expected Benefit-The generation bundle is self-explanatory: it distinguishes harness validation from an evaluated candidate and carries actionable ASI.--## Risk-A captured working-tree summary identifies candidate scope but is not proof that the behavior is correct.--## Validation Needed-Inspect the scoped changes and run the validation required by the target repository before deciding.--## Recommendation-Review the candidate, metric delta, and hard gates before logging any keep/discard decision.diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/manifest.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/manifest.jsondeleted file mode 100644index 1206e9aa8..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/manifest.json+++ /dev/null@@ -1,6 +0,0 @@-{- "created_at": "2026-08-21T08:47:44+00:00",- "generation_id": "gen_000",- "schema": "ralph-autoresearch-generation-v1",- "segment_id": "reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z"-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/metrics.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/metrics.jsondeleted file mode 100644index 47153c0ee..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/metrics.json+++ /dev/null@@ -1,4 +0,0 @@-{- "evenfire_minikube_healthy_start_calls": 0.0,- "evenfire_minikube_partial_start_calls": 1.0-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/scan_report.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/scan_report.jsondeleted file mode 100644index 10deae609..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/scan_report.json+++ /dev/null@@ -1,105 +0,0 @@-{- "created_at": "2026-08-21T08:47:44+00:00",- "fail_closed": true,- "required_artifacts": [- "asi",- "candidate_patch",- "checks",- "command",- "decision",- "hard_gates",- "improvement",- "manifest",- "metrics",- "stderr_preview",- "stdout_preview",- "trace"- ],- "scanned_artifacts": {- "asi": {- "bytes": 710,- "path": "asi.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "5cf55cc883d4365cc5d5868aa51e4a41044da3fa46434050e4c98473bd833d58"- },- "candidate_patch": {- "bytes": 1031,- "path": "candidate.patch",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "fe86c5f7ee9a3465aab0e4d6198b0d629239fff9ee76e9ece211eed059d0923e"- },- "checks": {- "bytes": 71,- "path": "checks.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "8bc9756109f2b43a0be6ad6876f0545bfbfa89dd1e0d99a50b89193c44ea96d8"- },- "command": {- "bytes": 361,- "path": "command.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "b36895879c6e14c12abc528d32401d097f8cf3ba46211c177380c788639d3342"- },- "decision": {- "bytes": 202,- "path": "decision.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "daf35fb6b1984dfb923e7ed47396d308c4a5f115a8a481f8060177b6ca16d49c"- },- "hard_gates": {- "bytes": 198,- "path": "hard_gates.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "1a8051584b1188c3fd0fc7e6351dcae0bd5bd23b669ad9ef55343d8ada0a0838"- },- "improvement": {- "bytes": 1091,- "path": "improvement.md",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "fcbb8b2fce300d5a9f6737fc0215cf678e9debf4dba7c6d736007ab7cb194181"- },- "manifest": {- "bytes": 213,- "path": "manifest.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "01cf5049eb9b64a05f84d126ae1a01b6d02dc071bc040165128f2b1272ddbfbf"- },- "metrics": {- "bytes": 99,- "path": "metrics.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "733128802267e24685db0937895e0af2b7c7633645df027484092768ca27e3e9"- },- "stderr_preview": {- "bytes": 0,- "path": "benchmark.stderr.preview.txt",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"- },- "stdout_preview": {- "bytes": 159,- "path": "benchmark.stdout.preview.txt",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "5ad037e89fb12913fd50b4440da571c0eb4c0fa0ba3139dde0d1b423c98b45f9"- },- "trace": {- "bytes": 258,- "path": "trace.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "87c0873bc7f1558f47ac8d3d98da924c670fae3b1244d92c61b33db0a1c8655f"- }- },- "scanner": "sensitive_content.is_red"-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/trace.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/trace.jsondeleted file mode 100644index 592016706..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_000/trace.json+++ /dev/null@@ -1,7 +0,0 @@-{- "candidate_patch_reason": "tracked_diff_detected",- "candidate_patch_status": "captured",- "freshness_fingerprint": "8a313dbfdcf61f2dd11464915212caa7cd0b7133ba4c3306a5804218eed56179",- "output_preview_bytes": 65536,- "primary_metric_present": true-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/asi.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/asi.jsondeleted file mode 100644index e552d52bb..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/asi.json+++ /dev/null@@ -1,9 +0,0 @@-{- "evidence": "candidate_patch=captured (tracked_diff_detected); metrics=evenfire_minikube_healthy_start_calls=0.0, evenfire_minikube_partial_start_calls=1.0; baseline=0.0; delta=0.0; hard_gates=all true.",- "family": "autoresearch",- "hypothesis": "The captured candidate may improve the configured goal: Reduce Minikube startup overhead while preserving strict branch-profile ownership and readiness gates.",- "lane": "local",- "next_action_hint": "Review the candidate evidence, metric delta, and hard gates before logging a keep/discard decision.",- "risk": "candidate_requires_review",- "rollback_reason": "Revert the scoped candidate changes if validation fails or the candidate is discarded."-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/benchmark.stderr.preview.txt b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/benchmark.stderr.preview.txtdeleted file mode 100644index e69de29bb..000000000diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/benchmark.stdout.preview.txt b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/benchmark.stdout.preview.txtdeleted file mode 100644index 473a509f3..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/benchmark.stdout.preview.txt+++ /dev/null@@ -1,3 +0,0 @@-METRIC evenfire_minikube_healthy_start_calls=0-METRIC evenfire_minikube_partial_start_calls=1-PASS: strict profile readiness and healthy-profile startup reusediff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/candidate.patch b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/candidate.patchdeleted file mode 100644index 320c69982..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/candidate.patch+++ /dev/null@@ -1,16 +0,0 @@-Makefile | 73 +++++++++++++++++------ deploy/scripts/converge-control-db-after-reset.sh | 19 ++++++- deploy/scripts/provision-gfs-runtime.sh | 6 +-- deploy/scripts/reconcile-gfs-deploy-credentials.sh | 18 +++---- scripts/minikube/pre-gate-sync.sh | 3 +-- scripts/minikube/start.sh | 25 +++++++-- scripts/minikube/sync-auth-key.sh | 68 +++++++++++++-------- scripts/minikube/t2-common.sh | 28 ++++++---- scripts/tests/test-gfs-deploy-contract.sh | 56 ++++++++++++++---- scripts/tests/test-minikube-makefile.sh | 9 ++-- scripts/tests/test-minikube-pre-gate-shadow.sh | 5 +-- .../tests/test-minikube-sync-auth-key-durable.sh | 8 +++- scripts/tests/test-minikube-sync-auth-key.sh | 8 +++- scripts/tests/test-minikube-t2-contract.sh | 5 +-- scripts/tests/test-minikube-t2-scenarios.sh | 9 +++- 15 files changed, 269 insertions(+), 71 deletions(-)diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/checks.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/checks.jsondeleted file mode 100644index d7fe282f5..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/checks.json+++ /dev/null@@ -1,6 +0,0 @@-{- "benchmark_returncode": 0,- "checks": {- "returncode": 0- }-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/command.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/command.jsondeleted file mode 100644index da7b33536..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/command.json+++ /dev/null@@ -1,10 +0,0 @@-{- "benchmark_command": "PYTHONDONTWRITEBYTECODE=1 bash scripts/tests/test-minikube-profile-readiness.sh",- "checks_command": "bash scripts/tests/test-minikube-t2-scenarios.sh",- "cwd": "/Users/alfredolopez/.codex/worktrees/f3d2/evenfire",- "env_allowlist": [- "PYTHONDONTWRITEBYTECODE",- "RALPH_AUTORESEARCH_GENERATION_SPINE"- ],- "timeout": 300-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/decision.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/decision.jsondeleted file mode 100644index 022995aef..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/decision.json+++ /dev/null@@ -1,7 +0,0 @@-{- "baseline": 0.0,- "baseline_policy": "initial",- "delta": 0.0,- "logged_at": "2026-08-21T09:11:18+00:00",- "status": "keep"-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/hard_gates.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/hard_gates.jsondeleted file mode 100644index 585e58047..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/hard_gates.json+++ /dev/null@@ -1,9 +0,0 @@-{- "eval_harness_unchanged": true,- "finite_primary_metric": true,- "fresh_packet": true,- "no_eval_gaming": true,- "no_scope_violation": true,- "no_secret_leak": true,- "tests_pass": true-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/improvement.md b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/improvement.mddeleted file mode 100644index 88142ec07..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/improvement.md+++ /dev/null@@ -1,25 +0,0 @@-# AutoResearch Packet Synthesis--- Goal: Reduce Minikube startup overhead while preserving strict branch-profile ownership and readiness gates-- Recommendation status: candidate-review-required-- Candidate patch: `captured` (tracked_diff_detected)-- Primary metric: `evenfire_minikube_healthy_start_calls=0.0`-- Emitted metrics: evenfire_minikube_healthy_start_calls=0.0, evenfire_minikube_partial_start_calls=1.0-- Baseline: 0.0-- Delta: 0.0-- Hard gates: all true--## Evidence-The packet completed the configured benchmark and checks and captured their metric and hard-gate results.--## Expected Benefit-The generation bundle is self-explanatory: it distinguishes harness validation from an evaluated candidate and carries actionable ASI.--## Risk-A captured working-tree summary identifies candidate scope but is not proof that the behavior is correct.--## Validation Needed-Inspect the scoped changes and run the validation required by the target repository before deciding.--## Recommendation-Review the candidate, metric delta, and hard gates before logging any keep/discard decision.diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/manifest.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/manifest.jsondeleted file mode 100644index bf1fba960..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/manifest.json+++ /dev/null@@ -1,6 +0,0 @@-{- "created_at": "2026-08-21T08:53:23+00:00",- "generation_id": "gen_001",- "schema": "ralph-autoresearch-generation-v1",- "segment_id": "reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z"-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/metrics.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/metrics.jsondeleted file mode 100644index 47153c0ee..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/metrics.json+++ /dev/null@@ -1,4 +0,0 @@-{- "evenfire_minikube_healthy_start_calls": 0.0,- "evenfire_minikube_partial_start_calls": 1.0-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/scan_report.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/scan_report.jsondeleted file mode 100644index 03ad07013..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/scan_report.json+++ /dev/null@@ -1,105 +0,0 @@-{- "created_at": "2026-08-21T08:53:23+00:00",- "fail_closed": true,- "required_artifacts": [- "asi",- "candidate_patch",- "checks",- "command",- "decision",- "hard_gates",- "improvement",- "manifest",- "metrics",- "stderr_preview",- "stdout_preview",- "trace"- ],- "scanned_artifacts": {- "asi": {- "bytes": 710,- "path": "asi.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "5cf55cc883d4365cc5d5868aa51e4a41044da3fa46434050e4c98473bd833d58"- },- "candidate_patch": {- "bytes": 1031,- "path": "candidate.patch",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "fe86c5f7ee9a3465aab0e4d6198b0d629239fff9ee76e9ece211eed059d0923e"- },- "checks": {- "bytes": 71,- "path": "checks.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "8bc9756109f2b43a0be6ad6876f0545bfbfa89dd1e0d99a50b89193c44ea96d8"- },- "command": {- "bytes": 361,- "path": "command.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "f5adf7b6f8a593440747811661474613156ae4c7ecc0729d1f7f9f30e31e94f4"- },- "decision": {- "bytes": 202,- "path": "decision.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "daf35fb6b1984dfb923e7ed47396d308c4a5f115a8a481f8060177b6ca16d49c"- },- "hard_gates": {- "bytes": 198,- "path": "hard_gates.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "1a8051584b1188c3fd0fc7e6351dcae0bd5bd23b669ad9ef55343d8ada0a0838"- },- "improvement": {- "bytes": 1091,- "path": "improvement.md",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "fcbb8b2fce300d5a9f6737fc0215cf678e9debf4dba7c6d736007ab7cb194181"- },- "manifest": {- "bytes": 213,- "path": "manifest.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "4a30ddfe2a87c7a43ade1dc3602965cb6faebf831109ff68adefd0060346a782"- },- "metrics": {- "bytes": 99,- "path": "metrics.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "733128802267e24685db0937895e0af2b7c7633645df027484092768ca27e3e9"- },- "stderr_preview": {- "bytes": 0,- "path": "benchmark.stderr.preview.txt",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"- },- "stdout_preview": {- "bytes": 159,- "path": "benchmark.stdout.preview.txt",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "5ad037e89fb12913fd50b4440da571c0eb4c0fa0ba3139dde0d1b423c98b45f9"- },- "trace": {- "bytes": 258,- "path": "trace.json",- "scan_status": "pass",- "scanner": "sensitive_content.is_red",- "sha256": "0f9e3d2a8d2b001b560df521c660d4bd09528992f8a036ef53a0214f921c4c3d"- }- },- "scanner": "sensitive_content.is_red"-}diff --git a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/trace.json b/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/trace.jsondeleted file mode 100644index 246568e15..000000000--- a/autoresearch.runs/reduce-minikube-startup-overhead-while-preservin-2026-08-21T084713Z/gen_001/trace.json+++ /dev/null@@ -1,7 +0,0 @@-{- "candidate_patch_reason": "tracked_diff_detected",- "candidate_patch_status": "captured",- "freshness_fingerprint": "29e5278281304861c420dafd107ec9356e235561cca873d4810051983cbdc52a",- "output_preview_bytes": 65536,- "primary_metric_present": true-}diff --git a/deploy/base/control-plane/host-context-controller.yaml b/deploy/base/control-plane/host-context-controller.yamlindex 5ddc05f32..e02982465 100644--- a/deploy/base/control-plane/host-context-controller.yaml+++ b/deploy/base/control-plane/host-context-controller.yaml@@ -23,6 +23,7 @@ spec:# single-writer assumption through the rollout too.strategy:type: Recreate+ # CONTRACT: hcc-rollout-recovery=external-detection-only; owner=evenfire-infra# Recreate + replicas:1 means a botched rollout (new pod never Ready) leaves# /ready 503. Kubernetes will not self-heal that; the evenfire-infra deploy# workflows own automatic `rollout undo --to-revision` for this Deploymentdiff --git a/host-context-controller/src/deploymentStrategy.test.ts b/host-context-controller/src/deploymentStrategy.test.tsindex ff51e3259..537d5b383 100644--- a/host-context-controller/src/deploymentStrategy.test.ts+++ b/host-context-controller/src/deploymentStrategy.test.ts@@ -102,26 +102,13 @@ describe('host-context-controller Deployment strategy', () => {})})- it('documents that the progress deadline is DETECTION ONLY and never rolls back', () => {- // The deadline flips Progressing=False and fails `kubectl rollout- // status`; it does NOT undo anything. If this documented contract is- // deleted from the manifest, a future reader will assume Kubernetes- // self-heals a botched Recreate rollout — the exact D1b failure mode.- expect(yamlSource).toContain('DETECTION ONLY')- expect(yamlSource).toContain('it does not roll back')- expect(yamlSource).toContain('Kubernetes will not self-heal')- })-- it('pins recovery ownership to the evenfire-infra rollout undo (evenfire#391)', () => {- // Recovery is owned by the evenfire-infra deploy workflows via- // `rollout undo --to-revision` for this Deployment only (evenfire#391).- // HCC must NOT grow its own undo runtime, and the manifest must keep- // naming the real owner so a silent deletion of the ownership comment- // fails loudly here.- expect(yamlSource).toContain('evenfire-infra')- expect(yamlSource).toContain('rollout undo --to-revision')- expect(yamlSource).toContain('evenfire#391')- expect(yamlSource).toContain('The deploy job still fails after a successful undo')+ it('keeps the external recovery ownership contract documented', () => {+ // The deadline only detects a stalled rollout. Recovery belongs to the+ // evenfire-infra deploy workflow; this stable marker avoids coupling the+ // test to explanatory prose in the manifest comment.+ expect(yamlSource).toContain(+ '# CONTRACT: hcc-rollout-recovery=external-detection-only; owner=evenfire-infra'+ )})})})diff --git a/scripts/minikube/filter-gfs-resources.py b/scripts/minikube/filter-gfs-resources.pyindex db6e35420..cfdc0239c 100755--- a/scripts/minikube/filter-gfs-resources.py+++ b/scripts/minikube/filter-gfs-resources.py@@ -4,6 +4,12 @@This is used only by non-T2 pre-gate deployment syncs. The filter is explicitabout the small set of cluster-scoped and control-plane GFS boundary objects;unknown documents are retained rather than guessed away.++The input is preserved byte-for-byte apart from removed documents. A small+structural scanner is used instead of a regular expression so document+separators inside block scalars and nested name fields cannot change which+Kubernetes object is filtered. PyYAML is not a repository-wide Python+dependency, while Python itself is already a hard dependency of this path."""from __future__ import annotations@@ -11,17 +17,148 @@ from __future__ import annotationsimport reimport sysfrom pathlib import Path+from typing import Iterator, NamedTuple+++class MappingLine(NamedTuple):+ indent: int+ key: str+ value: str+++MAPPING_LINE = re.compile(+ r"^(?P<indent>[ \t]*)(?P<key>[A-Za-z_][A-Za-z0-9_.-]*):"+ r"(?:[ \t]*(?P<value>.*?))?[ \t]*$"+)+DOCUMENT_START = re.compile(r"^---[ \t]*(?:#.*)?(?:\r?\n)?$")+BLOCK_SCALAR = re.compile(r"^[|>](?:[+-]?[1-9]?|[1-9]?[+-]?)$")+++def indentation(line: str) -> int:+ prefix = line[: len(line) - len(line.lstrip(" \t"))]+ return len(prefix.expandtabs(8))+++def strip_inline_comment(value: str) -> str:+ comment = re.search(r"[ \t]+#", value)+ return value[: comment.start()] if comment else value+++def scalar_value(value: str) -> str:+ value = strip_inline_comment(value).strip()+ if len(value) >= 2 and value[0] == value[-1] and value[0] in {"'", '"'}:+ return value[1:-1]+ return value+++def mapping_line(line: str) -> MappingLine | None:+ match = MAPPING_LINE.match(line.rstrip("\r\n"))+ if not match:+ return None+ return MappingLine(+ indentation(line),+ match.group("key"),+ match.group("value") or "",+ )+++def starts_block_scalar(line: str) -> bool:+ parsed = mapping_line(line)+ if parsed and BLOCK_SCALAR.fullmatch(strip_inline_comment(parsed.value).strip()):+ return True++ sequence_value = re.match(+ r"^[ \t]*-[ \t]+(?P<value>[|>](?:[+-]?[1-9]?|[1-9]?[+-]?))[ \t]*(?:#.*)?$",+ line.rstrip("\r\n"),+ )+ return bool(sequence_value)+++def split_documents(source: str) -> list[str]:+ documents: list[str] = []+ current: list[str] = []+ block_parent_indent: int | None = None++ for line in source.splitlines(keepends=True):+ if DOCUMENT_START.fullmatch(line):+ if current:+ documents.append("".join(current))+ current = []+ block_parent_indent = None+ continue++ if block_parent_indent is not None and line.strip():+ if indentation(line) <= block_parent_indent:+ block_parent_indent = None++ current.append(line)+ if block_parent_indent is None and starts_block_scalar(line):+ block_parent_indent = indentation(line)++ if current:+ documents.append("".join(current))+ return documents-def field(document: str, expression: str) -> str:- match = re.search(expression, document, flags=re.MULTILINE)- return match.group(1) if match else ""+def structural_mappings(document: str) -> Iterator[MappingLine]:+ block_parent_indent: int | None = None+ for line in document.splitlines(keepends=True):+ if block_parent_indent is not None and line.strip():+ if indentation(line) <= block_parent_indent:+ block_parent_indent = None+ else:+ continue+ if block_parent_indent is not None:+ continue++ parsed = mapping_line(line)+ if parsed is not None:+ yield parsed+ if starts_block_scalar(line):+ block_parent_indent = parsed.indent+++def inline_metadata(value: str) -> dict[str, str]:+ if not (value.strip().startswith("{") and value.strip().endswith("}")):+ return {}+ fields: dict[str, str] = {}+ for match in re.finditer(+ r"(?:^|,)\s*(name|namespace)\s*:\s*([^,}]+)", value.strip()[1:-1]+ ):+ fields[match.group(1)] = scalar_value(match.group(2))+ return fieldsdef is_gfs_owned(document: str) -> bool:- kind = field(document, r"^kind:\s*([^\s#]+)\s*$")- name = field(document, r"^ name:\s*([^\s#]+)\s*$")- namespace = field(document, r"^ namespace:\s*([^\s#]+)\s*$")+ kind = ""+ metadata: dict[str, str] = {}+ metadata_indent: int | None = None+ metadata_child_indent: int | None = None++ for parsed in structural_mappings(document):+ if parsed.indent == 0 and parsed.key == "kind":+ kind = scalar_value(parsed.value)+ continue++ if parsed.indent == 0 and parsed.key == "metadata":+ metadata_indent = parsed.indent+ metadata_child_indent = None+ metadata = inline_metadata(parsed.value)+ continue++ if metadata_indent is None:+ continue+ if parsed.indent <= metadata_indent:+ metadata_indent = None+ metadata_child_indent = None+ continue+ if metadata_child_indent is None:+ metadata_child_indent = parsed.indent+ if parsed.indent == metadata_child_indent and parsed.key in {"name", "namespace"}:+ metadata[parsed.key] = scalar_value(parsed.value)++ name = metadata.get("name", "")+ namespace = metadata.get("namespace", "")if kind == "Namespace" and name == "gfs":return Trueif namespace == "gfs" or kind == "GlobalFileSystem":@@ -45,8 +182,12 @@ def read_documents(paths: list[str]) -> str:def main() -> int:source = read_documents(sys.argv[1:])- documents = re.split(r"(?m)^---\s*$", source)- kept = [document.rstrip() for document in documents if document.strip() and not is_gfs_owned(document)]+ documents = split_documents(source)+ kept = [+ document.rstrip()+ for document in documents+ if document.strip() and not is_gfs_owned(document)+ ]if kept:sys.stdout.write("\n---\n".join(kept) + "\n")return 0diff --git a/scripts/minikube/gfs-rollout-shim/kubectl b/scripts/minikube/gfs-rollout-shim/kubectlindex 43c55f0b8..0d618fec8 100755--- a/scripts/minikube/gfs-rollout-shim/kubectl+++ b/scripts/minikube/gfs-rollout-shim/kubectl@@ -19,6 +19,12 @@ for dir in $PATH; do[ -n "$dir" ] || continueresolved="$(cd "$dir" 2>/dev/null && pwd -P)" || continue[ "$resolved" = "$SELF_DIR" ] && continue+ # A second worktree can prepend its own copy of this development shim. Skip+ # every harness directory, not only this copy, or two shims will bounce+ # between each other instead of reaching the real kubectl binary.+ case "$resolved" in+ */gfs-rollout-shim) continue ;;+ esacif [ -f "${dir}/kubectl" ] && [ -x "${dir}/kubectl" ]; thenREAL_KUBECTL="${dir}/kubectl"breakdiff --git a/scripts/tests/test-minikube-filter-gfs-resources.sh b/scripts/tests/test-minikube-filter-gfs-resources.shnew file mode 100755index 000000000..d167e1bcc--- /dev/null+++ b/scripts/tests/test-minikube-filter-gfs-resources.sh@@ -0,0 +1,65 @@+#!/usr/bin/env bash+set -euo pipefail++ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)"+FILTER="$ROOT/scripts/minikube/filter-gfs-resources.py"++python3 - "$FILTER" <<'PY'+import subprocess+import sys++filter_path = sys.argv[1]+source = """apiVersion: v1+kind: ConfigMap+metadata:+ name: keep+ namespace: default+data:+ embedded.yaml: |+ ---+ kind: Namespace+ metadata:+ name: gfs+---+apiVersion: example/v1+kind: Example+metadata:+ name: keep-example+spec:+ name: gfs+---+apiVersion: v1+kind: Namespace+metadata:+ name: gfs+"""++result = subprocess.run(+ [sys.executable, filter_path],+ input=source,+ text=True,+ capture_output=True,+ check=False,+)+if result.returncode != 0:+ raise SystemExit(f"filter failed: {result.stderr}")++output = result.stdout+assert "kind: ConfigMap" in output+assert " ---\n kind: Namespace" in output+assert "kind: Example" in output+assert "spec:\n name: gfs" in output+assert "kind: Namespace\nmetadata:\n name: gfs" not in output++empty = subprocess.run(+ [sys.executable, filter_path],+ input="apiVersion: v1\nkind: Namespace\nmetadata:\n name: gfs\n",+ text=True,+ capture_output=True,+ check=False,+)+assert empty.returncode == 0+assert empty.stdout == ""+PY++printf 'PASS: GFS filter preserves block scalars, scopes metadata, and handles empty output\n'diff --git a/scripts/tests/test-minikube-gfs-rollout-shim.sh b/scripts/tests/test-minikube-gfs-rollout-shim.shindex 878ec920c..a97760850 100755--- a/scripts/tests/test-minikube-gfs-rollout-shim.sh+++ b/scripts/tests/test-minikube-gfs-rollout-shim.sh@@ -39,6 +39,19 @@ chmod +x "$tmp/realbin/kubectl"export FAKE_KUBECTL_LOG="$tmp/kubectl.log"shim_path="$(dirname "$SHIM"):$tmp/realbin:/usr/bin:/bin"+# Two active worktrees can each prepend their own copy of the development+# shim. Both copies must skip the other harness directory and reach kubectl.+second_shim_dir="$tmp/second-worktree/scripts/minikube/gfs-rollout-shim"+mkdir -p "$second_shim_dir"+cp "$SHIM" "$second_shim_dir/kubectl"+chmod +x "$second_shim_dir/kubectl"+chain_shim_path="$second_shim_dir:$(dirname "$SHIM"):$tmp/realbin:/usr/bin:/bin"++: >"$FAKE_KUBECTL_LOG"+PATH="$chain_shim_path" kubectl --context=fake -n gfs get secret chain-check >/dev/null+grep -q -- '--context=fake -n gfs get secret chain-check' "$FAKE_KUBECTL_LOG" \+ || fail 'two shim copies did not reach the real kubectl binary'+# 1. Ordinary invocations pass through to the real kubectl unchanged.: >"$FAKE_KUBECTL_LOG"PATH="$shim_path" kubectl --context=fake -n gfs get secret whatever >/dev/nulldiff --git a/scripts/tests/test-minikube-makefile.sh b/scripts/tests/test-minikube-makefile.shindex 40e879d0c..009c4a47f 100755--- a/scripts/tests/test-minikube-makefile.sh+++ b/scripts/tests/test-minikube-makefile.sh@@ -33,6 +33,31 @@ assert_contains() {fi}+assert_file_contains() {+ local path="$1" needle="$2"+ if grep -Fq "$needle" "$REPO_ROOT/$path"; then+ echo "PASS: $path contains '$needle'"+ else+ echo "FAIL: $path missing '$needle'"+ FAIL=1+ fi+}++assert_not_contains() {+ local target="$1" needle="$2"+ local out+ out="$(make -n "$target" 2>&1 || true)"+ if [[ "$out" == *"$needle"* ]]; then+ echo "FAIL: make -n $target unexpectedly contains '$needle'"+ echo "---"+ echo "$out"+ echo "---"+ FAIL=1+ else+ echo "PASS: make -n $target omits '$needle'"+ fi+}+assert_make_contains() {local needle="$1"shift@@ -64,6 +89,13 @@ assert_contains minikube-sync-auth-key-body "--context=clerum-test"assert_contains minikube-sync-auth-key-body "scripts/minikube/sync-auth-key.sh"assert_contains minikube-verify-networkpolicies "verify-networkpolicies.sh --overlay minikube"assert_contains minikube-sync-auth-key-if-present "rpc-proxy-secrets"+assert_file_contains Makefile "T2_MUTATION_LOCK_WRAPPED"+assert_contains minikube-sync-auth-key-if-present "minikube-sync-auth-key"+assert_not_contains minikube-sync-auth-key-if-present "canonical T2 profile lock is not held"+assert_contains minikube-deploy-all-body "set -o pipefail"+assert_contains minikube-deploy-all-body "mktemp"+assert_contains minikube-deploy-all-body "filtered_manifest"+assert_contains minikube-deploy-crds-body '!= "true"'assert_make_contains "deployment/chatllm" minikube-deploy-service SVC=mcp-host NS=mcp-hostassert_make_contains "deployment/chatllm" minikube-restart-deploy SVC=mcp-host NS=mcp-hostdiff --git a/scripts/tests/test-minikube-t2-contract.sh b/scripts/tests/test-minikube-t2-contract.shindex 764808d07..872a4d3d2 100755--- a/scripts/tests/test-minikube-t2-contract.sh+++ b/scripts/tests/test-minikube-t2-contract.sh@@ -36,6 +36,7 @@ for file in "$MINIKUBE_DIR/profile-readiness.sh" "$ROOT/scripts/tests/test-minik"$ROOT/scripts/tests/test-minikube-t1-gfs-restore.sh"; dobash -n "$file"done+"$ROOT/scripts/tests/test-minikube-filter-gfs-resources.sh"python3 - "$GFS_FILTER" "$TMP_ROOT" <<'PY'import osimport py_compile