fix(server): cache health probes, surface SSE marshal errors, fail closed on missing duties

Health checks reuse a two-second snapshot and bound the schema query. Task SSE writes an error frame when an event cannot be encoded. ResolveDocTask errors when the frozen plan has no duty row, while explicit none-duties stay zero. Drop the unwired semantic-summary replace env, record the intentional dev versus release model split, document the test/main cutover path, and archive pre-goose SQL.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
weichen
2026-09-19 09:16:18 +00:00
co-authored by Cursor
parent 4c34e8a503
commit 265f09c1f2
24 changed files with 66 additions and 11 deletions
@@ -66,6 +66,7 @@ func (o *Orchestrator) ResolveDocTask(ctx context.Context, projectID, docTaskIns
res.TemplateVersion = def.TemplateVersion
}
}
matchedDuty := false
for _, stPlan := range plan.Stages {
if stPlan.StageKey != st.StageKey {
continue
@@ -77,8 +78,12 @@ func (o *Orchestrator) ResolveDocTask(ctx context.Context, projectID, docTaskIns
res.AuthorUserID = dtPlan.Duties.AuthorUserID
res.ReviewerUserID = dtPlan.Duties.ReviewerUserID
res.ApproverUserID = dtPlan.Duties.ApproverUserID
matchedDuty = true
}
}
if !matchedDuty {
return nil, fmt.Errorf("orchestrator: frozen plan has no duties for stage %s task %s", st.StageKey, dt.TaskKey)
}
return res, nil
}
}