fix(init): forge-template pipeline personas, missing contract, validate --all#555
Conversation
…orge support
Replace all 21 hardcoded `persona: github-*` references across 12 pipeline
files with `persona: "{{ forge.type }}-*"` so pipelines resolve to the
correct forge-specific persona at runtime (gitlab-analyst, gitea-commenter,
etc.). This was specced in #241 but never applied to persona fields.
Also fixes:
- init.go knownForgePrefixes used stale gh-/gl-/bb-/gt- prefixes that
never matched actual persona names (github-/gitlab-/bitbucket-/gitea-)
making filterPersonasByForge a no-op
- filterTransitiveDeps now expands {{ forge.type }} templates to all 4
forge variants before filtering, so init correctly includes the right
persona configs in wave.yaml
Composition steps (pipeline, branch, gate, loop, aggregate) have no persona, causing the TUI to render "scan ()" instead of useful info. Now shows "scan (pipeline:audit-security)", "triage (branch)", etc. Also guards both render sites against empty persona to avoid bare ().
… checking
wave validate --all now scans every pipeline in .wave/pipelines/ and checks:
- persona existence (with {{ forge.type }} template resolution)
- contract schema file existence
- sub-pipeline file existence
- prompt file existence
- dependency ordering
- composition step awareness (pipeline/branch/gate/loop/aggregate)
Previously validate only checked a single pipeline via --pipeline flag and
missed template personas, missing contracts, and missing prompt files.
Code Review (Wave Pipeline)Verdict: REQUEST_CHANGES This PR makes a solid architectural move — replacing hardcoded Critical Issues (must fix)1. Unresolved persona template in events, metrics, and logs
Fix: Replace all 2. Persona scope validation skips all templated personas
Fix: Resolve template variables before the 3. Dependency validation produces false positives on valid pipelines
The Fix: Two-pass validation — first pass collects all step IDs, second pass validates dependencies. 4. No test coverage for new validation logic
Fix: Add table-driven tests covering known forge, unknown forge, no-template, composition step types, dependency ordering, and missing persona/sub-pipeline scenarios. Suggested Improvements
Positive Observations
Generated by Wave pr-review pipeline |
…ope validation, and dependency checks
- Replace all step.Persona references after template resolution in
runStepExecution with resolvedPersona so events, metrics, audit logs,
and AdapterRunConfig receive the actual persona name instead of
template strings like {{ forge.type }}-analyst
- Resolve template variables before GetPersona in token scope validation
so forge-templated personas with token_scopes are actually validated
- Use two-pass validation in validatePipelineFull so forward dependencies
(step listed before its dependency in YAML) do not produce false
positives — the executor does topological sorting at runtime
- Return "step" as fallback in TUI stepTypeLabel for unrecognized types
- Add table-driven tests for resolveForgeTemplate, isCompositionStep,
validatePipelineFull (including forward dependency), stepTypeLabel,
and filterTransitiveDeps forge expansion
- Suppress unchecked LogStepStart/LogToolCall returns (audit log errors are non-fatal by design) - Use fmt.Fprintf instead of WriteString(fmt.Sprintf(...)) per QF1012
Review ResponseAll critical findings addressed in commits Critical Issues — Fixed
Suggested Improvements — Addressed
Noted but deferred
|
fix(init): forge-template pipeline personas, missing contract, validate --all
Summary
epic-children.schema.jsonwas referenced byops-implement-epicbut never shipped — users hit contract validation failure at runtimefilterPersonasByForgeused stale prefixes (gh-,gl-) that never matched actual persona names (github-,gitlab-), making the filter a no-oppersona: github-*refs across 12 pipelines now use{{ forge.type }}-*templates so non-GitHub forges (GitLab, Gitea, Bitbucket) resolve to the correct persona at runtimefilterTransitiveDepsnow expands{{ forge.type }}to all 4 forge variants before filtering, sowave initincludes the right persona configsscan ()— now showsscan (pipeline:audit-security),triage (branch), etc.wave validate --all: New flag scans every pipeline for missing personas, contracts, sub-pipelines, prompt files, and broken dependenciesTest plan
go test ./...all greengo build ./...cleanwave validate --allcatches missing personas/contracts on a fresh initwave initon a GitLab/Gitea project produces correct forge-specific personas inwave.yaml