jedarden
475b7f0d73
feat(ci): sync miroir-ci workflow from declarative-config
...
Updated CI workflow includes:
- Helm chart packaging and publishing steps
- Updated tarpaulin coverage task
- Removed PR coverage comment (simplified)
- Added helm-package, helm-publish-ghpages, helm-publish-oci templates
Synced from jedarden/declarative-config to ensure consistency
across the fleet.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 18:35:56 -04:00
jedarden
184ca2bffe
feat(ci): add HTML coverage output + PR comments for coverage delta (P9.1)
...
Updates the CI workflow to:
1. Add HTML coverage report output (plan §8 coverage policy)
- Previously only generated Lcov + Xml formats
- Now also outputs Html for browser-based viewing
2. Publish coverage reports as Argo artifacts
- coverage-html/ directory for interactive browsing
- cobertura.xml for CI tool integration
- lcov.info for diff tools
3. Add PR comment showing coverage delta
- Posts coverage percentage on PRs when revision != main
- Shows current coverage vs 90% target vs base (main)
- Includes link to full coverage artifact
4. Generate coverage summary file for PR comment consumption
The coverage gate (--fail-under 90) was already in place; this adds
the visibility (artifacts + PR comments) required by plan §8.
Closes: miroir-89x.1
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 17:02:05 -04:00
jedarden
77ff0b7528
Phase 6 — Horizontal Scaling + HPA (§14): Complete
...
Implements the full horizontal scaling architecture with HPA integration
and three coordination modes for background work partitioning.
## §14.1-§14.3 — Per-pod envelope
- Resource limits: 2000m CPU / 3584MiB RAM (2 vCPU / 3.75 GB)
- Memory budget validated for all §13 features
- CPU budget: ~3 kQPS/pod (small), ~1 kQPS/pod (large) at 70%
## §14.4 — Request path HPA
- autoscaling/v2 HPA with CPU 70%, memory 75%
- Custom metrics: miroir_requests_in_flight (Pods/AverageValue: 500)
- Custom metrics: miroir_background_queue_depth (External/Value: 10)
- prometheus-adapter ConfigMap for custom metrics discovery
- Chart dependency on prometheus-adapter (auto-enabled when hpa.enabled=true)
- values.schema.json Rule 2: HPA requires replicas >= 2 AND Redis backend
## §14.5 — Background coordination modes
- Mode A (shard-partitioned): anti_entropy_worker.rs, drift_reconciler.rs
- Mode B (leader-only): mode_b_coordinator.rs + leader_election/
- Mode C (work-queued): mode_c_coordinator.rs + mode_c_worker/
- Peer discovery via headless Service SRV records (15s refresh)
## §14.6 — Per-feature scaling mode wiring
- docs/horizontal-scaling/per-feature.md maps all 21 features to modes
- Forced-mode constraints in values.schema.json (Rules 0-5)
## §14.7 — Deployment sizing matrix
- docs/horizontal-scaling/sizing.md with workload tiers
- Task-store memory accounting for Redis-backed deployments
## §14.8 — Resource-aware configuration defaults
- charts/miroir/values.yaml with envelope-sized defaults
- tests/fixtures/section-14.8-defaults.yaml as reference
## §14.9 — Resource-pressure metrics and alerts
- miroir_memory_pressure, miroir_cpu_throttled_seconds_total
- miroir_request_queue_depth, miroir_background_queue_depth
- miroir_peer_pod_count, miroir_leader, miroir_owned_shards_count
- PrometheusRule with all alerts (MiroirMemoryPressure, etc.)
## §14.10 — Vertical-scaling escape valve
- docs/horizontal-scaling/single-pod.md documents single-pod mode
- tests/fixtures/section-14.10-single-pod-oversized.yaml with 2.13× multiplier
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 00:23:57 -04:00
jedarden
8378292238
Phase 8 CI: Separate bench-check step, rename artifacts→dist
...
- Split cargo-bench-check into dedicated template (plan §8 regression gate)
- Rename workspace/artifacts → workspace/dist (conventional naming)
- Move bench compilation after test (proper dependency ordering)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 23:50:04 -04:00
jedarden
603b17f708
P8.1: Simplify Dockerfile to scratch-only, update CI to use /workspace/artifacts/
...
Changes:
- Dockerfile: Remove multi-stage build, now expects pre-built miroir-proxy-linux-amd64
- Dockerfile: Add inline comment documenting the plan §7 cargo-build template
- CI workflow: Change /workspace/dist → /workspace/artifacts to match plan §7
- CI workflow: Update create-github-release to reference /workspace/artifacts
This aligns with plan §7 and §12: scratch base, no libc, minimal attack surface.
The CI builds the static musl binary separately, then Dockerfile copies it.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 07:16:34 -04:00
jedarden
90462daa64
P5.5 §13.5: Fix drift_reconciler compilation and complete two-phase settings broadcast
...
Complete the two-phase settings broadcast with drift reconciler implementation:
- Fix drift_reconciler module compilation (remove unused imports, correct type signatures)
- Complete SettingsBroadcast integration in proxy layer (admin_endpoints.rs)
- Add settings version tracking metrics (middleware.rs)
- Initialize drift_reconciler worker in main.rs
- Fix admin route registration (admin.rs, aliases.rs)
Acceptance tests verify:
1. Normal flow: propose+verify succeed, settings_version increments once
2. Mid-broadcast node failure: reissue succeeds after backoff
3. Out-of-band drift: reconciler detects and repairs within interval_s
4. X-Miroir-Min-Settings-Version floor excludes stale nodes
5. Legacy sequential strategy compatibility
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 18:10:10 -04:00
jedarden
9ba6d545ca
P11.7: Add quick-start example artifacts (Docker Compose + config)
...
Adds the on-disk examples referenced by plan §11 "Quick start (local, Docker Compose)":
- examples/docker-compose-dev.yml: 3 Meilisearch nodes + 1 Miroir orchestrator
- examples/dev-config.yaml: Matching Miroir config (16 shards, RF=1)
- examples/README.md: Comprehensive docs for running, troubleshooting, teardown
- k8s/argo-workflows/miroir-ci-docker-compose-smoke.yaml: CI smoke tests
The README.md quick start section already references these examples.
Acceptance:
✅ docker-compose-dev.yml boots via docker compose up
✅ dev-config.yaml mounted into Miroir container
✅ examples/README.md documents usage and teardown
✅ CI smoke job exercises compose stack (health + index + search tests)
✅ README.md quick start points to examples/docker-compose-dev.yml
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 06:49:05 -04:00
jedarden
ffe1d63d58
P8: Finalize CI/CD templates, prod ArgoCD app, and CHANGELOG for v0.1.0
...
- miroir-ci: use cargo fmt --all, add pre-release detection for GitHub releases
- miroir-ci-smoke: fix secret ref to github-token
- miroir-release: rewrite github-release step with gh CLI, build binaries in
release step, add pre-release flag and resource limits
- miroir-release-ready: fix serviceAccountName to argo-workflow
- miroir-application.yaml: switch prod to Redis backend, 4 Meilisearch replicas
- redis.rs: remove unused conn() helper
- CHANGELOG: date 0.1.0 release, add missing release/prod entries
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 15:09:14 -04:00
jedarden
42905066cf
P8: Fix miroir-release Kaniko build — use shell script instead of sprig expressions
...
Replace sprig regex template expressions with a shell script approach for
Kaniko destination tags, matching the pattern in miroir-ci.yaml. Pin Kaniko
image to v1.23.0-debug. Fix serviceAccountName from argo-runner to argo-workflow.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 14:33:51 -04:00
jedarden
9b2f11f71b
P8: Sync CI/CD templates and ArgoCD Application to miroir repo (plan §6/§7)
...
Adds miroir-ci WorkflowTemplate (checkout → lint → test → musl build →
Kaniko push + GitHub release, tag-gated), miroir-ci-smoke quick lint+test
template, and miroir-dev ArgoCD Application reference. Updates CHANGELOG.md
with Phase 8 deployment entries.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 13:28:07 -04:00
jedarden
2dcfae8822
P8.6: Release mechanics — bump script, release-ready check, PR template, Argo CIs
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 09:54:26 -04:00