Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
6461120
docs: add rewrite architecture records
xz-dev Jun 22, 2026
9527287
chore: add rewrite agent guardrails
xz-dev Jun 22, 2026
ae0d72c
feat(app): add Flutter shell scaffold
xz-dev Jun 22, 2026
4756f7c
feat(getter): wire package-centric getter submodule
xz-dev Jun 22, 2026
a5730a9
ci: add rewrite validation workflow
xz-dev Jun 22, 2026
59c1a0d
fix(getter): keep Android proxy off Lua deps
xz-dev Jun 22, 2026
3201d92
fix(app): use Flutter-compatible Gradle wrapper
xz-dev Jun 22, 2026
35e6c3d
ci: restrict Telegram notifications to master pushes
xz-dev Jun 22, 2026
80e1eb6
fix(app): use Flutter-compatible AGP
xz-dev Jun 22, 2026
384aee6
docs: add rewrite next-step audit plan
xz-dev Jun 22, 2026
a1c43f4
fix(app): use Flutter-compatible Kotlin plugin
xz-dev Jun 22, 2026
c6838b5
docs: update rewrite next-step completion status
xz-dev Jun 22, 2026
76f771a
feat(app): add getter bridge contract
xz-dev Jun 22, 2026
47f5811
feat(getter): add offline repo validation
xz-dev Jun 22, 2026
0976844
feat(getter): import legacy Room databases
xz-dev Jun 22, 2026
81a5dec
feat(getter): add installed app autogen
xz-dev Jun 22, 2026
8f3ca13
feat(getter): add offline update check
xz-dev Jun 22, 2026
9bb18f2
feat(getter): add offline task lifecycle
xz-dev Jun 23, 2026
1ba7614
feat(app): render getter task DTOs
xz-dev Jun 23, 2026
aed83cb
ci(app): publish Flutter APK artifacts
xz-dev Jun 23, 2026
2e22767
feat(app): add legacy Room migration adapter
xz-dev Jun 23, 2026
39af4c7
feat(app): add Android platform adapter spine
xz-dev Jun 23, 2026
3a5a602
feat(app): add Android installed inventory provider
xz-dev Jun 23, 2026
dd94154
feat(app): bridge installed autogen to Flutter
xz-dev Jun 23, 2026
8a6ac21
feat(app): bridge legacy room import
xz-dev Jun 24, 2026
044ca72
ci: set Android ar for cargo checks
xz-dev Jun 24, 2026
65df6ab
test(app): cover legacy room preparation
xz-dev Jun 24, 2026
c0f6752
test(app): validate native bridge on device
xz-dev Jun 24, 2026
d392b5c
docs(architecture): accept runtime task ADRs
xz-dev Jun 25, 2026
dba34ec
feat(app): bridge runtime task operations
xz-dev Jun 25, 2026
108625a
feat(app): stream runtime notifications
xz-dev Jun 25, 2026
2b98939
docs(todo): update runtime bridge progress
xz-dev Jun 25, 2026
ced8576
feat(app): issue runtime actions from update checks
xz-dev Jun 25, 2026
5061d20
docs(todo): note offline action issuance
xz-dev Jun 25, 2026
71c71c9
docs(lua): document static update candidates
xz-dev Jun 25, 2026
75b9f65
feat(app): issue actions from registered packages
xz-dev Jun 25, 2026
2aad93f
docs(todo): note registered package action issuance
xz-dev Jun 25, 2026
7ebf9be
feat(app): adopt pin version DTOs
xz-dev Jun 25, 2026
c1f7126
feat(app): add typed runtime task APIs
xz-dev Jun 25, 2026
b2c03b7
chore(app): point CLI debug tasks at runtime script
xz-dev Jun 25, 2026
3897038
refactor(app): drop fake task DTOs from product adapter
xz-dev Jun 25, 2026
dd9115c
docs(lua): describe static mock provider boundary
xz-dev Jun 25, 2026
1530a42
refactor(app): drop CLI fake task adapter APIs
xz-dev Jun 25, 2026
7bcaa0b
ci: install multilib for Android LuaJIT builds
xz-dev Jun 25, 2026
4e6274a
chore(app): update Flutter toolchain baseline
xz-dev Jun 25, 2026
25af79c
feat(app): load snapshots from native getter read model
xz-dev Jun 25, 2026
1a5d822
feat(app): submit update checks to runtime
xz-dev Jun 25, 2026
239f98f
docs(architecture): define provider autogen repository model
xz-dev Jun 26, 2026
4d65323
feat(app): use ADR-0012 autogen repository defaults
xz-dev Jun 26, 2026
03cb206
feat(getter): use package directory discovery
xz-dev Jun 26, 2026
4dea731
feat(app): consume package-directory autogen previews
xz-dev Jun 26, 2026
346636f
feat(getter): evaluate package directories
xz-dev Jun 26, 2026
aa3fdbb
fix(getter): update clippy-clean gitlink
xz-dev Jun 26, 2026
a8739cc
feat(getter): expose package-local file reads
xz-dev Jun 26, 2026
1ce7701
fix(getter): hash package-local file inputs
xz-dev Jun 26, 2026
175ae4c
feat(getter): add provider cache primitives
xz-dev Jun 26, 2026
e0673f2
feat(getter): add F-Droid provider fixtures
xz-dev Jun 26, 2026
1a13cbd
feat(getter): cache F-Droid catalog fixtures
xz-dev Jun 26, 2026
728cff6
feat(getter): add F-Droid autogen CLI slice
xz-dev Jun 27, 2026
dddce32
feat(getter): match F-Droid installed inventory
xz-dev Jun 27, 2026
b35b7c4
feat(getter): add GitHub release fixtures
xz-dev Jun 27, 2026
416075e
refactor(getter): remove flat Lua repository layout
xz-dev Jun 27, 2026
80df257
feat(app): expose F-Droid autogen bridge
xz-dev Jun 27, 2026
eb1719d
feat(getter): add GitHub latest commit fixtures
xz-dev Jun 27, 2026
be6f4b3
test(getter): cover F-Droid luaclass shape
xz-dev Jun 27, 2026
526e5d4
test(getter): cover GitHub luaclass shape
xz-dev Jun 27, 2026
cb74bba
feat(getter): add Lua host binding seam
xz-dev Jun 27, 2026
2f6585e
feat(getter): add dev Lua provider host eval
xz-dev Jun 27, 2026
345ef45
feat(getter): add F-Droid dev Lua provider host eval
xz-dev Jun 27, 2026
4e06159
feat(getter): add builtin luaclass fallback
xz-dev Jun 27, 2026
b8e929a
feat(getter): add Lua HTTP host seam
xz-dev Jun 27, 2026
64e2fb4
feat(getter): add dev provider luaclass modules
xz-dev Jun 27, 2026
dd1c259
feat(getter): add Lua HTTP policy harness
xz-dev Jun 27, 2026
8942c7f
feat(getter): add runtime hook harness
xz-dev Jun 27, 2026
19f2fd9
docs(architecture): design provider host API v1
xz-dev Jun 28, 2026
016f977
feat(getter): add stable provider host harness
xz-dev Jun 28, 2026
561d0e7
feat(getter): store provider response provenance
xz-dev Jun 28, 2026
b20fb0a
feat(getter): promote standard provider luaclasses
xz-dev Jun 28, 2026
c86c894
fix(getter): validate provider endpoint ids
xz-dev Jun 28, 2026
9e2be1e
test(getter): lock fdroid generated script boundary
xz-dev Jun 28, 2026
3b70b92
docs(plan): defer fdroid generated provider adoption
xz-dev Jun 28, 2026
0bb0c77
test(getter): cover configured provider endpoints
xz-dev Jun 28, 2026
236794e
feat(getter): use provider-backed update checks
xz-dev Jun 28, 2026
e1993f2
feat(getter): use F-Droid provider module autogen output
xz-dev Jun 28, 2026
67e99a8
feat(app): add installed F-Droid autogen flow
xz-dev Jun 29, 2026
1f7773b
feat(app): refresh F-Droid catalog cache
xz-dev Jun 29, 2026
4fbb6ca
feat(getter): add GitHub standard module runtime slice
xz-dev Jul 2, 2026
a1cdee6
feat(getter): add GitHub autogen product seam
xz-dev Jul 2, 2026
31ab0f9
feat(getter): add GitHub releases live transport slice
xz-dev Jul 2, 2026
5a380f6
feat(app): add GitHub autogen product bridge
xz-dev Jul 2, 2026
1b49340
feat(app): run getter-owned download bytes
xz-dev Jul 2, 2026
ea26f3e
feat(app): load getter startup snapshot
xz-dev Jul 14, 2026
c1f79c1
docs(cli): document app inspect and check
xz-dev Jul 14, 2026
171fb8e
docs(architecture): define artifact staging and installers
xz-dev Jul 16, 2026
0cd8a4b
feat(app): guide fresh package setup
xz-dev Jul 17, 2026
2369bcc
feat(app): bridge Android APK install preparation
xz-dev Jul 17, 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
Prev Previous commit
Next Next commit
chore(app): point CLI debug tasks at runtime script
  • Loading branch information
