Repository navigation
feat(web): record whether a completed review published its summary - #6889
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental re-review of the rebase (previous review at Files Reviewed (15 files)
Previous Review Summary (commit 09c1b80)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 09c1b80)Status: No Issues Found | Recommendation: Merge Executive SummaryReviewed the publication-status recording feature end to end (route classification, prepare-time baseline capture, DB write-once helper, enum/migration) and found no correctness, security, or data-integrity defects in the changed lines. Overview
Notable checks that passed:
Files Reviewed (14 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
Store a write-once publication status on the attempt this callback completes, and whether the previous summary lookup succeeded, so a missing comment is not treated as a published one.
09c1b80 to
26c5674
Compare
Summary
A code review can reach
completedwithout a summary comment, and the status callback still returns success. This stores a server-observed publication outcome on the attempt so that miss can be emitted to Axiom later. It does not add a health-check alert.On a completed callback, before the server appends history, footer, or the council block, it classifies the comment or note it already looks up:
published— a<!-- kilo-review -->summary is present and differs from the observed previous summaryunchanged— the visible summary matches the previous one after stripping a complete council block and the history footermissing— the lookup succeeded and there is no Kilo summaryunknown— the lookup failed, the platform is Bitbucket, or the previous-summary baseline was not observednot_applicable— Kilo mode, which does not publish to the providerThe status is write-once. A failed write does not change the callback result. Prepare records whether the previous-summary lookup succeeded, so a comment left behind by a failed snapshot is not treated as a new post.
Migration
0264_code_review_publication_statusadds nullablecloud_agent_code_review_attempts.publication_statusandcloud_agent_code_reviews.previous_summary_observed, plus a check constraint. No backfill and no index.Verification
pnpm drizzle migrateapplied the migration in the worktree database.pnpm --filter web exec jeston the publication-status, code-reviews db, prepare-payload, and status-route suites: 4 suites, 232 passed.packages/dbschema freshness and enum tests: 2 passed.@kilocode/dbtypecheck andscripts/typecheck-all.sh --changes-only: passed.Reviewer Notes
/api/code-reviews/up. The stored status is the value to emit to Axiom.unchanged, notpublished.publication_statusmeans the callback did not record an outcome. Existing rows stay null.