Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
7be4a8a
feat(sleep): implement medically-grounded HMM classifier with cycle c…
Oct 25, 2026
2a03486
feat(sleep): implement medically-grounded HMM classifier with artifac…
Oct 25, 2026
06dc76c
feat(sleep): add medical disclaimer to UI
Oct 25, 2026
7a4e503
fix(review): resolve CodeRabbit critical findings for compilation and…
Oct 25, 2026
4ae36ad
fix(l10n): localize medical disclaimer
Oct 25, 2026
d990495
fix(sleep): use 10th percentile for HR baseline and refined deep slee…
Oct 25, 2026
b8a6277
fix the sleep disclaimer build error and its contrast
abdulsaheel Oct 28, 2026
6c21e6c
drop the unused sleep baseline columns
abdulsaheel Oct 28, 2026
d6e2f8a
hmm: score contact loss and implausible readings as neutral
abdulsaheel Oct 28, 2026
848c9eb
fix(l10n): resolve app_ru.arb merge leftovers from rebase
mistral-vibe Nov 1, 2026
30cb221
feat(sleep): gate experimental HMM staging behind a default-off setting
mistral-vibe Nov 1, 2026
a374246
fix(review): address CodeRabbit findings on the HMM gate (#628)
mistral-vibe Nov 1, 2026
37900d8
refactor(smart-wake): drop dead hr_min_night fallback (Option A)
mistral-vibe Nov 2, 2026
f9620c5
Merge remote-tracking branch 'origin/main' into pr-628
abdulsaheel Nov 2, 2026
93532fe
drop the smart wake changes from this pr, they belong to #630 (and re…
abdulsaheel Nov 2, 2026
e4f7ded
hmm: fix the build, decode 30 s epochs on epoch-aligned beats, keep u…
abdulsaheel Nov 2, 2026
86387e7
sleep: drop the always-on disclaimer banner (the setting row says it)…
abdulsaheel Nov 2, 2026
57d359c
test(gallery): scroll the Developer section into view before assertin…
mistral-vibe Nov 14, 2026
bb17194
ci: re-trigger test workflow after missed synchronize event (no code …
mistral-vibe Nov 14, 2026
c26979b
Merge remote-tracking branch 'origin/main' into feat/sleep-stage-plau…
mistral-vibe Nov 14, 2026
9b7d6e8
Merge branch 'main' of https://github.com/OpenStrap/edge into feat/sl…
mistral-vibe Nov 14, 2026
991cd85
fix(backup): give sleep_hmm_stages an audit policy and type
mistral-vibe Nov 14, 2026
71d66da
Merge branch 'main' of https://github.com/OpenStrap/edge into feat/sl…
mistral-vibe Nov 14, 2026
94a7623
Publish portable and per-ABI Android release APKs
mikenrafter Nov 15, 2026
e8eae19
Create the release once before the parallel uploads
mikenrafter Nov 15, 2026
56b24d1
Keep the release a draft until every upload succeeds; check the packa…
mikenrafter Nov 15, 2026
1235969
release: stop before touching a published release; ignore unknown tar…
abdulsaheel Nov 15, 2026
ee8d9f0
l10n(es): translate the supplement catalogue, so 300 strings stop fal…
Nov 15, 2026
4db0a9a
l10n(fr): translate the supplement catalogue, so 300 strings stop fal…
Nov 15, 2026
8e9650d
l10n(zh): translate the supplement catalogue, so 300 strings stop fal…
Nov 15, 2026
b03e71b
l10n(hi): translate the supplement catalogue, so 300 strings stop fal…
Nov 15, 2026
faabe1f
l10n: translate three strings es, fr and th still held in English, an…
Nov 15, 2026
41cbce2
l10n(es): singular "1 noche"/"1 día", pool "largos", and a missed dos…
Nov 15, 2026
ce8d0a1
l10n(fr): singular "1 nuit"/"1 jour", and pool "longueurs" in the swi…
Nov 15, 2026
eaf9414
l10n: translate the current HRV, HRV-stability and breathing-rate met…
Nov 15, 2026
71fb04d
test(l10n): check every catalogue on disk for English copies, not a f…
Nov 15, 2026
aef9d4d
l10n: translate the ChatGPT sign-in flow and an alarm status, which s…
Nov 15, 2026
52c2a59
Revert the Spanish catalogue commit that landed on this branch by mis…
Nov 15, 2026
eda15f4
Revert the method-text commit that landed on this branch by mistake
Nov 15, 2026
ce544bf
l10n: translate the current HRV, HRV-stability and breathing-rate met…
Nov 15, 2026
3271d48
test: the literal scan also reads calls whose first argument is AppLo…
Nov 15, 2026
b2de4b6
l10n(es): the dose reminder says a dose is due, not to tap one
Nov 15, 2026
4ac24ed
context model: feed the overnight detectors residuals (actual - expec…
mistral-vibe Nov 15, 2026
94c85e3
fix analyzer findings from CI: spread-of-nullable tag merge, generic …
mistral-vibe Nov 15, 2026
9a09c55
fix two more analyzer errors: null-aware index ?[] is not valid here,…
mistral-vibe Nov 15, 2026
c73f6a8
freeze golden: strip only the context model's additive keys from the …
mistral-vibe Nov 15, 2026
ac7a6b7
l10n: add journalTagVaccinated to all seven non-English locales (each…
mistral-vibe Nov 15, 2026
8afab21
fix fixture assertions against the detectors' real scales: illness re…
mistral-vibe Nov 15, 2026
84b9814
fix last two fixture bugs: travel test index out of range (n=42), and…
mistral-vibe Nov 15, 2026
74c859a
ci: pin release action to v2.6.2 commit
mikenrafter Nov 15, 2026
96a4ce2
storage: input revisions (rung 61) and typed substrate transfer
mikenrafter Oct 24, 2026
42d7f97
derive: reuse staged sleep per day while its inputs are unchanged; wa…
mikenrafter Oct 24, 2026
a1210c2
derive: keep the last loaded substrate per day between passes while i…
mikenrafter Oct 24, 2026
0f3e610
derive: reuse finished-session HR ceilings while their inputs are unc…
mikenrafter Oct 24, 2026
00b2af2
derive: build wearable inputs and prepare session windows in a worker
mikenrafter Oct 24, 2026
19caa0b
Add inert live guide engine and widget rendering hooks
mikenrafter Nov 15, 2026
316a591
Keep guide foundations inert and mark the existing Naps control
mikenrafter Nov 15, 2026
32bedee
Keep generic overlay input and semantics regressions with the engine
mikenrafter Nov 15, 2026
022d5dc
Keep guide proof references aligned with consolidated regression files
mikenrafter Nov 15, 2026
9ea00d7
sleep plan, weekend shift: print durations in the display language
Nov 15, 2026
e326fd4
fr: say '1 longueur' for a single pool length
abdulsaheel Nov 15, 2026
c0b161d
zh: check the supplement counts at a second value
abdulsaheel Nov 15, 2026
53e9a0a
test: weigh on the local day, so the scale test passes west of UTC-6
Nov 15, 2026
546afad
Merge main into feat/sleep-stage-plausibility
Nov 15, 2026
6f62ad6
Merge pull request #726 from kurexw/l10n/chatgpt-signin
abdulsaheel Nov 15, 2026
ad9968f
Merge pull request #725 from kurexw/l10n/metric-method-copy
abdulsaheel Nov 15, 2026
86011d9
Merge pull request #724 from kurexw/l10n/english-copies
abdulsaheel Nov 15, 2026
ae514de
Merge pull request #723 from kurexw/l10n/hi-supplement
abdulsaheel Nov 15, 2026
e1bd9d3
Merge pull request #722 from kurexw/l10n/zh-supplement
abdulsaheel Nov 15, 2026
dc6fe8f
Merge pull request #721 from kurexw/l10n/fr-supplement
abdulsaheel Nov 15, 2026
b9373e5
merge main
abdulsaheel Nov 15, 2026
30fb324
sleep HMM: address the #628 review
Nov 15, 2026
a73618d
Merge pull request #720 from kurexw/l10n/es-supplement
abdulsaheel Nov 15, 2026
0cd3f8b
Merge pull request #731 from kurexw/fix/sleep-plan-duration-locale
abdulsaheel Nov 15, 2026
5bd7ea0
Merge pull request #732 from kurexw/fix/scale-weight-tz
abdulsaheel Nov 15, 2026
a3ef2a5
Merge remote-tracking branch 'refs/remotes/upstream/main' into feat/c…
mistral-vibe Nov 15, 2026
0be69a7
chore: release 0.12.0 (79)
abdulsaheel Nov 15, 2026
d2c97ae
Tier engine, ask-first check-in, illness state & tier cards (PR 2 of …
mistral-vibe Nov 15, 2026
4cadaeb
fix analyzer findings from CI on PR 2: epoch seconds, double? promoti…
mistral-vibe Nov 15, 2026
d8acd2c
Merge pull request #733 from OpenStrap/chore/release-0.12.0-79
abdulsaheel Nov 15, 2026
e95c849
fix CI on PR 2: en copy says "your usual" (jargon guard), gallery exe…
mistral-vibe Nov 15, 2026
f6270e9
docs: the calibration card says "learning your usual" (the app's en w…
mistral-vibe Nov 15, 2026
855ee35
docs: quote the check-in copy as shipped ("your usual")
mistral-vibe Nov 15, 2026
570b7f0
Merge remote-tracking branch 'upstream/main' into prepare/pr716-a
mikenrafter Nov 15, 2026
ab09d6b
Declare Russian guide accordion placeholder type
mikenrafter Nov 16, 2026
d7b5e9c
chore: refresh star history chart
github-actions[bot] Nov 16, 2026
b9fbcfc
Merge remote-tracking branch 'refs/remotes/upstream/main' into feat/i…
mistral-vibe Nov 16, 2026
c19b58b
Inactivity watch & recovery trend (PR 3 of the deviation pipeline)
mistral-vibe Nov 16, 2026
4e31a41
fix CI on PR 3: hoist trendCards out of the children list literal; dr…
mistral-vibe Nov 16, 2026
55c2613
freeze golden: strip the PR-3 additive keys (inactivity, recovery_tre…
mistral-vibe Nov 16, 2026
02fefa4
Give guide card actions 48 dp hit targets
mikenrafter Nov 16, 2026
567d2a1
fix CI on PR 3 (suites): defensive goal load, Pressable token, determ…
mistral-vibe Nov 16, 2026
f581aa3
merge main
abdulsaheel Nov 16, 2026
421ebf9
Merge pull request #719 from mikenrafter/pr/per-abi-releases
abdulsaheel Nov 16, 2026
ba460b4
hmm stager: reload the pref in headless derives, no rr difference acr…
abdulsaheel Nov 16, 2026
d84caf7
hmm stager: repair any rem->deep boundary after the merge, re-derive …
abdulsaheel Nov 16, 2026
6a99c8b
hmm stager: rederiveDays says whether it worked, the switch logs a fa…
abdulsaheel Nov 16, 2026
259896d
hmm stager: runDays records its failed days, rederiveDays reports them
abdulsaheel Nov 16, 2026
caf26fc
hmm stager: read the failed-day count before the next await
abdulsaheel Nov 16, 2026
061cfe6
Merge pull request #736 from OpenStrap/land/628-hmm-stager
abdulsaheel Nov 16, 2026
4d6e827
Merge remote-tracking branch 'refs/remotes/upstream/main' into feat/w…
mistral-vibe Nov 16, 2026
4ee9558
Workout-derived signals as context + performance-decrement path (PR 4…
mistral-vibe Nov 16, 2026
7b05060
analyzer: drop unused volSeries and the unused workout_signals import…
mistral-vibe Nov 16, 2026
72546f9
merge main
abdulsaheel Nov 16, 2026
cd8b3dd
guides: compare seen-only components, guard a node-less pending step …
abdulsaheel Nov 16, 2026
f198dd2
merge main
abdulsaheel Nov 16, 2026
2ca6513
test: assert the mask direction correctly (residual moves toward raw,…
mistral-vibe Nov 16, 2026
bd492a3
derive: rebuild the cross-day rollup after the strain rescale when th…
abdulsaheel Nov 16, 2026
5c4dfab
guides: a variant with no steps covers no band, de: say how many time…
abdulsaheel Nov 16, 2026
82ac847
derive: count the cross-day rebuild only when it reports success, rec…
abdulsaheel Nov 16, 2026
1fedf5a
Merge pull request #734 from mikenrafter/pr/guides-engine
abdulsaheel Nov 16, 2026
fecf908
Merge pull request #656 from mikenrafter/pr/edge-recalc-exact
abdulsaheel Nov 16, 2026
5b465a9
Merge upstream/main (fecf9081) into feat/bp-trend
mistral-vibe Nov 16, 2026
c2bdb60
Blood-pressure trend card over imported cuff readings (PR 5 of the de…
mistral-vibe Nov 16, 2026
f1514d1
analyzer: nullable pattern promotion (case final s?), no underscore l…
mistral-vibe Nov 16, 2026
20782da
l10n: carry @bpCard placeholder metadata in ru+th arb; keep the regul…
mistral-vibe Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/scripts/assert_release_unpublished.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
# Stops a release run from touching a release that is already public.
#
# The upload step deletes same-named assets before it uploads, so a re-run
# against a published release that then fails part-way leaves a PUBLIC release
# with files missing, and /releases/latest/download/<name> returns 404 for
# everyone. A run may only ever write to a release that is still a draft.
#
# `releases/tags/<tag>` returns published releases only: 200 means the release
# is public (refuse), 404 means there is no release or it is still a draft
# (fine). Any other answer, including a network error, fails closed.
#
# usage: GH_TOKEN=... GITHUB_REPOSITORY=owner/name assert_release_unpublished.sh <tag>
set -uo pipefail

tag="${1:?usage: assert_release_unpublished.sh <tag>}"
repo="${GITHUB_REPOSITORY:?GITHUB_REPOSITORY is not set}"

out=$(gh api "repos/${repo}/releases/tags/${tag}" 2>&1)
rc=$?

if [ "$rc" -eq 0 ]; then
echo "::error::The release for ${tag} is already published. This run would delete and re-upload its assets in place, and a failure part-way would leave a public release with files missing. Cut a new tag instead."
exit 1
fi

case "$out" in
*"HTTP 404"* | *"Not Found"*)
echo "No published release for ${tag}: safe to write to its draft."
exit 0
;;
*)
echo "::error::Could not tell whether the release for ${tag} is published, so stopping."
echo "$out"
exit 1
;;
esac
44 changes: 44 additions & 0 deletions .github/scripts/test_assert_release_unpublished.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
# Tests assert_release_unpublished.sh against a fake `gh`, so no network and no
# token is needed. Each case fakes one answer from the releases/tags endpoint.
# Exit codes alone cannot tell "refused because it is public" from "failed
# closed because the answer was unreadable" (both exit 1), so each case also
# pins the message the script prints.
set -uo pipefail

here="$(cd "$(dirname "$0")" && pwd)"
script="$here/assert_release_unpublished.sh"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
export GITHUB_REPOSITORY="owner/repo"

fail=0
check() { # name, expected exit code, expected output fragment, fake gh body
local name="$1" want="$2" frag="$3" body="$4"
printf '#!/usr/bin/env bash\n%s\n' "$body" > "$tmp/gh"
chmod +x "$tmp/gh"
PATH="$tmp:$PATH" bash "$script" v9.9.9 > "$tmp/out" 2>&1
local got=$?
if [ "$got" -ne "$want" ] || ! grep -q -- "$frag" "$tmp/out"; then
echo "FAIL: $name (exit $got, wanted $want, wanted output containing: $frag)"
cat "$tmp/out"
fail=1
else
echo "ok: $name"
fi
}

check "a published release is refused as published" 1 "already published" \
'echo "{\"draft\": false}"; exit 0'
check "no release at all is allowed" 0 "safe to write" \
'echo "gh: Not Found (HTTP 404)" >&2; exit 1'
check "a draft is allowed (the tag endpoint 404s for drafts)" 0 "safe to write" \
'echo "gh: Not Found (HTTP 404)" >&2; exit 1'
check "a network error fails closed" 1 "Could not tell" \
'echo "dial tcp: i/o timeout" >&2; exit 1'
check "a 500 fails closed" 1 "Could not tell" \
'echo "gh: Server Error (HTTP 500)" >&2; exit 1'
check "a rate limit fails closed" 1 "Could not tell" \
'echo "gh: API rate limit exceeded (HTTP 403)" >&2; exit 1'

exit "$fail"
79 changes: 79 additions & 0 deletions .github/scripts/test_verify_apk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
"""Release gate checks. Tiny ZIPs stand in for APKs; a fake aapt2 prints the badging."""

from pathlib import Path
import subprocess
import sys
import tempfile
import unittest
import zipfile


SCRIPT = Path(__file__).with_name("verify_apk.py")


class VerifyApkTest(unittest.TestCase):
def setUp(self):
temp = tempfile.TemporaryDirectory()
self.addCleanup(temp.cleanup)
self.root = Path(temp.name)
self.apk = self.root / "app.apk"
self.pubspec = self.root / "pubspec.yaml"
self.pubspec.write_text("name: example\nversion: 1.2.3+79\n")
self.aapt2 = self.root / "aapt2"
self.aapt2.write_text(f"#!{sys.executable}\nimport pathlib\nprint(pathlib.Path(__file__).with_name('badging').read_text())\n")
self.aapt2.chmod(0o755)
self.badging()

def badging(self, code="79", package="wtf.openstrap.openstrap_edge"):
(self.root / "badging").write_text(
f"package: name='{package}' versionCode='{code}' versionName='1.2.3'\n")

def package(self, abis=("arm64-v8a",), omit=()):
with zipfile.ZipFile(self.apk, "w") as archive:
for abi in abis:
for library in ("libapp.so", "libflutter.so"):
if f"lib/{abi}/{library}" not in omit:
archive.writestr(f"lib/{abi}/{library}", b"x")

def verify(self, variant="arm64-v8a", error=None):
result = subprocess.run(
[sys.executable, str(SCRIPT), str(self.apk), "--pubspec", str(self.pubspec),
"--aapt2", str(self.aapt2), "--variant", variant],
capture_output=True, text=True)
if error:
self.assertNotEqual(result.returncode, 0, result.stdout)
self.assertIn(error, result.stderr)
else:
self.assertEqual(result.returncode, 0, result.stderr)

def test_accepts_portable_and_single_abi(self):
self.package(("arm64-v8a", "armeabi-v7a", "x86_64"))
self.verify("portable")
self.package()
self.verify("arm64-v8a")

def test_rejects_split_version_code_and_other_package(self):
# --split-per-abi turns build 79 into 2079, which OTA would never see as older.
self.package()
self.badging(code="2079")
self.verify(error="versionCode")
self.badging(package="other.app")
self.verify(error="name")

def test_rejects_wrong_abi_set_or_missing_flutter_library(self):
self.package(("arm64-v8a", "x86_64"))
self.verify(error="ABIs")
self.package(omit=("lib/arm64-v8a/libflutter.so",))
self.verify(error="missing lib/arm64-v8a/libflutter.so")

def test_rejects_oversized_portable(self):
self.package(("arm64-v8a", "armeabi-v7a", "x86_64"))
contents = self.apk.read_bytes()
with self.apk.open("wb") as apk:
apk.seek(150_000_001 - len(contents)) # a sparse hole keeps the ZIP readable
apk.write(contents)
self.verify("portable", error="maximum is 150000000")


if __name__ == "__main__":
unittest.main()
96 changes: 96 additions & 0 deletions .github/scripts/verify_apk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/usr/bin/env python3
"""Reject release APKs whose version, native targets, or size break delivery.

The release workflow supplies aapt2 from the Android SDK. All expectations come
from pubspec.yaml and the selected artifact, never the APK's own declarations.
"""

import argparse
import json
import os
from pathlib import Path
import re
import shutil
import subprocess
import sys
import zipfile


VARIANT_ABIS = {
"portable": {"arm64-v8a", "armeabi-v7a", "x86_64"},
"arm64-v8a": {"arm64-v8a"},
"armeabi-v7a": {"armeabi-v7a"},
"x86_64": {"x86_64"},
}
PORTABLE_MAX_BYTES = 150_000_000
APPLICATION_ID = "wtf.openstrap.openstrap_edge"


def resolve_aapt2(aapt2):
"""Run only an executable file named aapt2, by absolute path, never via a shell."""
path = shutil.which(aapt2)
if path is None:
raise ValueError(f"aapt2 not found: {aapt2!r}")
path = Path(path).resolve()
if path.name != "aapt2" or not path.is_file() or not os.access(path, os.X_OK):
raise ValueError(f"not an aapt2 executable: {str(path)!r}")
return str(path)


def verify_apk(apk, pubspec, variant, aapt2, application_id=APPLICATION_ID):
version = re.search(r"^version:\s*([^\s+]+)\+([0-9]+)\s*(?:#.*)?$",
pubspec.read_text(), re.MULTILINE)
if not version:
raise ValueError("pubspec must contain version: NAME+BUILD")
expected_name, expected_code = version.groups()
badging = subprocess.run(
[resolve_aapt2(aapt2), "dump", "badging", str(apk.resolve())],
check=True, capture_output=True, text=True,
).stdout
package = re.search(r"^package: (.*)$", badging, re.MULTILINE)
if not package:
raise ValueError("aapt2 did not report package metadata")
metadata = dict(re.findall(r"(\w+)='([^']*)'", package.group(1)))
for key, expected in (("name", application_id), ("versionName", expected_name),
("versionCode", expected_code)):
if metadata.get(key) != expected:
raise ValueError(f"{key}: expected {expected!r}, got {metadata.get(key)!r}")

with zipfile.ZipFile(apk) as archive:
entries = {entry.filename for entry in archive.infolist() if not entry.is_dir()}
abis = {name.split("/")[1] for name in entries if name.startswith("lib/")}
expected_abis = VARIANT_ABIS[variant]
if abis != expected_abis:
raise ValueError(f"ABIs: expected {sorted(expected_abis)}, got {sorted(abis)}")
for abi in sorted(abis):
for library in ("libapp.so", "libflutter.so"):
if f"lib/{abi}/{library}" not in entries:
raise ValueError(f"missing lib/{abi}/{library}")

size = apk.stat().st_size
if variant == "portable" and size > PORTABLE_MAX_BYTES:
raise ValueError(f"portable APK is {size} bytes; maximum is {PORTABLE_MAX_BYTES}")
return {
"apk": str(apk), "variant": variant, "bytes": size,
"versionCode": expected_code, "versionName": expected_name, "abis": sorted(abis),
}


def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("apk", type=Path)
parser.add_argument("--pubspec", type=Path, default=Path("pubspec.yaml"))
parser.add_argument("--variant", choices=VARIANT_ABIS, required=True)
parser.add_argument("--aapt2", default="aapt2")
args = parser.parse_args()
try:
result = verify_apk(args.apk, args.pubspec, args.variant, args.aapt2)
except (ValueError, OSError, zipfile.BadZipFile, subprocess.CalledProcessError) as error:
print(f"APK verification failed: {error}", file=sys.stderr)
return 1
print(json.dumps(result, sort_keys=True))
return 0


if __name__ == "__main__":
sys.exit(main())
Loading
Loading