xz-dev committed Jun 25, 2026
commit b2c03b76b21e32d4203fa5a707faf8678bb90d70
10 changes: 8 additions & 2 deletions app_flutter/dev_test/cli_getter_adapter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,18 @@ void main() {
bundle.path,
]);
_runGetter(getterCli, dataDir.path, <String>[
'task',
'debug',
'fake-task',
'submit',
'--request',
taskRequest.path,
]);
_runGetter(getterCli, dataDir.path, <String>['task', 'run', 'task-1']);
_runGetter(getterCli, dataDir.path, <String>[
'debug',
'fake-task',
'run',
'task-1',
]);

final repositories = adapter.listRepositories();
expect(repositories.map((repo) => repo.id), contains('official'));
Expand Down
5 changes: 3 additions & 2 deletions app_flutter/lib/cli_getter_adapter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CliGetterAdapter implements GetterAdapter {

@override
List<DownloadTaskSummary> listDownloadTasks() {
final json = _runGetter(const <String>['task', 'list']);
final json = _runGetter(const <String>['debug', 'fake-task', 'list']);
final tasks = _asList(_data(json)['tasks'], 'tasks');
return tasks
.map((task) => _downloadTaskFromJson(_asMap(task, 'task')))
Expand All @@ -84,7 +84,8 @@ class CliGetterAdapter implements GetterAdapter {
@override
TaskEventPage listTaskEvents({required int after, required int limit}) {
final json = _runGetter(<String>[
'task',
'debug',
'fake-task',
'events',
'--after',
after.toString(),
Expand Down
17 changes: 10 additions & 7 deletions docs/architecture/adr/0006-package-centric-cli-command-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ getter --data-dir <path> repo validate <path>
getter --data-dir <path> package eval <package-id> [--repo <repo-id>]
getter --data-dir <path> storage validate
getter --data-dir <path> update check --fixture <fixture.json>
getter --data-dir <path> task submit --request <request.json>
getter --data-dir <path> task run <task-id>
getter --data-dir <path> task list
getter --data-dir <path> task cancel <task-id>
getter --data-dir <path> task events --after <cursor> --limit <n>
getter --data-dir <path> task install-result <handoff-id> --status <accepted|succeeded|failed|canceled>
getter --data-dir <path> runtime script --script <script.json>
getter --data-dir <path> debug fake-task submit --request <request.json>
getter --data-dir <path> debug fake-task run <task-id>
getter --data-dir <path> debug fake-task list
getter --data-dir <path> debug fake-task cancel <task-id>
getter --data-dir <path> debug fake-task events --after <cursor> --limit <n>
getter --data-dir <path> debug fake-task install-result <handoff-id> --status <accepted|succeeded|failed|canceled>
getter --data-dir <path> autogen installed preview --inventory <installed.json>
getter --data-dir <path> autogen installed apply --preview <preview.json> (--accept-all|--accept <package-id>...)
getter --data-dir <path> autogen cleanup preview --inventory <installed.json>
Expand Down Expand Up @@ -103,7 +104,9 @@ The first installed-app autogen slice accepts an Android/platform-provided inven

`update check --fixture <fixture.json>` is the first Phase D offline update-check slice. The fixture contract is explicitly offline and uses `format = "getter-offline-update-check"`, `version = 1`, `package_id`, optional `installed_version`, optional `pin_version` (with transitional `ignored_version` accepted as an input alias), and normalized candidate/artifact DTOs. The command returns `network_required = false`, observed `installed_version`, `effective_local_version`, a getter-owned status (`update_available`, `up_to_date`, or `no_candidates`), the selected update when one exists, and generated download/install action DTOs. An update-selected result must have an actionable artifact; a selected candidate without artifacts is a structured update-check error rather than `update_available` with no actions. It reuses Rust getter update selection and version comparison; it does not run providers, perform downloads, persist download tasks, stream events, or call Android installers.

The first getter-owned task lifecycle slice is also explicitly offline/fake and command-driven. `task submit --request <request.json>` accepts `format = "getter-download-request"`, `version = 1`, `package_id`, `executor = "fake"`, and update actions containing at least one `download` action; an optional `install` action creates an abstract install handoff after a successful fake run. `task run <task-id>` deterministically advances the fake task to `succeeded`; it performs no network I/O and writes no downloaded bytes. `task list` returns persisted task summaries from `main.db`. `task cancel <task-id>` persists cancellation for `queued`/`running` tasks, is idempotent for already-canceled tasks, and rejects terminal success/failure with a structured download error. `task events --after <cursor> --limit <n>` is a pollable CLI/dev event contract with a positive `limit`; it is not a native streaming API, and native streaming/backpressure remains deferred. `task install-result <handoff-id> --status <accepted|succeeded|failed|canceled>` records the platform-side result of an abstract handoff; the getter-created `requested` handoff state is not accepted as a platform result. Getter records handoff requests/results but does not call Android installers, request permissions, create notifications, or decide Android URI/SAF semantics.
The old persisted fake downloader slice is retained only as debug scaffolding under `debug fake-task ...`. `debug fake-task submit --request <request.json>` accepts `format = "getter-download-request"`, `version = 1`, `package_id`, `executor = "fake"`, and update actions containing at least one `download` action; an optional `install` action creates an abstract install handoff after a successful fake run. `debug fake-task run <task-id>` deterministically advances the fake task to `succeeded`; it performs no network I/O and writes no downloaded bytes. `debug fake-task list` returns persisted fake-task summaries from `main.db`. `debug fake-task cancel <task-id>` persists cancellation for `queued`/`running` fake tasks, is idempotent for already-canceled tasks, and rejects terminal success/failure with a structured download error. `debug fake-task events --after <cursor> --limit <n>` is a pollable debug event contract with a positive `limit`; it is not the ADR-0011 runtime event model. `debug fake-task install-result <handoff-id> --status <accepted|succeeded|failed|canceled>` records the platform-side result of an abstract debug handoff; the getter-created `requested` handoff state is not accepted as a platform result. This scaffold is not a product task API.

ADR-0011 runtime task debugging uses `runtime script --script <script.json>`. The script command creates one in-memory `GetterRuntime` for that single CLI process, executes scripted operations such as `issue_action`, `submit_action`, `task_start`, `task_complete_download`, `task_user_result`, `task_remove`, and `task_clean`, then drops all runtime task state when the process exits. It exists so CLI tests can cover runtime remove/clean/control semantics without introducing a task database, daemon, or cross-invocation task promise. Product task submission remains getter-issued opaque `action_id` only through the native bridge/runtime operation path.

`repo validate <path>` validates a repository path offline without requiring it to be registered first. It returns `valid`, `diagnostics`, `package_count`, and `network_required = false`; diagnostics are getter-owned structured records with stable codes, message, severity, source path, and optional package id/field.

Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/adr/0007-flutter-getter-bridge-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ Flutter then calls a getter bridge operation equivalent to `legacy import-room-d

## Event model

The first bridge slice is snapshot-only. Streaming events, progress, cancellation, backpressure, foreground services, notification lifecycle, and installer handoff are explicitly deferred to the update/download/install lifecycle ADR/work.
The initial bridge slice was snapshot-only. ADR-0011 supersedes the old persisted fake-task CLI scaffold for product task flow: runtime task state is process-memory only in the native getter singleton, `RuntimeNotification.task_changed` is pushed over the bridge, and current-state task query operations remain authoritative. The remaining `debug fake-task ...` CLI commands are development scaffolding, not a Flutter/product task API. CLI runtime task coverage uses `runtime script --script <script.json>`, which executes within one process and intentionally drops runtime task state after the command exits.

The first Phase D lifecycle slice defines getter-owned task/event/handoff DTOs through the CLI only: task state is persisted in getter `main.db`, task events are pollable with `after` cursor plus `limit`, and fake executor progress is command-driven rather than background-streamed. This pollable CLI/dev contract is not the final native stream API. Flutter should not maintain its own task state machine; future Flutter/bridge work must render getter task/event DTOs or ask getter for richer fields.
Flutter should not maintain its own task state machine; it renders getter-owned runtime task snapshots and invokes getter-owned task controls/update operations using opaque `action_id`s.

Android platform install remains a handoff boundary. Getter may request/record an abstract install handoff, but Android permissions, notifications, PackageInstaller/Shizuku/root execution, and path-versus-URI/SAF semantics belong to platform adapter work and remain outside this bridge slice.

Expand Down
26 changes: 13 additions & 13 deletions todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,36 +493,36 @@ Completed tasks:
6. Add getter-core task/event/install-handoff DTOs for the first offline lifecycle proof.
7. Add main DB task/event/install-handoff tables and storage APIs with TDD coverage.
8. Implement deterministic fake/offline downloader behavior beyond the previous placeholder crate: submit, run, cancel, list, poll events, and record install result.
9. Add CLI commands and BDD coverage for `task submit`, `task run`, `task list`, `task cancel`, `task events`, and `task install-result`.
9. Add debug fake-task CLI commands and BDD coverage for persisted offline scaffold operations: submit, run, list, cancel, events, and install-result.
10. Accept ADR-0011 for the in-memory runtime/task/action/RuntimeNotification model.
11. Add `getter-core::runtime` with in-memory `GetterRuntime`, single-use `action_id`, sealed action plans, package-version Lua object binding, generic `user-result`, mock download/install state, package-level non-waiting lock, task controls, remove/clean, and RuntimeNotification DTOs with TDD coverage.
12. Add shared `getter-operations::runtime` JSON controls for offline update-check action issuance plus submit/get/list/start/progress/complete-download/pause/resume/user-result/cancel/retry/remove/clean without persisted task state.

Completed additional UI/bridge slice:

10. Extend Flutter getter bridge DTOs/adapters with read-only task list and event page APIs backed by existing getter CLI `task list` and `task events`.
11. Render getter-owned task/event DTOs on the Flutter Downloads route without adding a Dart task state machine.
12. Add Flutter widget/dev integration coverage for reading and rendering getter task lifecycle DTOs.
10. Extend Flutter getter bridge DTOs/adapters with read-only debug fake-task list and event page APIs backed by getter CLI `debug fake-task list/events`.
11. Render getter-owned task/event DTOs on the initial Flutter Downloads route without adding a Dart task state machine.
12. Add Flutter widget/dev integration coverage for reading and rendering getter debug fake-task lifecycle DTOs.
13. Add native bridge process-lifetime runtime singleton, runtime operation dispatcher, bounded best-effort notification drain, Kotlin EventChannel, and Dart runtime notification stream primitive.
14. Add typed Dart runtime/update methods for package update-check action issuance, action-id submission, task query/control/user-result/remove/clean, typed runtime notifications, and runtime task snapshot rendering on the Downloads route.
15. Add `runtime script --script <script.json>` as a single-process CLI debug harness over `getter-operations::runtime`, including task remove/clean coverage, and move the old persisted fake downloader scaffold out of the public `task` namespace to `debug fake-task ...`.

Remaining tasks:

1. Replace the current static `updates` package seam with live provider update-check action issuance that materializes sealed action plans and returns opaque `action_id` to Flutter; keep Dart from constructing action payloads.
2. Optionally add CLI single-process scripted/debug tooling over `getter-operations::runtime` without pretending separate invocations share memory.
3. Replace or retire the older persisted fake CLI task scaffold so public task status/control language uses ADR-0011 (`completed`, `user-result`, remove/clean, no cross-invocation task state).
4. Implement live provider/downloader behavior beyond the fake/offline proof after a later ADR accepts real side-effect details.
5. Define Android production install handoff URI/SAF/permission/notification details and wire platform adapter execution after later ADRs.
6. Add product-level Flutter BDD for full update/download/install user flows after live/provider/background/installer decisions are accepted; the current slice covers typed runtime DTO methods and read-only runtime task snapshot rendering.
2. Continue retiring old fake-task scaffolding from product-facing adapters/docs as newer runtime/native flows cover those cases; the remaining `debug fake-task ...` commands are development-only.
3. Implement live provider/downloader behavior beyond the fake/offline proof after a later ADR accepts real side-effect details.
4. Define Android production install handoff URI/SAF/permission/notification details and wire platform adapter execution after later ADRs.
5. Add product-level Flutter BDD for full update/download/install user flows after live/provider/background/installer decisions are accepted; the current slice covers typed runtime DTO methods and read-only runtime task snapshot rendering.

Acceptance progress:

- CLI can run an offline fixture update check: done.
- Older CLI/dev fake task scaffold can persist/list task state: done, but superseded by ADR-0011 and slated for replacement/retirement.
- Older CLI/dev fake task scaffold can persist/list task state: done under `debug fake-task ...`; it is development-only and superseded by ADR-0011 for product runtime tasks.
- `getter-core::runtime` can manage in-memory tasks, controls, `user-result`, retry, package lock, remove/clean, and notifications: first TDD slice done.
- Getter can expose pollable task events with cursor/limit in the older CLI/dev scaffold; ADR-0011 native push stream skeleton is done with bounded best-effort EventChannel delivery and current-state query operations still pending typed Flutter UI use.
- Getter can record abstract install handoff requests/results in the older scaffold; ADR-0011 uses generic `user-result` and mock install waiting-user state, Android installer execution remains deferred.
- Flutter displays getter task/event DTOs rather than calculating status itself: done for read-only CLI/dev bridge slice.
- Getter can expose pollable task events with cursor/limit only in the `debug fake-task` scaffold; ADR-0011 native push stream skeleton is done with bounded best-effort EventChannel delivery and typed current-state query operations in Flutter.
- Getter can record abstract install handoff requests/results in the debug fake-task scaffold; ADR-0011 uses generic `user-result` and mock install waiting-user state, Android installer execution remains deferred.
- Flutter displays getter runtime task snapshots rather than calculating status itself: done for read-only typed runtime snapshot rendering.
- Android platform adapter owns permissions/notifications/installer handoff: documented/deferred; no Android execution added in this slice.

## 10. Do-not-do list for the next agent
Expand Down