feat(workflow): configure review precision and approval on the review.pr step

This commit is contained in:
sam committed 2026-10-17 17:00:55 +11:00
1 parent a973bd6567
commit 7e940acad4
19 files changed
+107 -267

No files matched your search

-18
View File
@@ -244,20 +244,6 @@ type Forge struct {
WebhookAddr string `toml:"webhook_addr" yaml:"webhook_addr"`
}
// Review configures the pr-review workflow.
// Both fields are off by default: the pipeline is recall-first, and posts
// automatically, unless an operator opts into either dial.
type Review struct {
// It trades recall for precision and cuts verification cost by filtering
// early.
PrecisionGate bool `toml:"precision_gate" yaml:"precision_gate"`
// ApproveBeforePost ends the pipeline in waiting_human right after
// synthesis, before the merge gate runs, so an operator can choose which
// findings to post, reject the review, or ask for a re-review with
// instructions. A review with no findings never waits.
ApproveBeforePost bool `toml:"approve_before_post" yaml:"approve_before_post"`
}
// Dispatch configures how archied discovers work and reacts on pickup.
type Dispatch struct {
// Trigger is how tasks are discovered: "assignee" (poll assigned
@@ -401,7 +387,6 @@ type Config struct {
Forge Forge `toml:"forge" yaml:"forge"`
Dispatch Dispatch `toml:"dispatch" yaml:"dispatch"`
Review Review `toml:"review" yaml:"review"`
// Models maps a model alias ("default", "fast", "embedding") to a
// runtime model ref ("provider/model"). Resolve it with ResolveModel.
@@ -489,7 +474,6 @@ type TaskConfig struct {
DiffCapLines int `json:"diff_cap_lines"`
Forge TaskForge `json:"forge"`
ToolPolicy ToolPolicy `json:"tool_policy"`
Review Review `json:"review"`
}
// DiffCap returns the changed-line cap; 0 means no cap.
@@ -519,7 +503,6 @@ func (c Config) ForTask() TaskConfig {
DiffCapLines: c.DiffCap(),
Forge: TaskForge{Host: c.Forge.Host},
ToolPolicy: c.Tools.Policy,
Review: c.Review,
}
}
@@ -555,7 +538,6 @@ func (tc TaskConfig) ToConfig() Config {
DiffCapLines: &tc.DiffCapLines,
Forge: Forge{Host: tc.Forge.Host},
Tools: ToolsConfig{Policy: tc.ToolPolicy},
Review: tc.Review,
}
}