aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test(build): add make watchdog, the glance memory budget and the glance ↵cirakg8 days26-31/+425
| | | | | | | | | | | | | | | screenshot - make watchdog (in make ci): a stress build encodes, packs, turns into runs and draws the largest code of every 2D symbology at two steps per event on the Forerunner 255S and 70; it fails on a watchdog trip, and the last code left on the screen must decode (bitmap path on the 70). - make memtest checks the glance (DIAG glance, budget 70 % of 64 KB). - screenshots.sh launches the app again after the flow and compares the glance with the favourite's code (glance_code.png on 7 watches); the About goldens show 0.8.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(glance): show the favourite code in the glance (opt-in)cirakg8 days25-54/+581
| | | | | | | | | | | | | | | With "Show the favourite code in the glance" on, the glance shows the code of the first favourite TOTP or Steam entry without the PIN, with a countdown bar. The glance can't open the vault, so the About scan seals that entry under "g" (device key, aad OTPW-GL-1) after every change, and removes it when the option is off or no entry qualifies; the glance also reads the option itself. HKDF moves to its own module so the glance loads only the crypto it needs (37 % of its 64 KB). Manage entry gains "Mark as favourite (glance)" and "Remove favourite", queued for locked entries like the other changes. Lines are inset on round screens so the Instinct 3's curved glance corner doesn't cut them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(codes): bound every 2D encoding step under the watchdog; draw large ↵cirakg8 days13-777/+2262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | codes from runs M6's step sizes were estimates, only exercised with small codes. With the largest inputs the app accepts, every 2D encoder tripped the watchdog on the Forerunner 255S (and the biggest steps were far over the 768 KB watches' limit), so a large code added from the phone would have stopped the app during settings processing at every start. - QR: resumable segmentation, Reed-Solomon, interleaving, function patterns and final mask; mask scoring on rows and columns packed 16 modules per word (same penalties, checked against the per-module rules). - Reed-Solomon: resumable field tables and generator, encoder shifting with native slice. - Data Matrix, Aztec, PDF417: resumable encodation, stuffing, compaction, placement and build; Data Matrix's grid as a byte array (90 KB -> 35 KB); PDF417 refuses text that can't fit the screen before compacting. - Cache format 2 with 16-bit sizes (wide PDF417 was cached wrong); packing in steps; codes drawn as runs, and from a bitmap painted in steps when a frame can't draw all runs. - The job runner does two steps per tick on 768 KB watches; gen_products --check verifies each product's watchdogCount fits that. - CodeView renews full brightness (AMOLED) or the backlight (MIP) for up to a minute from its single ticker; a tap restarts the minute. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(import): keep parsed items packed and the pasted text oncecirakg8 days10-56/+248
| | | | | | | | | | | | | | A parsed import item with its Entry took about 760 bytes as objects on the Forerunner 255S; packed into one Codec ByteArray it takes about 110, and the importer unpacks one item per store step (wiping the packed secret). Aegis group names are resolved when unpacking, so no step repacks all items. The JSON is parsed from the untrimmed text's bytes and the string is dropped; an incomplete part is saved from those bytes. The form hash is computed before the importer copies the text. The peak of a 100-entry import on the 255S falls from 56 % to 45 %. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: record M7 (settings forms) results; bump to 0.7.0v0.7.0cirakg8 days8-15/+139
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* build(lint): validate resource XML against the SDK schema and cross-check ↵cirakg8 days5-0/+250
| | | | | | | | | | the settings form tools/check_resources.py checks every resource file against the SDK's resources.xsd and that settings, properties and strings agree. Adds the pure-Python, MIT-licensed xmlschema to the dev image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(settings): cover every form, symbology and Manage action; send the ↵cirakg8 days57-6/+1061
| | | | | | | | | | | | forms end to end in the UI flow 34 Monkey C tests (154 per device): validation messages, idempotency, the queue, the About scan, "Encrypt names" and the properties contract. The UI-test build fills in Add OTP, Add code and Manage like the phone; the flow checks the new TOTP (309 848 at the frozen time), decodes the Code 128 card and confirms the queued change to the locked entry with the PIN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(settings): add the Add OTP, Add code and Manage entry forms with a PIN ↵cirakg8 days18-120/+2369
| | | | | | | | | | | | | | | | | | | | queue for locked entries The full phone settings form (README 10.2) and its processing (10.3) as one resumable job: Import, Add OTP, Add code, Manage, then the About fields. Forms are applied only when their switch is on, cleared afterwards (secret first; only the secret after a problem), deduplicated by keyed hash, and report into their Result field and the results screen. - Add OTP validates per README 10.4; Add code runs the real encoder (CodeCheck, a job for 2D codes) and caches 2D codes on the way in. - Manage entry: edit, move, require/drop PIN, replace, counter, delete. Changes to locked entries are sealed under "q" and applied only after the PIN is entered under "Phone changes" in the menu. - About: catalog (800 characters max), version, storage use. - "Encrypt names" now applies to new and existing entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: record M6 (all 12 symbologies) results; bump to 0.6.0v0.6.0cirakg9 days4-7/+38
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(codes): compare Aztec with aztec_code_generator, decode it and its ↵cirakg9 days19-5/+161
| | | | | | screenshot Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(codes): add an Aztec encoder (compact and full range) as a resumable jobcirakg9 days2-0/+525
| | | | | | | | Upper/Lower/Digit modes with Binary Shift, bit stuffing, Reed-Solomon over GF(2^6..2^12) in steps, geometry ported from aztec_code_generator; symbols match it for single-class text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: record M6c (Data Matrix, PDF417) resultscirakg9 days4-1/+45
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(codes): compare Data Matrix and PDF417 with references and decode them, ↵cirakg9 days31-17/+544
| | | | | | also from screenshots Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ui): show Data Matrix and PDF417 codes; fit 2D codes inside round screenscirakg9 days2-31/+66
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(codes): add Data Matrix (ECC 200, 10x10-144x144) and PDF417 encoders as ↵cirakg9 days10-20/+951
| | | | | | | | | | | | jobs Data Matrix: ASCII with digit pairs, Base256 or Upper Shift for UTF-8, interleaved Reed-Solomon in steps, utah placement; matches ppf.datamatrix. PDF417: pdf417gen's compaction, automatic or fixed EC level, columns fitted to the screen, pattern tables as generated JSON resources; matches pdf417gen. 2D matrices gain a row height and 8-at-a-time packing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* build(docker): add pdf417gen, ppf-datamatrix and aztec-code-generator as ↵cirakg9 days3-1/+27
| | | | | | reference encoders Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: record M6b (QR) resultscirakg9 days5-4/+46
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(codes): compare QR with segno, decode QR dumps and the QR screenshotcirakg9 days29-3/+459
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ui): show QR codes, encoded once with progress and cached sealed per entrycirakg9 days3-25/+195
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(codes): add a QR Code encoder (versions 1-40, levels L-H) as a ↵cirakg9 days4-0/+1025
| | | | | | | | | | | resumable job Optimal numeric/alphanumeric/byte segmentation, Reed-Solomon over GF(256), all eight masks scored like segno, steps sized for the 120,000-bytecode watchdog; block tables generated from segno; a generic Matrix type with a compact form for caching. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: record M6a (linear barcodes) resultscirakg9 days4-4/+36
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(codes): compare with zxing-cpp reference rows and decode encoder output ↵cirakg9 days16-4/+757
| | | | | | and screenshots Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ui): show barcode entries black on white at the largest whole module sizecirakg9 days3-4/+184
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(codes): add EAN/UPC, Code 128, Code 39, ITF and Codabar encoderscirakg9 days6-0/+661
| | | | | | | | Check digits added, verified, fixed or off; canonical UPC-E zero suppression; Code 128 sets B and C with zxing's switching rules; module rows match zxing-cpp (Code 128 by length, the tie-breaking differs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: record M5 results; bump to 0.5.0v0.5.0cirakg9 days6-5/+111
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(import): cover parsers, importer and a seeded fuzz corpus; import 100 ↵cirakg9 days23-5/+1050
| | | | | | entries in the UI flow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(settings): apply the Import form from the phone and show resultscirakg9 days13-16/+411
| | | | | | | | Import group in the app settings; the processor runs after the first frame and on settings changes, clears the fields, writes the status, remembers form hashes and opens the results screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(import): parse otpauth URIs and unencrypted Aegis JSON in resumable stepscirakg9 days8-0/+1609
| | | | | | | | | | Streaming JSON tokenizer with depth and length limits and native skipping of long strings; Aegis reader for database versions 1-3 with groups and encrypted-export detection; otpauth parser with ';' separators and Steam; import job with Replace mode, duplicate and replacement checks, a sealed multi-part buffer and a report. Google Authenticator exports deferred. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(storage): add keyed secret fingerprints to record headerscirakg9 days4-1/+53
| | | | | | | | An 8-byte HMAC of kind, type and secret (key derived from the device key) in header tag 13 lets imports find duplicates of locked entries while the watch is locked. Vault gains anyHeader() and storage(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: record M4 results and simulator findings; bump to 0.4.0v0.4.0cirakg9 days7-20/+132
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(ui): drive the simulator with a scripted flow and check every screencirakg9 days79-32/+808
| | | | | | | | | tools/ui_flow.py clicks buttons and taps from the device files, waits for DIAG shown lines and compares 10 screens per watch with goldens on four test and three spot-check devices. Adds the fixture-wrap generator, UI logic tests and driver tests; the launcher opens apps from their glance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ui): add the list, OTP detail, PIN entry, menu, info screens and glancecirakg9 days23-16/+2575
| | | | | | | | | | | | List with live codes and countdowns, adaptive rows and lazy headers; OTP detail with ring or bar, next code and HOTP next; PIN keypad or button selector with create, unlock, change, lockout display and pending promotion; native menu; glance with the entry count; self-test after the first frame; option properties with defaults. Codes are computed one per timer event, apart from drawing, for the watchdog. A UI-test build (uitest.jungle) starts with fake entries, PIN 123456 and a frozen clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(crypto): XOR PBKDF2 blocks as 32-bit words and step 100 iterationscirakg9 days7-76/+76
| | | | | | | | 200 byte-wise iterations in one event tripped the 120,000-bytecode watchdog on the Forerunner 255S profile. Word-wise XOR makes PBKDF2 2.3x faster (22 ms per 1000 iterations in the simulator). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: document the storage format and record M3 results; bump to 0.3.0v0.3.0cirakg10 days12-4/+218
| | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(storage): cover records, vault, PINs, lockout and migrationscirakg10 days7-1/+1065
| | | | | | | | | | 34 new tests (65 per device): round trips per entry type, every tampered byte, swapped records, the pending queue, the entry cap, a full store at 67 fill levels, the lockout schedule on a fake clock including restarts, erase, PIN change and reset, auto-lock wiping, and v0 to v1 migration. Adds an in-memory store with a size limit and storage benchmarks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(storage): add the encrypted vault, PIN keys, lockout, session and ↵cirakg10 days12-0/+1605
| | | | | | | | | | | | | | migrations Records are one ByteArray each: a readable TLV header plus an encrypt-then-MAC box whose aad binds the entry ID and the header. The device key seals unlocked entries and pending items; a random master key, wrapped under a PBKDF2 PIN key, seals locked ones. Wrong PINs are counted before the check, with delays on the trusted clock and an uptime fallback. Bytes.toUtf8 validates UTF-8 first, because the native conversion crashes on invalid input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: record M2 results and bump version to 0.2.0v0.2.0cirakg10 days7-4/+84
| | | | | | | | | CHANGELOG 0.2.0; PERFORMANCE (simulator benchmarks and what they mean for the watch); TESTING (vector sources, M2 results, watchdog caveat); FEASIBILITY (verified: no native HMAC-SHA1, AES-256 works, Long semantics); README status and targets; developer-guide Monkey C facts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(spike): add the M1 settings spike app and make targetscirakg10 days37-5/+861
| | | | | | | | | | A separate throwaway app (own app ID, no permissions) that shows what the Garmin Connect app delivers per settings field and writes values back, to measure the undocumented settings limits on the real phone and watch. Includes length-marked test strings, `make spike` / `make spike-sim`, `make vectors`, and step-by-step instructions in docs/SETTINGS_SPIKE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: add cross-checked crypto/OTP vectors, unit tests and stricter screenshotscirakg10 days14-2/+1193
| | | | | | | | | | | | | - gen_vectors.py: RFC/FIPS/NIST vectors recomputed with Python's stdlib (openssl for AES) before use, plus seeded cases around SHA padding boundaries, 2038 and 2100; generates test/data/Vectors.mc. - 31 Monkey C tests (hashes, HMAC, PBKDF2, HKDF, AES, sealed records incl. every-byte tamper detection, Base32 errors, 100 OTP and 12 Steam vectors, clock, jobs) and a benchmark; pass on all four test devices. - Screenshot tolerance 0.01 %: one changed character no longer passes. - Golden images updated for version 0.2.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(otp): add Base32 decoding, HOTP, TOTP and Steam Guard codescirakg10 days2-0/+198
| | | | | | | | Base32 accepts any case, spaces, hyphens and missing padding, and reports the exact position of a bad character. TOTP uses 64-bit time, so codes stay correct after 2038. Steam Guard is a separate, optional code type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(crypto): add SHA-512, HMAC, PBKDF2, HKDF, AES-256 records and self-testcirakg10 days10-0/+923
| | | | | | | | | | | | | | | | - Sha512: FIPS 180-4 in Monkey C (no native SHA-512), rotations inlined with precomputed masks; constants derived from the primes, not typed. - Hmac: RFC 2104 over SHA-1/256/512 (native HMAC only supports SHA-256). - Kdf: resumable PBKDF2-HMAC-SHA256 job with calibration bounds (2,000-200,000 iterations) and HKDF-SHA256. - Aes: CBC with PKCS#7 over the native cipher; AES-256 chosen. - SealedBox: encrypt-then-MAC records (HKDF-split keys, length-prefixed aad, constant-time tag check before decryption). - SelfTest: known-answer tests for every primitive at start-up. - Bytes (wipe, constant-time equal), Clock (2038-safe widening, trusted clock), Jobs (bounded steps against the watchdog, timer runner). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: add developer, testing and performance guides; record M0 resultsv0.1.0cirakg10 days7-8/+238
| | | | | | | | | | | | - DEVELOPER_GUIDE: workflow, how the tooling works (verified simulator behaviour), conventions and how to add devices. - TESTING and PERFORMANCE: test layers, M0 results and measured numbers. - FEASIBILITY: what M0 verified (watchdog 120k/240k, 10 MB storage in device profiles, unreliable monkeydo exit code, icon sizes). - README status, new make targets and layout; CHANGELOG 0.1.0. - Author/Summary headers on every document, including the original brief. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(app): add minimal watch app with smoke test and per-size iconscirakg10 days29-0/+381
| | | | | | | | | | The M0 placeholder app: AppBase entry point, home screen with name and version, debug-only diagnostics (start-up time, memory) and a unit test that runs in the headless simulator. Builds with strict type checking and zero warnings for all 72 products; icons.jungle gives every product a launcher icon of its exact size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(tools): add screenshot, budget and product checks; enforce file headerscirakg10 days21-81/+844
| | | | | | | | | | | | | | | | | | - sim_screenshot.py finds the device drawing in the simulator window, crops the screen and compares it with approved golden images. - check_budgets.py reads key=value DIAG/HARNESS lines (the simulator console escapes quotes, so JSON was dropped). - ciq_test_report.py accepts SDK 9.2.0's real summary line `PASSED (passed=N, failed=N, errors=N)`; a captured log is a fixture. - gen_products.py checks all manifest products are watches with API 5.0+ and at least 512 KB for apps. - lint_project.py rule HDR001: every file carries the Author/Summary header (JSON keys, PNG text chunks; generated package-lock exempt). - make_icon.py --all draws one icon per launcher size in use. - Golden screenshots for fr255s, venusq2, fr70 and fr965. - 44 tests, warnings as errors, ruff and mypy --strict clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* build: complete the Docker pipeline for build, test, screenshots and packagingcirakg10 days20-5/+437
| | | | | | | | | | | | | | | - Container scripts now run from the mounted project (no image rebuild per script change): build-app.sh (strict -l 3, warnings fail), run-unit-tests.sh, screenshots.sh, app-diag.sh (perf/memory), lint.sh, package.sh and sim-vnc.sh (noVNC on 127.0.0.1:6080). - Headless simulator helpers: wait for port 1234, remove the stale single-instance lock (~/Sim-dev) that made later starts hang, show the simulator log on failure. - New targets: screenshots-approve, icons; `make lock` re-adds the requirements header; pytest treats warnings as errors. - Author/Summary headers on every build file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(tools): add test-log judge, docs and policy checks with testscirakg10 days12-0/+890
| | | | | | | | | | | | | | | - ciq_test_report.py: decides pass/fail from Run No Evil output instead of monkeydo's unreliable exit code; writes JUnit XML. - check_docs.py: offline check of relative links and GitHub anchors. - lint_project.py: project rules (headers, no logging outside Diag, no secret-like literals, no network APIs or permissions). - check_budgets.py with budgets.json: perf and memory gates. - make_icon.py: reproducible launcher icon. - 31 pytest tests, including Hypothesis fuzzing of the log parser and integration checks against the real docs and sources; ruff and mypy (strict) clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* build: add Docker-only Makefile, SDK setup and product manifestcirakg10 days9-0/+558
| | | | | | | | | | | | | | | | | | - Makefile: every target runs in a container as your UID/GID, with no capabilities, a read-only root filesystem, only the project folder mounted and no network except for image builds and `make sdk`. Serial even under `make -j`. `make nuke` removes containers, images, the dedicated buildx builder and .cache/ after confirmation. - sdk-setup.sh: agreement acceptance pinned to the hash you read, password login (never stored), SDK 9.2.0 and device download, and the login token deleted afterwards. - gen-key.sh: RSA-4096 developer key into .cache/keys, never overwritten, with backup instructions. - manifest.xml: watch-app, minApiLevel 5.0.0, no permissions, and the 72 watches with API 5.0+ and at least 512 KB for apps. - .gitignore, lint configs and CHANGELOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* build(docker): add pinned dev and docs imagescirakg10 days7-0/+4375
| | | | | | | | | | | | | | | | | garmin-otp/dev: Ubuntu 22.04 (pinned by digest; the simulator needs WebKitGTK 4.0), apt packages from a dated snapshot.ubuntu.com mirror, OpenJDK 17, Xvfb/openbox/noVNC for the headless simulator, the connect-iq-sdk-manager CLI v0.8.4 checked against its release SHA-256, and Python tools installed from a hash-locked requirements file. garmin-otp/docs: Node 22 (pinned by digest), Debian snapshot packages, markdownlint-cli2 and mermaid-cli from package-lock.json, and the headless Chrome build pinned by Puppeteer. Locks only use releases published before 2026-10-01. The Garmin SDK, device files and the developer key are never baked into an image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: record final decisions, test watch and SDK login detailscirakg10 days2-47/+58
| | | | | | | | | | | - README: Forerunner 70 is the test watch, the phone is Android, Docker access is settled; how `make sdk` logs in and why the browser login can't be used; the new `make products` and `make lock` targets. - FEASIBILITY: final decisions D1-D5. - Space out table separator rows and turn bold-only lines into headings so markdownlint passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Inital commit.cirakg10 days3-0/+1480