MCPcopy Create free account
hub / github.com/JordanCoin/codemap / normalizeOptions

Function normalizeOptions

handoff/build.go:35–57  ·  view source on GitHub ↗
(opts BuildOptions, fileCount int)

Source from the content-addressed store, hash-verified

33}
34
35func normalizeOptions(opts BuildOptions, fileCount int) BuildOptions {
36 if opts.BaseRef == "" {
37 opts.BaseRef = DefaultBaseRef
38 }
39 if opts.Since <= 0 {
40 opts.Since = DefaultSince
41 }
42
43 budget := limits.HandoffBudgetForRepo(fileCount)
44 if opts.MaxChanged <= 0 {
45 opts.MaxChanged = budget.MaxChanged
46 }
47 if opts.MaxRisk <= 0 {
48 opts.MaxRisk = budget.MaxRisk
49 }
50 if opts.MaxEvents <= 0 {
51 opts.MaxEvents = budget.MaxEvents
52 }
53 if opts.MaxHubs <= 0 {
54 opts.MaxHubs = max(budget.MaxRisk, 8)
55 }
56 return opts
57}
58
59// Build creates a multi-agent handoff artifact from git + daemon state.
60func Build(root string, opts BuildOptions) (*Artifact, error) {

Callers 1

BuildFunction · 0.85

Calls 2

HandoffBudgetForRepoFunction · 0.92
maxFunction · 0.50

Tested by

no test coverage detected