Documentation
¶
Overview ¶
Package cqa bridges a Code-Quality-Agent (CQA) API into the task queue: the latest scan's fixable issues for each locally-present repo become agent fix tasks. This closes the quality loop — the pool fixes what the scanners find, the next scan re-verifies, and any remaining or new issues arrive as fresh tasks (dedup keys include the scan ID, so a new scan arms new work).
Ingestion is read-only against the CQA API and idempotent against the queue: enqueues ride the store's dedup keys, so running the bridge twice (or racing a harvest tick) never double-enqueues.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
Bridge reads a CQA API and turns findings into agent tasks.
type Config ¶
type Config struct {
// BaseURL is the CQA API root, e.g. http://localhost:8080.
BaseURL string
// Token is sent as a Bearer authorization header (optional).
Token string
// OwnerID filters projects on the CQA side (its API requires it).
OwnerID string
// ProjectsDir maps CQA repo names to local directories: only repos that
// exist locally become tasks (the pool cannot fix remote-only repos).
ProjectsDir string
// MaxFiles caps how many fix tasks one run may produce (0 = no cap).
MaxFiles int
// MinSeverity filters which issues are worth an agent run:
// "critical" and "error" by default. One of critical|error|warning|info.
MinSeverity string
// Type is the task type enqueued (default "agent").
Type string
// TimeoutMinutes for generated fix tasks (default 45).
TimeoutMinutes int
}
Config controls one bridge run.
type Issue ¶
type Issue struct {
Analyzer string `json:"analyzer"`
Severity string `json:"severity"`
RuleID string `json:"rule_id,omitempty"`
FilePath string `json:"file_path,omitempty"`
LineStart int32 `json:"line_start,omitempty"`
Message string `json:"message,omitempty"`
Suggestion string `json:"suggestion,omitempty"`
Fixable bool `json:"fixable"`
FixComplexity string `json:"fix_complexity,omitempty"`
}
Issue is the slice of CQA's issue response the bridge needs.