Skip to content

feat(autopilot): playbooks-guidance — full feature (all phases) - #74

Merged
pacphi merged 7 commits into
mainfrom
develop
Jul 1, 2026
Merged

feat(autopilot): playbooks-guidance — full feature (all phases)#74
pacphi merged 7 commits into
mainfrom
develop

Conversation

@pacphi

@pacphi pacphi commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Integration PR for the playbooks-guidance feature — makes the Remediation Playbook editor instructional (surfaces the embedded default as a documented, editable starting point; adds per-field schema hints and richer field-path validation). Mirrors the shipped model-catalog feature. Driven autonomously through the autopilot pr_ci pipeline; every phase landed on develop behind green CI.

Phases (all gate PASSED on develop)

Phase PR Marker Summary
0 #69 b502517 Backend: GET /api/remediation/playbooks/embedded (read-only default) + Playbook::validate_yaml schema-aware field-path validation → 422 invalid playbook \`: `
1 #70 fd64683 Frontend: "Load built-in default", per-row "Duplicate to customize", preview capability pills (role · outputContract · allowedTools)
2 #71 f55ab96 Frontend: per-field schema guide (tool-ceiling narrow-only rule, trusted/untrusted split), inline field-path errors, 27-locale i18n
3 #72 b671dbf Docs: docs/features/PLAYBOOKS.md + Postgres-gated preview no-model-call integration test
opt #73 93451c0 Cross-phase optimization: shared invalid_playbook() 422 helper (create/update dedup)

Verification

  • Every phase merged only on green required CI (CI Success aggregator) into develop, incl. Backend Integration Tests (PostgreSQL), Frontend Build & Test, Validate React Translations, Backend Lint & Format, Docs Lint.
  • Backend: 5 Postgres-gated playbook integration tests + validate_yaml unit tests. Frontend: 917 tests (12 PlaybookEditor specs), i18n coverage 100%. make test / make lint / make audit green.
  • ADR-006 invariants preserved: the tool-ceiling narrow-only clamp and the trusted-vars / untrusted-context split are unchanged; the embedded endpoint is read-only.
  • Each phase passed an independent adversarial review; findings were fixed and covered before merge.

Ready for human review; do NOT auto-merge. This is the develop → main (trunk) integration PR — a human decides whether to merge into main.

pacphi added 6 commits July 1, 2026 09:16
…+ seed ledger

Retires the shipped remediation-model-catalog pipeline (survives in git history
and its ledger). Seeds record 0 of the playbooks-guidance session ledger. pr_ci
mode, base=develop, trunk=main, 4 phases.
Embedded playbook endpoint + schema-aware field-path validation (ADR-006). All required CI checks green: CI Success, Backend Build/Lint/Unit(SQLite)/Integration(PostgreSQL)/Coverage/Security, frontend + i18n. Adversarial review: 2 findings fixed.
Load built-in default + duplicate + preview pills; embedded endpoint wired; all i18n keys translated into 26 locales + types.ts regenerated. All required CI green (CI Success, Frontend Build/Lint, Validate React Translations, backend). Adversarial review: bogus locale dir fixed.
Per-field schema hints + inline field-path validation errors; 27-locale i18n with interpolation-protected code tokens + types.ts regen. All required CI green (CI Success, Frontend Build/Lint, Validate React Translations, backend). Adversarial review: <root> error handling fixed.
Docs (PLAYBOOKS.md) + preview no-model-call integration test. All required CI green after one rustfmt fix (CI Success, Backend Lint/Build/Integration(PostgreSQL), frontend, docs lint). Feature complete — all 4 phases shipped.
…PASSED (#73)

Shared invalid_playbook() 422 helper (create/update dedup). All required CI green.
@pacphi

pacphi commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Component Coverage Status
Backend N/A%
Frontend N/A%
Overall N/A%

Coverage Thresholds

  • 🟢 Green: ≥ 80% (target)
  • 🟡 Yellow: 60-79% (acceptable)
  • 🔴 Red: < 60% (needs improvement)

Coverage reports generated by CI workflow

The playbook embedded default overlays and the provider DEFAULT_MODEL fallbacks
held out-of-date model ids. Update both to current catalog choices:
- claude: claude-sonnet-4-6 -> claude-sonnet-5
- gemini: gemini-2.0-flash  -> gemini-2.5-flash (repriced 0.0003/0.0025 per 1k)
- ollama: qwen2.5-coder      -> qwen3-coder:30b-a3b-q4_K_M (runnable Ollama tag)

Updates crates/ampel-worker/playbooks/default.yaml (UI-visible overlays) and the
claude/gemini/ollama provider DEFAULT_MODEL constants (runtime fallback), plus
the gemini cost model + its two pricing tests to match 2.5-flash rates.
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🌐 Translation Coverage Report

Overall Coverage

Component Coverage Status
Backend (Rust) 100.0%
Frontend (React) 100%
Total Average 100.00%

Threshold: 95%
Supported Languages: 27


Backend Coverage Details

Translation Coverage Report

Overall Coverage: 100.0%

Source Keys: 950

Language Coverage

Language Coverage Translated Total Missing
ar ✅ 100.0% 950 950 0
cs ✅ 100.0% 950 950 0
da ✅ 100.0% 950 950 0
de ✅ 100.0% 950 950 0
en-GB ✅ 100.0% 950 950 0
es-ES ✅ 100.0% 950 950 0
es-MX ✅ 100.0% 950 950 0
fi ✅ 100.0% 950 950 0
fr ✅ 100.0% 950 950 0
he ✅ 100.0% 950 950 0
hi ✅ 100.0% 950 950 0
it ✅ 100.0% 950 950 0
ja ✅ 100.0% 950 950 0
ko ✅ 100.0% 950 950 0
nl ✅ 100.0% 950 950 0
no ✅ 100.0% 950 950 0
pl ✅ 100.0% 950 950 0
pt-BR ✅ 100.0% 950 950 0
ru ✅ 100.0% 950 950 0
sr ✅ 100.0% 950 950 0
sv ✅ 100.0% 950 950 0
th ✅ 100.0% 950 950 0
tr ✅ 100.0% 950 950 0
vi ✅ 100.0% 950 950 0
zh-CN ✅ 100.0% 950 950 0
zh-TW ✅ 100.0% 950 950 0

Frontend Coverage Details

Translation Coverage Report

Generated: 2026-07-01T19:25:12.947Z
Base Locale: en
Total Keys: 100
Overall Coverage: 100%

Coverage by Language

Language Coverage Translated Missing Empty Status
en 100% 100 0 0
es-ES 100% 100 0 0
es-MX 100% 100 0 0
fr 100% 100 0 0
de 100% 100 0 0
it 100% 100 0 0
pt-BR 100% 100 0 0
nl 100% 100 0 0
pl 100% 100 0 0
ru 100% 100 0 0
ja 100% 100 0 0
ko 100% 100 0 0
zh-CN 100% 100 0 0
zh-TW 100% 100 0 0
ar 100% 100 0 0
he 100% 100 0 0
hi 100% 100 0 0
th 100% 100 0 0
tr 100% 100 0 0
cs 100% 100 0 0
fi 100% 100 0 0
sv 100% 100 0 0
da 100% 100 0 0
no 100% 100 0 0
vi 100% 100 0 0
sr 100% 100 0 0
en-GB 100% 100 0 0

Missing Translations

✅ No missing translations


Updated: 2026-07-01T19:25:27.140Z

@pacphi
pacphi merged commit 728bd88 into main Jul 1, 2026
39 checks passed
@pacphi
pacphi deleted the develop branch July 1, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant