feat!: rewrite getter as package-centric CLI core#54
Open
xz-dev wants to merge 27 commits into
Open
Conversation
Replace the old hub-app centered implementation with the reusable rewrite spine for the UpgradeAll architecture. Add split core/storage/CLI crates, Lua repository evaluation, SQLite main/cache storage, repository overlay behavior, and legacy JSON bridge-bundle import coverage.
Add tokenized version comparison and selection policy that skips ignored versions while choosing the highest newer candidate.
Use sort_by_key for repository package ordering and elide needless lifetimes in highest_priority.
Preserve the documented require("lib.xxx") contract by extending the Lua package path while keeping unprefixed lib_dir lookups for compatibility.
Support the documented require("lib.*") contract with a constrained searcher instead of exposing the repository root through package.path.
Do not retain Lua's default package.path for package evaluation. Keep repository lib loading explicit and add coverage for root/template leakage when cwd is the repository root.
Make getter domain crates an optional feature so the Android api_proxy facade can build without vendored Lua on armeabi-v7a.
Add a legacy report-list command so app and test adapters can consume sanitized migration reports through the getter JSON envelope instead of reading the data directory layout directly.
Do not expose getter data-directory report paths in legacy report-list output; callers only need the sanitized report fields.
Expose repo validate through the getter JSON envelope with structured getter-owned diagnostics for repository layout, Lua runtime, schema, and domain errors. Add BDD coverage and cache-key hashing for repository changes.
Populate the diagnostic location field for schema errors when getter can infer the failing field from validation messages.
Remove process/filesystem-sensitive Lua globals during package evaluation and assert the repo validator exposes full diagnostic shape for schema errors.
4be8543 to
60a6515
Compare
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.
Summary
pin_versionstorage/update semantics:pin_versionis an effective local comparison baseline, while legacyignored_version/ Roomignore_version_number/mark_version_numberremain only at import/compatibility boundaries.GetterRuntime, single-use opaqueaction_id, sealed action plans, bound package-version Lua object, mock download/install phases,user-result, package lock, task controls, remove/clean, andRuntimeNotificationsnapshots.runtime script --script <script.json>as the single-process CLI debug harness for ADR-0011 runtime coverage, and move the old persisted fake downloader commands out of the publictask ...namespace into development-onlydebug fake-task ....updatescandidates behindgetter-providers::StaticPackageUpdatesProvideras a mock-provider boundary; live provider/network execution remains deferred.require("lib.xxx")constrained to repositorylib/modules without exposing repository root/current-directory modules.Architecture notes
DUpdateSystem/UpgradeAll.action_id; Flutter/native callers must not assemble action payloads.updatesthrough a mock-provider boundary. Real live provider/downloader/installer semantics are deferred to later ADRs.legacy report-listare sanitized summaries, not raw filesystem/report internals.Validation
Recent local validation on the current branch head
60a6515 feat(operations): expose read model operationsincludes:cargo fmtcargo test -p getter-cli --libcargo test -p getter-cli --test bdd_clicargo test -p getter-core updatecargo test -p getter-storagecargo test -p getter-providerscargo test -p getter-operations --features luacargo test -p getter-operations --features lua runtimecargo test -p getter-operations --features lua read_modelcargo test --manifest-path ../api_proxy/Cargo.toml --lib runtime_dispatchercargo test --manifest-path ../api_proxy/Cargo.toml --lib read_operationcargo check -p getter-core --no-default-featurescargo check -p getter-operationscargo check -p getter-operations --features luajust verify-workspace-skeletonwithJAVA_HOME=/opt/android-studio/jbrandANDROID_NDK_HOME=/home/xz/.local/share/Google/Android/Sdk/ndk/29.0.14206865.Consumed by
core-getter/src/main/rust/gettergit submodule.Deferred work / non-goals
Notes