ADFA-4128 (5/11): quickbuild:core — change detection & classification - #1717
Open
fryanpan wants to merge 2 commits into
Open
ADFA-4128 (5/11): quickbuild:core — change detection & classification#1717fryanpan wants to merge 2 commits into
fryanpan wants to merge 2 commits into
Conversation
fryanpan
force-pushed
the
feature/ADFA-4128-qb-05-core-detection
branch
from
August 22, 2026 06:41
1e2eafe to
bdfdc6c
Compare
…alesce a save burst, classify the cheapest correct route Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kj9YeCDHGp9DU8LPtfWJ7W
…ndness (Blocker) + MOVED_TO watch Blocker (SourceAnnotationScanner TYPE_DECLARATION): the declared-name regex captured "class" for Kotlin `enum class`, and had no branch for `typealias` or top-level `const val`, so edits to such anchor files classified as reload-safe and shipped stale generated code. Fixed the alternation (`enum\s+class` first) and added `typealias` + `const\s+val` branches; added the conservative backstop in AnnotationImpactAnalyzer (a declaration change in a file declaring no recognized name escalates while a processor is active). Covered by AnnotationImpactAnalyzerTest: "adding an entry to an enum class an entity stores escalates", "retargeting a typealias an entity column uses escalates", "bumping a top-level const the database version reads escalates", and "a declaration change in a file declaring no recognized name escalates". Important (AndroidProjectWatcher): directory MOVED_TO never triggered watch registration, leaving a renamed/moved-in package inotify-blind for the session. The recursion gate now fires on CREATE or MOVED_TO; files inside the moved tree are supplied by the poll sweep. FileObserver glue is JVM-inert in this module (isReturnDefaultValues), so the gate carries a precise comment rather than a faked test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kj9YeCDHGp9DU8LPtfWJ7W
fryanpan
force-pushed
the
feature/ADFA-4128-qb-05-core-detection
branch
from
August 22, 2026 07:05
bdfdc6c to
cd01ada
Compare
fryanpan
marked this pull request as ready for review
August 23, 2026 02:31
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 5/11 of the stacked split of #1669 (requested by Akash). Base: feature/ADFA-4128-qb-04-runtime. Stack overview + review mechanics: PR 1 (#1713). Terms are defined in quickbuild/README.md (lands in PR 1).
This is the first of several PRs for the Quick Build core that runs inside of Code on the Go.
Lets Quick Build notice every change a developer makes, however it arrives, so nothing ever builds stale.
flowchart LR save(["file write: editor save,<br/>git pull, Termux script"]) --> w subgraph s5["<b>This PR: core slice 1 — change detection</b>"] w["AndroidProjectWatcher (data)<br/>FileObserver + mtime poll<br/><i>AndroidProjectWatcher.kt</i>"] --> rec["WatcherBatchReconciler +<br/>trailing-debounce coalescing<br/>(domain/watch)<br/><i>WatcherBatchReconciler.kt</i>"] rec --> cls["ChangeClassifier (domain/classify)<br/>annotation-aware;<br/>assetsLiveReloadable gate<br/><i>ChangeClassifier.kt</i>"] ann["SourceAnnotationScanner<br/>(domain/annotations)<br/><i>SourceAnnotationScanner.kt</i>"] --- cls end cls -- "BuildRoute" --> orch["orchestration slice (PR 8)<br/>runs the route"] classDef thisPrBox fill:#dbeafe,stroke:#93c5fd,color:#1e3a5f classDef inPr fill:#ffffff,stroke:#64748b,color:#000 class s5 thisPrBox class w,rec,cls,ann inPrWhat to review
ChangeClassifier.kt— picks the cheapest still-correct route. The routing contract; line-by-line.AndroidProjectWatcher.kt,WatcherBatchReconciler.kt— watch rules, phantom-deletion guard, save-burst coalescing.SourceAnnotationScanner.kt— why an annotation edit is not just a code edit.How this PR Was Tested
:quickbuild:core:test— only this slice's files exist yet, so the module suite is exactly the slice suite: 17 test files (16 suites; RoomAppFixture is a fixture), 221 tests per variant across all 6 variants, 0 failures, 0 errors. Coverage 97.4% line / 94.9% branch.Coverage (JaCoCo at the stack tip, single run):
…quickbuild.dataWatchServiceoverflow paths need a real watcher…quickbuild.domain…quickbuild.domain.annotations…quickbuild.domain.classify…quickbuild.domain.watch14 source files in the diff, all 14 measured.
Slice 1 of 4 — next: deploy and reload (PR 6).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Kj9YeCDHGp9DU8LPtfWJ7W