No description
  • C++ 62.3%
  • QML 27.8%
  • Python 7%
  • Shell 2.3%
  • QMake 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
hermes 6826abda97
All checks were successful
Build aarch64 rpm / build (push) Successful in 4m53s
fix: seed PRNG so code/math challenges change on every ring (#1)
## Problem

The dismiss challenge code (4-digit code) and math problem were **not actually random** — they produced the same value every time.

## Root cause

`qrand()` was called in `beginRinging()` to generate the challenge, but `qsrand()` was **never called** to seed the PRNG. On this Qt (older than 5.7), `qrand()` defaults to a deterministic seed, so every alarm ring presented the same four-digit code and the same math problem — defeating the entire purpose of the dismiss challenge.

## Fix

Seed `qrand()` with `QDateTime::currentMSecsSinceEpoch()` before each challenge generation in `beginRinging()`. Each ringer is a fresh process launched by timed, so per-ring seeding is sufficient and avoids any global init-order dependency (AGENTS.md landmine #7).

Added seeding in both the `code` and `math` challenge branches.

Version bumped to 0.0.15 per the build-iteration policy.

## Files changed

- `app/src/alarmcontroller.cpp` — added `qsrand()` calls before `qrand()` usage
- `app/app.pro` — version bump 0.0.14 → 0.0.15
- `rpm/harbour-heratys52.spec` — version bump 0.0.14 → 0.0.15

Co-authored-by: OpenCode Agent <[EMAIL]>
Reviewed-on: #1
2026-09-17 20:34:54 +00:00
.forgejo/workflows CI: Forgejo Actions build workflow (port of the finnscale job) 2026-08-24 22:10:06 +01:00
app fix: seed PRNG so code/math challenges change on every ring (#1) 2026-09-17 20:34:54 +00:00
rpm fix: seed PRNG so code/math challenges change on every ring (#1) 2026-09-17 20:34:54 +00:00
scripts Alarmist 0.0.14: sandboxed replacement alarm clock for Sailfish OS 5.2 2026-08-24 18:51:51 +01:00
.gitignore Alarmist 0.0.14: sandboxed replacement alarm clock for Sailfish OS 5.2 2026-08-24 18:51:51 +01:00
AGENTS.md AGENTS: release-branch + RC-tag flow; main holds only device-validated code 2026-08-25 08:14:56 +01:00
BUILD.md Alarmist 0.0.14: sandboxed replacement alarm clock for Sailfish OS 5.2 2026-08-24 18:51:51 +01:00
harbour-heratys52.pro Alarmist 0.0.14: sandboxed replacement alarm clock for Sailfish OS 5.2 2026-08-24 18:51:51 +01:00
LICENSE Alarmist 0.0.14: sandboxed replacement alarm clock for Sailfish OS 5.2 2026-08-24 18:51:51 +01:00
README.md Alarmist 0.0.14: sandboxed replacement alarm clock for Sailfish OS 5.2 2026-08-24 18:51:51 +01:00
renovate.json chore: Configure Renovate (#3) 2026-09-17 20:32:01 +00:00

Alarmist (harbour-heratys52)

Alarmist — because dismissing an alarm should take intent, not an accidental swipe. A replacement alarm clock for Sailfish OS 5.2+.

(The rpm/app id keeps the internal codename heratys — Finnish for "alarm, wake-up" — for continuity with its sibling project.)

The native alarm is easy to discard by accident. heratys makes both snooze and dismiss highly configurable, per alarm:

  • snooze interval, maximum snooze count, escalating snooze ladders (e.g. 5, 5, 10, 15 minutes)
  • dismiss challenges: none, hold-to-dismiss, random 4-digit code shown on screen and dialled in, or a math problem
  • escalating volume ramp, vibration, auto-snooze when ignored

How it works (and how it does not work)

heratys is a plain sandboxed Silica application — no privileged daemon, no root, no custom sandbox permissions. Scheduling is delegated to the platform time daemon (timed, com.nokia.time), the same suspend-safe, reboot-persistent engine the native clock uses, through its public D-Bus API. Every alarm is registered as a buttonless timed event owned by heratys, so the ringing UI is ours and can enforce whatever dismiss challenge the user configured.

Status: early development (M0 scaffold). See AGENTS.md for the architecture and the roadmap.

Icon

app/harbour-heratys52.png is generated — never edit it by hand. Regenerate with:

python3 scripts/generate-icon.py --variant hourglass --output app/harbour-heratys52.png

Building

See BUILD.md (Fedora + rootless podman, community Platform SDK container, aarch64).

License

MIT — see LICENSE.