Repository navigation
feat(migration): post the progress delta on PRs and show the map on the front page - #15145
Conversation
…he front page Add `--compare <base.json> <head.json>` to the generator: a markdown delta with the percent before and after, the changed feature boxes, and the cells that closed, reopened or were dropped. A new CI job runs it on every same-repository pull request against the base branch and keeps one comment per PR up to date, with the treemap of the head commit. Generate `badge.svg` and embed badge, treemap and history in the root README inside one marked block (rung 4, entry in shared-patches.json), so the map is visible from the branch front page.
|
➖ v2 migration progress: 0.1% → 0.1% (0 done, 0 total, 0 dropped; 8/9854 cells) No change to the progress map. |
| </p> | ||
| <!-- kilocode_change start - Kilo v2 migration progress map, generated by script/upstream/progress.ts --> | ||
| <p align="center"> | ||
| <a href="migration-tracking/progress/README.md"><img alt="Kilo v2 migration progress" src="migration-tracking/progress/badge.svg" /></a> |
There was a problem hiding this comment.
SUGGESTION: Prefer Markdown image syntax in this documentation file
The repo review guidelines ask that images in .md documentation be included as Markdown (), not as HTML <img> tags. The new badge and the two charts are added as <img> elements. Consider Markdown image syntax so the images render consistently across Markdown renderers (a linked image can still be written as [](href); centering would need to be dropped).
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| const baseDone = new Set(base.done ?? []) | ||
| const headDone = new Set(head.done ?? []) | ||
| const closed = [...headDone].filter((id) => !baseDone.has(id)).sort(byName) | ||
| const reopened = [...baseDone].filter((id) => !headDone.has(id)).sort(byName) |
There was a problem hiding this comment.
SUGGESTION: A cell that goes from done to dropped is listed twice
reopened is baseDone minus headDone. A cell that was done on the base and is now dropped on the head satisfies both cuts, so it appears both under "cells reopened (were done on the base)" and under "cells dropped" in the same comment, which reads as a contradiction. Consider excluding IDs present in head.dropped from reopened.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (8 files)
Notes: the Fix these issues in Kilo Cloud Reviewed by deepseek-v4.1-flash · Input: 62.3K · Output: 15.4K · Cached: 575K |
Supersedes #15143, which GitHub closed when the base branch of #15138 was deleted on merge.
What Problem This Solves
The progress map from #15138 lives in
migration-tracking/progress/README.mdand changes only inside the diff ofprogress.json. Nobody opens either during review, so a port that closes 30 cells looks the same as one that closes none, and the map is invisible to anyone who does not know the path.Why This Change Was Made
Two additions, both reading the committed files, so nothing new has to be maintained:
progress.ts --compare <base.json> <head.json>prints the percent before and after, a table of the feature boxes that changed (gateway | 8/85 | 39/85 | +27 modules done; +4 hooks done; +1 dropped), and collapsible lists of the cells that closed, reopened or were dropped. The new CI jobmigration progress commentfetchesprogress.jsonfrom the PR base branch, runs the compare against the head, and creates or updates a single comment (found by an HTML marker), with the treemap of the head commit in a collapsed block and links to the full map and the skill section. Same-repository PRs only; a fork PR gets a read-only token and the job is skipped by condition. The job haspull-requests: write; the other jobs keepcontents: read.badge.svg(v2 migration 0.1%). The rootREADME.mdgets one marked block under upstream's badge row with the badge, the treemap and the history chart, all linking to the full map. This is a rung 4 patch in a shared upstream file, registered inshared-patches.jsonwith its missing seam: the repository README is a single upstream-owned file and a Kilo-owned README cannot be the front page of the same repository. Limits raised in the same diff (files12 to 13,markedLines34 to 45). It goes away when the map is published outside the repository or when the Kilo host owns the repository root.The skill and the tooling README describe both.
User Impact
Developers only. Every PR into
v2shows what it did to the migration, and the branch front page shows where the migration stands. The images in the README and in the comments are the committed SVGs, so they are always current with the code they sit next to.Evidence
bun script/upstream/progress.ts --compare base.json head.jsonon a simulated delta (gateway +31 done, 1 dropped): the table, closed and dropped lists render as shown above; identical inputs print "No change to the progress map."; a missing base file is treated as an empty map (first PR after merge).cd script/upstream && bun test: 76 pass (1 new test forcompare: per-feature rows, unchanged features omitted, closed, reopened and dropped lists, no-change and empty-base cases).bun run typecheck: clean.bun script/upstream/progress.ts --check: up to date.bun script/check-shared-patches.ts --worktree,bun script/check-opencode-annotations.ts --worktree,bun script/check-workflows.ts: ok.progress.json, so the comment says "No change to the progress map.".Limits: the comment is posted by
github-actions; the image inside it points at the head commit's SVG by SHA, so it stays valid after further pushes. The compare has no notion of features renamed throughfeatures.json; a renamed box shows as one removed and one new row.