Repository navigation
feat(apps): pin code-review-sage for adoption - #38478
Conversation
Code Review Sage now lives in its own repository under KiroCrewCaptain, ported up to the current wheel copy, #37492's chat launch included, with green CI on ubuntu, macOS and Windows. The row is the output of scripts/adoption_pin.py compute and is added to adoption-pins.json and the _SHIPPED_PINS table, so a host whose record is builtin-owned moves onto the app's own tree at its next restart and keeps data/, the app secret, the grants and enabled. minAppSdkLevel is 10, the level of the permissions.chatLaunch the repository declares exactly as the wheel copy does, so E9 holds nothing back and a host without the seam keeps the wheel copy. The wheel built-in app.json version moves to the pinned 0.9.5, since a first-adoption pin must equal it (D12). The owning spec records the adoption. Part of #26967
|
Catalog row: kirodotdev/KiroCrewApps#87 switches code-review-sage to |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: the change only adds a pin row through the existing adoption machinery and bumps the version to match it (D12). Nothing reads the old 0.9.3 version. Notes
[DESIGN-REVIEWED] 95ee9b8 Description read[DESCRIPTION-READ] e8a6c28f6956b13a29dc4f987f0d2a0052d5457ff73742f0bcc2decf6f68656a That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The row reuses the adoption-pin mechanism that already has 15 rows, and AGENTS.md's "No built-in apps" rule plus decision 2026-11-01 require Sage to leave core. What this change shipsInventory (6 items) — 6 justifiedIntent: let hosts running the built-in Code Review Sage move to the app's own repository at restart without losing state. This is an ADDITION (a migration step under #26967).
[FIRST-PRINCIPLES-REVIEWED] 95ee9b8 Description read[DESCRIPTION-READ] c672cc31585c0d04fb9485119ad63abea788647d99655f65716a85304c5cd510 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This review checked head 95ee9b8 against the adoption code. The archive sha256 and the tree digest both match the codeload tarball for the pinned commit. The pinned tree's name and version (0.9.5) match the pin and the wheel app.json, as D12 requires. Its minAppSdkLevel 10 equals APP_SDK_LEVEL. It ships no build inputs, no overlays and no mcpServers. Its permissions, skills and chatLaunch are byte-identical to the wheel copy, so E9 holds. Each hunk has a test that fails if it is reverted: the exact, ordered pin table comparison and the wheel version equality test.
Well done: the port tightens the old silent pass-throughs. A missing redactor, link-safe reader, permission floor or SEL now makes it refuse or withhold.
Optional:
- Follow-ups opened after adoption now carry embed_app, so an uninstall drops their resume pointer, which the built-in's follow-up never did. Consider one line saying so in the new app-kit-platform.md paragraph or under Backwards compatibility.
- #38443 appends rows at the same array tail. Whichever PR lands second needs a rebase, and the ordered table test will catch a wrong row order.
Flip code-review-sage from a builtin source to a git source in its own KiroCrewCaptain repository, pinned at the commit Kiro Crew's adoption pin table names for it in kirodotdev/KiroCrew#38478, with the note the other adopted apps carry and the org author URL.
Problem / Motivation
Goal: A host that has Code Review Sage as a built-in moves onto the app's own repository at its next restart, keeping its reviews, its repositories and settings, its follow-up chats, its grants and whether it was enabled.
Code Review Sage now lives in its own repository (
KiroCrewCaptain/kirocrew-app-code-review-sage), ported from the current wheel copy, with green CI on ubuntu, macOS and Windows. Its last seam, #37492 (an app page opens the person's chat it declares:permissions.chatLaunchanduseChatLauncher().createChat, App Kit level 10), has merged, and the repository now opens a new follow-up chat through it. The wheel's adoption pin table does not name Code Review Sage yet, so no host adopts it and every Sage fix keeps having to land twice.Why it matters
Until a pin row exists, Code Review Sage cannot leave core: every host keeps running the wheel copy, and the removal of the built-ins in #26967 cannot start for it.
Not a goal
src/kiro_crew/apps/builtins/code_review_sage/,website/src/apps/code-review-sage/); only itsapp.jsonversion moves.What changed (motivation → approach → change)
Code Review Sage gets an adoption pin row, so at its next restart a host whose Sage is the built-in switches to the app's own repository at the pinned commit, keeping
data/(its runs, results, reports, learnings, repositories and settings),.app_secret, the approved grants andenabled. The row is the output ofscripts/adoption_pin.py compute, copied intoadoption-pins.jsonand the_SHIPPED_PINStable:minAppSdkLevel711261d196f5permissions.chatLaunchdeclaration)The wheel built-in
app.jsonversion moves to 0.9.5: a first-adoption pin must equal it (D12). The repository'sapp.jsondeclares the samepermissionsas the wheel copy (its own namespace,/api/source/pull-request,network,storageand thechatLaunchof #37492), the sameskillsand nocredentialMasks, so E9 holds nothing back. Its review panel sends the follow-up create the wheel copy sends throughuseChatLauncher().createChat, feature-detected, so a host without the seam keeps continuing existing follow-ups only; a follow-up the built-in opened is the person's chat under the declared prefix and reopens through the same create. The tree ships.kiro/at its root, since a reviewed record keeps the review worker's.kiro/settings/there and adoption would otherwise skip the swap. The owning spec,app-kit-platform.md§ 44, records the adoption.The pinned tree carries every change its wheel copy has on
main8826a22397. The repository was last ported up toaf94fac51f(its #3 and #4); the one later non-test wheel-copy change, #37492 (the manifest'schatLaunchand the follow-up panel's create), is the repository's #5, and #6 released 0.9.5 as711261d196f5. The later test-only wheel-copy changes are #37408 (generated tokens in their published formats, needed once the repository's test dependency moved to a host with the rule-table redactor, so carried by #5) and #38036, #38038 and #38039 (tmp_pathhomes, not carried). No later commit touched the page's catalogs or the store art.Merge order: lands after #38443 (the agent-worlds and ops-mission-control pin PR), which also appends rows after
md-notebookin both files; once it lands this branch is rebased onto it and this row follows its rows in both files.App repo: KiroCrewCaptain/kirocrew-app-code-review-sage@711261d
Wheel-copy base: code-review-sage@8647f912727a93e7e94a9f309ea24349ef22769b
Backwards compatibility
Compatible: one row is added and one version moves up. A host whose record is builtin-owned adopts at the next restart and keeps
data/,.app_secret, the grants andenabled; a host that cannot adopt (an SDK level below 10, a pending config review, a file besideapp.jsonthe tree does not ship) keeps the wheel copy unchanged. A follow-up chat the adopted copy opens carries theembed_appevery app-launched chat carries (§ 44), where the built-in's create sent none; follow-ups opened before the swap keep their records.Removes nothing: the wheel copy, its
/code-review-sageroute and every existing pin row stay.Tests
test/test_builtin_adoption_pins.py::test_the_shipped_pin_file_validates_and_pins_exactly_the_shipped_tabletakes the new row and fails with the pin file ofmain;test_every_shipped_pin_matches_its_wheel_built_in_versionholds the version bump.Proof: PROVEN test/test_builtin_adoption_pins.py::test_the_shipped_pin_file_validates_and_pins_exactly_the_shipped_table (head 95ee9b8)
Determinism: no test logic changes, only the pinned data table. With this commit on
main8826a22397: everytest/file that namesadoption_pin,adoption-pins,code_review_sageorcode-review-sage(38 files,test_builtin_adoption_*.py,test_code_review_sage_permission_parity.py,test_core_code_review_sage_decoupling.pyandtest_adopted_wheel_copy_check.pyamong them),test_app_chat_launch.py,test_legacy_state_moves.py,test/integration/test_builtin_adoption_boot.py,test_flake_pattern_ratchet.pyand the wheel copy's owntests/, run serially: 2999 passed, 5 skipped. Black, flake8, isort, mypy, subprocess-encoding, comment-history, brand-name, line-cap and harness-parity gates andscripts/docs-lint.shpass..github/scripts/adopted_wheel_copy_check.pypasses on this body, and fails with the previous port baseaf94fac51f(namingapp.jsonandReviewChat.tsx). No frontend change; semgrep is not installed on this host.Manual verification
scripts/adoption_pin.py computeat711261d196f5with--min-sdk-level 10prints the committed row byte for byte, and refuses--min-sdk-level 9namingapp.json permissions.chatLaunch. Every shipped row measured over the network, one at a time sinceverifystops at its first refusal: fifteen rowsok, this one included. md-notebook's row, unchanged here, is refused: it was pinned at 8 one hour before #37459 made anycredentialMasksa level-10 use. The pinned commit is the head of the repository'smain, with every check run green on ubuntu, macOS and Windows.Upgrade smoke on isolated loopback gateways (throwaway homes, the code-review-sage row as
KIROCREW_HARNESS_ADOPTION_PINS, a real GitHub fetch). The model is Kiro Crew's fake ACP backend, wrapped to answer a Sage review prompt with a capability-bound envelope of two findings and to carry out a poster prompt; GitHub is the repository's captureghstand-in plus a writable review store for the draft round trip. Each home was first booted onmain1dfee9ace2, before this change. Then this branch (on that main; the rebase onto8826a22397brings nothing underapps/, the chat launch or the App SDK) booted twice (STAGE, APPLY), once with Sage enabled at the upgrade and once with it disabled:staged); the record stays the built-in,data/unchangedorigin: registry,sourceCommit711261d196f5, version 0.9.5,enabledkeptenabled: falsekept)data/byte-equal (18 files), approved grants equal, no app crons before or after (the fixture's two crons unchanged), trust written for this app, skills re-linked to the tree with the built-in's digests/apps/code-review-sage/ui/dist/index.mjs), both reviews listed, report and pending draft shownPOST /api/chat/slotswithapp_launch, no title or folder, 200, the same key; title, agent, folder and memory mode unchangedcreateChat: 200, asage-followup-key, agentkirocrew, folderSage Review, persistent memory, the pull request's titleadopted,installed.jsonbyte-equal, nothing fetchedv0.9.5 -> v0.9.5), the page loadsdata/; after a restart no built-in comes back711261d196f5, enable):data/equal to before the uninstall plus the gateway's dependency lock; a restart shows one recordNo ERROR or traceback in any gateway's stderr. The stand-in's every review session has the same id, so its transcript is planted again before a follow-up is opened (opening one retires it). Update and reinstall ran against the published catalog with only code-review-sage's row switched to
gitat this commit (the KiroCrewApps PR below), served atofficial_catalog._open_catalog; with today'sbuiltinrow an adopted record has no install source until that PR lands, as for every earlier pin.Related Issues
Part of #26967
Unblocked by #37492. Catalog row: the kirodotdev/KiroCrewApps PR linked in a comment below switches code-review-sage to
gitat the same commit. It is not auto-merged: the driver merges it right after this PR lands.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.