Repository navigation
ci: require an app-repo commit for an adopted app's wheel-copy change - #31351
Conversation
218b977 to
b41e66a
Compare
|
Round note for head
|
UX Review (Opus 5.5) — ⏭️ skippedRevision |
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: |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: the gate runs where the PR body is visible, its script is read from the base ref, it checks pins at three revisions, and the limit on what it verifies is stated as a non-goal. Notes
[DESIGN-REVIEWED] e0dd498 Description read[DESCRIPTION-READ] 510f8150dfb6fa77d281d4909fe80db2c9533a68c67e55e4ddca458f853bb6ce 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 defect is shown by #30438 and #30505, and the gate sits where the PR body can be read. Deleting the wheel copies under #26967 is the actual fix and is still out of scope. Notes
What this change shipsInventory (6 items) — 4 justifiedIntent: a fix to an adopted app has to reach users running the app repo as well as wheel users. FIX (a CI guard).
[FIRST-PRINCIPLES-REVIEWED] e0dd498 Description read[DESCRIPTION-READ] c03ba4a0a79a676989bd42df65def95862e0cb912aaa810ee869064e18be8a51 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: |
Once adoption-pins.json pins a former built-in, adopted hosts run the app's own repository and never the wheel copy, so a change made only to src/kiro_crew/apps/builtins/<dir>/ or website/src/apps/<name>/ is lost for them. PR Hygiene now fails such a change unless the body names the matching app-repo commit or PR on an 'App repo: <owner>/<repo>@<sha>' line. Deleting the wheel copy and test files stay exempt. Part of #26967
b41e66a to
e0dd498
Compare
|
self-added: yes
|
|
self-added: yes
|
buluoray
left a comment
There was a problem hiding this comment.
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:
NEEDS_OWNER: the check is safe and does what it says, but it gives no honest way through for a core-side change that has to edit a pinned app's wheel copy and has no app-repository twin.
What it does for users: once an app is pinned for adoption, a fix made only to its wheel copy no longer merges silently. PR Hygiene asks for the matching app-repository commit or PR, so hosts that adopted the app stop quietly missing fixes that built-in hosts get.
Owner question. Some core PRs have to touch a pinned app's wheel copy and have nothing to port. One example is open now: #31431 swaps file-explorer's inline disabled-app test for a new core helper, isAppNotEnabledError, in website/src/apps/file-explorer/FileExplorerPage.tsx. The app repository builds against the SDK and has no such call site. Earlier "make core independent of " refactors (#28032, #28021) were the same kind of change. After this merges, PR Hygiene fails those PRs, and the only ways through are to drop the wheel-copy edit or to write an App repo: line naming a commit that does not carry the change. The script checks only the line's shape and repository (adopted_wheel_copy_check.py:29-31), so the second option passes, and the PR body then states something untrue. Should there be an explicit exemption line with a required reason, for example "App repo: none -- ", or should core refactors that touch a pinned wheel copy be held until the copy is removed under #26967?
Focus checks, all verified against the head:
- Unrelated PRs are not blocked. Only an added or modified non-test path under src/kiro_crew/apps/builtins// or website/src/apps// of a pinned name is scanned (adopted_wheel_copy_check.py:73-75 and 91-103). Root-level files in website/src/apps (builtinRegistry.ts and the like) and sibling prefixes such as papyrus-extra/ do not match, because both prefixes end in a slash. Deletions and test files are exempt (lines 78-88 and 95). Searching the open PRs found four that touch a pinned wheel copy and would fail on their next run: #31531 (papyrus fix), #31141 (file-explorer feature), #31431 (the core refactor above) and #31343 (the pin bump, which edits each app.json version).
- Fork PRs are safe. The workflow triggers on pull_request only, with no pull_request_target anywhere in code-review.yml (lines 3-5). Permissions are contents: read (line 7), and checkout uses persist-credentials: false (pr-hygiene job, lines 377-380). No secret reaches the step. The PR body reaches the script through an env variable, never through template interpolation into the run block, and the script only regex-matches it. test_body_is_data_not_code pins that.
- A branch cannot weaken its own check. The script is read from the base tip with git show whenever the base tip has it (code-review.yml step, new lines 591-596). The pin tables are read at the merge base, the base tip and the head, so a PR cannot drop its own pin to pass. A malformed table at the head fails closed (load_pins raising ValueError, lines 52-69, exit 1 in main). That fails the PR's own author, not anyone else.
Tests: test/test_adopted_wheel_copy_check.py together with test/test_workflow_array_expansion_bash32.py gave 31 passed at this head.
Mutations, one at a time, tree clean after each:
- In check(), replacing "if slug.lower() not in named:" with "if False:" reddened 9 tests, among them TestRealRegressions::test_30438_papyrus_backend_fix_is_flagged, test_30505_file_explorer_fix_is_flagged, TestDetection::test_a_pin_only_at_the_base_tip_counts and TestCli::test_fail_prints_the_line_to_add.
- Dropping "$BASE_TIP" from the workflow's pin loop reddened only TestWiring::test_every_revisions_table_and_the_merge_base_diff_are_passed. The base-tip case is therefore covered by a text match on the workflow; no test executes the run block. The PR body says the block was run by hand against real commits. I did not repeat that.
CI on this head: 82 success, 12 skipped, 0 failing. PR Readiness is success. Design and First Principles both PASS. No reviews and no inline threads. The merge-tree against main exits 0.
Source-only: I did not run the step on a real fork PR. The fork-safety claims rest on reading the trigger, permissions and checkout settings.
Follow-ups, whatever the owner decides:
- Merge order with #31343. That PR edits the five app.json files in the wheel copies. If this lands first, its next PR Hygiene run fails until its body carries one App repo: line per app. The five pinned commits are the natural lines to add, and it is a body edit with no push.
- A README or other non-code file inside a pinned wheel copy counts as shipped. That is probably intended, but neither the script docstring nor the spec says so.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved by Crew Captain for the on-call: checks green, PR Readiness passed, review lanes clean on this head.
Problem / Motivation
Goal: A fix to an adopted app can no longer land only in its wheel copy, so a user who adopted the app gets every fix a built-in user gets.
Five former built-ins are pinned in
src/kiro_crew/apps/adoption-pins.json. A host that adopted one runs the app repository at the pinned commit and never the wheel copy. Fixes kept landing only in the wheel copy (src/kiro_crew/apps/builtins/<dir>/,website/src/apps/<name>/) after the repository snapshot, for example the papyrus Windows LaTeX probe (#30438) and the file-explorer search truncation fix (#30505). Adopted users silently lost those fixes, and nothing in CI noticed.Why it matters
Every adopted user runs an older app than a built-in user, with no error and no record of what they are missing. The gap grows with every wheel-only fix, and each one has to be found and ported by hand later (#31343 is that catch-up for the fixes so far).
Not a goal
What changed (motivation → approach → change)
A wheel-only fix to a pinned app is lost for adopted users, so the cheapest effective guard sits where the PR body is visible: PR Hygiene. The new
.github/scripts/adopted_wheel_copy_check.pystep fails a PR that adds or modifies a non-test file in a pinned app's wheel copy, unless the body has one line per changed app naming its app-repo change:App repo: <owner>/<repo>@<sha>orApp repo: <owner>/<repo>#<PR>, using the pin row'srepository. Deleting wheel-copy files is always allowed, and test files are exempt because they never ship. A name counts as pinned if the merge base, the base tip or the head pins it: a PR cannot drop its own pin to pass, and a branch cut before a pin landed on main is still held to it. The step runs the script from the base ref, like the Sibling sweep and Proof steps, so a branch cannot weaken its own check. Editing the body re-runs the check with no push. AGENTS.md (No built-in apps), the app-kit-platform spec (§33) anddocs/ci/ci-and-reviews.md(PR Hygiene) now state the rule.Backwards compatibility
Compatible: no product code changes, so nothing a user runs behaves differently. For contributors, an open PR that edits a pinned app's wheel copy will fail PR Hygiene on its next run after this merges, until its body gets an
App repo:line.Removes nothing: the only new behaviour is a CI condition on pull requests. The runtime, the pin table and the wheel copies are untouched.
Tests
test/test_adopted_wheel_copy_check.py(25 tests):papyrus-extra/,papyrusApi.ts) do not;#0, mid-line, wrong-repo and URL forms are rejected;builtins/<name with _>/);PR_BODYfrom env, diffs the merge base with--no-renames, reads the merge base, base tip and head pin tables, and reads the script from the base ref.${a[@]+"${a[@]}"}form thattest/test_workflow_array_expansion_bash32.pyrequires, so the block also runs under macOS bash 3.2.Determinism: 5 runs in shuffled order, 25/25 each time.
test_flake_pattern_ratchet.pypasses. Every test file that namescode-review.ymlorpr-hygienepasses (1982 tests), the bash 3.2 expansion pin included. The frontend leg could not run on this host (npm E401), and this diff has no frontend change.Manual verification
Ran the workflow step's exact
run:block locally against real commits. With an empty body, 00a0937 (#30438, papyrus) exits 1 and 3adab5e (#30505, file-explorer) exits 1, each naming the line to add. On 665a0e4, the current main tip, which touches no wheel copy, it exits 0. In a scratch repository where only the base tip pins papyrus, a papyrus wheel-copy edit exits 1 with an empty body and 0 with anApp repo:line; the same block with the base tip left out of the pin loop exits 0, which is the gap this step closes.Related Issues
Part of #26967
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)