Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
d89431e
ADFA-7082: Vendor sqlite-js 1.3.7 with our patches
davidschachterADFA Nov 12, 2026
ae04160
ADFA-7082: Build the sqlite-js AAR for apps in subprojects:sqlite-js
davidschachterADFA Nov 12, 2026
f766299
ADFA-7082: Release the sqlite-js AAR to sqlite-js-latest
davidschachterADFA Nov 12, 2026
3372d3b
ADFA-7082: Build the sqlite-js AAR for arm64-v8a and armeabi-v7a only
davidschachterADFA Nov 12, 2026
1391c4b
ADFA-7082: Run no stored code by default; test sqlite-js on pull requ…
davidschachterADFA Nov 12, 2026
e0f400a
ADFA-7082: Update sqlite-js-latest in place, out of latest-release se…
davidschachterADFA Nov 12, 2026
362ad7f
ADFA-7082: Sort the QuickJS copyright lines the same on every machine
davidschachterADFA Nov 12, 2026
2f3460f
ADFA-7082: Log stored functions that cannot be listed; guard the tag …
davidschachterADFA Nov 12, 2026
401a052
ADFA-7082: Vendor the reviewed sqlite-js patches
davidschachterADFA Nov 12, 2026
44a6e88
ADFA-7082: Put back both the assets and the tag if a release update f…
davidschachterADFA Nov 12, 2026
3c93bda
ADFA-7082: Find js_functions in any case; sync the cancel test; doc c…
davidschachterADFA Nov 12, 2026
0d1f9db
ADFA-7082: Let a re-run repair a release left without its assets
davidschachterADFA Nov 12, 2026
ac748be
ADFA-7082: Vendor sqlite-js main with our changes merged, one patch left
davidschachterADFA Nov 12, 2026
8086fd1
ADFA-7082: Vendor the sqlite-js 1.4.1 release
davidschachterADFA Nov 12, 2026
6957c71
ADFA-7082: Let a connection open, and its stored functions load, duri…
davidschachterADFA Nov 12, 2026
763bb47
ADFA-7082: Patch two stack-bound crashes and two garbage cases
davidschachterADFA Nov 12, 2026
c084450
ADFA-7082: Let a re-run replace a release left as a draft
davidschachterADFA Nov 12, 2026
7f8e40c
style: spotless reformat, no functional change
davidschachterADFA Nov 12, 2026
a113c80
ADFA-7082: End the result sets an interrupted call leaves open
davidschachterADFA Nov 13, 2026
64269ea
ADFA-7082: Make ending result sets safe when it runs JavaScript, and …
davidschachterADFA Nov 13, 2026
851ee17
ADFA-7082: Stop what ending result sets runs; count the interrupts db…
davidschachterADFA Nov 13, 2026
8973b29
ADFA-7082: Answer the independent review of patches 0004 to 0007
davidschachterADFA Nov 13, 2026
db04941
ADFA-7082: Test a direct interrupt during db.exec with a result set kept
davidschachterADFA Nov 13, 2026
e538658
Merge branch 'stage' into feat/ADFA-7082-sqlite-js-aar
davidschachterADFA Nov 13, 2026
b8f7aa6
ADFA-7135: Define the interface between the SQLite debugger extension…
claude Nov 13, 2026
c603f89
ADFA-7136: Copy the MCP server from ShareYourApps, renamed
claude Nov 13, 2026
fab6cff
ADFA-7135 Add the sqlite-debugger module skeleton
claude Nov 13, 2026
1b53c59
ADFA-7136: MCP server with the eight read-only database tools
claude Nov 13, 2026
acddbd2
ADFA-7135 Implement the SQLite debugger extension and its host tests
claude Nov 13, 2026
ff0312f
ADFA-7135 Add the JNI layer and NativeDebugEngine
claude Nov 13, 2026
31dc721
style: spotless reformat of the SQLite debugger module, no functional…
claude Nov 13, 2026
16a006f
ADFA-7135 Fix three review findings in the extension
claude Nov 13, 2026
f03521d
ADFA-7136: Document the SQLite debugger module
claude Nov 13, 2026
e21aae3
ADFA-7136: List sqlite-debugger among the modules without ABI flavors
claude Nov 13, 2026
8dd5efb
ADFA-7136 Never let the debugger crash or miss the host app's early c…
claude Nov 13, 2026
c862c5c
ADFA-7135 Keep read-only server connections from holding locks
claude Nov 13, 2026
05c2a2b
ADFA-7136 Bound query results and report truncation per cell
claude Nov 13, 2026
d309d28
ADFA-7136 Drop stale server connections and stop expanding SQL when idle
claude Nov 13, 2026
d1f0feb
ADFA-7136 Test the JNI query path
claude Nov 13, 2026
7684331
ADFA-7136 Document the JNI test and the requery trace limit
claude Nov 13, 2026
3a5cb53
ADFA-7082: Vendor the sqlite-js 1.4.2 release
davidschachterADFA Nov 13, 2026
464e6e7
ADFA-7082: Test sqlite-js 1.4.2's result-set rule and patch 0002
davidschachterADFA Nov 13, 2026
5b9b062
ADFA-7082: Keep a call's cancel for the finals its result sets run
davidschachterADFA Nov 14, 2026
5b5cd20
ADFA-7082: Say what a late cancel does to a call's finals
davidschachterADFA Nov 16, 2026
9d87b3e
ADFA-7135 Set the Kotlin JVM target on the compile tasks
davidschachterADFA Nov 13, 2026
0ec489a
ADFA-7082: Read result sets as interrupted when the cancel lands whil…
davidschachterADFA Nov 16, 2026
5fc4976
ADFA-7082: Address review of the sqlite-js cancel patches
davidschachterADFA Nov 16, 2026
3e1830f
ADFA-7136 Bound the request head and refuse before reading the body; …
davidschachterADFA Nov 16, 2026
7cf251b
ADFA-7135 Refuse the process-wide heap limit and temp directory PRAGM…
davidschachterADFA Nov 16, 2026
f785f96
ADFA-7135 Give server connections a 3 s busy timeout
davidschachterADFA Nov 16, 2026
dcd342e
ADFA-7135 Fail a query whose argument count differs from its paramete…
davidschachterADFA Nov 16, 2026
d90b7b4
ADFA-7136 List an open database once when the databases folder is rea…
davidschachterADFA Nov 16, 2026
3527173
ADFA-7135 Run the sqlite-debugger host tests in CI
davidschachterADFA Nov 16, 2026
813c352
ADFA-7137 Add debugger_endpoint_table and migration 5 to 6
davidschachterADFA Nov 16, 2026
6adec66
style: spotless reformat, no functional change
davidschachterADFA Nov 16, 2026
4a97c77
ADFA-7137 Pair apps with projects and receive their debugger endpoint
davidschachterADFA Nov 16, 2026
b36bb6f
ADFA-7137 Send the debugger endpoint to Code on the Go once the serve…
davidschachterADFA Nov 16, 2026
6dd7340
ADFA-7137 Docs: describe the debugger endpoint and database version 6
davidschachterADFA Nov 16, 2026
2b759e6
ADFA-7137 Clear pending installs on failure and pin the endpoint broa…
davidschachterADFA Nov 16, 2026
c72508a
ADFA-7139 Add DebuggerEndpointService and the debugger.endpoints perm…
davidschachterADFA Nov 16, 2026
a84d59b
ADFA-7139 Implement DebuggerEndpointService in plugin-manager
davidschachterADFA Nov 16, 2026
030c678
ADFA-7139 Serve the stored debugger endpoints to plugins
davidschachterADFA Nov 16, 2026
4181e7c
ADFA-7139 Docs: describe DebuggerEndpointService in the sqlite-debugg…
davidschachterADFA Nov 16, 2026
6a99814
ADFA-7139 Leave uninstalled apps out of the endpoints and rethrow int…
davidschachterADFA Nov 16, 2026
cbe541a
ADFA-7139 Docs: DebuggerEndpointService ships in 26.47, not 26.43
davidschachterADFA Nov 16, 2026
b15fa5d
ADFA-7082: Vendor the sqlite-js 1.4.3 release, with no patches
davidschachterADFA Nov 16, 2026
d6e0d1a
style: spotless rewrap of the cancelAll() javadoc, no functional change
davidschachterADFA Nov 16, 2026
0c2e603
ADFA-7082: Answer the independent review of the 1.4.3 move
davidschachterADFA Nov 16, 2026
f46e68e
ADFA-7082: Record the phone run of the 1.4.3 build
davidschachterADFA Nov 16, 2026
e9e3f7d
ADFA-7135: Merge #2244 (sqlite-js 1.4.3) into the debugger stack
davidschachterADFA Nov 16, 2026
a49098e
ADFA-7137: Merge ADFA-7135 (with #2244's sqlite-js 1.4.3) up the stack
davidschachterADFA Nov 16, 2026
aa86aa1
ADFA-7139: Merge ADFA-7137 (with #2244's sqlite-js 1.4.3) up the stack
davidschachterADFA Nov 16, 2026
5b54c33
ADFA-7135: Correct two README lines the CI and device work made false
davidschachterADFA Nov 16, 2026
8410499
ADFA-7137: Merge ADFA-7135 (README corrections) up the stack
davidschachterADFA Nov 16, 2026
2007193
ADFA-7139: Merge ADFA-7137 (README corrections) up the stack
davidschachterADFA Nov 16, 2026
49c84c0
ADFA-7135 Refuse SQL that holds more than one statement
davidschachterADFA Nov 17, 2026
ff0bd0c
ADFA-7136 Say when a query ran out of time waiting for another tool call
davidschachterADFA Nov 17, 2026
0da5af2
ADFA-7136 Start a tool call's time limit when the call begins
davidschachterADFA Nov 17, 2026
2fecac4
ADFA-7137: Merge ADFA-7135 (F18 one-statement check, F19 tool deadlin…
davidschachterADFA Nov 17, 2026
7374a39
ADFA-7139: Merge ADFA-7137 (F18 one-statement check, F19 tool deadlin…
davidschachterADFA Nov 17, 2026
d097e5d
ADFA-7135 Let the query backstop's ROLLBACK past the server's authorizer
davidschachterADFA Nov 17, 2026
0d40222
ADFA-7136 Say when get_schema cut a CREATE statement
davidschachterADFA Nov 17, 2026
8ed3fc6
ADFA-7137: Merge ADFA-7135 (F37 backstop rollback, F38 get_schema tru…
davidschachterADFA Nov 17, 2026
e7be1a9
ADFA-7139: Merge ADFA-7137 (F37 backstop rollback, F38 get_schema tru…
davidschachterADFA Nov 17, 2026
403746b
ADFA-7136 Say that functions the app adds to its own connections are …
davidschachterADFA Nov 17, 2026
9c916ca
ADFA-7136 Name both limits that can leave get_schema entries out
davidschachterADFA Nov 17, 2026
691cb38
ADFA-7137: Merge ADFA-7135 (F51 app functions, F52 get_schema limits)…
davidschachterADFA Nov 17, 2026
7d53ea7
ADFA-7139: Merge ADFA-7137 (F51 app functions, F52 get_schema limits)…
davidschachterADFA Nov 17, 2026
6468cff
ADFA-7136 Say that a full integrity_check fails on the app's index fu…
davidschachterADFA Nov 17, 2026
cee95ac
ADFA-7136 Give get_schema's paging advice an ORDER BY and the right unit
davidschachterADFA Nov 17, 2026
b8ea689
ADFA-7137: Merge ADFA-7135 (F108 integrity_check app functions, F109 …
davidschachterADFA Nov 17, 2026
f2aae36
ADFA-7139: Merge ADFA-7137 (F108 integrity_check app functions, F109 …
davidschachterADFA Nov 17, 2026
238edfb
ADFA-7139 Inject the SQLite debugger endpoint source through Koin
davidschachterADFA Nov 17, 2026
89b5c7e
ADFA-7139 Require the installed-app check of DebuggerEndpointRepository
davidschachterADFA Nov 17, 2026
ce08883
ADFA-7139 Test two projects and a symlinked path against the real DAO
davidschachterADFA Nov 17, 2026
f7a7497
ADFA-7139 Return no SQLite debugger endpoints when no project is open
davidschachterADFA Nov 17, 2026
e6880dd
ADFA-7139 Keep the SQLite debugger endpoint source out of plugins' reach
davidschachterADFA Nov 17, 2026
a754c2b
ADFA-7139 Test the DebuggerEndpointService each loaded plugin gets
davidschachterADFA Nov 17, 2026
b4d682b
ADFA-7139 Refuse SQLite debugger endpoints to a disabled plugin
davidschachterADFA Nov 17, 2026
e651f95
ADFA-7139 Docs: list DebuggerEndpointService in the plugin API surface
davidschachterADFA Nov 17, 2026
d7a9b08
ADFA-7139 Return the SQLite debugger endpoints in an unmodifiable list
davidschachterADFA Nov 17, 2026
4f1230a
ADFA-7139 Declare the InterruptedException getEndpoints() can throw
davidschachterADFA Nov 17, 2026
46bc104
ADFA-7139 Docs: say what the debugger.endpoints permission gives a pl…
davidschachterADFA Nov 17, 2026
0bd8ab1
ADFA-7139 Pin DebuggerEndpointService.CONTRACT_VERSION at 1
davidschachterADFA Nov 17, 2026
ad91c84
ADFA-7139 Drop the empty-list case from the unmodifiable-list test
davidschachterADFA Nov 17, 2026
6ed99d7
ADFA-7139 style: spotless reformat of DebuggerEndpointRepositoryTest,…
davidschachterADFA Nov 17, 2026
bc76c14
ADFA-7136 Say which app functions make quick_check and integrity_chec…
davidschachterADFA Nov 17, 2026
e1864d2
ADFA-7136 Advise ORDER BY type, name to page through sqlite_master
davidschachterADFA Nov 17, 2026
2077542
Merge sqlite-debugger/ADFA-7135 into sqlite-debugger/ADFA-7137
davidschachterADFA Nov 17, 2026
5120581
Merge sqlite-debugger/ADFA-7137 into sqlite-debugger/ADFA-7139
davidschachterADFA Nov 17, 2026
a32d288
ADFA-7139 Say which public paths still reach another plugin's Debugge…
davidschachterADFA Nov 17, 2026
24453ed
ADFA-7139 Keep the DebuggerEndpointService closed for a plugin saved …
davidschachterADFA Nov 17, 2026
14067c0
ADFA-7139 Test that a failed activation closes the DebuggerEndpointSe…
davidschachterADFA Nov 17, 2026
cff9d24
ADFA-7139 style: spotless format of PluginManagerDebuggerEndpointTest…
davidschachterADFA Nov 17, 2026
299266e
ADFA-7135 Register consumer-rules.pro so an app's R8 keeps NativeBridge
davidschachterADFA Nov 17, 2026
8acd4bd
ADFA-7135 Refuse a server connection to a path the app no longer has …
davidschachterADFA Nov 17, 2026
e6d9171
ADFA-7135 Bound a JSON-RPC batch by message count and reply size
davidschachterADFA Nov 17, 2026
d1bece3
ADFA-7137: Merge ADFA-7135 (F149 consumer rules, F151 recheck path, F…
davidschachterADFA Nov 17, 2026
61902dd
ADFA-7139: Merge ADFA-7137 (carrying ADFA-7135 F149, F151, F154) up t…
davidschachterADFA Nov 17, 2026
bc94eaa
ADFA-7135 State the true bound on a batch's replies
davidschachterADFA Nov 17, 2026
0defc3f
ADFA-7135 Document the batch limits in the README
davidschachterADFA Nov 17, 2026
85fbbd9
ADFA-7135 Refuse a server connection when every app connection to the…
davidschachterADFA Nov 17, 2026
bd579d9
ADFA-7137: Merge ADFA-7135 (F168 batch bound KDoc, F169 README batch …
davidschachterADFA Nov 17, 2026
73ae97c
ADFA-7139: Merge ADFA-7137 (F168 batch bound KDoc, F169 README batch …
davidschachterADFA Nov 17, 2026
9200772
ADFA-7135 Say the first row of a result can pass the 4 MiB cap
davidschachterADFA Nov 17, 2026
e0bff8b
ADFA-7137: Merge ADFA-7135 (F172 first-row exception to the 4 MiB cap…
davidschachterADFA Nov 17, 2026
99fb7a2
ADFA-7139: Merge ADFA-7137 (F172 first-row exception to the 4 MiB cap…
davidschachterADFA Nov 17, 2026
dcadfe1
ADFA-7135 Say a call that waited half its time limit says so
davidschachterADFA Nov 17, 2026
82ba6e7
ADFA-7135: Merge stage (#2244 squash-merged as 5f3d76aad) into the st…
davidschachterADFA Nov 17, 2026
c327c69
ADFA-7137: Merge ADFA-7135 (F181 half-deadline KDoc, and stage with #…
davidschachterADFA Nov 17, 2026
0ece6a8
ADFA-7139: Merge ADFA-7137 (F181 half-deadline KDoc, and stage with #…
davidschachterADFA Nov 17, 2026
1d12027
ADFA-7137 Re-send the endpoint when Code on the Go asks
davidschachterADFA Nov 18, 2026
6d8c81c
ADFA-7137 Pair a slow install with the open project at launch
davidschachterADFA Nov 18, 2026
85ba2f4
ADFA-7139: Merge ADFA-7137 (endpoint announce, slow-install pairing) …
davidschachterADFA Nov 18, 2026
9149b58
ADFA-7139 Let a retried plugin start install the same endpoint source
davidschachterADFA Nov 18, 2026
d51c88f
ADFA-7139 Delete the unused createPluginContext overload
davidschachterADFA Nov 18, 2026
7bd6675
ADFA-7137 Pair each install by its PackageInstaller session, in the a…
davidschachterADFA Nov 18, 2026
e7223f3
ADFA-7139: Merge ADFA-7137 (session-keyed install pairing in the app-…
davidschachterADFA Nov 18, 2026
dc4c095
ADFA-7139 Docs: DebuggerEndpointService ships in 26.48, not 26.47
davidschachterADFA Nov 18, 2026
c45aae3
ADFA-7137 Drop the install note when the session cannot be committed
davidschachterADFA Nov 18, 2026
95660de
ADFA-7137 Pair nothing on a success result that names no package
davidschachterADFA Nov 18, 2026
10e4c47
ADFA-7137 Docs: Quick Build's installs are never paired
davidschachterADFA Nov 18, 2026
94e4620
ADFA-7139: Merge ADFA-7137 (A2 failed-commit note, A3 result without …
davidschachterADFA Nov 18, 2026
300bf93
ADFA-7139 One endpoint-service helper; drop the close startOpen alrea…
davidschachterADFA Nov 19, 2026
d1626c9
ADFA-7139 Close the endpoint service only once a disable has happened
davidschachterADFA Nov 19, 2026
6793181
ADFA-7139 Close the endpoint service on every way a load fails
davidschachterADFA Nov 19, 2026
4c98e4e
ADFA-7139 Ask the endpoint source by the canonical project path
davidschachterADFA Nov 19, 2026
7f717ef
ADFA-7139 Start the plugin system when the endpoint source can't be s…
davidschachterADFA Nov 19, 2026
33cdf50
ADFA-7139 Docs: name reportedEndpoints as the repository read that th…
davidschachterADFA Nov 19, 2026
da6a0e3
ADFA-7139 Check token and port before asking whether an app is installed
davidschachterADFA Nov 19, 2026
3406a95
ADFA-7139 Style: wrap an overlong line in PluginSystemStartTest
davidschachterADFA Nov 19, 2026
906f7d2
ADFA-7137 Clear an app's stored endpoint when an install from its pro…
davidschachterADFA Nov 19, 2026
5d13841
ADFA-7139 Merge #2260 (sqlite-debugger/ADFA-7137): clear the stored e…
davidschachterADFA Nov 19, 2026
1f0846f
ADFA-7139 Test that a reinstalled app gets no endpoint until it repor…
davidschachterADFA Nov 19, 2026
085eb15
ADFA-7137 Rethrow an install's cancellation, and let a VirtualMachine…
davidschachterADFA Nov 19, 2026
b850ede
ADFA-7137 Keep the install note for the real result when a success na…
davidschachterADFA Nov 19, 2026
d692060
ADFA-7139 Let a VirtualMachineError from the endpoint source through
davidschachterADFA Nov 19, 2026
f9791cf
ADFA-7139 Let a VirtualMachineError from resolving the project path t…
davidschachterADFA Nov 19, 2026
c121f11
ADFA-7139 Merge #2260 (sqlite-debugger/ADFA-7137): brief 5 fixes (G7,…
davidschachterADFA Nov 19, 2026
f7efd3c
ADFA-7137 Let a VirtualMachineError out of apkApplicationId and canon…
davidschachterADFA Nov 20, 2026
ea44b03
ADFA-7137 Docs: narrow the endpoint-clearing claim to what the code does
davidschachterADFA Nov 20, 2026
76e0623
ADFA-7139 Merge #2260 (sqlite-debugger/ADFA-7137): narrow two helpers…
davidschachterADFA Nov 20, 2026
0a4ee95
ADFA-7139 Docs: reportedEndpoints leaves out only an app a Run instal…
davidschachterADFA Nov 20, 2026
632bc27
ADFA-7135 Merge origin/stage into sqlite-debugger/ADFA-7135: stage at…
davidschachterADFA Nov 20, 2026
54ce393
ADFA-7137 Merge sqlite-debugger/ADFA-7135 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 20, 2026
e227f26
ADFA-7139 Merge sqlite-debugger/ADFA-7137 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 20, 2026
3dfb5f4
ADFA-7137 Docs: the list of installs that keep the old endpoint is fi…
davidschachterADFA Nov 21, 2026
b366b56
ADFA-7139 Merge sqlite-debugger/ADFA-7137 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 21, 2026
1da19cb
ADFA-7139 Docs: reportedEndpoints and the README name all five instal…
davidschachterADFA Nov 21, 2026
a297cc1
ADFA-7137 Docs: add the fallback installer and a catch-all to the ins…
davidschachterADFA Nov 21, 2026
df77170
ADFA-7139 Merge sqlite-debugger/ADFA-7137 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 21, 2026
1e384f2
ADFA-7139 Docs: reportedEndpoints and the README add the fallback ins…
davidschachterADFA Nov 21, 2026
0ad7df1
ADFA-7139 Docs: rewrap the reportedEndpoints KDoc to 100 columns
davidschachterADFA Nov 21, 2026
7dbd5b4
ADFA-7137 Docs: name the real launches that skip recordLaunched, say …
davidschachterADFA Nov 21, 2026
d452961
ADFA-7139 Merge sqlite-debugger/ADFA-7137 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 21, 2026
6b54cd4
ADFA-7139 Docs: reportedEndpoints and the README name the real launch…
davidschachterADFA Nov 21, 2026
ff1fea4
ADFA-7137 Docs: Launch pairs an unpaired app from all six install cas…
davidschachterADFA Nov 21, 2026
21169f3
ADFA-7139 Merge sqlite-debugger/ADFA-7137 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 21, 2026
d4bf740
ADFA-7139 Don't reopen or activate a plugin that was unloaded during …
davidschachterADFA Nov 21, 2026
2d7c135
ADFA-7135 Merge origin/stage into sqlite-debugger/ADFA-7135: stage at…
davidschachterADFA Nov 22, 2026
a522456
ADFA-7136 Count user tables whose name only looks like sqlite_ in get…
davidschachterADFA Nov 22, 2026
4ee1506
ADFA-7136 Report a path whose app connections are all closing as not …
davidschachterADFA Nov 22, 2026
3a3d57a
ADFA-7135 Drain unread request input before closing after an error reply
davidschachterADFA Nov 22, 2026
df22b7a
ADFA-7136 Stop a server statement after 1.5 s on a database that is n…
davidschachterADFA Nov 22, 2026
f683484
ADFA-7135 Run the SQLite debugger's Kotlin unit tests in CI
davidschachterADFA Nov 22, 2026
8b7c558
ADFA-7137 Merge sqlite-debugger/ADFA-7135 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 22, 2026
23c4a06
ADFA-7139 Merge sqlite-debugger/ADFA-7137 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 22, 2026
3ae862a
ADFA-7135 sqlite-debugger README: say where the rest lands and what r…
davidschachterADFA Nov 22, 2026
52bc0ad
ADFA-7135 sqlite-debugger README: the device runs predate the review …
davidschachterADFA Nov 22, 2026
613ffbc
ADFA-7137 Merge sqlite-debugger/ADFA-7135 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 22, 2026
13be2aa
ADFA-7139 Merge sqlite-debugger/ADFA-7137 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 22, 2026
f21b3ac
ADFA-7135 Merge origin/stage into sqlite-debugger/ADFA-7135: stage at…
davidschachterADFA Nov 23, 2026
f6de53d
ADFA-7135 Remove separator comments from the SQLite debugger module
davidschachterADFA Nov 23, 2026
12a3bd6
ADFA-7135 Say in the README that test.sh runs on Linux only
davidschachterADFA Nov 23, 2026
212c143
ADFA-7135 Clear a connection's closing flag when a later statement runs
davidschachterADFA Nov 23, 2026
3db82a5
ADFA-7136 Keep one pending idle check in DatabaseTools
davidschachterADFA Nov 23, 2026
c84d987
ADFA-7136 List the cut cells in truncated_cell_indexes
davidschachterADFA Nov 23, 2026
4911b94
ADFA-7136 Give one deadline to every tool call of a POST
davidschachterADFA Nov 23, 2026
ee7fa6f
ADFA-7136 Tell a get_events client when its cursor is from an earlier…
davidschachterADFA Nov 23, 2026
915bc3f
ADFA-7137 Merge sqlite-debugger/ADFA-7135 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 23, 2026
47512a2
ADFA-7139 Merge sqlite-debugger/ADFA-7137 into sqlite-debugger/ADFA-7…
davidschachterADFA Nov 23, 2026
4fc9885
ADFA-7135 Merge origin/stage at 8ab2028bd into sqlite-debugger/ADFA-7135
davidschachterADFA Nov 24, 2026
5bf99a1
ADFA-7135 Merge origin/stage at b5931b2e6 into sqlite-debugger/ADFA-7135
davidschachterADFA Nov 24, 2026
c78cc27
ADFA-7135 Roll back an open transaction when a query fails before it …
davidschachterADFA Nov 24, 2026
c84ae0c
ADFA-7135 Stop JNI_OnLoad at the first failed lookup or allocation
davidschachterADFA Nov 24, 2026
a645f21
ADFA-7135 Document the setup failures of sqlitedbg_open_server
davidschachterADFA Nov 24, 2026
dcb5506
ADFA-7136 Say "at least N tables" when get_stats hit the table list cap
davidschachterADFA Nov 24, 2026
a24a886
ADFA-7136 Answer Expect: 100-continue before reading the request body
davidschachterADFA Nov 24, 2026
afaf027
ADFA-7136 Answer 400 when a chunked body ends inside the trailer section
davidschachterADFA Nov 24, 2026
18304ca
ADFA-7136 Count open attempts in FakeDebugEngine so "never opened" ca…
davidschachterADFA Nov 24, 2026
242f68a
ADFA-7136 Bound the waits in queuedBehindAnotherCall and release in f…
davidschachterADFA Nov 24, 2026
860cac5
ADFA-7136 Wait for the recorded accept retries instead of sleeping in…
davidschachterADFA Nov 24, 2026
29f355d
ADFA-7135 Open the JNI test's app fixture with UTF-8 bytes and check …
davidschachterADFA Nov 24, 2026
f3fce48
ADFA-7135 Fail the parameter diagnostic JNI test when the query succeeds
davidschachterADFA Nov 24, 2026
ba78ebb
ADFA-7136 Say in the README that the time limits and two idle paths a…
davidschachterADFA Nov 24, 2026
63ce517
ADFA-7137 Merge sqlite-debugger/ADFA-7135 at ba78ebbb2 into sqlite-de…
davidschachterADFA Nov 24, 2026
790730f
ADFA-7137 Merge origin/stage at 122cc41cd into sqlite-debugger/ADFA-7137
davidschachterADFA Nov 24, 2026
4fa3b84
ADFA-7139 Merge sqlite-debugger/ADFA-7137 at 790730f38 into sqlite-de…
davidschachterADFA Nov 24, 2026
c236413
ADFA-7139 Merge origin/stage at acca2c3b3 into sqlite-debugger/ADFA-7139
davidschachterADFA Nov 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.itsaky.androidide.app

import android.content.Context
import android.content.Intent
import android.os.Handler
import android.os.Looper
import android.os.UserManager
import androidx.annotation.VisibleForTesting
import androidx.appcompat.app.AppCompatDelegate
import androidx.core.os.LocaleListCompat
import androidx.work.WorkManager
Expand All @@ -21,6 +23,7 @@ import com.itsaky.androidide.managers.ToolsManager
import com.itsaky.androidide.plugins.PluginLogger
import com.itsaky.androidide.plugins.base.PluginFragmentHelper
import com.itsaky.androidide.plugins.manager.core.PluginManager
import com.itsaky.androidide.plugins.manager.services.DebuggerEndpointSource
import com.itsaky.androidide.plugins.manager.services.IdeBuildServiceImpl
import com.itsaky.androidide.plugins.manager.services.IdeLogServiceImpl
import com.itsaky.androidide.plugins.manager.services.IdeTerminalServiceImpl
Expand All @@ -45,6 +48,8 @@ import kotlinx.coroutines.withContext
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
import org.koin.core.component.KoinComponent
import org.koin.core.component.get
import org.slf4j.LoggerFactory
import java.io.File
import java.util.concurrent.atomic.AtomicBoolean
Expand All @@ -59,7 +64,9 @@ import kotlin.system.exitProcess
*
* @author Akash Yadav
*/
internal object CredentialProtectedApplicationLoader : ApplicationLoader {
internal object CredentialProtectedApplicationLoader :
ApplicationLoader,
KoinComponent {
private val logger = LoggerFactory.getLogger(CredentialProtectedApplicationLoader::class.java)

private val _isLoaded = AtomicBoolean(false)
Expand Down Expand Up @@ -327,8 +334,13 @@ internal object CredentialProtectedApplicationLoader : ApplicationLoader {
ideLogcatReader = null
}

/** [context] and [endpointSource] are parameters only so a test can start the plugin system without the app. */
@VisibleForTesting
@OptIn(DelicateCoroutinesApi::class)
private fun initializePluginSystem() {
internal fun initializePluginSystem(
context: Context = application,
endpointSource: () -> DebuggerEndpointSource = { get() },
) {
try {
logger.info("Initializing plugin system...")

Expand Down Expand Up @@ -368,15 +380,15 @@ internal object CredentialProtectedApplicationLoader : ApplicationLoader {

pluginManager =
PluginManager.getInstance(
context = application,
context = context,
eventBus = EventBus.getDefault(),
logger = pluginLogger,
)

pluginManager?.setLanguageContributionsListener(PluginLanguageSupport::refresh)

// Set up plugin service providers
setupPluginServices()
setupPluginServices(endpointSource)
setupPluginInflationErrorHandler()

// Load plugins asynchronously
Expand All @@ -398,17 +410,44 @@ internal object CredentialProtectedApplicationLoader : ApplicationLoader {
/**
* Sets up the plugin service providers to integrate with AndroidIDE's actual systems.
*/
private fun setupPluginServices() {
private fun setupPluginServices(endpointSource: () -> DebuggerEndpointSource) {
pluginManager?.let { manager ->
manager.setActivityProvider { application.foregroundActivity }
setupBuildServiceProviders()
setupProjectManipulationProviders()
IdeLogServiceImpl.getInstance().setLogReader(LogsProvider::read)
installDebuggerEndpointSource(manager, endpointSource)
IdeTerminalServiceImpl.setSessionLauncher(PluginTerminalLauncher { application.foregroundActivity })
logger.info("Plugin services configured successfully")
}
}

/**
* Installs where every plugin's DebuggerEndpointService reads the SQLite debugger endpoints. The
* SQLite debugger is optional, so an Exception or LinkageError here, such as a binding that cannot
* be built or a different source already installed, is reported and the plugin system starts anyway:
* plugins load, and getEndpoints() throws IllegalStateException saying the endpoints are unavailable.
* Like the other host and plugin-system calls, this catches nothing else: a VirtualMachineError such
* as OutOfMemoryError propagates out of [initializePluginSystem].
*/
private fun installDebuggerEndpointSource(
manager: PluginManager,
endpointSource: () -> DebuggerEndpointSource,
) {
try {
manager.installDebuggerEndpointSource(endpointSource())
} catch (e: Exception) {
reportEndpointSourceFailure(e)
} catch (e: LinkageError) {
reportEndpointSourceFailure(e)
}
}

private fun reportEndpointSourceFailure(e: Throwable) {
Sentry.captureException(e)
logger.error("Could not set up the SQLite debugger endpoints for plugins; plugins load without them", e)
}

@OptIn(DelicateCoroutinesApi::class)
private fun setupBuildServiceProviders() {
val buildServiceImpl = IdeBuildServiceImpl.getInstance()
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/java/com/itsaky/androidide/di/AppModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.itsaky.androidide.deeplink.PendingDeepLinkOpen
import com.itsaky.androidide.editor.language.outline.OutlineProvider
import com.itsaky.androidide.editor.language.outline.TreeSitterOutlineProvider
import com.itsaky.androidide.git.core.GitCredentialsManager
import com.itsaky.androidide.plugins.manager.services.DebuggerEndpointSource
import com.itsaky.androidide.repositories.DebuggerEndpointRepository
import com.itsaky.androidide.repositories.RecentProjectRepository
import com.itsaky.androidide.repositories.RecentProjectRepositoryImpl
Expand All @@ -19,11 +20,13 @@ import com.itsaky.androidide.viewmodel.OutlineViewModel
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.runBlocking
import org.koin.android.ext.koin.androidApplication
import org.koin.android.ext.koin.androidContext
import org.koin.core.module.dsl.viewModel
import org.koin.core.qualifier.named
import org.koin.dsl.module
import java.io.File

/** Qualifier for the process-lifetime [CoroutineScope]; see the binding for why it is named. */
const val APPLICATION_SCOPE = "applicationScope"
Expand Down Expand Up @@ -65,13 +68,21 @@ val coreModule =

single {
val context = androidContext()
val packageManager = context.packageManager
DebuggerEndpointRepository(
get(),
get(named(APPLICATION_SCOPE)),
isInstalled = { DebuggerEndpointRepository.isPackageInstalled(packageManager, it) },
Comment thread
davidschachterADFA marked this conversation as resolved.
Resolved
announce = { DebuggerEndpointAnnounce.send(context, it) },
)
}

// What DebuggerEndpointService reads. Plugins call it off the main thread, so blocking on Room is fine.
single<DebuggerEndpointSource> {
val repository = get<DebuggerEndpointRepository>()
DebuggerEndpointSource { location -> runBlocking { repository.reportedEndpoints(File(location)) } }
}

single<RecentProjectRepository> {
RecentProjectRepositoryImpl(get())
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.itsaky.androidide.repositories

import android.content.pm.PackageManager
import com.itsaky.androidide.roomData.recentproject.DebuggerEndpointDao
import com.itsaky.androidide.sqlitedebugger.DebuggerEndpointValidation
import com.itsaky.androidide.utils.canonicalProjectLocation
Expand All @@ -12,17 +13,22 @@ import kotlinx.coroutines.withContext
import org.slf4j.LoggerFactory
import java.io.File
import java.util.concurrent.ConcurrentHashMap
import com.itsaky.androidide.plugins.services.DebuggerEndpoint as PluginDebuggerEndpoint

/**
* Which app each project builds, and the SQLite debugger endpoint the app last reported (ADFA-7137).
* Nothing here throws except [CancellationException]: any other failure is logged and reported as
* false, because none of the callers can do anything about it, and they run on the application scope,
* which has no CoroutineExceptionHandler (an escaping exception would crash the process).
* The writes throw nothing but [CancellationException]: any other failure is logged and reported as
* false, because none of their callers can do anything about it, and they run on the application
* scope, which has no CoroutineExceptionHandler (an escaping exception would crash the process).
* [reportedEndpoints], the read behind the plugin API, is the exception: it throws on a read failure,
* so call it where a failure is handled, not on the application scope.
*/
class DebuggerEndpointRepository(
private val dao: DebuggerEndpointDao,
private val scope: CoroutineScope,
private val clock: () -> Long = System::currentTimeMillis,
/** Required, with no default: one that answered true would serve an uninstalled app's port and token as live. */
private val isInstalled: (String) -> Boolean,
/**
* Asks the app to report its endpoint again, after each pairing; see DebuggerEndpointAnnounce. Required, with no
* default: one that did nothing would leave an app that was already running unknown until its process restarts.
Expand Down Expand Up @@ -164,7 +170,54 @@ class DebuggerEndpointRepository(
false
}

private companion object {
/**
* The endpoints the apps of [projectDir] have reported, for the plugin API (ADFA-7139). Looked up
* by the canonical path, as the pairing stores it; an app is left out until it reports again only
* when a Run install from ProjectHandlerActivity cleared its endpoint (a success result that
* names the package and arrives in the same Code on the Go process). An app installed by Quick
* Build, by a Run install with no project open or whose APK's application ID could not be read,
* by a success result with no package name, by a result that arrived after Code on the Go
* restarted, or by the intent-based fallback installer (on MIUI, or when debugFallbackInstaller
* is set; Run installs too, and it never calls beforeCommit or has a session or result) keeps its
* old token and port until it reports, so it can be listed with a dead endpoint. So can an app
* whose install did not clear them for another reason: [recordInstalled] returns false and keeps
* the old values when the project has no recent-project row or the write fails; a result that
* names a different package is dropped without clearing; a beforeCommit that throws is logged and
* the install goes on with no note; and an install not made from a project (the file tab, adb)
* leaves an already-paired app listed with its dead token and port. Only the Launch action pairs
* an unpaired app at the next launch from a project, keeping stored values; the automatic
* post-install launch (in debug mode too), RestartVmAction and Quick Build's launch of the proxy
* app never call [recordLaunched]. Apps that are no longer installed are left out too: their
* stored port and token would otherwise come back as live. An endpoint can also be stale when the
* app's process has died. Unlike the writes, a read failure is thrown: the plugin API reports it
* rather than answering "no apps".
*/
suspend fun reportedEndpoints(projectDir: File): List<PluginDebuggerEndpoint> =
Comment thread
davidschachterADFA marked this conversation as resolved.
Resolved
dao.getByProjectLocation(projectDir.canonicalProjectLocation()).mapNotNull { row ->
Comment thread
davidschachterADFA marked this conversation as resolved.
Resolved
val token = row.token ?: return@mapNotNull null
val port = row.port ?: return@mapNotNull null
// Last: a binder call per app, which an app that has not reported need not cost.
if (!isInstalled(row.applicationId)) return@mapNotNull null
PluginDebuggerEndpoint(row.applicationId, port, token, row.updatedAt ?: 0L)
}

companion object {
/**
* Whether [applicationId] is installed. Every package is visible because Code on the Go targets SDK 28; at a
* target of 30 or later, package visibility filtering would make every endpoint look uninstalled unless the
* manifest declares a matching `<queries>`.
*/
fun isPackageInstalled(
packageManager: PackageManager,
applicationId: String,
): Boolean =
try {
packageManager.getPackageInfo(applicationId, 0)
true
} catch (e: PackageManager.NameNotFoundException) {
false
}

private val log = LoggerFactory.getLogger(DebuggerEndpointRepository::class.java)
}
}
Loading
Loading