Skip to content

feat(migration): post the progress delta on PRs and show the map on the front page - #15145

Merged
marius-kilocode merged 2 commits into
v2from
progress-pr-comment
Oct 16, 2026
Merged

marius-kilocode merged 2 commits into
v2from
progress-pr-comment

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

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.md and changes only inside the diff of progress.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:

  • One comment per PR with the delta. 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 job migration progress comment fetches progress.json from 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 has pull-requests: write; the other jobs keep contents: read.
  • The map on the branch front page. The generator now also writes badge.svg (v2 migration 0.1%). The root README.md gets 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 in shared-patches.json with 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 (files 12 to 13, markedLines 34 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 v2 shows 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.json on 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 for compare: 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.
  • The comment job ran on feat(migration): post the progress delta on PRs and show the map on the front page #15143 and posted one comment, then updated it in place on the next push (created 08:01:07, updated 08:02:29) with the treemap of the new head commit. The base has the same 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 through features.json; a renamed box shows as one removed and one new row.

…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.
@github-actions

Copy link
Copy Markdown
Contributor

➖ v2 migration progress: 0.1% → 0.1% (0 done, 0 total, 0 dropped; 8/9854 cells)

No change to the progress map.

v2 migration progress map at this commit

Full map · how cells close

@marius-kilocode
marius-kilocode merged commit a329da6 into v2 Oct 16, 2026
26 checks passed
@marius-kilocode
marius-kilocode deleted the progress-pr-comment branch October 16, 2026 08:09
Comment thread README.md
</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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Prefer Markdown image syntax in this documentation file

The repo review guidelines ask that images in .md documentation be included as Markdown (![alt](./path/to/image.png)), 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 [![alt](src)](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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kilo-code-bot

kilo-code-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2
Issue Details (click to expand)

SUGGESTION

File Line Issue
README.md 18 The new badge and two charts are added as HTML <img> tags; repo review guidelines ask for Markdown image syntax in .md docs.
script/upstream/progress.ts 516 A cell that was done on the base and is now dropped on the head is listed under both "cells reopened" and "cells dropped".
Files Reviewed (8 files)
  • .github/workflows/kilo-v2.yml - no issues
  • .kilo/skills/v2-migration/SKILL.md - no issues
  • README.md - 1 suggestion
  • migration-tracking/progress/badge.svg - no issues (matches generator output)
  • script/upstream/README.md - no issues
  • script/upstream/progress.test.ts - no issues
  • script/upstream/progress.ts - 1 suggestion
  • script/upstream/shared-patches.json - no issues

Notes: the progress-comment job passes the PR base ref, head SHA and repo through env rather than interpolating them into the shell script, so there is no script-injection surface; the comparison reads committed JSON only and introduces no resource leaks. No CRITICAL or WARNING level problems were found in the changed code.

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 62.3K · Output: 15.4K · Cached: 575K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant