• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valksor / kvelmo / 23419412497

23 Mar 2026 02:30AM UTC coverage: 51.3% (-0.8%) from 52.116%
23419412497

push

github

k0d3r1s
Add intelligent orchestration features across conductor, quality, and web UI

18 features that make kvelmo's lifecycle orchestration smarter, safer,
and more observable. Covers the full stack: Go packages, socket RPCs,
and web frontend.

## Per-Phase Intelligence

- Per-phase agent specialization: Configure different agents per
  lifecycle phase via agent.phase_agent settings. The conductor resolves
  overrides and the worker pool matches jobs to workers by agent name,
  falling back to any available worker.

- Router-based adaptive progression: After each phase completes, a
  PhaseRouter evaluates the output and decides advance/retry/skip/
  rollback. DefaultRouter always advances; the interface enables custom
  routing strategies. Route decisions tracked in WorkUnit history.

- Per-phase guardrails: Configurable pre/post validation checks per
  phase. Built-in: require-spec (blocks implement without specs) and
  max-diff-size (warns on large diffs). Violations become structured
  findings with state rollback on blocking failures.

## Quality & Safety

- Hold-the-line quality gating: Findings classified as introduced vs
  pre-existing based on git diff hunk analysis. Only agent-introduced
  issues block progression; inherited tech debt reported as
  informational. Enabled by default.

- Slop detection: AI-specific code smell checker catches boilerplate
  phrases in comments, excessive comment-to-code ratio, redundant error
  wrapping, commented-out code, and ignored errors without justification.

- Secret redaction: Strips secrets (AWS keys, GitHub tokens, API keys,
  private keys, JWT) from content before sending to LLM APIs. Uses
  same detection patterns as SecretScanner. Invalid custom patterns
  logged at warn level.

- Multi-agent consensus: Dispatch same review prompt to N agents in
  parallel, deduplicate findings by file+line+rule proximity with
  DetectedBy attribution. Deterministic agent ordering for reproducible
  output.

## Automation
... (continued)

801 of 1350 branches covered (59.33%)

Branch coverage included in aggregate %.

833 of 2253 new or added lines in 39 files covered. (36.97%)

8 existing lines in 3 files now uncovered.

21965 of 43028 relevant lines covered (51.05%)

0.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.32
/pkg/codegraph/parser.go
1
package codegraph
2

3
import (
4
        "fmt"
5
        "go/ast"
6
        "go/parser"
7
        "go/token"
8
        "strings"
9
)
10

11
// rawEdge holds unresolved edge data before symbol IDs are assigned.
12
type rawEdge struct {
13
        FromName string
14
        ToName   string
15
        Relation string
16
}
17

18
// parseGoFile parses a Go source file and extracts symbols and raw edges.
19
func parseGoFile(path string) ([]Symbol, []rawEdge, error) {
1✔
20
        fset := token.NewFileSet()
1✔
21
        file, err := parser.ParseFile(fset, path, nil, parser.ParseComments)
1✔
22
        if err != nil {
1✔
NEW
23
                return nil, nil, fmt.Errorf("parse: %w", err)
×
NEW
24
        }
×
25

26
        pkgName := file.Name.Name
1✔
27

1✔
28
        var symbols []Symbol
1✔
29
        var edges []rawEdge
1✔
30

1✔
31
        // Extract top-level declarations.
1✔
32
        for _, decl := range file.Decls {
2✔
33
                switch d := decl.(type) {
1✔
34
                case *ast.FuncDecl:
1✔
35
                        sym := extractFuncDecl(fset, d, pkgName)
1✔
36
                        symbols = append(symbols, sym)
1✔
37

1✔
38
                        // Extract calls made by this function.
1✔
39
                        callEdges := extractCalls(d, sym.Name)
1✔
40
                        edges = append(edges, callEdges...)
1✔
41

42
                case *ast.GenDecl:
1✔
43
                        syms := extractGenDecl(fset, d, pkgName)
1✔
44
                        symbols = append(symbols, syms...)
1✔
45
                }
46
        }
47

48
        // Extract import edges: package -> imported package.
49
        for _, imp := range file.Imports {
2✔
50
                importPath := strings.Trim(imp.Path.Value, `"`)
1✔
51
                edges = append(edges, rawEdge{
1✔
52
                        FromName: pkgName,
1✔
53
                        ToName:   importPath,
1✔
54
                        Relation: "imports",
1✔
55
                })
1✔
56
        }
1✔
57

58
        return symbols, edges, nil
1✔
59
}
60

61
// extractFuncDecl extracts a Symbol from a function or method declaration.
62
func extractFuncDecl(fset *token.FileSet, fn *ast.FuncDecl, pkg string) Symbol {
1✔
63
        kind := "function"
1✔
64
        name := fn.Name.Name
1✔
65

1✔
66
        if fn.Recv != nil && len(fn.Recv.List) > 0 {
2✔
67
                kind = "method"
1✔
68
                recvType := receiverTypeName(fn.Recv.List[0].Type)
1✔
69
                if recvType != "" {
2✔
70
                        name = recvType + "." + fn.Name.Name
1✔
71
                }
1✔
72
        }
73

74
        return Symbol{
1✔
75
                Name:    name,
1✔
76
                Kind:    kind,
1✔
77
                Line:    fset.Position(fn.Pos()).Line,
1✔
78
                Package: pkg,
1✔
79
        }
1✔
80
}
81

