Complete local CI coverage and remove obsolete documentation
This commit is contained in:
1 parent
0eb9a9410b
commit
0e59dc3b95
22 files changed
+516
-1187
No files matched your search
@@ -1,12 +1,14 @@
|
||||
# The Test job's machine for `make release-ready`: the runner's Ubuntu, the
|
||||
# packages ci.yml installs from .github/apt/test-packages.txt, and Node 22.
|
||||
# Build context: .github/apt (scripts/release-ready.sh builds and tags it).
|
||||
# packages CI installs for native/browser tests, its pinned SDK, and Node 22.
|
||||
# Build context: .github (scripts/release-ready.sh builds and tags it).
|
||||
FROM docker.io/library/ubuntu:24.04
|
||||
|
||||
ARG NODE_VERSION=22.12.0
|
||||
ARG GO_VERSION=1.24.4
|
||||
|
||||
COPY test-packages.txt /tmp/test-packages.txt
|
||||
COPY apt/test-packages.txt /tmp/test-packages.txt
|
||||
COPY apt/web-packages.txt /tmp/web-packages.txt
|
||||
COPY emscripten-version /tmp/emscripten-version
|
||||
|
||||
# The hosted runner also ships git, Git LFS, curl, cmake, zip, jq, OpenSSL's
|
||||
# headers, libsodium, D-Bus, Java 21, Go and the Android SDK
|
||||
@@ -15,13 +17,31 @@ RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
git git-lfs python3 curl xz-utils make cmake zip unzip jq file libssl-dev \
|
||||
libsodium23 dbus openjdk-21-jdk-headless \
|
||||
$(grep -v '^#' /tmp/test-packages.txt | tr '\n' ' ') \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/test-packages.txt
|
||||
libgtk-3-0t64 libasound2t64 libdbus-glib-1-2 libxt6t64 libxtst6 libpci3 \
|
||||
$(grep -v '^#' /tmp/test-packages.txt /tmp/web-packages.txt | cut -d: -f2- | sort -u | tr '\n' ' ') \
|
||||
&& curl -fsSL https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /tmp/chrome.deb \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends /tmp/chrome.deb \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/test-packages.txt /tmp/web-packages.txt /tmp/chrome.deb
|
||||
|
||||
RUN curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
|
||||
| tar -xJ -C /usr/local --strip-components=1 \
|
||||
&& node --version
|
||||
|
||||
RUN mkdir -p /opt/emsdk /opt/firefox \
|
||||
&& curl -fsSL https://github.com/emscripten-core/emsdk/archive/refs/heads/main.tar.gz \
|
||||
| tar -xz -C /opt/emsdk --strip-components=1
|
||||
RUN /opt/emsdk/emsdk install "$(cat /tmp/emscripten-version)" \
|
||||
&& /opt/emsdk/emsdk activate "$(cat /tmp/emscripten-version)" \
|
||||
&& /opt/emsdk/upstream/emscripten/embuilder build zlib \
|
||||
&& chmod -R a+rwX /opt/emsdk/upstream/emscripten/cache \
|
||||
&& rm /tmp/emscripten-version
|
||||
RUN curl -fsSL 'https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US' \
|
||||
| tar -xJ -C /opt/firefox --strip-components=1 \
|
||||
&& ln -s /opt/firefox/firefox /usr/local/bin/firefox
|
||||
|
||||
ENV PATH=/opt/emsdk/upstream/emscripten:/usr/local/go/bin:/usr/local/bin:/usr/bin:/bin
|
||||
ENV EM_CONFIG=/opt/emsdk/.emscripten
|
||||
|
||||
RUN curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -xz -C /usr/local \
|
||||
&& ln -s /usr/local/go/bin/go /usr/local/bin/go \
|
||||
&& go version
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# The same package and real-browser checks as CI's Build Browser Add-ons job.
|
||||
set -eu
|
||||
export YUE_DESKTOP_RECOVERY=0
|
||||
unset DISPLAY WAYLAND_DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
|
||||
make package-unpackaged-assets chrome-web-store firefox-addons firefox-addons-lint
|
||||
test -f build/dist/inbe-chrome-web-store.zip
|
||||
test -f build/dist/inbe-firefox-addons.zip
|
||||
make web-smoke-test
|
||||
LIBGL_ALWAYS_SOFTWARE=1 make web-smoke-test-firefox
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# Reset only the server's private overlay, never its canonical checkout.
|
||||
set -eu
|
||||
server=/sync-server
|
||||
filesystem=$(stat -f -c %T "$server")
|
||||
if [ "$filesystem" != overlayfs ]; then
|
||||
echo "release-ready: sync server is not a private overlay" >&2
|
||||
exit 2
|
||||
fi
|
||||
commit=$(cat .github/sync-test-server-commit)
|
||||
git -c safe.directory="$server" -C "$server" -c core.hooksPath=/dev/null reset -q --hard "$commit"
|
||||
git -c safe.directory="$server" -C "$server" clean -ffdxq
|
||||
expected=$(git -c safe.directory="$server" -C "$server" rev-parse HEAD:vendor/liboqs)
|
||||
actual=$(git -c safe.directory="$server/vendor/liboqs" -C "$server/vendor/liboqs" rev-parse HEAD)
|
||||
if [ "$expected" != "$actual" ]; then
|
||||
echo "release-ready: canonical Daochi's liboqs must match the CI pin" >&2
|
||||
exit 2
|
||||
fi
|
||||
if [ -n "$(git -c safe.directory="$server/vendor/liboqs" -C "$server/vendor/liboqs" status --porcelain --untracked-files=all)" ]; then
|
||||
echo "release-ready: canonical Daochi's liboqs must be pristine" >&2
|
||||
exit 2
|
||||
fi
|
||||
make -C "$server" BUILD_DIR=/src/build/sync-test-server build
|
||||
DAOCHI_BIN="$server/daochi" make sync-server-test
|
||||
@@ -0,0 +1 @@
|
||||
1ef10d91aba32b45a381cd6a5af4db029698c343
|
||||
@@ -165,6 +165,11 @@ jobs:
|
||||
build/practice-images-ui-test/
|
||||
retention-days: 7
|
||||
|
||||
- name: Read sync test server revision
|
||||
if: matrix.shard == 0
|
||||
id: sync-test-server
|
||||
run: echo "revision=$(cat .github/sync-test-server-commit)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Check out sync test server
|
||||
if: matrix.shard == 0
|
||||
uses: actions/checkout@v4
|
||||
@@ -172,7 +177,7 @@ jobs:
|
||||
repository: kryonlabs/daochi
|
||||
# Includes signed photo copies (blobs) and the private Lumi
|
||||
# collection used for shared account activity.
|
||||
ref: 1ef10d91aba32b45a381cd6a5af4db029698c343
|
||||
ref: ${{ steps.sync-test-server.outputs.revision }}
|
||||
path: .test-server
|
||||
submodules: recursive
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
explicit product intent and separate review from implementation changes.
|
||||
- Run `make proof-test sync-recovery-test version-test` for these contracts.
|
||||
Coverage, trust boundaries, and the next proof migrations are described in
|
||||
[docs/build-laws-plan.md](docs/build-laws-plan.md).
|
||||
[docs/build-laws.md](docs/build-laws.md).
|
||||
|
||||
## Public UI and sync boundaries
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ paths. Translate changed app strings in every supported locale.
|
||||
Run the tests that exercise the changed behavior and `git diff --check`.
|
||||
For UI changes, run `make clean-text-api-check button-api-check` and the relevant
|
||||
private-display UI tests. `make test` and `make visual-test` are the CI gates.
|
||||
Android adapter tests need Java 17 and Android SDK platform 36; set
|
||||
Android adapter tests need Java 21 and Android SDK platform 36; set
|
||||
`ANDROID_SDK_ROOT` to your SDK directory.
|
||||
Visual tests create disposable profiles and private displays; they must never
|
||||
use your desktop or personal profile. See [verification](docs/cells.md#verification)
|
||||
|
||||
@@ -398,9 +398,6 @@ CELL_RESOURCES += $(shell rg --files assets/practices design/tai-chi/text 2>/dev
|
||||
CELL_RESOURCES += $(wildcard apps/*/achievements.json) $(wildcard apps/*/achievement-locales/*.json)
|
||||
CELL_RESOURCES += $(wildcard assets/*/sidebar.shape)
|
||||
|
||||
# Read here, before TARGET is set: its UI tests do not build $(TARGET) first.
|
||||
include mk/tests-lumi.mk
|
||||
|
||||
EMBEDDED_ASSET_FILES := apps/publishers.json $(INBE_BUNDLE) build/apps-ui/apps.zib assets/app/icon.png
|
||||
KRY_GEN_DIR := $(BUILD_DIR)/kryon/generated
|
||||
# Dependencies are imported as PACKAGE/Module through their linked packages.
|
||||
@@ -873,6 +870,12 @@ $(WIN64_TARGET): $(WINDOWS_BUNDLE_RUNTIME)
|
||||
$(WEB_JS_TARGET) $(WEB_CANVAS_TARGET): $(WEB_BUNDLE_RUNTIME)
|
||||
$(CLICK_BIN): $(CLICK_BUNDLE_RUNTIME)
|
||||
|
||||
# Build fragments affect the artifacts even when Makefile itself is unchanged.
|
||||
BUILD_MAKEFILES := $(filter-out mk/tests-%.mk,$(MAKEFILE_LIST)) mk/native-objects.mk
|
||||
$(TARGET) $(KRYON_HOST_TARGET) $(KRY_GEN_STAMP) $(WINDOWS_GEN_STAMP) $(WEB_GEN_STAMP) $(WIN64_TARGET) $(WEB_JS_TARGET) $(WEB_TARGET) $(WEB_CANVAS_TARGET) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE) $(CELL_BUNDLES): $(BUILD_MAKEFILES)
|
||||
|
||||
# UI prerequisites are expanded only after all artifact paths are defined.
|
||||
include mk/tests-lumi.mk
|
||||
include mk/tests-checks.mk
|
||||
include mk/tests-storage.mk
|
||||
include mk/tests-practices.mk
|
||||
|
||||
@@ -1,48 +1,17 @@
|
||||
# Inner Breeze TODO
|
||||
|
||||
What is still pending, as of 2026-10-17. Remove an item when it lands; plans
|
||||
belong in `docs/`, marketing outside this repository.
|
||||
Remaining work checked against the current source on 22 October 2026. Remove
|
||||
an item when it is implemented and verified. Release status belongs in the
|
||||
release workflow and changelog.
|
||||
|
||||
## Release 2.1.35
|
||||
## App packages
|
||||
|
||||
- Unreleased on master: Chess and the node's optional apps in More apps,
|
||||
beta apps in Settings › About, the Photos beta with photos copied to every
|
||||
photo node, and upright camera photos in Diary on desktops.
|
||||
- The Diary redesign (Markdown and photos) is in progress in another session
|
||||
and is meant for this release.
|
||||
- Release with `make release-ready`, then `make release` with the Moto
|
||||
connected (docs/cells.md, "Verification"); push only with the owner's
|
||||
say-so.
|
||||
- Move the remaining host-drawn Habits screens into `apps/habits/`, followed
|
||||
by Practices, so those screens can update without a new APK. The hosted
|
||||
editor, table, statistics and typed data calls are still needed.
|
||||
|
||||
## Codebase
|
||||
## Media sources
|
||||
|
||||
- Move the rest of Habits (`src/screens/habits*`) into `apps/habits/`, so
|
||||
Habits updates through its package without an APK; Practices after it.
|
||||
The count dialog moved in Habits 1.1.0 (`habits_view.zi`). The editor
|
||||
needs hosted Kryon Dropdown, Fieldset and SegmentedControl, the table
|
||||
hosted paint primitives and drag capture, statistics hosted Plot charts,
|
||||
and all of them typed host calls for habits, days and entries.
|
||||
- Lumi's UI tests (`mk/tests-lumi.mk`) are read before `TARGET` is set, so
|
||||
they don't build the app first, and editing an `mk/` area file does not
|
||||
rebuild the artifacts whose rules list only `Makefile`.
|
||||
- `make music-navigation-test` includes `src/platform/audio_runtime.h`,
|
||||
which the generator writes as `audio_runtime.h`; it does not build.
|
||||
- `make release-ready` does not cover CI's browser add-on smoke tests or
|
||||
shard 0's Daochi sync test yet.
|
||||
|
||||
## Translations
|
||||
|
||||
- `locales/pt.txt` lacks accents in 14 strings; for example
|
||||
`exercise_sun_salutation` "Saudacao ao sol" should be "Saudação ao sol".
|
||||
The others: `profile_leaderboard_title`, `profile_metric_avg_hold`,
|
||||
`profile_friend_remove_message`, `profile_no_leaderboard_data`,
|
||||
`sun_salutation_repetitions_label`, `sun_salutation_tempo_preview_hint`,
|
||||
`sun_salutation_step_2`, `_3`, `_4`, `_9`, `_10`, `_11`, `about_text` and
|
||||
`elist_default_item_breathe`.
|
||||
|
||||
## Repository weight
|
||||
|
||||
- Practice media is 129 MB of the tracked files, most of it Tai Chi narration
|
||||
in 12 languages and two voices. Phones already download it as practice
|
||||
packs from the node, but the packs are built from these files in Git, so
|
||||
moving them out needs another home for pack sources first (owner decision).
|
||||
- Practice packs download separately on devices, but their source media is
|
||||
still tracked here. Moving it out requires an owner-approved home for the
|
||||
pack sources first.
|
||||
@@ -1,109 +0,0 @@
|
||||
# Inbe Ziran migration status
|
||||
|
||||
Status on 2026-09-27: **the port is incomplete.** Inbe's `src/` contains no
|
||||
handwritten `.c` files; replacing those files does not prove that all behavior
|
||||
is restored or that every platform builds. Generated C,
|
||||
third-party libraries, legacy headers, and C test harnesses are separate from
|
||||
that source count.
|
||||
|
||||
## Current evidence
|
||||
|
||||
| Area | Verified | Still required |
|
||||
| --- | --- | --- |
|
||||
| Desktop | Full native build/link; home screenshot has visible text, icons, and full banner; private-display screenshot regression passes | Rebuild and rerun navigation after fixing discarded list records; integrated interactions and secondary windows |
|
||||
| Browser | Real Wasm storage, file-picker, HTTP, WebSocket, bounded asset downloads; upstream Canvas pixel/input/reopen, text/OS, and audio lifecycle tests pass | Pin the combined Canvas backend, build the full app, and run browser smoke checks |
|
||||
| Android | Four-ABI JNI checks; complete Java compilation; earlier arm64 app compilation reached link; API21 file links pass on four ABIs | Finish arm64 link after locale lookup fix; run the app with restored input, viewport, and bounded HTTPS transport |
|
||||
| Windows | Focused source generation and ABI/syntax checks for platform adapters | Complete Windows build and runtime checks |
|
||||
| Plan 9 | Converted entry, storage stubs, and SQLite VFS; focused behavior checks | Native libdraw/platform support and build rules; no native Plan 9 execution verified |
|
||||
|
||||
Inbe currently has 288 `.zi` source files. The last successful desktop build
|
||||
produced `build/bin/linux/inbe-linux-x86_64` and passed the home screenshot
|
||||
regression. Later list-storage and locale changes are being rebuilt. A
|
||||
successful earlier build does not verify those later changes.
|
||||
|
||||
The first screenshot investigation identified an endless inner loop in
|
||||
`practice_draw_title_crescent`. After that fix the process completed, but its
|
||||
widget frame was rejected with `FrameDuplicateKey`: the desktop navigation
|
||||
rail was submitted twice. Both defects are corrected and verified. The screenshot
|
||||
regression now requires timely exit, no frame rejection, and visible content
|
||||
beyond a mostly solid background. Actual navigation subsequently exposed a
|
||||
separate Lists failure: the database loader filled local record copies,
|
||||
leaving stored UUIDs and titles empty. Both list and item loaders now use
|
||||
pointers into the app state; integrated navigation reverification is pending.
|
||||
|
||||
Upstream fixes also restore nested/transformed raylib clipping, embedded image
|
||||
file callbacks, native callback comparisons, and pointer-sized borrowed string
|
||||
descriptors. The string ABI regression runs source and saved IR through C/C++
|
||||
on native 64-bit and real WebAssembly 32-bit targets.
|
||||
|
||||
A further real WebAssembly archive test exposed a compiler blocker:
|
||||
`size_of` currently folds the build host's 64-bit layout into generated code.
|
||||
For example, zlib receives 112 bytes for a stream that occupies 56 bytes on
|
||||
Wasm32. A general Ziran fix is in progress. Four-ABI Android link checks do
|
||||
not establish 32-bit runtime correctness while that defect remains.
|
||||
|
||||
The same audit corrected remaining Inbe allocator declarations to use
|
||||
pointer-sized `usize`. Reminder and break-timer settings also had discarded
|
||||
local-copy writes; they now update their app-owned records directly.
|
||||
|
||||
The loop audit also corrected missing progress in habit-session round rows and
|
||||
in social rows without IDs.
|
||||
|
||||
## Platform work already exercised
|
||||
|
||||
- Process identity, screenshot data isolation, shutdown signals, variadic
|
||||
logging, file picker, URI handling, updater fetch/download verification,
|
||||
and secondary-window effects are authored in `.zi`.
|
||||
- Private Xvfb tests exercised GTK tray lifecycle and secondary-window texture
|
||||
orientation, GL context restoration, and rejection of foreign window events.
|
||||
- Updater tests cover redirects, bounds, failed downloads, SHA-256 rejection,
|
||||
atomic installation, and restart using disposable files.
|
||||
- Android tests cover real JNI table dispatch, callback registration, UTF-8
|
||||
editing order, focus lifetime, timers, downloads, wake locks, and viewport
|
||||
structure layout. These are focused tests, not proof of a running APK.
|
||||
- Browser hooks for background practices, extension controls, onboarding,
|
||||
guide targets, and storage were restored from disabled branches to current
|
||||
checked Ziran.
|
||||
|
||||
## Library boundaries
|
||||
|
||||
- Ziran owns the language, compiler, standard library, `.zir` representation,
|
||||
and `.zib` format. It contains no Inbe or Daochi policy.
|
||||
- Kryon owns reusable UI, layout, input, and rendering. Its upstream changes
|
||||
are committed before moving Inbe's pristine submodule pointer.
|
||||
- Daochi Client owns challenge/login, bearer retry, signed v6 sync,
|
||||
registration, social requests, and signed account deletion. Blocking and
|
||||
polled deletion share the same signing preparation. Its protocol tests and
|
||||
portable wire/URL tests pass with Inbe's pinned Ziran toolchain.
|
||||
- Inbe owns account/device-key storage, payload construction, merging,
|
||||
lifecycle, settings, and platform transport adapters. Browser and Android
|
||||
network operations are being connected to the polled Daochi interface.
|
||||
|
||||
All installed database layouts and upgrade paths remain required behavior.
|
||||
Do not remove data migrations as part of source conversion. Some older C test
|
||||
recipes still name removed Kryon files and need migration to the maintained
|
||||
Ziran/Daochi surfaces.
|
||||
|
||||
## Memory and display discipline
|
||||
|
||||
Large Make, source-check, and Android generation commands share
|
||||
`build/ziran-compiler.lock` through `scripts/run-ziran.sh` and the source
|
||||
checker. Heavy Make targets are serialized. This prevents overlapping builds
|
||||
from multiplying compiler memory use; it does not establish that every
|
||||
compiler or runtime memory issue is permanently fixed.
|
||||
|
||||
All graphical testing uses a private display, with inherited `DISPLAY`,
|
||||
`WAYLAND_DISPLAY`, `XAUTHORITY`, and `GDK_DISPLAY` removed.
|
||||
|
||||
## Reproduction
|
||||
|
||||
```sh
|
||||
PKG_CONFIG_PATH=/home/wao/.local/sdl2/lib/pkgconfig make -j1 native
|
||||
make native-screenshot-test
|
||||
make native-navigation-test
|
||||
make package-check
|
||||
```
|
||||
|
||||
The screenshot test writes `build/native-screenshot-test/home.png` and
|
||||
`build/native-screenshot-test/app.log`. Failed frame commits are logged rather
|
||||
than being mistaken for successful screenshots.
|
||||
@@ -1,851 +0,0 @@
|
||||
# Inner Breeze achievements implementation plan
|
||||
|
||||
Date: 18 October 2026. Status: implementation in progress; final application
|
||||
integration and device verification remain pending.
|
||||
|
||||
The 160 catalogs, app earning adapters, shared Entity view and alert control are
|
||||
implemented. Facts and permanent awards use validated account-owned settings
|
||||
records in their own encrypted collection, rather than a second database.
|
||||
Presentation receipts remain local. Native SQLite checks cover earning,
|
||||
source deletion and purge, sync merging, archive restore and profile replacement.
|
||||
Successful focused checks do not establish that the final application is released.
|
||||
|
||||
Achievements live in the shared **Entity** profile app. Each installed Inner
|
||||
Breeze app supplies its own achievements, and Practices supplies an additional
|
||||
set for each installed practice. Entity shows both earned and unearned
|
||||
achievements; unearned achievements have gray artwork and visible requirements
|
||||
and progress. A single **Achievement alerts** switch lets the person enable or
|
||||
disable alerts without changing whether achievements are earned.
|
||||
|
||||
The initial catalog below defines **160 achievements**: Entity 10, Practices 60
|
||||
(10 general and 10 for each of five practices), Diary 20, Habits 20, Lists 15,
|
||||
Lumi 10, Photos 10, Radio 10, and Leaderboard 5. This is the full catalog, not
|
||||
the number every installation must display. Only the installed apps and practice
|
||||
content contribute to the visible catalog and its earned/available counts.
|
||||
|
||||
## 1. Product behavior
|
||||
|
||||
### Where achievements appear
|
||||
|
||||
- Add **Achievements** inside Entity, alongside the existing profile content.
|
||||
Opening it shows app headings, each app's earned/available count, and its
|
||||
achievements. Practices has nested headings for its general achievements
|
||||
and each installed practice.
|
||||
- Every row shows a distinct, meaningful icon, name, plain-language earning condition,
|
||||
and progress such as `7 / 25 sessions`. Earned rows also show the earned
|
||||
date. A row can open its full description when space is limited.
|
||||
- Unearned icons are gray. Keep the text readable, and show explicit
|
||||
**Not earned** or **Earned** status so color is never the only distinction.
|
||||
Gray rows remain focusable and readable; they are not disabled controls.
|
||||
- Use the existing profile typography, theme, standard widgets, and responsive
|
||||
layout. Keep one scrolling collection with clear app headings. Do not add
|
||||
search, filters, new navigation destinations outside Entity, or separate
|
||||
achievement screens in every app for this work.
|
||||
- Show progress for each individual achievement, including first-step awards.
|
||||
Use counts for simple thresholds and explanatory progress for compound rules.
|
||||
For example, a return achievement says `Return after a 14-day gap`; do not
|
||||
display a countdown encouraging someone to stop practicing.
|
||||
|
||||
### Which apps and practices are visible
|
||||
|
||||
- Use the same successful installation state as Apps. Package bytes bundled
|
||||
with the host, sidebar pins, available downloads, and installation requests
|
||||
are not by themselves proof that the person installed an optional app.
|
||||
- Keep an installed app's achievements visible offline and when its sidebar
|
||||
shortcut is removed. Lumi and Leaderboard follow their existing installation
|
||||
rules; removing a shortcut does not uninstall them.
|
||||
- An app appears only after installation commits successfully. An update in
|
||||
progress or a failed update keeps its last working installed catalog.
|
||||
- Uninstalling an app immediately hides its heading, achievements and visible
|
||||
totals. Preserve its private progress and earned records so reinstalling
|
||||
restores them silently. Do not add an archive screen.
|
||||
- Apply the same rule to downloaded practice content: show practice-specific
|
||||
sets only while their content is installed and available through Practices.
|
||||
Merely selecting a practice or having preview artwork does not install it.
|
||||
General Practices achievements remain visible while Practices is installed.
|
||||
- A compound achievement that needs another app is visible only when all its
|
||||
declared prerequisites are installed. In this catalog that affects Lumi's
|
||||
practice and diary awards, and Leaderboard's two-practice award. A saved
|
||||
leaderboard can still be read without internet; an unavailable friend row
|
||||
does not fabricate a qualifying check-in.
|
||||
- Installation state is local to the current device. Synced preferences may
|
||||
request an app, but do not make its achievements visible before its package
|
||||
is usable on that device. Earned history belongs to the profile across devices.
|
||||
|
||||
### What earning means
|
||||
|
||||
- Earn on a successfully saved, qualifying action. Opening a composer,
|
||||
clicking Start, receiving an AI reply, a failed save, and cancelling an action
|
||||
do not prove completion.
|
||||
- Count each source action once. Reopening a completed task and completing it
|
||||
again does not create another task milestone. A habit's linked practice and
|
||||
manual completion resolve to one habit/day result.
|
||||
- All day, week and month thresholds below are cumulative, not streaks. A
|
||||
missed day never erases an earned achievement. Weeks start on Monday.
|
||||
- Capture a valid local activity date when the action happens, with UTC time
|
||||
and timezone offset where available. A later timezone change does not move
|
||||
old activity into new days. Reject invalid dates; do not invent local dates
|
||||
from UTC when the historical timezone is unknown.
|
||||
- Awards are permanent within a profile. Editing or deleting source activity
|
||||
can reduce progress toward an unearned achievement, but does not revoke an
|
||||
earned award. Remove deleted source details from the calculation and retain
|
||||
only the minimal award record. Deleting the profile or all its data removes
|
||||
its achievements and receipts too.
|
||||
- Existing history counts wherever it actually proves the condition. Preserve
|
||||
an unknown earned date as `Earned from earlier activity` instead of claiming
|
||||
the migration date was the activity date. Historical backfill is silent.
|
||||
- Achievements do not grant Dew, money, paid content, rankings or extra access.
|
||||
There are no purchase, account-linking, public-sharing, breath-hold duration,
|
||||
faster-breathing, longer-single-session or mood-improvement requirements.
|
||||
|
||||
## 2. Achievement alerts
|
||||
|
||||
The requested control is one standard toggle in **Entity → Achievements**:
|
||||
|
||||
**Achievement alerts**
|
||||
|
||||
`Show an alert when you earn an achievement. Achievements still unlock when alerts are off.`
|
||||
|
||||
- Proposed default: **on**, consistent with opt-out milestone feedback. It
|
||||
enables quiet in-app alerts; it does not request system notification
|
||||
permission or enable system notifications automatically.
|
||||
- Store the boolean per profile through the existing settings path, using
|
||||
`notification_achievements`. Save it offline, retain it across restarts,
|
||||
and sync it using the account's existing settings conflict rules. Keep a
|
||||
guest profile's preference local until an explicit account migration.
|
||||
- **Off:** continue recording progress and saving awards; suppress in-app and
|
||||
system achievement alerts, dismiss any pending achievement alert, and consume
|
||||
the corresponding presentation receipts. Other notification preferences keep
|
||||
their existing behavior.
|
||||
- **On again:** alert for new qualifying unlocks from that point forward. Never
|
||||
replay unlocks suppressed while off, imported history, awards restored on
|
||||
reinstall, or awards learned from another device.
|
||||
- Finish persisting the setting before reporting the switch as saved. Show
|
||||
the ordinary save error and restore the previous value if saving fails.
|
||||
Recheck the live setting just before dispatch, so switching off also cancels
|
||||
an alert queued while a practice was running. Receiving a synced Off setting
|
||||
has the same effect.
|
||||
- A foreground alert is one quiet, nonmodal message. Never interrupt a running
|
||||
practice, take input focus, vibrate, or play a sound. Wait until its results
|
||||
or the next idle screen; group several unlocks from one action into one
|
||||
message, such as `3 achievements earned`.
|
||||
- If the app is in the background, use only its existing supported notification
|
||||
route and existing permission. System permission denied means no system
|
||||
alert; it does not change the toggle or earning. Never issue both an in-app
|
||||
and a system alert for the same award on the same device.
|
||||
- A practice alert deferred until the next idle screen is eligible only in the
|
||||
current foreground run. On restart, sync, or profile change, old pending
|
||||
receipts are consumed without an alert. Switch-off takes effect immediately
|
||||
on the current device; an offline second device uses its last synced value
|
||||
until it reconnects.
|
||||
- Alert text includes the achievement name or grouped count, never diary text,
|
||||
habit names, task titles, photo names or Lumi messages. Respect the existing
|
||||
platform quiet-mode and accessibility behavior.
|
||||
- Keep presentation receipts local to each device. Mark a receipt consumed
|
||||
before dispatch for best-effort, at-most-once presentation; a crash may miss
|
||||
an alert but must not replay an uncertain alert. Awards remain visible in Entity.
|
||||
|
||||
## 3. Existing code and ownership
|
||||
|
||||
The current checkout already provides these integration points:
|
||||
|
||||
- [`../src/app/entity_host.zi`](../src/app/entity_host.zi) loads the independent
|
||||
Entity bundle, supplies `entity.json`, maps profile data and allows scoped store
|
||||
and locale calls. It currently adds account, progress, data, friends and
|
||||
Telegram extensions; it has no achievement catalog or award contract.
|
||||
- Entity is a dependency in [`../ziran.toml`](../ziran.toml). Its canonical
|
||||
repository is `waozixyz/entity`; `src/model.zi` owns the profile document and
|
||||
`src/entity.zi` owns its UI. Make shared Entity UI changes there first, commit
|
||||
there, then update Inbe's dependency with the package tool. Do not edit a
|
||||
cached package or build copy.
|
||||
- [`../src/screens/profile_screen.zi`](../src/screens/profile_screen.zi) still
|
||||
hosts Inner Breeze progress content. It should not become a second
|
||||
implementation of the shared Entity achievement collection.
|
||||
- [`../src/cells/catalog.zi`](../src/cells/catalog.zi),
|
||||
[`../src/cells/node_apps.zi`](../src/cells/node_apps.zi), and the Apps
|
||||
installation path distinguish bundled selections, node apps, and downloads.
|
||||
Reuse those installation decisions through one shared installed-app snapshot.
|
||||
- [`../apps/versions.json`](../apps/versions.json) declares the bundled apps
|
||||
and optional Photos and Radio node apps in this checkout. Their source
|
||||
presence is not evidence that every user's device has them installed.
|
||||
- [`../src/practices/practice_registry.zi`](../src/practices/practice_registry.zi)
|
||||
and [`../apps/practice/content.json`](../apps/practice/content.json) identify
|
||||
WHM, Meditation, Sun Salutation, Breathing Patterns and Tai Chi.
|
||||
- [`../src/storage/storage_profile_stats.zi`](../src/storage/storage_profile_stats.zi)
|
||||
supplies current profile statistics. Reuse validated source history, but do
|
||||
not turn its limited recent-day scans into lifetime achievement totals.
|
||||
- Session history lives in `sessions`, `session_rounds` and `meditation_logs`.
|
||||
Their values have different meanings: WHM rounds contain retention values,
|
||||
while Sun Salutation saves repetitions through the same round surface.
|
||||
Summing every `seconds` column cannot produce trustworthy practice minutes.
|
||||
- Diary, habits, Lists and media already have account-scoped stores and sync.
|
||||
Some events needed below, such as a task's first completion date, a Radio
|
||||
listening interval, or a rendered Leaderboard check-in, are not recoverable
|
||||
from their current snapshots. They need durable facts going forward.
|
||||
- Existing notification settings are loaded and saved in
|
||||
[`../src/app/app_settings.zi`](../src/app/app_settings.zi). Reuse that pattern
|
||||
for the alerts preference rather than creating another preferences store.
|
||||
|
||||
App-specific definitions, text, thresholds and fact rules belong in
|
||||
`apps/<app>/`, with Practices using its existing `apps/practice/` source
|
||||
directory. Shared Entity presentation belongs in the Entity repository. Inbe's
|
||||
host supplies generic storage, scoped access, event persistence, notification
|
||||
dispatch and installed-package information. Apps do not read another app's
|
||||
database tables or internals. Existing compiled practice completion paths may
|
||||
emit validated save facts through the bridge; this does not require an
|
||||
unrelated rewrite of every practice screen.
|
||||
|
||||
## 4. Definitions, facts and storage
|
||||
|
||||
### Package supplied definitions
|
||||
|
||||
Each achievement-capable app ships a versioned `achievements.json` manifest
|
||||
inside its signed package, plus its localized strings. Practice definitions
|
||||
also declare their content-pack ID. The root integration supplies the Entity
|
||||
overview definitions to the shared profile display.
|
||||
|
||||
Each definition contains:
|
||||
|
||||
- A stable `app_id` and `achievement_id`, independent of translations and
|
||||
package slot numbers. The catalog's IDs below are the proposed stable IDs.
|
||||
- `definition_version`, a rule version, order, title and description locale
|
||||
keys, and a badge reference in that package's approved assets.
|
||||
- The metric, target and one bounded rule form: threshold, distinct days,
|
||||
distinct periods, distinct source IDs, first successful action, or return
|
||||
after a gap. Compound rules declare their required metrics explicitly.
|
||||
- Required installed app/content IDs, optional source capability requirements,
|
||||
the source fact kinds it can consume, and a backfill policy.
|
||||
|
||||
Validate manifests when installing the package. Reject duplicate IDs, invalid
|
||||
targets, unbounded rules, undeclared assets and cross-app writes. Retain a
|
||||
last-known-good catalog if an update fails. A future downloaded app provides
|
||||
its own catalog through this contract; an unknown app's achievements must not
|
||||
be invented by the host. An older installed package with no catalog contributes
|
||||
no achievement rows until its compatible achievement package is installed.
|
||||
|
||||
Keep achievement identity stable across package updates. Titles and translation
|
||||
fixes may change; a materially different earning rule gets a new achievement
|
||||
ID. Do not turn an earned 10-session award into a 100-session requirement by
|
||||
editing the existing ID. Removed definitions are hidden from the current
|
||||
catalog while their minimal earned history is retained for compatible return.
|
||||
|
||||
### Source facts
|
||||
|
||||
Facts carry only the data required by the rule: profile, publisher app,
|
||||
source ID and revision, event kind, activity date, trusted numeric measures,
|
||||
and the minimal flags or subtype IDs needed for qualification. Keep names,
|
||||
diary prose, photo bytes, chat content and habit answers in their owning stores.
|
||||
|
||||
The host derives the publisher scope from the running package's validated
|
||||
identity. An app cannot claim another app ID, write arbitrary awards, or
|
||||
submit arbitrary SQL. An app's ordinary successful save returns its canonical
|
||||
receipt; that receipt is the basis of the fact, not an unchecked UI message.
|
||||
These are private personal milestones, not a tamper-proof competitive score.
|
||||
|
||||
Use source IDs for set membership, not increment-only counters. For example:
|
||||
|
||||
- Practice session: unique canonical session ID and practice ID.
|
||||
- Meditation: one session ID even if both a session row and a meditation log
|
||||
describe it. Standalone legacy logs count once when their source identity
|
||||
and duration are valid.
|
||||
- Diary: one valid nonempty document per local date, with a photo-present flag.
|
||||
- Habits: one resolved completed habit/date, using that day's schedule and
|
||||
target; separate committed answer/span flags for their specific awards.
|
||||
- Lists: distinct item IDs, with a persisted first successful completion date
|
||||
and actor. Re-completing an item does not add another first completion.
|
||||
- Lumi: successful command/action receipts with their confirmed effects,
|
||||
not counts of sent messages or model claims of success.
|
||||
- Photos: distinct original-content hashes, valid capture days and deliberate
|
||||
successful photo opens; reimporting the same file adds nothing.
|
||||
- Radio: persisted playback-session/interval IDs with active playback seconds.
|
||||
Connection time, buffering, muted playback, stopped time and retries add
|
||||
nothing. Checkpoint while listening, so a crash loses at most one checkpoint.
|
||||
Deduplicate replayed intervals; merge concurrent-device overlapping intervals
|
||||
once rather than treating two streams as twice the listening time.
|
||||
- Leaderboard: one successful own-row check-in per local day, plus the
|
||||
installed practice ID viewed. Opening an empty or failed board adds nothing.
|
||||
|
||||
For every current fact that is edited or deleted, update its contribution and
|
||||
recompute the affected unearned progress. Keep only a minimal deduplication
|
||||
tombstone when needed, without source content. Awards already earned remain.
|
||||
All-data deletion clears these tombstones as well.
|
||||
|
||||
### Proposed account scoped records
|
||||
|
||||
The following names describe new records to add, not existing tables:
|
||||
|
||||
- `achievement_facts`: canonical source contribution, source version, date and
|
||||
bounded numeric/flag payload. Profile, app, fact kind and source ID form a
|
||||
unique identity. A source revision replaces its contribution; it does not
|
||||
create extra activity.
|
||||
- `achievement_progress`: rebuildable aggregate cache by profile, app and
|
||||
achievement. Store the source/catalog revision used for its computation.
|
||||
- `achievement_awards`: unique `(profile_id, app_id, achievement_id)`, rule
|
||||
version, known earned time/date or explicit unknown, and backfill origin.
|
||||
- `achievement_alert_receipts`: device-local consumed/suppressed status by
|
||||
profile and award identity. Do not sync notification presentation state.
|
||||
|
||||
Keep the alerts preference in existing settings rather than one of these
|
||||
tables. Add schema upgrades without rewriting source history or dropping old
|
||||
upgrade paths. Include award records and non-reconstructible facts in account
|
||||
export/import and all-data deletion. Rebuild progress from the restored sources
|
||||
and facts; do not trust imported cached totals.
|
||||
|
||||
Use the existing encrypted, account-authenticated sync envelope and protocol
|
||||
v6 for a separate achievement record namespace, proposed
|
||||
`private.inbe.v1.achievements`. Do not put achievement records into Lumi's
|
||||
restricted collection. Confirm node support before enabling the new namespace;
|
||||
earning and Entity remain available locally when sync is unavailable.
|
||||
|
||||
Synced awards merge by stable identity as a union; preserve the earliest known
|
||||
valid earned time and keep unknown time distinct. Merge facts by canonical
|
||||
source ID and revision, following their owning source's conflict semantics.
|
||||
Never add two devices' aggregate progress counters together. Source facts and
|
||||
their later source deletions may arrive in either order; use revisions and
|
||||
tombstones to avoid resurrecting deleted progress.
|
||||
|
||||
### Evaluation and display contract
|
||||
|
||||
1. Commit a successful source mutation and its fact, or a durable outbox job
|
||||
for that fact, in the same storage transaction. The outbox closes the crash
|
||||
window for sources whose existing store cannot share the transaction.
|
||||
2. Recompute only affected metrics and rules. Insert each newly earned award
|
||||
under a unique constraint, then commit the new progress and award records.
|
||||
3. Queue an alert only for a genuinely new award caused by a live local action.
|
||||
Imports, backfills, replays, sync, startup rebuilds and catalog discovery
|
||||
initialize consumed receipts silently. A live local action may still qualify
|
||||
after a local outbox retry in the current foreground run.
|
||||
4. Project the installed catalog, progress, awards and saved preference to Entity.
|
||||
Entity renders this data and writes only the alerts preference. It cannot
|
||||
create or edit awards.
|
||||
|
||||
Provide bounded, paginated projections over Entity's existing generic store
|
||||
bridge, with explicitly allowed document names for the catalog, pages and
|
||||
settings. Do not place the 160 definitions into `entity.json`: Entity's current
|
||||
identity decoder has an 8192-byte input limit. Add optional capability
|
||||
negotiation so old Entity packages keep working and old hosts do not claim to
|
||||
support achievements. Any host interface change must use the existing app
|
||||
version/compatibility machinery and requires a host update before packages
|
||||
can rely on it.
|
||||
|
||||
## 5. Qualification rules used by the catalog
|
||||
|
||||
These rules make each requirement below implementable and consistent:
|
||||
|
||||
- **Active day:** a date containing at least one qualifying saved practice,
|
||||
habit completion, nonempty diary day, first task completion, confirmed useful
|
||||
Lumi action, successful photo import/open, one minute of active Radio
|
||||
playback, or a successful own-row Leaderboard check-in. Entity overview uses
|
||||
the union of these dates. Source updates, settings changes and merely
|
||||
installing or opening an app are not activity.
|
||||
- **Practice session:** a distinct saved session meeting its practice's
|
||||
qualification. WHM requires at least one completed normal round, with no
|
||||
retention-duration target. Meditation and Patterns require at least 60
|
||||
seconds of actual practice, excluding paused time; keeping a saved partial
|
||||
session of at least that length counts. Sun Salutation requires one complete
|
||||
sequence; Tai Chi requires one course item played to completion. Do not infer
|
||||
a full routine from a bare Start event or an ambiguous old session row.
|
||||
- **Practice day:** a distinct local date with at least one qualifying session
|
||||
of that practice. General Practices days combine practice IDs by date.
|
||||
- **Diary day:** one saved date containing non-whitespace authored text or a
|
||||
valid photo embed/attachment. Empty autosaves, formatting markers alone and
|
||||
broken image references do not count. Count edits to the same date once.
|
||||
A photo diary day needs at least one valid photo, not a particular app's
|
||||
photo integration. Months are distinct `YYYY-MM`; weeks are Monday-based
|
||||
civil week keys, with year-boundary tests.
|
||||
- **Habit completion:** one habit/date that meets the owning app's existing
|
||||
completion rules and the historical schedule/target for that date. Count
|
||||
one result for counter, linked-practice, question and span representations
|
||||
of that same day. Reaching twice the target does not earn two completions.
|
||||
General habit-days are distinct dates across habits. A skipped question may
|
||||
count as an ordinary completed day under Habits' existing rules, but never
|
||||
earns the answered-question award; an unfinished span does not earn the
|
||||
ended-span award.
|
||||
- **Completed task:** a distinct item whose own successful not-done → done
|
||||
transition is committed for this profile. Attribute shared-list actions to
|
||||
their actual actor; another person's completion cannot earn this profile an
|
||||
achievement. List-clearing awards require completing the final open item
|
||||
in a list containing at least three distinct active items, all now done.
|
||||
Removing the last open item or deleting a list does not qualify.
|
||||
- **Useful Lumi action:** a confirmed change to an installed app's data,
|
||||
a qualifying practice caused by Lumi, or a verified requested progress
|
||||
chart. No-op commands, failed actions, cosmetic settings changes, plain
|
||||
conversation and repeated reads of the same chart/day do not add actions.
|
||||
A practice-start action counts only when its correlated session qualifies.
|
||||
The first-offline-action award requires the action's recorded mode to be
|
||||
offline; all other Lumi awards work with either connection mode.
|
||||
- **Photo:** a successfully imported, nontrashed original with a unique hash.
|
||||
A photo-open fact requires deliberately opening a successfully decoded
|
||||
photo, not merely scrolling past a thumbnail. Days-of-photos thresholds
|
||||
use valid capture dates, not guessed dates for files with no date metadata.
|
||||
- **Radio day:** at least 60 nonoverlapping seconds of active audible playback
|
||||
on a date. Minute totals are cumulative across listening sessions. The
|
||||
two-station award requires 60 active seconds for each of two distinct stable
|
||||
station IDs, not station names or reconnects.
|
||||
- **Leaderboard check-in:** the person's own row successfully rendered in
|
||||
the visible board after an explicit open/selection, from valid cached or
|
||||
fresh data. Count one check-in date regardless of refreshes. No award
|
||||
depends on a rank, friend count, another person's performance or hold time.
|
||||
- **Return after a 14-day gap:** a new qualifying action whose date is at
|
||||
least 15 civil days after the most recent prior qualifying date. There must
|
||||
be prior activity; first use never qualifies. The 14 days between them have
|
||||
no qualifying activity in that scope.
|
||||
|
||||
Progress for distinct-day and count thresholds is `current / target`, capped
|
||||
at the target for display. For same-habit awards show the largest qualifying
|
||||
day count for one habit. For a return award show earned/not earned plus its
|
||||
condition. Tier achievements are individual awards with individual IDs; one
|
||||
action may cross multiple tiers and produces one grouped alert.
|
||||
|
||||
## 6. Complete initial catalog of 160 achievements
|
||||
|
||||
Every numbered line defines one achievement, its stable proposed ID and its
|
||||
earning condition. Session, day, completion and return terms use section 5.
|
||||
|
||||
### Entity overview — 10 achievements
|
||||
|
||||
These are the profile's cross-app milestones, supplied by the root integration.
|
||||
|
||||
1. **A beginning** — `self.active.1`: record 1 active day.
|
||||
2. **Three days for yourself** — `self.active.3`: record 3 active days.
|
||||
3. **A week of moments** — `self.active.7`: record 7 active days.
|
||||
4. **Fourteen moments** — `self.active.14`: record 14 active days.
|
||||
5. **Thirty days for yourself** — `self.active.30`: record 30 active days.
|
||||
6. **Sixty days of care** — `self.active.60`: record 60 active days.
|
||||
7. **One hundred days** — `self.active.100`: record 100 active days.
|
||||
8. **A growing history** — `self.active.180`: record 180 active days.
|
||||
9. **A year of moments** — `self.active.365`: record 365 active days.
|
||||
10. **Welcome back** — `self.return.14`: record an active day after a 14-day activity gap.
|
||||
|
||||
### Practices general — 10 achievements
|
||||
|
||||
Owned by `inbe.practices`; visible while Practices is installed.
|
||||
|
||||
11. **First practice** — `practices.sessions.1`: record 1 qualifying practice session.
|
||||
12. **Five practices** — `practices.sessions.5`: record 5 qualifying practice sessions.
|
||||
13. **Ten practices** — `practices.sessions.10`: record 10 qualifying practice sessions.
|
||||
14. **Twenty-five practices** — `practices.sessions.25`: record 25 qualifying practice sessions.
|
||||
15. **Fifty practices** — `practices.sessions.50`: record 50 qualifying practice sessions.
|
||||
16. **One hundred practices** — `practices.sessions.100`: record 100 qualifying practice sessions.
|
||||
17. **A lasting practice** — `practices.sessions.250`: record 250 qualifying practice sessions.
|
||||
18. **Seven practice days** — `practices.days.7`: practice on 7 distinct days.
|
||||
19. **Thirty practice days** — `practices.days.30`: practice on 30 distinct days.
|
||||
20. **One hundred practice days** — `practices.days.100`: practice on 100 distinct days.
|
||||
|
||||
### WHM — 10 achievements
|
||||
|
||||
Owned by Practices; requires the installed `whm` content pack. All session
|
||||
awards use normal completed rounds without comparing retention values.
|
||||
|
||||
21. **First WHM practice** — `whm.sessions.1`: record 1 qualifying WHM session.
|
||||
22. **Five WHM practices** — `whm.sessions.5`: record 5 qualifying WHM sessions.
|
||||
23. **Ten WHM practices** — `whm.sessions.10`: record 10 qualifying WHM sessions.
|
||||
24. **Twenty-five WHM practices** — `whm.sessions.25`: record 25 qualifying WHM sessions.
|
||||
25. **Fifty WHM practices** — `whm.sessions.50`: record 50 qualifying WHM sessions.
|
||||
26. **One hundred WHM practices** — `whm.sessions.100`: record 100 qualifying WHM sessions.
|
||||
27. **Three WHM days** — `whm.days.3`: practice WHM on 3 distinct days.
|
||||
28. **Seven WHM days** — `whm.days.7`: practice WHM on 7 distinct days.
|
||||
29. **Thirty WHM days** — `whm.days.30`: practice WHM on 30 distinct days.
|
||||
30. **One hundred WHM days** — `whm.days.100`: practice WHM on 100 distinct days.
|
||||
|
||||
### Meditation — 10 achievements
|
||||
|
||||
Owned by Practices; requires the installed `meditation` content pack. Time
|
||||
thresholds are cumulative, never a requirement to sit for one long session.
|
||||
|
||||
31. **First meditation** — `meditation.sessions.1`: record 1 qualifying meditation session.
|
||||
32. **Five quiet moments** — `meditation.sessions.5`: record 5 qualifying meditation sessions.
|
||||
33. **Ten quiet moments** — `meditation.sessions.10`: record 10 qualifying meditation sessions.
|
||||
34. **Twenty-five quiet moments** — `meditation.sessions.25`: record 25 qualifying meditation sessions.
|
||||
35. **Fifty quiet moments** — `meditation.sessions.50`: record 50 qualifying meditation sessions.
|
||||
36. **Three meditation days** — `meditation.days.3`: meditate on 3 distinct days.
|
||||
37. **Seven meditation days** — `meditation.days.7`: meditate on 7 distinct days.
|
||||
38. **Thirty meditation days** — `meditation.days.30`: meditate on 30 distinct days.
|
||||
39. **An hour of quiet** — `meditation.minutes.60`: accumulate 60 actual meditation minutes.
|
||||
40. **Ten hours of quiet** — `meditation.minutes.600`: accumulate 600 actual meditation minutes.
|
||||
|
||||
### Breathing Patterns — 10 achievements
|
||||
|
||||
Owned by Practices; requires the installed `patterns` content pack. Preset
|
||||
awards require a qualifying session with the recorded preset, not selecting it.
|
||||
|
||||
41. **First breathing pattern** — `patterns.sessions.1`: record 1 qualifying Patterns session.
|
||||
42. **Five breathing practices** — `patterns.sessions.5`: record 5 qualifying Patterns sessions.
|
||||
43. **Ten breathing practices** — `patterns.sessions.10`: record 10 qualifying Patterns sessions.
|
||||
44. **Twenty-five breathing practices** — `patterns.sessions.25`: record 25 qualifying Patterns sessions.
|
||||
45. **Fifty breathing practices** — `patterns.sessions.50`: record 50 qualifying Patterns sessions.
|
||||
46. **One hundred breathing practices** — `patterns.sessions.100`: record 100 qualifying Patterns sessions.
|
||||
47. **Seven breathing days** — `patterns.days.7`: practice Patterns on 7 distinct days.
|
||||
48. **Thirty breathing days** — `patterns.days.30`: practice Patterns on 30 distinct days.
|
||||
49. **A box-breathing moment** — `patterns.preset.box`: record 1 qualifying box-breathing session.
|
||||
50. **A coherent-breathing moment** — `patterns.preset.coherent`: record 1 qualifying coherent-breathing session.
|
||||
|
||||
### Sun Salutation — 10 achievements
|
||||
|
||||
Owned by Practices; requires the installed `sunsalutation` content pack.
|
||||
Qualification requires a completed sequence, without a pace or flexibility goal.
|
||||
|
||||
51. **First salutation** — `sunsalutation.sessions.1`: record 1 qualifying Sun Salutation session.
|
||||
52. **Five salutation practices** — `sunsalutation.sessions.5`: record 5 qualifying Sun Salutation sessions.
|
||||
53. **Ten salutation practices** — `sunsalutation.sessions.10`: record 10 qualifying Sun Salutation sessions.
|
||||
54. **Twenty-five salutation practices** — `sunsalutation.sessions.25`: record 25 qualifying Sun Salutation sessions.
|
||||
55. **Fifty salutation practices** — `sunsalutation.sessions.50`: record 50 qualifying Sun Salutation sessions.
|
||||
56. **One hundred salutation practices** — `sunsalutation.sessions.100`: record 100 qualifying Sun Salutation sessions.
|
||||
57. **Three salutation days** — `sunsalutation.days.3`: practice Sun Salutation on 3 distinct days.
|
||||
58. **Seven salutation days** — `sunsalutation.days.7`: practice Sun Salutation on 7 distinct days.
|
||||
59. **Thirty salutation days** — `sunsalutation.days.30`: practice Sun Salutation on 30 distinct days.
|
||||
60. **One hundred salutation days** — `sunsalutation.days.100`: practice Sun Salutation on 100 distinct days.
|
||||
|
||||
### Tai Chi — 10 achievements
|
||||
|
||||
Owned by Practices; requires the installed `taichi` content pack. Completing
|
||||
one course item qualifies a session; no form needs to be performed faster.
|
||||
|
||||
61. **First Tai Chi practice** — `taichi.sessions.1`: record 1 qualifying Tai Chi session.
|
||||
62. **Five Tai Chi practices** — `taichi.sessions.5`: record 5 qualifying Tai Chi sessions.
|
||||
63. **Ten Tai Chi practices** — `taichi.sessions.10`: record 10 qualifying Tai Chi sessions.
|
||||
64. **Twenty-five Tai Chi practices** — `taichi.sessions.25`: record 25 qualifying Tai Chi sessions.
|
||||
65. **Fifty Tai Chi practices** — `taichi.sessions.50`: record 50 qualifying Tai Chi sessions.
|
||||
66. **One hundred Tai Chi practices** — `taichi.sessions.100`: record 100 qualifying Tai Chi sessions.
|
||||
67. **Three Tai Chi days** — `taichi.days.3`: practice Tai Chi on 3 distinct days.
|
||||
68. **Seven Tai Chi days** — `taichi.days.7`: practice Tai Chi on 7 distinct days.
|
||||
69. **Thirty Tai Chi days** — `taichi.days.30`: practice Tai Chi on 30 distinct days.
|
||||
70. **One hundred Tai Chi days** — `taichi.days.100`: practice Tai Chi on 100 distinct days.
|
||||
|
||||
### Diary — 20 achievements
|
||||
|
||||
Owned by `inbe.diary`. Week and month counts need one qualifying diary day
|
||||
in each distinct period; the periods do not have to be consecutive.
|
||||
|
||||
71. **First page** — `diary.days.1`: save 1 qualifying diary day.
|
||||
72. **Three pages** — `diary.days.3`: save 3 qualifying diary days.
|
||||
73. **Seven pages** — `diary.days.7`: save 7 qualifying diary days.
|
||||
74. **Fourteen pages** — `diary.days.14`: save 14 qualifying diary days.
|
||||
75. **Thirty pages** — `diary.days.30`: save 30 qualifying diary days.
|
||||
76. **Sixty pages** — `diary.days.60`: save 60 qualifying diary days.
|
||||
77. **One hundred pages** — `diary.days.100`: save 100 qualifying diary days.
|
||||
78. **An unfolding story** — `diary.days.180`: save 180 qualifying diary days.
|
||||
79. **A year of pages** — `diary.days.365`: save 365 qualifying diary days.
|
||||
80. **Two weeks remembered** — `diary.weeks.2`: write in 2 distinct weeks.
|
||||
81. **Four weeks remembered** — `diary.weeks.4`: write in 4 distinct weeks.
|
||||
82. **Twelve weeks remembered** — `diary.weeks.12`: write in 12 distinct weeks.
|
||||
83. **Twenty-six weeks remembered** — `diary.weeks.26`: write in 26 distinct weeks.
|
||||
84. **Three months remembered** — `diary.months.3`: write in 3 distinct months.
|
||||
85. **Six months remembered** — `diary.months.6`: write in 6 distinct months.
|
||||
86. **Twelve months remembered** — `diary.months.12`: write in 12 distinct months.
|
||||
87. **A picture in your story** — `diary.photo_days.1`: save a valid photo on 1 diary day.
|
||||
88. **Five illustrated days** — `diary.photo_days.5`: save valid photos on 5 distinct diary days.
|
||||
89. **Twenty illustrated days** — `diary.photo_days.20`: save valid photos on 20 distinct diary days.
|
||||
90. **A new page again** — `diary.return.14`: save a diary day after a 14-day diary gap.
|
||||
|
||||
### Habits — 20 achievements
|
||||
|
||||
Owned by `inbe.habits`. These follow Habits' historical schedule and completion
|
||||
semantics; missing an unscheduled day never breaks a requirement.
|
||||
|
||||
91. **An intention takes shape** — `habits.created.1`: save 1 valid habit.
|
||||
92. **First habit day** — `habits.days.1`: complete a habit on 1 distinct day.
|
||||
93. **Three habit days** — `habits.days.3`: complete habits on 3 distinct days.
|
||||
94. **Seven habit days** — `habits.days.7`: complete habits on 7 distinct days.
|
||||
95. **Fourteen habit days** — `habits.days.14`: complete habits on 14 distinct days.
|
||||
96. **Thirty habit days** — `habits.days.30`: complete habits on 30 distinct days.
|
||||
97. **Sixty habit days** — `habits.days.60`: complete habits on 60 distinct days.
|
||||
98. **One hundred habit days** — `habits.days.100`: complete habits on 100 distinct days.
|
||||
99. **A habit history** — `habits.days.180`: complete habits on 180 distinct days.
|
||||
100. **A year of habit days** — `habits.days.365`: complete habits on 365 distinct days.
|
||||
101. **Ten completions** — `habits.completions.10`: record 10 distinct habit/date completions.
|
||||
102. **Fifty completions** — `habits.completions.50`: record 50 distinct habit/date completions.
|
||||
103. **One hundred completions** — `habits.completions.100`: record 100 distinct habit/date completions.
|
||||
104. **Five hundred completions** — `habits.completions.500`: record 500 distinct habit/date completions.
|
||||
105. **One habit, seven times** — `habits.single_scheduled_days.7`: complete the same habit on 7 of its scheduled dates.
|
||||
106. **One habit, thirty times** — `habits.single_scheduled_days.30`: complete the same habit on 30 of its scheduled dates.
|
||||
107. **One habit, one hundred times** — `habits.single_scheduled_days.100`: complete the same habit on 100 of its scheduled dates.
|
||||
108. **A target met** — `habits.counter_target.1`: reach a counting habit's own target on 1 date.
|
||||
109. **An answer recorded** — `habits.question_answer.1`: save 1 genuine answer to a habit question.
|
||||
110. **A span recorded** — `habits.ended_span.1`: save 1 valid span with both start and end.
|
||||
|
||||
### Lists — 15 achievements
|
||||
|
||||
Owned by `inbe.lists`. Completed items count once by item ID, including shared
|
||||
items only when this profile is the confirmed completing actor.
|
||||
|
||||
111. **A place for intentions** — `lists.created.1`: save 1 valid list.
|
||||
112. **First task finished** — `lists.items.1`: complete 1 distinct task.
|
||||
113. **Five tasks finished** — `lists.items.5`: complete 5 distinct tasks.
|
||||
114. **Ten tasks finished** — `lists.items.10`: complete 10 distinct tasks.
|
||||
115. **Twenty-five tasks finished** — `lists.items.25`: complete 25 distinct tasks.
|
||||
116. **Fifty tasks finished** — `lists.items.50`: complete 50 distinct tasks.
|
||||
117. **One hundred tasks finished** — `lists.items.100`: complete 100 distinct tasks.
|
||||
118. **Two hundred fifty tasks finished** — `lists.items.250`: complete 250 distinct tasks.
|
||||
119. **Three days of follow-through** — `lists.days.3`: finish tasks on 3 distinct days.
|
||||
120. **Seven days of follow-through** — `lists.days.7`: finish tasks on 7 distinct days.
|
||||
121. **Thirty days of follow-through** — `lists.days.30`: finish tasks on 30 distinct days.
|
||||
122. **One hundred days of follow-through** — `lists.days.100`: finish tasks on 100 distinct days.
|
||||
123. **A list brought to rest** — `lists.cleared.1`: finish the last open task in 1 list containing at least 3 distinct active tasks.
|
||||
124. **Five lists brought to rest** — `lists.cleared.5`: do that for 5 distinct lists.
|
||||
125. **Details carried through** — `lists.commented_completion.1`: finish 1 task with a saved nonempty comment.
|
||||
|
||||
### Lumi — 10 achievements
|
||||
|
||||
Owned by `inbe.lumi`. All effects must be confirmed by their owning app; no
|
||||
achievement requires online AI, message volume or a paid provider.
|
||||
|
||||
126. **A little help, offline** — `lumi.offline_action.1`: complete 1 useful Lumi action in offline mode.
|
||||
127. **Five useful moments** — `lumi.actions.5`: complete 5 distinct useful Lumi actions.
|
||||
128. **Twenty-five useful moments** — `lumi.actions.25`: complete 25 distinct useful Lumi actions.
|
||||
129. **One hundred useful moments** — `lumi.actions.100`: complete 100 distinct useful Lumi actions.
|
||||
130. **Help on three days** — `lumi.days.3`: complete useful Lumi actions on 3 distinct days.
|
||||
131. **Help on seven days** — `lumi.days.7`: complete useful Lumi actions on 7 distinct days.
|
||||
132. **Help on thirty days** — `lumi.days.30`: complete useful Lumi actions on 30 distinct days.
|
||||
133. **Your progress, made visible** — `lumi.progress_chart.1`: request 1 successfully built chart from verified saved activity.
|
||||
134. **A practice with Lumi** — `lumi.practice.1`: finish 1 qualifying practice started through Lumi; requires Practices and at least 1 installed practice pack.
|
||||
135. **A page with Lumi** — `lumi.diary.1`: successfully save 1 nonempty diary addition through Lumi; requires Diary.
|
||||
|
||||
### Photos — 10 achievements
|
||||
|
||||
Owned by `inbe.photos`; visible only while Photos is installed. No cloud
|
||||
upload, public sharing, album feature or new editing tool is required.
|
||||
|
||||
136. **First memory kept** — `photos.originals.1`: import 1 distinct original photo.
|
||||
137. **Ten memories kept** — `photos.originals.10`: import 10 distinct original photos.
|
||||
138. **Fifty memories kept** — `photos.originals.50`: import 50 distinct original photos.
|
||||
139. **One hundred memories kept** — `photos.originals.100`: import 100 distinct original photos.
|
||||
140. **Three days remembered** — `photos.capture_days.3`: keep photos from 3 distinct valid capture dates.
|
||||
141. **Seven days remembered** — `photos.capture_days.7`: keep photos from 7 distinct valid capture dates.
|
||||
142. **Thirty days remembered** — `photos.capture_days.30`: keep photos from 30 distinct valid capture dates.
|
||||
143. **A closer look** — `photos.opened.1`: deliberately open 1 successfully decoded photo.
|
||||
144. **Ten closer looks** — `photos.opened.10`: deliberately open 10 distinct successfully decoded photos.
|
||||
145. **Returning to your memories** — `photos.view_days.7`: deliberately open photos on 7 distinct days.
|
||||
|
||||
### Radio — 10 achievements
|
||||
|
||||
Owned by `inbe.radio`; visible only while Radio is installed. Listening time
|
||||
is cumulative, audible playback time, not continuous-session length.
|
||||
|
||||
146. **A minute of atmosphere** — `radio.minutes.1`: listen for 1 active minute in total.
|
||||
147. **Ten minutes of atmosphere** — `radio.minutes.10`: listen for 10 active minutes in total.
|
||||
148. **Half an hour of atmosphere** — `radio.minutes.30`: listen for 30 active minutes in total.
|
||||
149. **An hour of atmosphere** — `radio.minutes.60`: listen for 60 active minutes in total.
|
||||
150. **Two hours of atmosphere** — `radio.minutes.120`: listen for 120 active minutes in total.
|
||||
151. **Five hours of atmosphere** — `radio.minutes.300`: listen for 300 active minutes in total.
|
||||
152. **Three listening days** — `radio.days.3`: listen on 3 qualifying Radio days.
|
||||
153. **Seven listening days** — `radio.days.7`: listen on 7 qualifying Radio days.
|
||||
154. **Thirty listening days** — `radio.days.30`: listen on 30 qualifying Radio days.
|
||||
155. **Two atmospheres** — `radio.stations.2`: listen for at least 1 active minute to each of 2 distinct stations.
|
||||
|
||||
### Leaderboard — 5 achievements
|
||||
|
||||
Owned by `inbe.leaderboard`. These recognize checking personal progress,
|
||||
without creating a competition to increase retention or beat another person.
|
||||
|
||||
156. **A look at your progress** — `leaderboard.check_days.1`: complete 1 own-row check-in.
|
||||
157. **Three progress check-ins** — `leaderboard.check_days.3`: check your own row on 3 distinct days.
|
||||
158. **Seven progress check-ins** — `leaderboard.check_days.7`: check your own row on 7 distinct days.
|
||||
159. **Thirty progress check-ins** — `leaderboard.check_days.30`: check your own row on 30 distinct days.
|
||||
160. **Two perspectives** — `leaderboard.practices.2`: check your own row for 2 distinct installed practices; requires at least 2 installed practice packs.
|
||||
|
||||
## 7. Backfill and migration
|
||||
|
||||
1. Add the achievement schema, preference default and migration checkpoint.
|
||||
Read old databases without changing the meaning of their source records.
|
||||
2. Load each installed app's validated manifest. Scan its existing history in
|
||||
bounded, resumable batches through that app's scoped data provider.
|
||||
3. Backfill confirmed practice counts/dates, meditation time, nonempty diary
|
||||
dates and valid photos, resolved habit history, currently completed owned
|
||||
tasks, valid list counts and photo-library hashes/capture dates where the
|
||||
source proves the requirement. Deduplicate meditation's two representations.
|
||||
4. Do not infer a task's completion date from `updated_at`, a Patterns preset
|
||||
from duration, a full Tai Chi item from seconds alone, or a completed Sun
|
||||
Salutation sequence from a timer. Check actual source guarantees and import
|
||||
provenance before qualifying historical records. An ambiguous record remains
|
||||
ordinary history but cannot prove a specific achievement fact.
|
||||
5. Only start counting facts absent from historical storage when that new
|
||||
instrumentation is installed: verified command effects, photo opens, Radio
|
||||
playback, Leaderboard check-ins, and first task completion dates. Do not read
|
||||
personal chat text to infer that a command succeeded.
|
||||
6. If an old task is already done, it can prove a unique completed-item total
|
||||
when ownership/actor are known. Seed its deduplication record with unknown
|
||||
completion date, so a later reopen/re-complete does not count as a new item
|
||||
or falsely create its first completion date. Unknown shared actors do not
|
||||
prove personal completion.
|
||||
7. Write awards with backfill origin and consumed alert receipts in the same
|
||||
batch. Record an earned date only when source ordering proves it. Restarting
|
||||
the scan must not add progress, alerts or duplicate awards.
|
||||
8. Complete reconciliation before exposing a partially computed earned count
|
||||
as final. Show ordinary loading feedback during first migration, retaining
|
||||
a previously valid projection during later rebuilds.
|
||||
|
||||
## 8. Implementation sequence
|
||||
|
||||
### Stage 1 — Agree and encode the contract
|
||||
|
||||
- Turn this catalog into app-owned definition data without changing the IDs
|
||||
or thresholds accidentally. Add a catalog validator with count, unique-ID,
|
||||
valid prerequisite, bounded-rule and locale-completeness checks.
|
||||
- Define the exact installed-app/content snapshot and document the difference
|
||||
between installed, bundled, pinned, updating and requested-on-another-device.
|
||||
- Define source receipts, local dates, deletion semantics, projection pages,
|
||||
preference scope, award identity and alert eligibility before wiring UI.
|
||||
|
||||
Exit: the complete 160-definition catalog validates, and representative fixtures
|
||||
describe earning, muted alerts, uninstalled apps and historical ambiguity.
|
||||
|
||||
### Stage 2 — Durable progress and earning
|
||||
|
||||
- Add data-preserving schema upgrades, scoped fact storage, dirty metric
|
||||
evaluation, unique award inserts, durable outbox handling and local receipts.
|
||||
- Instrument committed practice, diary, habit and Lists mutations. Put
|
||||
app-specific qualification in their app packages. Add practice subtype and
|
||||
completion metadata only where the source currently cannot prove it.
|
||||
- Add resumable backfill, export/import coverage and profile isolation.
|
||||
|
||||
Exit: real source actions and restored history produce correct deterministic
|
||||
awards offline, including retries and restarts, without showing alerts yet.
|
||||
|
||||
### Stage 3 — Entity collection and alerts switch
|
||||
|
||||
- Implement the shared collection, grouped app headings, nested practice
|
||||
headings, gray unearned badges, accessible progress and earned dates in the
|
||||
canonical Entity repository. Add the standard alerts toggle and save behavior.
|
||||
- Connect Inbe's scoped projection and preference provider, with pagination
|
||||
and capability negotiation. Update Entity through Inbe's package dependency.
|
||||
- Use existing icons or vector badge primitives for the first implementation.
|
||||
A separate request for illustrated badges can supply bitmap assets later;
|
||||
no generated image production is required for the achievement behavior.
|
||||
|
||||
Exit: Entity renders correct installed-only results at phone and desktop sizes;
|
||||
the toggle survives restart and account changes without losing achievements.
|
||||
|
||||
### Stage 4 — Complete every app and sync
|
||||
|
||||
- Add verified Lumi receipts, Photos view facts, Radio playback checkpoints
|
||||
and Leaderboard check-ins, finishing all 160 definitions' source adapters.
|
||||
- Add encrypted sync records and source-aware merge/recovery. Reconcile
|
||||
synced awards silently, preserving different installation states by device.
|
||||
- Enable quiet grouped alerts with the immediate Off behavior and local
|
||||
receipt rules in section 2.
|
||||
|
||||
Exit: every achievement has a working earning path, a working installed-state
|
||||
gate, and a documented evidence/backfill policy. The feature is not complete
|
||||
if the UI lists awards that have no implemented trigger.
|
||||
|
||||
### Stage 5 — Verification and release preparation
|
||||
|
||||
- Translate all achievement names, conditions, progress units, states and
|
||||
alerts in every shipped locale. Keep localized strings owned by the packages
|
||||
that supply the feature; never copy English placeholders to other locales.
|
||||
- Check old-host/new-package and new-host/old-package behavior, including an
|
||||
older Entity package and packages without achievement definitions.
|
||||
- Run the targeted tests below and the repository's required compatibility,
|
||||
proof, locale and visual gates. Reuse stable build output directories.
|
||||
- For an eventual approved release, add its numeric changelog entry and use
|
||||
`update_version.sh`, followed by the existing release-ready and exact-artifact
|
||||
phone checks. App and Entity version changes must use their owning workflows.
|
||||
Publishing or releasing remains a separate owner-authorized action.
|
||||
|
||||
Exit: all 160 earning rules and alert states pass, translations are complete,
|
||||
and the exact artifacts are ready for the existing release process.
|
||||
|
||||
## 9. Acceptance and verification
|
||||
|
||||
### Core earning and persistence
|
||||
|
||||
- Zero progress, one below target, exact target and above target for each rule
|
||||
type; every catalog ID has at least one fixture proving its earning path.
|
||||
- Repeated saves, duplicate source events, source revisions, app restarts,
|
||||
outbox retries and a crash between source save and evaluation never inflate
|
||||
progress or insert another award.
|
||||
- Account A, account B and a guest profile never read one another's progress,
|
||||
alert preference, award dates or pending alerts. All-data deletion includes
|
||||
awards, facts, cached projections, outbox jobs and local receipts.
|
||||
- Late source deletion, partial sync, stale revisions and source correction
|
||||
update locked progress without revoking earned awards or resurrecting data.
|
||||
- A legacy database migrates without data loss; backfill is resumable and
|
||||
silent. Mixed meditation history counts each session once. WHM retention
|
||||
and Sun Salutation repetitions are never treated as meditation minutes.
|
||||
- Civil dates cover midnight, timezone travel, leap days and week/year
|
||||
boundaries. Cumulative day rules do not become accidental streak rules.
|
||||
|
||||
### Installed apps and package compatibility
|
||||
|
||||
- A fresh profile shows only its truly installed app and content sets; keeping
|
||||
an optional package in the APK does not expose its uninstalled achievements.
|
||||
- Unpinning, offline use and a failed update retain installed achievements.
|
||||
Uninstall hides them and fixes totals immediately. Reinstall restores earned
|
||||
rows with no alerts. A failed first install adds no rows.
|
||||
- Photos and Radio remain optional. Prerequisite-dependent Lumi and
|
||||
Leaderboard rows follow installed state, including different device layouts
|
||||
on the same account. Catalog loading handles more than the initial 160 rows
|
||||
without exceeding the Entity identity-document limit.
|
||||
- Malformed catalogs, duplicate IDs, cross-app award attempts and unsupported
|
||||
capabilities are rejected without replacing the working package or data.
|
||||
|
||||
### Alerts switch and delivery
|
||||
|
||||
- On + live local unlock: one quiet alert after the action commits; one message
|
||||
for several simultaneous awards. An active practice defers it until idle.
|
||||
- Off + unlock: the earned row appears, progress is saved, and no alert is
|
||||
shown through any supported surface. Pending practice alerts are suppressed.
|
||||
- Off → On: historical or muted awards never replay; the next live local
|
||||
unlock can alert. Repeated toggles never alter earned records.
|
||||
- Preference survives restart and offline use, syncs with existing setting
|
||||
rules, and never changes another notification setting. Save failure restores
|
||||
the prior toggle value and uses the existing error behavior.
|
||||
- Sync, import, migration, startup recovery and reinstall never produce a
|
||||
notification burst. Profile switching discards the old profile's pending
|
||||
presentations. Receipt recovery never replays an uncertain dispatch.
|
||||
- Permission denied, background operation, platform quiet mode and an offline
|
||||
second device behave as specified in section 2. Foreground/background
|
||||
transitions never show both alert forms for one award.
|
||||
|
||||
### Source specific checks
|
||||
|
||||
- A Start/cancel loop grants no practice awards. Partial saved sessions follow
|
||||
the explicit qualification of their practice. Preset selection alone grants
|
||||
no Patterns award. No WHM rule examines a best hold or demands improvement.
|
||||
- Empty diary autosaves and broken photo links grant no days. Multiple edits
|
||||
to one day count once. A diary photo does not require Photos installation.
|
||||
- Counter increments, question answers, spans and linked sessions resolve to
|
||||
one habit/date completion. Historical schedules remain authoritative.
|
||||
- Reopening/re-completing a task counts its item once. Deleting the last open
|
||||
task cannot earn a cleared-list award. Shared actions credit their actor.
|
||||
- Lumi failures and plain chat add no action progress. Photos deduplicates
|
||||
original hashes. Buffering, mute and reconnects add no Radio listening time.
|
||||
Refreshing a Leaderboard does not add another check-in date.
|
||||
|
||||
### UI and existing checks
|
||||
|
||||
- Verify earned/unearned contrast, visible labels, keyboard focus, touch
|
||||
targets, wrapping of translated conditions, large text, and the toggle's
|
||||
accessible name and checked state. Test the existing light/dark themes and
|
||||
the supported zoom range without truncating the earning condition.
|
||||
- Run relevant existing targets including `profile-host-test`,
|
||||
`launcher-policy-test`, `schema-zi-test`, `database-upgrade-zi-test`,
|
||||
`package-compat-test`, `package-check`, `proof-test`, `sync-recovery-test`,
|
||||
`version-test`, `locale-translated-test`, `clean-text-api-check` and
|
||||
`button-api-check`, plus the new focused achievement/alert tests.
|
||||
- Run required visual and phone checks against the actual release artifacts.
|
||||
Every screenshot or UI automation check must use a private Xvfb/Xephyr
|
||||
display and disposable profiles. Scrub inherited `DISPLAY`,
|
||||
`WAYLAND_DISPLAY`, `XAUTHORITY` and `DBUS_SESSION_BUS_ADDRESS` before starting
|
||||
that private display; never verify against the owner's live windows.
|
||||
|
||||
## 10. Completion boundary
|
||||
|
||||
The requested feature is complete when Entity owns the achievement UI, all 160
|
||||
catalog entries can be earned through implemented app actions, only installed
|
||||
apps/practices are shown, unearned badges are gray and understandable, profile
|
||||
history survives restart/reinstall/sync, and the alerts toggle reliably controls
|
||||
all achievement alerts while leaving earning active.
|
||||
|
||||
This planning change does not implement or deploy the feature. The catalog and
|
||||
default-on in-app alert behavior are proposed decisions for implementation;
|
||||
source-specific historical credit remains conditional on evidence as described
|
||||
above.
|
||||
|
||||
|
||||
Owner decision, 2026-10-21: every achievement has its own meaningful pictogram,
|
||||
without shield artwork, numbered tiers or a badge container. The catalogs name
|
||||
icons from the locked MingCute package; package preparation copies their shapes
|
||||
and license into each app. Catalog tests reject repeated icon artwork across all
|
||||
160 built-in achievements. Earned IDs, dates and progress are unchanged.
|
||||
@@ -0,0 +1,351 @@
|
||||
# Achievements
|
||||
|
||||
The shared Entity profile displays achievements supplied by installed apps and
|
||||
practice content. Each row has its own icon, earning condition, progress and
|
||||
permanent earned date. Uninstalled apps do not contribute visible rows or totals;
|
||||
reinstalling an app restores its saved awards without replaying alerts.
|
||||
|
||||
The built-in catalogs contain 160 entries. Their machine-readable definitions
|
||||
live in `apps/*/achievements.json`, with translations in each app's
|
||||
`achievement-locales/`. Stable IDs, including the historical `self.*` IDs, are
|
||||
persisted data and must not be renamed when changing a display name.
|
||||
|
||||
## Ownership and storage
|
||||
|
||||
`src/app/achievement_host.zi` provides Entity's read-only projection and the
|
||||
owner-guarded alert preference. `src/app/achievement_runtime.zi` reconciles
|
||||
committed activity and presents new awards. The app adapters supply facts;
|
||||
merely opening an app or starting an unsaved practice does not earn an award.
|
||||
|
||||
`src/storage/achievement_records.zi` validates account-owned facts and permanent
|
||||
awards. They sync in `private.inbe.v1.achievements`. Presentation receipts stay
|
||||
local. Deleting source activity removes its contribution to unearned progress;
|
||||
it does not revoke permanent awards. Deleting the profile removes its records.
|
||||
|
||||
The **Achievement alerts** switch controls presentation, not earning. It uses
|
||||
`notification_achievements`; silent backfill, imports, sync and reinstall do not
|
||||
replay historical alerts. Active practices defer alerts until idle.
|
||||
|
||||
## Qualification rules
|
||||
|
||||
These rules make each requirement below implementable and consistent:
|
||||
|
||||
- **Active day:** a date containing at least one qualifying saved practice,
|
||||
habit completion, nonempty diary day, first task completion, confirmed useful
|
||||
Lumi action, successful photo import/open, one minute of active Radio
|
||||
playback, or a successful own-row Leaderboard check-in. Entity overview uses
|
||||
the union of these dates. Source updates, settings changes and merely
|
||||
installing or opening an app are not activity.
|
||||
- **Practice session:** a distinct saved session meeting its practice's
|
||||
qualification. WHM requires at least one completed normal round, with no
|
||||
retention-duration target. Meditation and Patterns require at least 60
|
||||
seconds of actual practice, excluding paused time; keeping a saved partial
|
||||
session of at least that length counts. Sun Salutation requires one complete
|
||||
sequence; Tai Chi requires one course item played to completion. Do not infer
|
||||
a full routine from a bare Start event or an ambiguous old session row.
|
||||
- **Practice day:** a distinct local date with at least one qualifying session
|
||||
of that practice. General Practices days combine practice IDs by date.
|
||||
- **Diary day:** one saved date containing non-whitespace authored text or a
|
||||
valid photo embed/attachment. Empty autosaves, formatting markers alone and
|
||||
broken image references do not count. Count edits to the same date once.
|
||||
A photo diary day needs at least one valid photo, not a particular app's
|
||||
photo integration. Months are distinct `YYYY-MM`; weeks are Monday-based
|
||||
civil week keys, with year-boundary tests.
|
||||
- **Habit completion:** one habit/date that meets the owning app's existing
|
||||
completion rules and the historical schedule/target for that date. Count
|
||||
one result for counter, linked-practice, question and span representations
|
||||
of that same day. Reaching twice the target does not earn two completions.
|
||||
General habit-days are distinct dates across habits. A skipped question may
|
||||
count as an ordinary completed day under Habits' existing rules, but never
|
||||
earns the answered-question award; an unfinished span does not earn the
|
||||
ended-span award.
|
||||
- **Completed task:** a distinct item whose own successful not-done → done
|
||||
transition is committed for this profile. Attribute shared-list actions to
|
||||
their actual actor; another person's completion cannot earn this profile an
|
||||
achievement. List-clearing awards require completing the final open item
|
||||
in a list containing at least three distinct active items, all now done.
|
||||
Removing the last open item or deleting a list does not qualify.
|
||||
- **Useful Lumi action:** a confirmed change to an installed app's data,
|
||||
a qualifying practice caused by Lumi, or a verified requested progress
|
||||
chart. No-op commands, failed actions, cosmetic settings changes, plain
|
||||
conversation and repeated reads of the same chart/day do not add actions.
|
||||
A practice-start action counts only when its correlated session qualifies.
|
||||
The first-offline-action award requires the action's recorded mode to be
|
||||
offline; all other Lumi awards work with either connection mode.
|
||||
- **Photo:** a successfully imported, nontrashed original with a unique hash.
|
||||
A photo-open fact requires deliberately opening a successfully decoded
|
||||
photo, not merely scrolling past a thumbnail. Days-of-photos thresholds
|
||||
use valid capture dates, not guessed dates for files with no date metadata.
|
||||
- **Radio day:** at least 60 nonoverlapping seconds of active audible playback
|
||||
on a date. Minute totals are cumulative across listening sessions. The
|
||||
two-station award requires 60 active seconds for each of two distinct stable
|
||||
station IDs, not station names or reconnects.
|
||||
- **Leaderboard check-in:** the person's own row successfully rendered in
|
||||
the visible board after an explicit open/selection, from valid cached or
|
||||
fresh data. Count one check-in date regardless of refreshes. No award
|
||||
depends on a rank, friend count, another person's performance or hold time.
|
||||
- **Return after a 14-day gap:** a new qualifying action whose date is at
|
||||
least 15 civil days after the most recent prior qualifying date. There must
|
||||
be prior activity; first use never qualifies. The 14 days between them have
|
||||
no qualifying activity in that scope.
|
||||
|
||||
Progress for distinct-day and count thresholds is `current / target`, capped
|
||||
at the target for display. For same-habit awards show the largest qualifying
|
||||
day count for one habit. For a return award show earned/not earned plus its
|
||||
condition. Tier achievements are individual awards with individual IDs; one
|
||||
action may cross multiple tiers and produces one grouped alert.
|
||||
|
||||
## Catalog
|
||||
|
||||
Every numbered line defines one achievement, its stable ID and its
|
||||
earning condition. Session, day, completion and return terms use the qualification rules above.
|
||||
|
||||
### Entity overview — 10 achievements
|
||||
|
||||
These are the profile's cross-app milestones, supplied by the root integration.
|
||||
|
||||
1. **A beginning** — `self.active.1`: record 1 active day.
|
||||
2. **Three days for yourself** — `self.active.3`: record 3 active days.
|
||||
3. **A week of moments** — `self.active.7`: record 7 active days.
|
||||
4. **Fourteen moments** — `self.active.14`: record 14 active days.
|
||||
5. **Thirty days for yourself** — `self.active.30`: record 30 active days.
|
||||
6. **Sixty days of care** — `self.active.60`: record 60 active days.
|
||||
7. **One hundred days** — `self.active.100`: record 100 active days.
|
||||
8. **A growing history** — `self.active.180`: record 180 active days.
|
||||
9. **A year of moments** — `self.active.365`: record 365 active days.
|
||||
10. **Welcome back** — `self.return.14`: record an active day after a 14-day activity gap.
|
||||
|
||||
### Practices general — 10 achievements
|
||||
|
||||
Owned by `inbe.practices`; visible while Practices is installed.
|
||||
|
||||
11. **First practice** — `practices.sessions.1`: record 1 qualifying practice session.
|
||||
12. **Five practices** — `practices.sessions.5`: record 5 qualifying practice sessions.
|
||||
13. **Ten practices** — `practices.sessions.10`: record 10 qualifying practice sessions.
|
||||
14. **Twenty-five practices** — `practices.sessions.25`: record 25 qualifying practice sessions.
|
||||
15. **Fifty practices** — `practices.sessions.50`: record 50 qualifying practice sessions.
|
||||
16. **One hundred practices** — `practices.sessions.100`: record 100 qualifying practice sessions.
|
||||
17. **A lasting practice** — `practices.sessions.250`: record 250 qualifying practice sessions.
|
||||
18. **Seven practice days** — `practices.days.7`: practice on 7 distinct days.
|
||||
19. **Thirty practice days** — `practices.days.30`: practice on 30 distinct days.
|
||||
20. **One hundred practice days** — `practices.days.100`: practice on 100 distinct days.
|
||||
|
||||
### WHM — 10 achievements
|
||||
|
||||
Owned by Practices; requires the installed `whm` content pack. All session
|
||||
awards use normal completed rounds without comparing retention values.
|
||||
|
||||
21. **First WHM practice** — `whm.sessions.1`: record 1 qualifying WHM session.
|
||||
22. **Five WHM practices** — `whm.sessions.5`: record 5 qualifying WHM sessions.
|
||||
23. **Ten WHM practices** — `whm.sessions.10`: record 10 qualifying WHM sessions.
|
||||
24. **Twenty-five WHM practices** — `whm.sessions.25`: record 25 qualifying WHM sessions.
|
||||
25. **Fifty WHM practices** — `whm.sessions.50`: record 50 qualifying WHM sessions.
|
||||
26. **One hundred WHM practices** — `whm.sessions.100`: record 100 qualifying WHM sessions.
|
||||
27. **Three WHM days** — `whm.days.3`: practice WHM on 3 distinct days.
|
||||
28. **Seven WHM days** — `whm.days.7`: practice WHM on 7 distinct days.
|
||||
29. **Thirty WHM days** — `whm.days.30`: practice WHM on 30 distinct days.
|
||||
30. **One hundred WHM days** — `whm.days.100`: practice WHM on 100 distinct days.
|
||||
|
||||
### Meditation — 10 achievements
|
||||
|
||||
Owned by Practices; requires the installed `meditation` content pack. Time
|
||||
thresholds are cumulative, never a requirement to sit for one long session.
|
||||
|
||||
31. **First meditation** — `meditation.sessions.1`: record 1 qualifying meditation session.
|
||||
32. **Five quiet moments** — `meditation.sessions.5`: record 5 qualifying meditation sessions.
|
||||
33. **Ten quiet moments** — `meditation.sessions.10`: record 10 qualifying meditation sessions.
|
||||
34. **Twenty-five quiet moments** — `meditation.sessions.25`: record 25 qualifying meditation sessions.
|
||||
35. **Fifty quiet moments** — `meditation.sessions.50`: record 50 qualifying meditation sessions.
|
||||
36. **Three meditation days** — `meditation.days.3`: meditate on 3 distinct days.
|
||||
37. **Seven meditation days** — `meditation.days.7`: meditate on 7 distinct days.
|
||||
38. **Thirty meditation days** — `meditation.days.30`: meditate on 30 distinct days.
|
||||
39. **An hour of quiet** — `meditation.minutes.60`: accumulate 60 actual meditation minutes.
|
||||
40. **Ten hours of quiet** — `meditation.minutes.600`: accumulate 600 actual meditation minutes.
|
||||
|
||||
### Breathing Patterns — 10 achievements
|
||||
|
||||
Owned by Practices; requires the installed `patterns` content pack. Preset
|
||||
awards require a qualifying session with the recorded preset, not selecting it.
|
||||
|
||||
41. **First breathing pattern** — `patterns.sessions.1`: record 1 qualifying Patterns session.
|
||||
42. **Five breathing practices** — `patterns.sessions.5`: record 5 qualifying Patterns sessions.
|
||||
43. **Ten breathing practices** — `patterns.sessions.10`: record 10 qualifying Patterns sessions.
|
||||
44. **Twenty-five breathing practices** — `patterns.sessions.25`: record 25 qualifying Patterns sessions.
|
||||
45. **Fifty breathing practices** — `patterns.sessions.50`: record 50 qualifying Patterns sessions.
|
||||
46. **One hundred breathing practices** — `patterns.sessions.100`: record 100 qualifying Patterns sessions.
|
||||
47. **Seven breathing days** — `patterns.days.7`: practice Patterns on 7 distinct days.
|
||||
48. **Thirty breathing days** — `patterns.days.30`: practice Patterns on 30 distinct days.
|
||||
49. **A box-breathing moment** — `patterns.preset.box`: record 1 qualifying box-breathing session.
|
||||
50. **A coherent-breathing moment** — `patterns.preset.coherent`: record 1 qualifying coherent-breathing session.
|
||||
|
||||
### Sun Salutation — 10 achievements
|
||||
|
||||
Owned by Practices; requires the installed `sunsalutation` content pack.
|
||||
Qualification requires a completed sequence, without a pace or flexibility goal.
|
||||
|
||||
51. **First salutation** — `sunsalutation.sessions.1`: record 1 qualifying Sun Salutation session.
|
||||
52. **Five salutation practices** — `sunsalutation.sessions.5`: record 5 qualifying Sun Salutation sessions.
|
||||
53. **Ten salutation practices** — `sunsalutation.sessions.10`: record 10 qualifying Sun Salutation sessions.
|
||||
54. **Twenty-five salutation practices** — `sunsalutation.sessions.25`: record 25 qualifying Sun Salutation sessions.
|
||||
55. **Fifty salutation practices** — `sunsalutation.sessions.50`: record 50 qualifying Sun Salutation sessions.
|
||||
56. **One hundred salutation practices** — `sunsalutation.sessions.100`: record 100 qualifying Sun Salutation sessions.
|
||||
57. **Three salutation days** — `sunsalutation.days.3`: practice Sun Salutation on 3 distinct days.
|
||||
58. **Seven salutation days** — `sunsalutation.days.7`: practice Sun Salutation on 7 distinct days.
|
||||
59. **Thirty salutation days** — `sunsalutation.days.30`: practice Sun Salutation on 30 distinct days.
|
||||
60. **One hundred salutation days** — `sunsalutation.days.100`: practice Sun Salutation on 100 distinct days.
|
||||
|
||||
### Tai Chi — 10 achievements
|
||||
|
||||
Owned by Practices; requires the installed `taichi` content pack. Completing
|
||||
one course item qualifies a session; no form needs to be performed faster.
|
||||
|
||||
61. **First Tai Chi practice** — `taichi.sessions.1`: record 1 qualifying Tai Chi session.
|
||||
62. **Five Tai Chi practices** — `taichi.sessions.5`: record 5 qualifying Tai Chi sessions.
|
||||
63. **Ten Tai Chi practices** — `taichi.sessions.10`: record 10 qualifying Tai Chi sessions.
|
||||
64. **Twenty-five Tai Chi practices** — `taichi.sessions.25`: record 25 qualifying Tai Chi sessions.
|
||||
65. **Fifty Tai Chi practices** — `taichi.sessions.50`: record 50 qualifying Tai Chi sessions.
|
||||
66. **One hundred Tai Chi practices** — `taichi.sessions.100`: record 100 qualifying Tai Chi sessions.
|
||||
67. **Three Tai Chi days** — `taichi.days.3`: practice Tai Chi on 3 distinct days.
|
||||
68. **Seven Tai Chi days** — `taichi.days.7`: practice Tai Chi on 7 distinct days.
|
||||
69. **Thirty Tai Chi days** — `taichi.days.30`: practice Tai Chi on 30 distinct days.
|
||||
70. **One hundred Tai Chi days** — `taichi.days.100`: practice Tai Chi on 100 distinct days.
|
||||
|
||||
### Diary — 20 achievements
|
||||
|
||||
Owned by `inbe.diary`. Week and month counts need one qualifying diary day
|
||||
in each distinct period; the periods do not have to be consecutive.
|
||||
|
||||
71. **First page** — `diary.days.1`: save 1 qualifying diary day.
|
||||
72. **Three pages** — `diary.days.3`: save 3 qualifying diary days.
|
||||
73. **Seven pages** — `diary.days.7`: save 7 qualifying diary days.
|
||||
74. **Fourteen pages** — `diary.days.14`: save 14 qualifying diary days.
|
||||
75. **Thirty pages** — `diary.days.30`: save 30 qualifying diary days.
|
||||
76. **Sixty pages** — `diary.days.60`: save 60 qualifying diary days.
|
||||
77. **One hundred pages** — `diary.days.100`: save 100 qualifying diary days.
|
||||
78. **An unfolding story** — `diary.days.180`: save 180 qualifying diary days.
|
||||
79. **A year of pages** — `diary.days.365`: save 365 qualifying diary days.
|
||||
80. **Two weeks remembered** — `diary.weeks.2`: write in 2 distinct weeks.
|
||||
81. **Four weeks remembered** — `diary.weeks.4`: write in 4 distinct weeks.
|
||||
82. **Twelve weeks remembered** — `diary.weeks.12`: write in 12 distinct weeks.
|
||||
83. **Twenty-six weeks remembered** — `diary.weeks.26`: write in 26 distinct weeks.
|
||||
84. **Three months remembered** — `diary.months.3`: write in 3 distinct months.
|
||||
85. **Six months remembered** — `diary.months.6`: write in 6 distinct months.
|
||||
86. **Twelve months remembered** — `diary.months.12`: write in 12 distinct months.
|
||||
87. **A picture in your story** — `diary.photo_days.1`: save a valid photo on 1 diary day.
|
||||
88. **Five illustrated days** — `diary.photo_days.5`: save valid photos on 5 distinct diary days.
|
||||
89. **Twenty illustrated days** — `diary.photo_days.20`: save valid photos on 20 distinct diary days.
|
||||
90. **A new page again** — `diary.return.14`: save a diary day after a 14-day diary gap.
|
||||
|
||||
### Habits — 20 achievements
|
||||
|
||||
Owned by `inbe.habits`. These follow Habits' historical schedule and completion
|
||||
semantics; missing an unscheduled day never breaks a requirement.
|
||||
|
||||
91. **An intention takes shape** — `habits.created.1`: save 1 valid habit.
|
||||
92. **First habit day** — `habits.days.1`: complete a habit on 1 distinct day.
|
||||
93. **Three habit days** — `habits.days.3`: complete habits on 3 distinct days.
|
||||
94. **Seven habit days** — `habits.days.7`: complete habits on 7 distinct days.
|
||||
95. **Fourteen habit days** — `habits.days.14`: complete habits on 14 distinct days.
|
||||
96. **Thirty habit days** — `habits.days.30`: complete habits on 30 distinct days.
|
||||
97. **Sixty habit days** — `habits.days.60`: complete habits on 60 distinct days.
|
||||
98. **One hundred habit days** — `habits.days.100`: complete habits on 100 distinct days.
|
||||
99. **A habit history** — `habits.days.180`: complete habits on 180 distinct days.
|
||||
100. **A year of habit days** — `habits.days.365`: complete habits on 365 distinct days.
|
||||
101. **Ten completions** — `habits.completions.10`: record 10 distinct habit/date completions.
|
||||
102. **Fifty completions** — `habits.completions.50`: record 50 distinct habit/date completions.
|
||||
103. **One hundred completions** — `habits.completions.100`: record 100 distinct habit/date completions.
|
||||
104. **Five hundred completions** — `habits.completions.500`: record 500 distinct habit/date completions.
|
||||
105. **One habit, seven times** — `habits.single_scheduled_days.7`: complete the same habit on 7 of its scheduled dates.
|
||||
106. **One habit, thirty times** — `habits.single_scheduled_days.30`: complete the same habit on 30 of its scheduled dates.
|
||||
107. **One habit, one hundred times** — `habits.single_scheduled_days.100`: complete the same habit on 100 of its scheduled dates.
|
||||
108. **A target met** — `habits.counter_target.1`: reach a counting habit's own target on 1 date.
|
||||
109. **An answer recorded** — `habits.question_answer.1`: save 1 genuine answer to a habit question.
|
||||
110. **A span recorded** — `habits.ended_span.1`: save 1 valid span with both start and end.
|
||||
|
||||
### Lists — 15 achievements
|
||||
|
||||
Owned by `inbe.lists`. Completed items count once by item ID, including shared
|
||||
items only when this profile is the confirmed completing actor.
|
||||
|
||||
111. **A place for intentions** — `lists.created.1`: save 1 valid list.
|
||||
112. **First task finished** — `lists.items.1`: complete 1 distinct task.
|
||||
113. **Five tasks finished** — `lists.items.5`: complete 5 distinct tasks.
|
||||
114. **Ten tasks finished** — `lists.items.10`: complete 10 distinct tasks.
|
||||
115. **Twenty-five tasks finished** — `lists.items.25`: complete 25 distinct tasks.
|
||||
116. **Fifty tasks finished** — `lists.items.50`: complete 50 distinct tasks.
|
||||
117. **One hundred tasks finished** — `lists.items.100`: complete 100 distinct tasks.
|
||||
118. **Two hundred fifty tasks finished** — `lists.items.250`: complete 250 distinct tasks.
|
||||
119. **Three days of follow-through** — `lists.days.3`: finish tasks on 3 distinct days.
|
||||
120. **Seven days of follow-through** — `lists.days.7`: finish tasks on 7 distinct days.
|
||||
121. **Thirty days of follow-through** — `lists.days.30`: finish tasks on 30 distinct days.
|
||||
122. **One hundred days of follow-through** — `lists.days.100`: finish tasks on 100 distinct days.
|
||||
123. **A list brought to rest** — `lists.cleared.1`: finish the last open task in 1 list containing at least 3 distinct active tasks.
|
||||
124. **Five lists brought to rest** — `lists.cleared.5`: do that for 5 distinct lists.
|
||||
125. **Details carried through** — `lists.commented_completion.1`: finish 1 task with a saved nonempty comment.
|
||||
|
||||
### Lumi — 10 achievements
|
||||
|
||||
Owned by `inbe.lumi`. All effects must be confirmed by their owning app; no
|
||||
achievement requires online AI, message volume or a paid provider.
|
||||
|
||||
126. **A little help, offline** — `lumi.offline_action.1`: complete 1 useful Lumi action in offline mode.
|
||||
127. **Five useful moments** — `lumi.actions.5`: complete 5 distinct useful Lumi actions.
|
||||
128. **Twenty-five useful moments** — `lumi.actions.25`: complete 25 distinct useful Lumi actions.
|
||||
129. **One hundred useful moments** — `lumi.actions.100`: complete 100 distinct useful Lumi actions.
|
||||
130. **Help on three days** — `lumi.days.3`: complete useful Lumi actions on 3 distinct days.
|
||||
131. **Help on seven days** — `lumi.days.7`: complete useful Lumi actions on 7 distinct days.
|
||||
132. **Help on thirty days** — `lumi.days.30`: complete useful Lumi actions on 30 distinct days.
|
||||
133. **Your progress, made visible** — `lumi.progress_chart.1`: request 1 successfully built chart from verified saved activity.
|
||||
134. **A practice with Lumi** — `lumi.practice.1`: finish 1 qualifying practice started through Lumi; requires Practices and at least 1 installed practice pack.
|
||||
135. **A page with Lumi** — `lumi.diary.1`: successfully save 1 nonempty diary addition through Lumi; requires Diary.
|
||||
|
||||
### Photos — 10 achievements
|
||||
|
||||
Owned by `inbe.photos`; visible only while Photos is installed. No cloud
|
||||
upload, public sharing, album feature or new editing tool is required.
|
||||
|
||||
136. **First memory kept** — `photos.originals.1`: import 1 distinct original photo.
|
||||
137. **Ten memories kept** — `photos.originals.10`: import 10 distinct original photos.
|
||||
138. **Fifty memories kept** — `photos.originals.50`: import 50 distinct original photos.
|
||||
139. **One hundred memories kept** — `photos.originals.100`: import 100 distinct original photos.
|
||||
140. **Three days remembered** — `photos.capture_days.3`: keep photos from 3 distinct valid capture dates.
|
||||
141. **Seven days remembered** — `photos.capture_days.7`: keep photos from 7 distinct valid capture dates.
|
||||
142. **Thirty days remembered** — `photos.capture_days.30`: keep photos from 30 distinct valid capture dates.
|
||||
143. **A closer look** — `photos.opened.1`: deliberately open 1 successfully decoded photo.
|
||||
144. **Ten closer looks** — `photos.opened.10`: deliberately open 10 distinct successfully decoded photos.
|
||||
145. **Returning to your memories** — `photos.view_days.7`: deliberately open photos on 7 distinct days.
|
||||
|
||||
### Radio — 10 achievements
|
||||
|
||||
Owned by `inbe.radio`; visible only while Radio is installed. Listening time
|
||||
is cumulative, audible playback time, not continuous-session length.
|
||||
|
||||
146. **A minute of atmosphere** — `radio.minutes.1`: listen for 1 active minute in total.
|
||||
147. **Ten minutes of atmosphere** — `radio.minutes.10`: listen for 10 active minutes in total.
|
||||
148. **Half an hour of atmosphere** — `radio.minutes.30`: listen for 30 active minutes in total.
|
||||
149. **An hour of atmosphere** — `radio.minutes.60`: listen for 60 active minutes in total.
|
||||
150. **Two hours of atmosphere** — `radio.minutes.120`: listen for 120 active minutes in total.
|
||||
151. **Five hours of atmosphere** — `radio.minutes.300`: listen for 300 active minutes in total.
|
||||
152. **Three listening days** — `radio.days.3`: listen on 3 qualifying Radio days.
|
||||
153. **Seven listening days** — `radio.days.7`: listen on 7 qualifying Radio days.
|
||||
154. **Thirty listening days** — `radio.days.30`: listen on 30 qualifying Radio days.
|
||||
155. **Two atmospheres** — `radio.stations.2`: listen for at least 1 active minute to each of 2 distinct stations.
|
||||
|
||||
### Leaderboard — 5 achievements
|
||||
|
||||
Owned by `inbe.leaderboard`. These recognize checking personal progress,
|
||||
without creating a competition to increase retention or beat another person.
|
||||
|
||||
156. **A look at your progress** — `leaderboard.check_days.1`: complete 1 own-row check-in.
|
||||
157. **Three progress check-ins** — `leaderboard.check_days.3`: check your own row on 3 distinct days.
|
||||
158. **Seven progress check-ins** — `leaderboard.check_days.7`: check your own row on 7 distinct days.
|
||||
159. **Thirty progress check-ins** — `leaderboard.check_days.30`: check your own row on 30 distinct days.
|
||||
160. **Two perspectives** — `leaderboard.practices.2`: check your own row for 2 distinct installed practices; requires at least 2 installed practice packs.
|
||||
|
||||
## Verification
|
||||
|
||||
`make achievements-test achievement-catalog-test` checks storage, source facts,
|
||||
ownership, deduplication, translation coverage, unique icon artwork and agreement
|
||||
between this catalog and the packaged definitions. The complete application also
|
||||
runs its normal package compatibility, migration, locale, visual and release
|
||||
checks. A focused test pass does not replace those gates.
|
||||
@@ -1,8 +1,8 @@
|
||||
# Build laws in Ziran
|
||||
|
||||
Every Inbe law is stated, implemented, and checked in Ziran. Bend, its Node.js
|
||||
checker, and the generated `.zi` tables are gone. This file records what the
|
||||
laws cover, how they are enforced, and what is still to do.
|
||||
checker, and the generated `.zi` tables are gone. This reference describes the
|
||||
checked behavior, enforcement and limits.
|
||||
|
||||
## Implemented
|
||||
|
||||
@@ -57,7 +57,7 @@ laws cover, how they are enforced, and what is still to do.
|
||||
Seven laws over every dialog type and screen numbers -2 to 20: each
|
||||
screen-specific dialog appears only where it belongs, all others appear
|
||||
anywhere, and the habit-tab flag cannot leak a dialog onto another screen.
|
||||
- **Ziran `forall` laws** (in `~/Projects/ziran`).
|
||||
- **Ziran `forall` laws** (in the pinned Ziran package).
|
||||
`#law NAME forall x: 0..4, k: SomeEnum => condition;` checks every
|
||||
combination of integer ranges and enum members with the compile-time
|
||||
evaluator. A failure reports the counterexample; a domain over 1,000,000
|
||||
@@ -65,9 +65,8 @@ laws cover, how they are enforced, and what is still to do.
|
||||
the gate unless explicitly waived.
|
||||
|
||||
The laws do not prove server availability, delivery, alias/friend restoration,
|
||||
filesystem or SQLite behavior, or arbitrary `.zi` code. Integration tests for
|
||||
those effects remain, and the sync recovery native build still stops at the
|
||||
unfinished Ziran source gate.
|
||||
filesystem or SQLite behavior, or arbitrary `.zi` code. Integration tests check
|
||||
those effects separately.
|
||||
|
||||
## Build behavior and verification
|
||||
|
||||
@@ -83,22 +82,19 @@ longer required to build, and the Flatpak no longer carries a Node build tool.
|
||||
not vacuous.
|
||||
- `make sync-retry-zi-test`: behavior across the portable bundle and the C, C++,
|
||||
and Go targets, from source and saved IR.
|
||||
- `make sync-recovery-test`: generated Ziran C and the coordinator; blocked by
|
||||
the unfinished app source gate.
|
||||
- `make sync-recovery-test`: generated Ziran C and the coordinator.
|
||||
- `make version-test`: release synchronization and mismatch rejection.
|
||||
|
||||
Compiler regression tests, the text/button scanners, migration tests, and the
|
||||
sync integration suite are separate checks with their own scope; none is a
|
||||
proof of application behavior.
|
||||
|
||||
## Toolchain pin
|
||||
## Toolchain
|
||||
|
||||
`ziran.lock` pins Ziran commit `9235688` on `master`, which has `forall` laws
|
||||
over ranges, enums, and bounded sequences, enum-aware `custom` laws, and law
|
||||
identity and waiver validation.
|
||||
`ziran lock` currently also re-resolves Kryon, whose working tree needs raylib,
|
||||
so the pin was changed by hand to the toolchain commit only. Local builds use
|
||||
the `../ziran` and `../kryon` working trees through `ziran.local.toml`.
|
||||
`ziran.lock` selects the exact Ziran package. Release builds use
|
||||
`PACKAGE_FLAGS=--locked`; local canonical checkout overrides belong only in the
|
||||
ignored `ziran.local.toml`. Update dependencies through the package command,
|
||||
then run `make package-check` and the relevant law and behavior checks.
|
||||
|
||||
## Model and implementation
|
||||
|
||||
@@ -108,19 +104,12 @@ code, a test runs that code against the same statements (`habit-merge-sql-test`,
|
||||
broken implementation. What is not covered is stated next to each law; no law
|
||||
claims to prove a separately implemented path it does not check.
|
||||
|
||||
## Remaining work
|
||||
## Limits
|
||||
|
||||
1. **Determinism matrix in Ziran.** Law tables byte-identical across runs and
|
||||
between source and saved IR is tested for `forall`, enum, and sequence laws
|
||||
in `tests/laws.sh`, not across the whole compiler matrix.
|
||||
2. **Mutation gate as a Ziran library.** `tests/law_mutation_test.sh` is local to
|
||||
Inbe; Ziran should provide the reusable form.
|
||||
3. **Unbounded and wider domains.** Sequence laws are exhaustive up to 1,000,000
|
||||
cases and 16 elements; larger merges are covered by the bounded model plus
|
||||
the SQL test, not by proof.
|
||||
4. **Widget behavior beyond dialog rules.** Rendering, layout, and hover/press
|
||||
transitions stay covered by portable value tests and host boundary tests.
|
||||
Ziran stays unaware of UI widgets.
|
||||
The proofs cover their declared finite domains. Wider or unbounded merges are
|
||||
not established by the bounded model or by a passing SQL test. Rendering,
|
||||
layout and interaction transitions use runtime tests, not formal UI proofs.
|
||||
The mutation harness remains local to this application.
|
||||
|
||||
## Trust and use with smaller models
|
||||
|
||||
+2
-33
@@ -8,7 +8,7 @@ phone test. All other release gates still run.
|
||||
|
||||
The build checks Inbe's laws with the Ziran compiler (`ziran check`); no
|
||||
separate proof tool is needed. The build host needs Python 3 and the platform's
|
||||
native build dependencies. See [build laws](build-laws-plan.md) for the
|
||||
native build dependencies. See [build laws](build-laws.md) for the
|
||||
checked behavior.
|
||||
|
||||
Build commands fetch the dependencies pinned in `ziran.lock`.
|
||||
@@ -91,37 +91,6 @@ and the existing release workflow, which builds and publishes the signed
|
||||
Google Play AAB and owns release tags. A local build or commit is not a Play
|
||||
deployment.
|
||||
|
||||
`make lumi-promo` renders a narrated portrait review MP4 from the exact
|
||||
reviewed phone captures and the generated artwork in `design/lumi-promo/`.
|
||||
Lumi uses eight generated wing-flapping frames, flies to each screen and settles
|
||||
facing the app while a narrator explains it. Lumi turns with the flight direction
|
||||
and flips inward after arriving on the right. Wings flap continuously using
|
||||
distinct poses; each app screen stays in a fixed position without sliding in.
|
||||
The audio contains speech only, without music or sound effects. Scene timings
|
||||
expand to fit the complete spoken lines.
|
||||
`make lumi-narration` generates the stored narrator clips through OpenRouter
|
||||
using a locally configured `OPENROUTER_API_KEY`; unchanged clips are reused.
|
||||
The voice, script and provider options are in `design/lumi-promo/narration.json`.
|
||||
The chat example runs real local theme actions; the surrounding forest and
|
||||
glow are marketing effects. Inspect `build/lumi-promo/storyboard.jpg` and
|
||||
`build/lumi-promo/inner-breeze-lumi-review.mp4` before using it publicly.
|
||||
Google Play's preview video field takes a YouTube URL, so the MP4 needs an
|
||||
approved public or unlisted YouTube upload with embedding enabled before it can
|
||||
be added to the listing. Pass `--video-url https://www.youtube.com/watch?v=VIDEO_ID`
|
||||
to the listing uploader, or configure `PLAY_VIDEO_URL`. To update only the
|
||||
video, use `PLAY_COMMIT=1 python3 scripts/upload-play-screenshots.py --video-only --video-url URL`.
|
||||
The [Inner Breeze trailer](https://www.youtube.com/watch?v=GTly6Fu5zPk),
|
||||
"A Day with Lumi", is public on YouTube and configured in every Google Play
|
||||
listing language.
|
||||
`design/promo-film/` holds the trailer's sources: `film.json` (clips, voice
|
||||
times, app-screen inserts), `narrate.py` (Lumi's voice), `score.py` (music),
|
||||
`mix.py`, `keyframes.py` and `compose.py`, which renders the cut with the real
|
||||
app screens into `build/promo-video/`. `mix.py --short` and
|
||||
`compose.py --short` render the 36-second vertical short from `short.json`,
|
||||
the portrait keyframes in `keyframes-vertical/` and sections of the same score.
|
||||
Screenshot publishing still requires the complete current
|
||||
capture, visual review, export and locked build preflight.
|
||||
|
||||
To test sync and recovery against an isolated local server:
|
||||
|
||||
```bash
|
||||
@@ -129,7 +98,7 @@ make sync-server-test DAOCHI_BIN=/absolute/path/to/daochi
|
||||
```
|
||||
|
||||
This uses disposable client databases and a loopback server; see
|
||||
[web and sync test coverage](../WEB_RENDERER_TESTS.md) for details.
|
||||
[web and sync test coverage](web-testing.md) for details.
|
||||
|
||||
The Apps picker, independent ZIB packages, update settings, account choices and
|
||||
publisher setup are described in [app packages](cells.md).
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
# Sync compatibility validation — 2026-09-14
|
||||
|
||||
## Production repair
|
||||
|
||||
The backend was restarting because it required `DAOCHI_TOKEN_SECRET_HEX`
|
||||
while the deployed environment still used `KSYNC_TOKEN_SECRET_HEX`.
|
||||
The configuration migration preserved the existing token secret and database
|
||||
settings, retained the old settings for rollback, and made a private backup.
|
||||
|
||||
Daochi commit `ae40c7f` is deployed. Sync responses no longer advertise backend
|
||||
protocol development as a client upgrade. `latest_protocol` echoes the client
|
||||
protocol on typed sync responses; `server_latest_protocol` reports backend
|
||||
capability separately. The opaque encrypted endpoint omits `latest_protocol`.
|
||||
|
||||
## Passed checks
|
||||
|
||||
- Daochi `make test`, including real ML-DSA authentication with the shipped
|
||||
Inbe, Ksync, and Daochi signing contexts and headers; altered signatures
|
||||
rejected; sync protocols v1–v5 accepted without upgrade warnings.
|
||||
- Environment migration tests: credential/database preservation, idempotence,
|
||||
and rejection of conflicting old/new settings.
|
||||
- Inbe sync-account and sync-review tests, including persisted newer protocol
|
||||
metadata that must not become an app-update notification.
|
||||
- Inbe two-client integration test against a disposable Daochi server:
|
||||
upload/download, offline recovery, interrupted upload, retry, conflicts,
|
||||
mood data, backup restoration, and deletion.
|
||||
- Official GitHub release APK 1.9.19 (versionCode 121), installed alongside
|
||||
the existing debug app on the attached Moto E6 Play:
|
||||
imported a disposable old-format `.key`, connected to production,
|
||||
saved and uploaded one meditation session, reset only the fresh test app,
|
||||
re-imported the same key, and restored the session from production.
|
||||
The Data screen reported one session, queued zero, and Ready, without
|
||||
the protocol-driven “Upgrade Inner Breeze” warning.
|
||||
- All five newly added sync status/error messages are present exactly once
|
||||
in all 12 locale files. Vendor trees remain clean; `git diff --check` passes.
|
||||
|
||||
## Remaining limits
|
||||
|
||||
- The phone validation uses the unchanged published APK. Its missing locale
|
||||
messages still display identifiers; the translated fixes are in 1.10.0
|
||||
source and are not published yet.
|
||||
- Building the current Android working tree fails at the existing
|
||||
`PickerDialog` / `PickerDialogProps` call in notification settings, whose
|
||||
API is absent from the selected runtime. A new APK has not been validated.
|
||||
- The full locale test also reports pre-existing missing profile translations
|
||||
and unused profile/list keys outside the sync changes.
|
||||
- A backup produced by the current development client was rejected by the
|
||||
old APK as an invalid export. Key-based server restoration passed; do not
|
||||
claim forward compatibility of development backup archives.
|
||||
- Production `/healthz` succeeds. `/readyz` still reports a separately
|
||||
configured direct-payment issuer key missing; database, token secret,
|
||||
and signature-verifier checks pass. Deployment preserved that existing
|
||||
readiness state rather than changing payment configuration.
|
||||
- This validates the tested release and wire formats, not every historical
|
||||
binary, platform, or possible account dataset.
|
||||
File renamed without changes.
+20
-20
@@ -32,10 +32,10 @@ Dados
|
||||
Sincronização
|
||||
---
|
||||
[profile_habits_label]
|
||||
Habitos
|
||||
Hábitos
|
||||
---
|
||||
[profile_sessions_label]
|
||||
Sessoes
|
||||
Sessões
|
||||
---
|
||||
[profile_storage_label]
|
||||
Tamanho do banco de dados local
|
||||
@@ -44,16 +44,16 @@ Tamanho do banco de dados local
|
||||
Amigos
|
||||
---
|
||||
[profile_leaderboard_title]
|
||||
Classificacao
|
||||
Classificação
|
||||
---
|
||||
[profile_metric_streak]
|
||||
Sequencia atual
|
||||
Sequência atual
|
||||
---
|
||||
[profile_metric_avg_time]
|
||||
Tempo medio
|
||||
Tempo médio
|
||||
---
|
||||
[profile_metric_avg_hold]
|
||||
Retencao media
|
||||
Retenção média
|
||||
---
|
||||
[profile_none_label]
|
||||
Nenhum
|
||||
@@ -68,7 +68,7 @@ Recusar
|
||||
Remover amigo?
|
||||
---
|
||||
[profile_friend_remove_message]
|
||||
%s sera removido. Envie uma nova solicitacao para reconectar.
|
||||
%s será removido. Envie uma nova solicitação para reconectar.
|
||||
---
|
||||
[profile_updating_status]
|
||||
Atualizando
|
||||
@@ -89,7 +89,7 @@ Recebidos
|
||||
Enviados
|
||||
---
|
||||
[profile_no_leaderboard_data]
|
||||
Sem dados de classificacao
|
||||
Sem dados de classificação
|
||||
---
|
||||
[profile_my_habits_title]
|
||||
Meus hábitos
|
||||
@@ -119,7 +119,7 @@ Respiração Wim Hof
|
||||
Meditação
|
||||
---
|
||||
[exercise_sun_salutation]
|
||||
Saudacao ao sol
|
||||
Saudação ao sol
|
||||
---
|
||||
[sun_salutation_character_label]
|
||||
Personagem
|
||||
@@ -164,13 +164,13 @@ Cada inspiração ou expiração dura este número de segundos. Mais segundos si
|
||||
Postura da montanha
|
||||
---
|
||||
[sun_salutation_step_2]
|
||||
Saudacao para cima
|
||||
Saudação para cima
|
||||
---
|
||||
[sun_salutation_step_3]
|
||||
Flexao para a frente
|
||||
Flexão para a frente
|
||||
---
|
||||
[sun_salutation_step_4]
|
||||
Avanco baixo
|
||||
Avanço baixo
|
||||
---
|
||||
[sun_salutation_step_5]
|
||||
Prancha
|
||||
@@ -182,16 +182,16 @@ Joelhos, peito e queixo
|
||||
Postura da cobra
|
||||
---
|
||||
[sun_salutation_step_8]
|
||||
Cao olhando para baixo
|
||||
Cão olhando para baixo
|
||||
---
|
||||
[sun_salutation_step_9]
|
||||
Avanco baixo
|
||||
Avanço baixo
|
||||
---
|
||||
[sun_salutation_step_10]
|
||||
Flexao para a frente
|
||||
Flexão para a frente
|
||||
---
|
||||
[sun_salutation_step_11]
|
||||
Saudacao para cima
|
||||
Saudação para cima
|
||||
---
|
||||
[sun_salutation_step_12]
|
||||
Postura da montanha
|
||||
@@ -395,7 +395,7 @@ Aparência
|
||||
Sobre
|
||||
---
|
||||
[about_text]
|
||||
Um companheiro tranquilo para respiracao, habitos e sincronizacao.
|
||||
Um companheiro tranquilo para respiração, hábitos e sincronização.
|
||||
---
|
||||
[speed_label]
|
||||
Velocidade
|
||||
@@ -1200,7 +1200,7 @@ RODADA %d
|
||||
Rodada %d
|
||||
---
|
||||
[notification_starting_seconds]
|
||||
Inicio: %ds
|
||||
Início: %ds
|
||||
---
|
||||
[notification_breathing_count]
|
||||
Inspire e expire: %d
|
||||
@@ -2125,7 +2125,7 @@ Listas
|
||||
Caixa de entrada
|
||||
---
|
||||
[elist_default_item_breathe]
|
||||
Respire com atencao
|
||||
Respire com atenção
|
||||
---
|
||||
[elist_default_item_walk]
|
||||
Saia para uma caminhada curta
|
||||
@@ -2143,7 +2143,7 @@ Criar lista
|
||||
Adicionar
|
||||
---
|
||||
[elist_empty_title]
|
||||
Ainda nao ha listas
|
||||
Ainda não há listas
|
||||
---
|
||||
[elist_empty_detail]
|
||||
Crie uma lista e adicione tarefas e notas em um so lugar.
|
||||
|
||||
@@ -21,7 +21,7 @@ $(FLAGS_STAMP): FORCE
|
||||
@printf '%s\n' '$(subst ','"'"',$(NATIVE_CFLAGS))' > $@.new
|
||||
@if cmp -s $@.new $@; then rm -f $@.new; else mv $@.new $@; fi
|
||||
|
||||
$(OBJ_DIR)/%.o: /%.c $(FLAGS_STAMP)
|
||||
$(OBJ_DIR)/%.o: /%.c $(FLAGS_STAMP) mk/native-objects.mk
|
||||
@mkdir -p $(dir $@)
|
||||
@printf ' CC %s\n' '$<'
|
||||
@$(CC) $(NATIVE_CFLAGS) -MMD -MP -c '$<' -o '$@'
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Inbe consistency review
|
||||
|
||||
This review continues the 21 October Inbe session. It records the requested fixes and the remaining implementation differences; it does not propose new product controls.
|
||||
|
||||
## Changes in this continuation
|
||||
|
||||
- Android account-key backups use a system-picked document URI, stage bytes in private storage, and report success only after writing and closing the destination. Cancellation and failed writes remain distinct from success.
|
||||
|
||||
- Lists prepares shared edits from the complete account-scoped saved document in `src/cells/lists_command.zi`. The screen's bounded item buffer is a view, not a replacement document. Local sharing reads all saved items from SQLite; shared edits read the complete confirmed cache.
|
||||
- The Share dialog shows the original owner and every active or pending collaborator, including people outside the viewer's friends cache. Name suggestions select an invitee before the explicit Invite action. Sharing refreshes silently.
|
||||
- Owners can give others the same full list rights: editing, deletion, invitations and permission management. Editors can change content and invite; viewers can read. Permission changes and removal are enforced by Daochi. The original owner retains the list's storage identity.
|
||||
- Released sharing translations remain available to older app packages while the new interface uses the new role labels.
|
||||
- Undo restores a private item's existing row, retaining its ID, comment, completion and order. Shared undo retains the item ID, comment and completion in the next revision.
|
||||
- Games inside Arcade use the existing nested Back path. Host navigation hides during a game and the return bar remains available, including when Arcade is pinned.
|
||||
- Library uses the existing Kryon horizontal swipe decision for chapter turns. Vertical movement remains chapter scrolling. Reading hides host navigation and uses a paper background. The current catalog contains one book; no additional books have been selected or added.
|
||||
- The shop keeps Activity below Add reward and reserves room for the scrollbar. Narrow reward cards and activity rows keep names readable instead of squeezing them between controls. Its regression scene includes more activity than fits on a screen and a soda symbol.
|
||||
|
||||
## Remaining differences worth deciding separately
|
||||
|
||||
- Lists loads at most 32 list headers and 256 items for rendering. Complete saved documents are used for writes, so this limit must never remove hidden items. Displaying larger collections needs a separate product decision about paging or loading more rows.
|
||||
- Lists still uses the legacy cell message interface; Diary uses the shared app context. A migration should preserve the existing identity, on-disk upgrade paths and account isolation rather than introducing a second implementation.
|
||||
- Library's warm reading colours are local to its reading page. Other apps retain their selected palettes. A general reading appearance setting has not been requested.
|
||||
- Habits and Practices still have compiled host screens alongside their portable package views. Moving an entire screen into a package is separate from these fixes; reusable widgets belong in Kryon.
|
||||
|
||||
## Verification
|
||||
|
||||
Behavior tests cover complete-document edits beyond the screen capacity and restoring deleted item data. UI checks exercise deletion and undo through the actual Lists bundle and persistence bridge, Lists sharing, the shop's final activity row at phone and desktop sizes and 200% zoom, Library swipes and Back, and returning from Chess to Arcade. Release status and exact check results are recorded in `backup/session-completion/`; this file does not claim a build or publication has completed.
|
||||
@@ -12,11 +12,11 @@
|
||||
# edits files during the run, the run names them and records no pass.
|
||||
# Build outputs stay in build/release-ready/; a run takes about 90 minutes.
|
||||
#
|
||||
# Covered: ci.yml Secret Scan (publishers, versions, secrets), Package URLs,
|
||||
# the large-file guard, Test (make test: all three shards, then
|
||||
# make visual-test) and release.yml's make package-compat-test.
|
||||
# Not covered: Build Browser Add-ons (Chrome and Firefox web smoke), shard 0's
|
||||
# Daochi sync server test, and the release platform builds.
|
||||
# Covered: ci.yml Secret Scan, Package URLs, large-file guard, all three test
|
||||
# shards, visual tests, Chrome/Firefox add-ons and smoke, the real pinned Daochi
|
||||
# sync server, and release.yml's package compatibility test. Platform release
|
||||
# builds remain separate. The server comes from its canonical checkout through
|
||||
# another private overlay; no temporary source checkout is created.
|
||||
#
|
||||
# sh scripts/release-ready.sh every covered job; writes the stamp
|
||||
# sh scripts/release-ready.sh TARGET... only these make targets; no stamp
|
||||
@@ -27,7 +27,7 @@ root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||
cd "$root"
|
||||
|
||||
output=build/release-ready
|
||||
image_tag=$(cat .github/local-ci/Containerfile .github/apt/test-packages.txt | sha256sum | cut -c1-12)
|
||||
image_tag=$(cat .github/local-ci/Containerfile .github/apt/test-packages.txt .github/apt/web-packages.txt .github/emscripten-version | sha256sum | cut -c1-12)
|
||||
image=localhost/inbe-ci:$image_tag
|
||||
commit=$(git rev-parse HEAD)
|
||||
|
||||
@@ -36,10 +36,12 @@ commit=$(git rev-parse HEAD)
|
||||
# disk during the run while the container still read them from this checkout.
|
||||
state() {
|
||||
python3 -c 'import importlib.util, subprocess, sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
spec = importlib.util.spec_from_file_location("phone_check", "scripts/phone-check.py")
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
root = module.ROOT
|
||||
root = Path(os.environ.get("RELEASE_READY_STATE_ROOT", str(module.ROOT)))
|
||||
command = sys.argv[1]
|
||||
if command == "content":
|
||||
print(module.release_content(root, sys.argv[2]))
|
||||
@@ -99,6 +101,8 @@ else
|
||||
job "Test: make test" make -k test
|
||||
job "Test: make visual-test" make visual-test
|
||||
job "Test: make package-compat-test" make package-compat-test
|
||||
job "Browser add-ons: Chrome and Firefox" sh .github/local-ci/check-browser.sh
|
||||
job "Sync: pinned Daochi server" sh .github/local-ci/check-sync.sh
|
||||
fi
|
||||
if [ -n "$failed" ]; then
|
||||
printf "\nrelease-ready: FAILED:%s\n" "$failed"
|
||||
@@ -107,6 +111,16 @@ fi
|
||||
printf "\nrelease-ready: every covered CI job passed\n"'
|
||||
|
||||
mkdir -p "$output/build" "$output/home"
|
||||
sync_server=""
|
||||
sync_mount_source="$root/$output/sync-unused"
|
||||
mkdir -p "$sync_mount_source"
|
||||
if [ "$#" -eq 0 ]; then
|
||||
sync_server=${RELEASE_READY_DAOCHI_SOURCE:-"$root/../../kryonlabs/daochi"}
|
||||
sync_server=$(CDPATH= cd -- "$sync_server" && pwd)
|
||||
sync_commit=$(cat .github/sync-test-server-commit)
|
||||
git -C "$sync_server" cat-file -e "$sync_commit^{commit}"
|
||||
sync_mount_source=$sync_server
|
||||
fi
|
||||
# One run at a time: runs share build/release-ready/.
|
||||
exec 9>"$output/lock"
|
||||
if ! flock -n 9; then
|
||||
@@ -116,7 +130,7 @@ fi
|
||||
|
||||
if ! podman image exists "$image"; then
|
||||
echo "release-ready: building $image"
|
||||
podman build -t "$image" -f .github/local-ci/Containerfile .github/apt
|
||||
podman build -t "$image" -f .github/local-ci/Containerfile .github
|
||||
# Replace the images of older package lists; one still in use stays.
|
||||
podman images --format '{{.Repository}}:{{.Tag}}' localhost/inbe-ci \
|
||||
| grep -v ":$image_tag\$" | xargs -r podman rmi >/dev/null 2>&1 || true
|
||||
@@ -126,6 +140,10 @@ rm -f "$output/stamp.json"
|
||||
content=$(state content "$commit")
|
||||
tree_before=$(state tree)
|
||||
state untracked > "$output/untracked-before"
|
||||
if [ -n "$sync_server" ]; then
|
||||
sync_tree_before=$(RELEASE_READY_STATE_ROOT="$sync_server" state tree)
|
||||
RELEASE_READY_STATE_ROOT="$sync_server" state untracked > "$output/sync-untracked-before"
|
||||
fi
|
||||
started=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
echo "release-ready: testing $(git log -1 --format='%h %s' "$commit")"
|
||||
|
||||
@@ -150,6 +168,7 @@ podman run --rm --pull=never --userns=keep-id \
|
||||
-v "$root:/src:O" \
|
||||
-v "$root/$output/build:/src/build" \
|
||||
-v "$root/$output/home:/home/ubuntu" \
|
||||
-v "$sync_mount_source:/sync-server:O" \
|
||||
$android_mount \
|
||||
-e HOME=/home/ubuntu -e CI=true -e RELEASE_READY_COMMIT="$commit" \
|
||||
-w /src "$image" sh -c "$inside" release-ready "$@" || status=$?
|
||||
@@ -158,6 +177,15 @@ podman run --rm --pull=never --userns=keep-id \
|
||||
# overlay, so another session's edits during the run can reach the tests.
|
||||
leaked=$(state leaked "$tree_before" "$commit" "$output/untracked-before")
|
||||
rm -f "$output/untracked-before"
|
||||
if [ -n "$sync_server" ]; then
|
||||
sync_leaked=$(RELEASE_READY_STATE_ROOT="$sync_server" state leaked "$sync_tree_before" "$sync_commit" "$output/sync-untracked-before")
|
||||
rm -f "$output/sync-untracked-before"
|
||||
if [ -n "$sync_leaked" ]; then
|
||||
echo "release-ready: Daochi source changed during the run; refusing a clean result:" >&2
|
||||
printf '%s\n' "$sync_leaked" | head -n 10 | sed 's/^/ /' >&2
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
if [ -n "$leaked" ]; then
|
||||
count=$(printf '%s\n' "$leaked" | grep -c .)
|
||||
echo "release-ready: $count files changed in the checkout during the run and may have reached" >&2
|
||||
|
||||
@@ -622,6 +622,8 @@ function writeFirefoxPrefs() {
|
||||
'user_pref("dom.webgpu.enabled", false);',
|
||||
'user_pref("gfx.webrender.software", true);',
|
||||
'user_pref("media.autoplay.default", 0);',
|
||||
// Silence the test profile's output while keeping media playback active.
|
||||
'user_pref("media.volume_scale", "0.0");',
|
||||
'user_pref("privacy.fingerprintingProtection", false);',
|
||||
'user_pref("privacy.resistFingerprinting", false);',
|
||||
'user_pref("webgl.disabled", false);',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""The shipped catalog, plan, translations and package resources agree."""
|
||||
"""The shipped catalog, reference, translations and package resources agree."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
import re
|
||||
@@ -56,8 +56,8 @@ class AchievementCatalogs(unittest.TestCase):
|
||||
self.assertTrue(value.strip())
|
||||
self.assertEqual(root_text[key], value)
|
||||
self.assertEqual(len(all_ids), 160)
|
||||
plan = (ROOT / "docs/achievements-plan.md").read_text()
|
||||
listed = set(re.findall(r"\*\* — `([a-z0-9_.-]+)`:", plan))
|
||||
reference = (ROOT / "docs/achievements.md").read_text()
|
||||
listed = set(re.findall(r"\*\* — `([a-z0-9_.-]+)`:", reference))
|
||||
self.assertEqual(all_ids, listed)
|
||||
for locale in sorted((ROOT / "locales").glob("*.txt")):
|
||||
if locale.stem != "index":
|
||||
|
||||
Reference in new issue
Block a user