mirror of
https://github.com/AventurasTeam/Aventuras.git
synced 2026-10-20 11:32:55 +00:00
## Summary #612 turned off the Gradle cache to save quota. The Android job is already the longest in every CI run, and measured runs show that without the cache it takes about **1m45s longer**. This PR turns the cache back on. The Rust dependency hash from #612 freed most of the quota needed for its 843 MB entry, and this PR frees another ~140 MB by deduplicating the Linux npm cache. ## Changes - **`build-android.yml`**: `setup-gradle` drops `cache-disabled: true`. It keeps `cache-provider: basic` (MIT, read-only off `master`). - **`.github/actions/npm-install`**: on Linux, the action sets `npm_config_cache` to `.npm-cache` inside the checkout (gitignored) and caches that literal path. Windows keeps its Dev Drive path, and macOS is unchanged. - Desktop Linux runs in an `ubuntu:22.04` container (`HOME=/github/home`) and Android runs on the host. With `~/.npm`, the two jobs had the same `npm-Linux-X64-…` key but saved two identical ~140 MB entries. `actions/cache` versions an entry by its literal `path`. - Matching the literal path alone isn't enough. `actions/cache` stores tar entries relative to `GITHUB_WORKSPACE`, so restoring a container `~/.npm` archive on the host would extract to `/home/runner/github/home/.npm`. That still counts as a hit, so the save is skipped. `.npm-cache` is the same directory in both environments and sits at the same position relative to the workspace. It can't be a sibling `../.npm-cache`: `actions/cache/save` rejects `..` in a path and only logs a warning. - **`docs/development/ci-caching.md`**: updates the Decisions table, adds the measured Gradle timings, and adds a new `## npm` section. **`release.md`** is updated to match. ### Gradle timings (Android job) | Phase | Uncached (38192218726 / 38197882367) | Cached (38111960581 / 38071840978) | |---|---|---| | `setup-gradle` restore | 1–2.5 s | 12–17 s | | Gradle startup to first Rust handoff | 92 s / 96 s | ~24 s | | Packaging after last Rust target | ~120 s | ~79 s | | `:app:lintUniversalDebug` | 49 s / 46 s | 37 s / 36 s | ### Effect - The first `master` CI run after this merges is cold for Gradle and for Linux npm. Each saves one entry: 843 MB for Gradle, and ~140 MB for npm in place of the two current Linux entries. - The two old `npm-Linux-X64-…` entries can be deleted by hand or left to eviction. ## Testing - `npm run check`, `npm test` and `npm run lint:fix` pass. This PR only changes YAML and docs. - CI caching can only be verified after merge, because PR runs don't save caches. After the merge, two dispatched `ci.yml` runs on `master` should show: - one `npm-Linux-X64` entry; - `Cache restored from key: npm-Linux-X64-…` in both the desktop Linux and Android logs; - no `Downloading https://services.gradle.org` line on Android in the second run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FsdTn4ZMvVxxETgpvb1Li3 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated Linux dependency caching so containerized desktop and Android builds can share the npm cache. * Re-enabled Gradle caching for Android builds, with read-only caching on non-default branches. These changes affect build workflows and do not add or change app features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| architecture | ||
| development | ||
| README.md | ||
Aventuras — internal documentation
How the app is put together and why it is put together that way. The user-facing page is the repository README; this is for whoever is changing the code.
These documents carry the reasoning that does not fit in a comment: the measured numbers, the failure a design exists to prevent, the two things that must stay in step. Code comments stay short and say only what the next reader cannot infer — see CLAUDE.md.
Architecture
| Document | Read it before touching |
|---|---|
| overview.md | the repository layout, StoryEntry/branches/chapters/world state, the generation pipeline, or the side panels and their swipe gestures |
| context-injection.md | services/ai/retrieval/, WorldStateInjector, the three tiers, stickiness, agentic or static memory retrieval |
| lore-management.md | services/ai/lorebook/, services/duplicates/, LoreManagementCoordinator, the duplicates window |
| prompts.md | anything under services/prompts/templates/, prompt packs, or the order blocks are assembled in |
| ai-services.md | adding a ServiceId, agent profiles, reasoning effort, or a default in ai/core/defaults.ts |
| persistence.md | SQLite, a new migration, src-tauri/src/, or the shape of the settings blob |
| dialogue-and-tts.md | utils/dialogue.ts, dialogue highlighting, or the TTS pipeline |
| story-time.md | services/storyTime/, time anchors, timeline anomalies, reconciliation, or a new story's starting time |
| exchange-format.md | services/exchange/, exporting or importing a vault character, scenario or lorebook, the Aventura JSON format |
| narration-cleaning.md | utils/narrationClean.ts, or sending story entries to a model that should not read <pic> tags, HTML or layout markup |
Development
| Document | Read it before |
|---|---|
| testing.md | writing a test — the suite has real constraints on what it can import |
| release.md | cutting a release, or changing the updater, CI or the build scripts |
| ci-caching.md | changing a CI cache key, what a cache stores, or the Android targets |
| ios-build-target.md | the iOS build target, the unsigned .ipa pipeline, or gen/apple |
| platform-support.md | using a new JS, CSS or Web API, or changing the bundle targets or minimum OS versions |
Keeping them true
If a change alters behaviour a document describes, update the document in the same commit. A document nobody trusts costs more than no document: the numbers in these files were measured, and a stale one is read as a measurement.