82
// extractGenDecl extracts symbols from type, const, and var declarations.
83
func extractGenDecl(fset *token.FileSet, gd *ast.GenDecl, pkg string) []Symbol {
1✔
84
        var symbols []Symbol
1✔
85

1✔
86
        for _, spec := range gd.Specs {
2✔
87
                switch s := spec.(type) {
1✔
88
                case *ast.TypeSpec:
1✔
89
                        kind := "type"
1✔
90
                        if _, ok := s.Type.(*ast.InterfaceType); ok {
2✔
91
                                kind = "interface"
1✔
92
                        }
1✔
93
                        symbols = append(symbols, Symbol{
1✔
94
                                Name:    s.Name.Name,
1✔
95
                                Kind:    kind,
1✔
96
                                Line:    fset.Position(s.Pos()).Line,
1✔
97
                                Package: pkg,
1✔
98
                        })
1✔
99

1✔
100
                        // Extract embedded types.
1✔
101
                        if st, ok := s.Type.(*ast.StructType); ok {
2✔
102
                                for _, field := range st.Fields.List {
2✔
103
                                        if len(field.Names) == 0 { // embedded
1✔
NEW
104
                                                if ident := fieldTypeName(field.Type); ident != "" {
×
NEW
105
                                                        symbols = append(symbols, Symbol{
×
NEW
106
                                                                Name:    s.Name.Name + "." + ident,
×
NEW
107
                                                                Kind:    "embed",
×
NEW
108
                                                                Line:    fset.Position(field.Pos()).Line,
×
NEW
109
                                                                Package: pkg,
×
NEW
110
                                                        })
×
NEW
111
                                                }
×
112
                                        }
113
                                }
114
                        }
115

116
                case *ast.ValueSpec:
1✔
117
                        kind := "var"
1✔
118
                        if gd.Tok == token.CONST {
2✔
119
                                kind = "const"
1✔
120
                        }
1✔
121
                        for _, name := range s.Names {
2✔
122
                                if name.Name == "_" {
1✔
NEW
123
                                        continue
×
124
                                }
125
                                symbols = append(symbols, Symbol{
1✔
126
                                        Name:    name.Name,
1✔
127
                                        Kind:    kind,
1✔
128
                                        Line:    fset.Position(name.Pos()).Line,
1✔
129
                                        Package: pkg,
1✔
130
                                })
1✔
131
                        }
132
                }
133
        }
134

135
        return symbols
1✔
136
}
137

138
// extractCalls walks a function body and extracts direct call edges.
139
func extractCalls(fn *ast.FuncDecl, callerName string) []rawEdge {
1✔
140
        if fn.Body == nil {
1✔
NEW
141
                return nil
×
NEW
142
        }
×
143

144
        var edges []rawEdge
1✔
145
        seen := make(map[string]bool)
1✔
146

1✔
147
        ast.Inspect(fn.Body, func(n ast.Node) bool {
2✔
148
                call, ok := n.(*ast.CallExpr)
1✔
149
                if !ok {
2✔
150
                        return true
1✔
151
                }
1✔
152

153
                var calleeName string
1✔
154

1✔
155
                switch fun := call.Fun.(type) {
1✔
NEW
156
                case *ast.Ident:
×
NEW
157
                        // Direct function call: foo()
×
NEW
158
                        calleeName = fun.Name
×
159
                case *ast.SelectorExpr:
1✔
160
                        // Method or package call: x.Foo() or pkg.Foo()
1✔
161
                        if ident, ok := fun.X.(*ast.Ident); ok {
2✔
162
                                calleeName = ident.Name + "." + fun.Sel.Name
1✔
163
                        }
1✔
164
                }
165

166
                if calleeName != "" && !seen[calleeName] {
2✔
167
                        seen[calleeName] = true
1✔
168
                        edges = append(edges, rawEdge{
1✔
169
                                FromName: callerName,
1✔
170
                                ToName:   calleeName,
1✔
171
                                Relation: "calls",
1✔
172
                        })
1✔
173
                }
1✔
174

175
                return true
1✔
176
        })
177

178
        return edges
1✔
179
}
180

181
// receiverTypeName extracts the type name from a method receiver expression.
182
func receiverTypeName(expr ast.Expr) string {
1✔
183
        switch t := expr.(type) {
1✔
NEW
184
        case *ast.Ident:
×
NEW
185
                return t.Name
×
186
        case *ast.StarExpr:
1✔
187
                if ident, ok := t.X.(*ast.Ident); ok {
2✔
188
                        return ident.Name
1✔
189
                }
1✔
NEW
190
        case *ast.IndexExpr:
×
NEW
191
                // Generic type: T[U]
×
NEW
192
                if ident, ok := t.X.(*ast.Ident); ok {
×
NEW
193
                        return ident.Name
×
NEW
194
                }
×
NEW
195
        case *ast.IndexListExpr:
×
NEW
196
                // Generic type: T[U, V]
×
NEW
197
                if ident, ok := t.X.(*ast.Ident); ok {
×
NEW
198
                        return ident.Name
×
NEW
199
                }
×
200
        }
201

NEW
202
        return ""
×
203
}
204

205
// fieldTypeName extracts the name from a field type expression (for embedded fields).
NEW
206
func fieldTypeName(expr ast.Expr) string {
×
NEW
207
        switch t := expr.(type) {
×
NEW
208
        case *ast.Ident:
×
NEW
209
                return t.Name
×
NEW
210
        case *ast.StarExpr:
×
NEW
211
                return fieldTypeName(t.X)
×
NEW
212
        case *ast.SelectorExpr:
×
NEW
213
                return t.Sel.Name
×
214
        }
215

NEW
216
        return ""
×
217
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc