Repository navigation
feat(upstream): adopt the host strategy in the progress map - #15231
Conversation
Rename the cell kind hook to patch, add the kilo_port done-proof for Kilo-owned files, record the landed rung of each proved cell, add the core-internal import and shared-patch ratchets, and add the placement line to the PR comment.
|
➖ v2 migration progress: 0.1% → 0.1% (0 done, 0 total, 0 dropped; 12/9854 cells) Placement: 0 new marked lines in shared files, 0 new Ratchets: 4 core-internal imports (base n/a); shared patches by rung 14 seam, 1 patch (base n/a). No change to the progress map. |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Incremental review at
No shared upstream files changed; no inline comments. Files Reviewed (3 files)
Previous Review Summary (commit e58136c)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit e58136c)Status: No Issues Found | Recommendation: Merge Reviewed the full PR at head Notes (not defects): the Files Reviewed (10 files)
Reviewed by deepseek-v4.1-flash-1017 · Input: 36.6K · Output: 10.1K · Cached: 283.8K Review guidance: REVIEW.md from base branch |
A tracked Kilo-owned file deleted from the working tree crashed the run. Also state that the logic-package rule checks non-test files, and that a re-pin must update done-proofs.
# Conflicts: # .kilo/skills/v2-feature-placement/SKILL.md
What Problem This Solves
The progress map was built before the host strategy (#15228,
migration-tracking/plans/v2-host-strategy.mdsection 8). A v1 patch cell closed only with akilocode_change(<feature>:<id>)marker, and markers are allowed only in shared upstream files. Under the host strategy most v1 patches move to plugin hooks in Kilo-owned files (rung 1), so those cells could never close. The map also called these cells "hooks", which collides with plugin hooks, and it did not show where a done cell landed or the two numbers that the strategy ratchets.Closes #15230. Part of #13750. Builds on #15228, now merged into
v2.Why This Change Was Made
Section 8, items 1 to 5:
hookis nowpatch:Kind,progress.json, README terms and counting rules, and thev2-migrationandv2-feature-placementskills.ID decision: cell IDs change from
hook:<feature>:<hash>topatch:<feature>:<hash>, with a one-time mapping. The change breaks no marker: a marker carries only<feature>:<hash>,rg "kilocode_change\(" packagesfinds no tagged marker onv2, anddispositions.jsonis empty. The hash does not change. The one-time mapping is in--compare: it reads a baseprogress.jsonwritten before the rename with"hook"mapped to"patch", so this PR and PRs on an older base show no false delta.// kilo_port(<feature>:<id>)in a Kilo-owned file underpackages/, found by the samegit grepthat findskilocode_change(<feature>:<id>)in shared files. An unknown ID fails the run, with the same message style asdispositions.json. A proof in the wrong kind of file (kilo_portin a shared file, or a tagged marker in a Kilo-owned file) also fails, so a wrong proof cannot leave a cell open without notice. Unknown tagged markers now fail too;v2has none. A cell proved by both is reported once, at the highest rung. The temporarystate: "ported"bridge sentence is removed from both skills.kilo_portinpackages/kilo-cli, 1 (plugin) in other Kilo-owned files, and for a marker the rung of its file inshared-patches.json(3 seam, 4 patch). Shown per feature in a newLandedcolumn (for example2 plugin, 1 seam), as a summary line, in the treemap legend, and inprogress.json(summary.landed,features[].landed, andlandedper cell ID).progress.json(summary.coreImportswith thecoreImportslist,summary.sharedPatches) and the PR comment: the distinct core-internal upstream modules (@opencode/core/*, or relative imports intopackages/core/srcoutsidekilocode/) that non-test files ofpackages/kilo-*andpackages/*/src/kilocodeimport, and the shared patches by rung inshared-patches.json. Apackages/kilo-*-corelogic package that imports anything from@opencode/*fails the run. Mirrored files join whenmirroredFilesexists in the sync tooling (not yet).--compare <base.json> <head.json> <pr.diff>counts new marked lines in shared files by rung (the marker coverage rules ofcheck-shared-patches.ts, applied to the head file, so a line added inside an existing block counts), newkilo_portannotations in Kilo-ownedpackages/files, and new core-internal imports from the base and headcoreImportslists. Themigration progress commentjob checks out the merge commit with depth 2 and usesHEAD^1for the base map and the diff.The generator stays mechanical: git plumbing, path rules, regex and string equality, no dates, code-unit sort.
User Impact
// kilo_port(<feature>:<id>), without adispositions.jsonworkaround.bun script/upstream/progress.ts --list <feature>printspatch:<feature>:<hash>. The hash is the same as before.progress.svgis 24 px taller (legend row).Evidence
The rename alone changes no cell state.
progress.jsonbefore and after the rename step, with"hook"mapped to"patch"in the old file: identical (diffprints nothing),donelist identical,--compare old newprints "No change to the progress map."progress.jsonsummaryorigin/host-strategy)Ratchets on
v2(after the Kilo host, #15232): 4 core-internal imports (@opencode/core/busand@opencode/core/variantfrompackages/core/src/kilocode/gateway.ts,@opencode/core/appand@opencode/core/plugin/sdkfrompackages/kilo-cli/src); 15 shared patches by rung: 14 seam, 1 patch. Landed: 0 plugin, 0 host, 0 seam, 0 patch.bun script/upstream/placement.ts --imports(from #15232) reports the same 4 modules.Done-proofs with temporary edits (all reverted):
// kilo_port(gateway:0468bd6d3d9e)inpackages/core/src/kilocode/gateway.ts: the cell left--list gateway(75 to 74 open cells), gateway went from 12/87 to 13/87,1 pluginshows in the README row, the summary and the legend,--comparelists the closed cell, and the placement line reads "1 newkilo_portannotation".gateway:0468bd6d3d9f) and wrong feature (sandbox:0468bd6d3d9e): the run fails withdone-proofs name cells that do not exist on the v1 target.kilo_portin a shared file (packages/core/src/plugin/provider.ts): the run fails withdone-proofs in the wrong kind of file.kilocode_change(gateway:0468bd6d3d9e)on the marked line inprovider.ts(rung 3): the cell lands at1 seam, and the placement line reads "1 new marked line in shared files (1 seam)". With both proofs present, the cell is reported once, at seam.export type { Model } from "@opencode/schema/model"inpackages/kilo-gateway-core/src/defaults.ts: the run fails withlogic packages (packages/kilo-*-core) must import nothing from @opencode/*.Commands:
bun script/upstream/progress.tstwice: identical output (diff -rempty), also underLC_ALL=tr_TR.UTF-8 TZ=Pacific/Kiritimati.bun script/upstream/progress.ts --check: up to date, also after the commit.script/upstream:bun test82 pass, 0 fail (new tests forkilo_portparsing, landed-rung attribution and the single report, the import count and logic-package rule, and the placement line);bun run typecheckclean.bun script/check-workflows.ts,bun script/check-shared-patches.ts,bun script/check-opencode-annotations.ts: ok.bun run check(root): lint has 0 errors. Typecheck fails locally only on Node built-in typings (zstdCompressSync,node:sqlite,registerHooks) in packages that this PR does not change (no file underpackages/changes);checkis green onv2for the samepackages/tree, and the CItypecheckjob passes on this PR.PR comment on this PR (comment), from the
migration progress commentjob with the new placement and ratchet lines. The base map predates the ratchets, so this first comment showsn/afor the base values:CI: all checks pass (workflow allowlist, shared upstream patches, migration progress map, migration progress comment, upstream sync tooling tests, typecheck, unit linux and windows).
Shared upstream files changed: none. All changed files are Kilo-owned (
script/upstream/**,migration-tracking/**,.kilo/**,.github/workflows/kilo-v2.yml). Progress map delta: none, 12/9854 before and after.Limits: the placement line describes one diff; in an upstream sync PR it also counts upstream lines that land inside existing Kilo blocks. Mirrored files are not in the ratchets yet. Section 8 says that cell IDs do not change: the hash does not, and the
hook:topatch:prefix is the only ID change.Follow-ups:
progress.tsandplacement.ts --importsnow scan imports with two implementations that agree today;progress.tsshould reuseplacement.ts. The history table reads every first-parent commit of the local branch, so a branch with two commits that changeprogress.jsongets a history row that CI (which checks the merge ref) does not have. This branch has such a commit, so the committed map is generated as CI sees it, and a local--checkon this branch reportsREADME.mdandhistory.svgas stale until the merge.