feat(governance): surface stale km burndown
All checks were successful
CD Pipeline / tests (push) Successful in 5m28s
Code Review / ai-code-review (push) Successful in 12s
Type Sync Check / check-type-sync (push) Successful in 25s
CD Pipeline / build-and-deploy (push) Successful in 4m6s
CD Pipeline / post-deploy-checks (push) Successful in 1m32s

This commit is contained in:
Your Name
2026-05-24 22:11:33 +08:00
parent f4253f22f8
commit ded2223d14
7 changed files with 720 additions and 7 deletions

View File

@@ -376,6 +376,47 @@ class KnowledgeStaleOwnerReviewInboxResponse(BaseModel):
generated_at: datetime
class KnowledgeStaleOwnerReviewBurnDownItem(BaseModel):
completion_dispatch_id: str
governance_event_id: str
source_dispatch_id: str | None = None
recheck_dispatch_id: str | None = None
entry_id: str | None = None
project_id: str
dispatch_status: str
workflow_stage: str
review_outcome: Literal[
"refresh_with_evidence",
"archive",
"supersede",
] | None = None
owner: str | None = None
completed_at: datetime | None = None
stale_ratio_snapshot: KnowledgeReviewDraftStaleRatioSnapshot | None = None
stale_count_delta: int | None = None
stale_ratio_delta: float | None = None
above_threshold: bool | None = None
class KnowledgeStaleOwnerReviewBurnDownResponse(BaseModel):
schema_version: str = "km_stale_owner_review_burndown_v1"
project_id: str
burn_down_status: Literal["above_threshold", "at_or_below_threshold", "no_data"]
current_snapshot: KnowledgeReviewDraftStaleRatioSnapshot | None = None
entries_to_threshold: int
pending_owner_reviews: int
completed_owner_reviews: int
completion_audit_total: int
stale_ratio_recheck_total: int
latest_stale_count_delta: int | None = None
latest_stale_ratio_delta: float | None = None
writes_on_read: bool = False
manual_review_required: bool = True
returned: int
items: list[KnowledgeStaleOwnerReviewBurnDownItem] = Field(default_factory=list)
generated_at: datetime
class KnowledgeStaleOwnerReviewCompleteRequest(BaseModel):
dispatch_id: str | None = Field(
default=None,