mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-24 20:06:30 +01:00
Compare commits
6 Commits
1b15430ad4
...
d5ba2360e4
| Author | SHA1 | Date | |
|---|---|---|---|
| d5ba2360e4 | |||
| 96e52d6c2a | |||
| b164bf9592 | |||
| 62ff982956 | |||
| 0323f36f56 | |||
| d29c00d09d |
@ -74,7 +74,7 @@ repos:
|
||||
types_or: [python, pyi]
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.13.0
|
||||
rev: v2.4.0
|
||||
hooks:
|
||||
- id: mypy
|
||||
additional_dependencies:
|
||||
|
||||
1
crdt_sync_dart/.gitignore
vendored
1
crdt_sync_dart/.gitignore
vendored
@ -1,6 +1,5 @@
|
||||
.dart_tool/
|
||||
.packages
|
||||
build/
|
||||
pubspec.lock
|
||||
coverage/
|
||||
*.iml
|
||||
|
||||
397
crdt_sync_dart/pubspec.lock
Normal file
397
crdt_sync_dart/pubspec.lock
Normal file
@ -0,0 +1,397 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
_fe_analyzer_shared:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: "9a3386eea899815698dd55995277cf7cb8572ee52b399a6edfb7ae2b50e5fc19"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "105.0.0"
|
||||
analyzer:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer
|
||||
sha256: "62993bed6eadbe9596c5c20d5c167e7bc563c5fe266657a04ddeb93bdb84f4c9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.1.0"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.7.0"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.13.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
cli_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cli_config
|
||||
sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.19.1"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
coverage:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: coverage
|
||||
sha256: "956a3de0725ca232ad353565a8290d3357592bf4250f6f298a185e2d949c5d3d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.15.1"
|
||||
crypto:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: crypto
|
||||
sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.7"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.1"
|
||||
frontend_server_client:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: frontend_server_client
|
||||
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
glob:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: glob
|
||||
sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
http:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: http
|
||||
sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.6.0"
|
||||
http_multi_server:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_multi_server
|
||||
sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.2"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.2"
|
||||
io:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: io
|
||||
sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.5"
|
||||
lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: lints
|
||||
sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.0"
|
||||
logging:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: logging
|
||||
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.20"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.19.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: mime
|
||||
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
node_preamble:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: node_preamble
|
||||
sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
package_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_config
|
||||
sha256: ffcf4cf3d6c0b74ac43708d9f56625506e8a68aa935abe9d267a7330f320eb5d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
pool:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pool
|
||||
sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.2"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pub_semver
|
||||
sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
shelf:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf
|
||||
sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.2"
|
||||
shelf_packages_handler:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_packages_handler
|
||||
sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
shelf_static:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_static
|
||||
sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.3"
|
||||
shelf_web_socket:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_web_socket
|
||||
sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
source_map_stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_map_stack_trace
|
||||
sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
source_maps:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_maps
|
||||
sha256: "14c2945847669b44089bb1222f66873d7ff7103c58911917f2a63c5a62327898"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.10.14"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.2"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.12.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.1"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
test:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: test
|
||||
sha256: "44b2fccf4407bcdb5e105c064c5d6b5e2a640c87761f8b03cdce8cf532d98cfa"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.33.0"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "47481c58bb92d0b1d218f0510ff5647e768f8e1256d07077a151fb520923b51d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.15"
|
||||
test_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_core
|
||||
sha256: "9dec4c178bd61493e1cd2060ffe701fcb61c43da2493e99590fb1b0cc82eb4af"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.21"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: "5f37239c4851efcef929cea7824e76df7f2f0970aef85d66bbc430afa40e72f0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "15.3.0"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: watcher
|
||||
sha256: "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
web_socket:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket
|
||||
sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket_channel
|
||||
sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
webkit_inspection_protocol:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webkit_inspection_protocol
|
||||
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.12.2 <4.0.0"
|
||||
1
crdt_sync_flutter/.gitignore
vendored
1
crdt_sync_flutter/.gitignore
vendored
@ -1,6 +1,5 @@
|
||||
.dart_tool/
|
||||
.packages
|
||||
build/
|
||||
pubspec.lock
|
||||
coverage/
|
||||
*.iml
|
||||
|
||||
683
crdt_sync_flutter/pubspec.lock
Normal file
683
crdt_sync_flutter/pubspec.lock
Normal file
@ -0,0 +1,683 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.7.0"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.13.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.1"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
code_assets:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: code_assets
|
||||
sha256: cfd4f5f575a49c5f10ca856e9846073f1e6c3ee94912377eea5f6cefc5272941
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.19.1"
|
||||
crdt_sync:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: crdt_sync_dart
|
||||
ref: "crdt_sync_dart-v0.11.1"
|
||||
resolved-ref: "978d32af3af66f0d6500c4c6c0c6df5370ebe9a2"
|
||||
url: "https://github.com/kuhyx/utils"
|
||||
source: git
|
||||
version: "0.11.1"
|
||||
crypto:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: crypto
|
||||
sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.7"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.3"
|
||||
ffi:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ffi
|
||||
sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
ffi_leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ffi_leak_tracker
|
||||
sha256: "4093d4ef9ca06ffe2786e73bfb25e22aa92112b9bb4ec941f11e3e6b61489a97"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.2"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.1"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fixnum
|
||||
sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_secure_storage:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_secure_storage
|
||||
sha256: d4e1fb6b2cb524868929e78dc0282fa000554b22060fb53789dc481c9fc95bb8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.2.0"
|
||||
flutter_secure_storage_darwin:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_darwin
|
||||
sha256: ac6d76a752de0cd738334eb4b21743fc4943f449f5b6e308f18838b048c02ac0
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.0"
|
||||
flutter_secure_storage_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_linux
|
||||
sha256: "76fa9c841b3b1619fc5b5bc36efc7d158fa2356f223b6caeb1d0c80a54168546"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
flutter_secure_storage_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_platform_interface
|
||||
sha256: "4bc033841169d07f690d46d89dbc3f5305b6562820822445384c82e0866e2719"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
flutter_secure_storage_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_web
|
||||
sha256: "073a62b3aeb866ab4ce795f960413948e51e5a42a9b0c8333b6daf5bb3208a1c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
flutter_secure_storage_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_windows
|
||||
sha256: "471951813a97006d899db4948acc654a4f28c440083ea08178935ce20b173ec1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.2.2"
|
||||
flutter_test:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_web_plugins:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
google_identity_services_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_identity_services_web
|
||||
sha256: "5d187c46dc59e02646e10fe82665fc3884a9b71bc1c90c2b8b749316d33ee454"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.3+1"
|
||||
google_sign_in:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: google_sign_in
|
||||
sha256: "521031b65853b4409b8213c0387d57edaad7e2a949ce6dea0d8b2afc9cb29763"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.2.0"
|
||||
google_sign_in_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_android
|
||||
sha256: "57782125965ca87b03d42a147d40b046f1fd6a09141a58913e1b86671a5ef22e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.2.16"
|
||||
google_sign_in_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_ios
|
||||
sha256: ac1e4c1205267cb7999d1d81333fccffdfda29e853f434bbaf71525498bb6950
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.0"
|
||||
google_sign_in_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_platform_interface
|
||||
sha256: "7f59208c42b415a3cca203571128d6f84f885fead2d5b53eb65a9e27f2965bb5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
google_sign_in_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_web
|
||||
sha256: d473003eeca892f96a01a64fc803378be765071cb0c265ee872c7f8683245d14
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.3"
|
||||
hooks:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: hooks
|
||||
sha256: eaac480a35ec0814146c2c48d96aaa829e0e44a7662c88ae84c9edf4bc35651f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
http:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: http
|
||||
sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.6.0"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.2"
|
||||
jni:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: jni
|
||||
sha256: f038e58b4dc2c9037f50e233175086337e0b305e356d28211bf55f21c504cbd3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
jni_flutter:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: jni_flutter
|
||||
sha256: "7b717011ea40d04fd47c2731d3d1d36eb99eba3435c2753d62489e8c3c9991d5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
jni_util:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: jni_util
|
||||
sha256: "1ba86da04a5f2bf18fde2edb235587e70c5b0fc5bd4ba955f46b00942c3fc35f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.0.2"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.10"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
logging:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: logging
|
||||
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.20"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.13.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.19.0"
|
||||
objective_c:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: objective_c
|
||||
sha256: ad56fd53a78ff6b1472fa59ff2a4e8b8ccabafc586fc263a1dfad0b99b5553e3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.6.0"
|
||||
package_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_config
|
||||
sha256: ffcf4cf3d6c0b74ac43708d9f56625506e8a68aa935abe9d267a7330f320eb5d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
path_provider:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider
|
||||
sha256: a7f4874f987173da295a61c181b8ee71dab59b332a486b391babf26a1b884825
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.6"
|
||||
path_provider_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_android
|
||||
sha256: "69cbd515a62b94d32a7944f086b2f82b4ac40a1d45bebfc00813a430ab2dabcd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
path_provider_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_foundation
|
||||
sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.6.0"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_linux
|
||||
sha256: "58c2005f147315b11e9b4a7bc889cd5203e250cba8e3f012dae259b4972b5c16"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
path_provider_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_platform_interface
|
||||
sha256: "484838772624c3a4b94f1e44a3e19897fee738f2d5c4ce448443b0417f7c9dda"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
path_provider_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_windows
|
||||
sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: platform
|
||||
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.6"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pub_semver
|
||||
sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
record_use:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: record_use
|
||||
sha256: "1cb8564af8d43b464294411db9217f5ec04891c6f22ee2c32d73ae05e88a6bd2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: shared_preferences
|
||||
sha256: "1e85e0dccf5b4a016077fea7dfbb4a7cb39c759ac1596fcf60c06deadb7da91f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.6"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
sha256: "0634e64bd719f89c012f392938e173521f535d3ecaf66558fa94a056d22b5cc7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.27"
|
||||
shared_preferences_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_foundation
|
||||
sha256: "4e7eaffc2b17ba398759f1151415869a34771ba11ebbccd1b0145472a619a64f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.6"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_linux
|
||||
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
shared_preferences_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_platform_interface
|
||||
sha256: "649dc798a33931919ea356c4305c2d1f81619ea6e92244070b520187b5140ef9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.2"
|
||||
shared_preferences_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_web
|
||||
sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.3"
|
||||
shared_preferences_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_windows
|
||||
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.2"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.12.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.1"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.12"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
url_launcher:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: url_launcher
|
||||
sha256: e8cc955c97e06df9879140a1fe301f3d493f01b7c62dec7f46834be31d7e9fda
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.3"
|
||||
url_launcher_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
sha256: b413d49b73867ac08dd2f9890efd3cc11f2a0e577618d50843440a1fb3776c32
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.32"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_ios
|
||||
sha256: "580fe5dfb51671ae38191d316e027f6b76272b026370708c2d898799750a02b0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.4.1"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_linux
|
||||
sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.2"
|
||||
url_launcher_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_macos
|
||||
sha256: "368adf46f71ad3c21b8f06614adb38346f193f3a59ba8fe9a2fd74133070ba18"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.5"
|
||||
url_launcher_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_platform_interface
|
||||
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
url_launcher_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_web
|
||||
sha256: "85c81589622fbc87c1c683aaea164d3604a7777495a79d91e39ffcdec39ddb34"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.3"
|
||||
url_launcher_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_windows
|
||||
sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.5"
|
||||
uuid:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: uuid
|
||||
sha256: "9b129329f58692f6e6578329498a8fe9fbe98f090beb764ffbb8ee2eadd01dcd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.6.0"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: f36f9f3be64c6198714492bb455c11056e33e2f85d9a0b676a48301e44fdcf47
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.2"
|
||||
very_good_analysis:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: very_good_analysis
|
||||
sha256: "0bd5eb8d6be76aa0d71e70cbdae6cac8f784f761170568e3c2214a6948c7f6d3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.0.0"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: "5f37239c4851efcef929cea7824e76df7f2f0970aef85d66bbc430afa40e72f0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "15.3.0"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: a0b93865d5644f11cf6a8c3f6db909f1ec168958b5805f6cc684adea957cd63d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.4.0"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xdg_directories
|
||||
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.13.0 <4.0.0"
|
||||
flutter: ">=3.44.0"
|
||||
@ -4,7 +4,7 @@ description: >-
|
||||
persisted per-install device id, and a one-call bootstrap. Removes the
|
||||
~150 lines of firebase_backend.dart every consuming app was copying.
|
||||
publish_to: 'none'
|
||||
version: 0.3.2
|
||||
version: 0.3.3
|
||||
|
||||
environment:
|
||||
sdk: ^3.12.2
|
||||
|
||||
@ -15,7 +15,7 @@ screen-locker computes a real workout streak and celebratory reward text, then
|
||||
throws almost all of it away. Verified 2026-08-16:
|
||||
|
||||
- `StatusSnapshot` (`screen_locker/_status_types.py` ~:88-101) carries populated
|
||||
`streak`, `bonus_hours_this_week` and `early_bird_extended` fields, filled by
|
||||
`streak` and `early_bird_extended` fields, filled by
|
||||
`_status_data.py` ~:210-214. **Grep confirms no renderer reads them.**
|
||||
- `_extra_benefits.py` `process_week_transition()` (~:82, reward strings built at
|
||||
~:130-139) produces fully-formed celebratory sentences — and
|
||||
@ -43,8 +43,7 @@ Primary:
|
||||
- `screen_locker/_status_types.py` — `StatusSnapshot` (~:88-101), the fields you
|
||||
are rendering. Read-only for this task.
|
||||
- `screen_locker/_extra_benefits.py` (179 lines) — `process_week_transition()`
|
||||
and its reward strings; `current_streak()` ~:154,
|
||||
`weekly_shutdown_bonus_hours()` ~:159, `has_extended_early_bird()` ~:171.
|
||||
and its reward strings; `current_streak()`, `has_extended_early_bird()`.
|
||||
- `screen_locker/_startup_checks.py` ~:57-58 — where the reward strings are
|
||||
currently discarded into a log call.
|
||||
- `screen_locker/_unlock_view.py` (72 lines, lots of headroom) — the existing
|
||||
@ -53,8 +52,8 @@ Primary:
|
||||
## must
|
||||
|
||||
- **Render the already-populated fields.** Add `_section_streak` to
|
||||
`_status_sections.py` showing the weekly streak, this week's bonus hours, and
|
||||
the extended-early-bird state, and call it from `status_view.py`'s `render()`.
|
||||
`_status_sections.py` showing the weekly streak and the extended-early-bird
|
||||
state, and call it from `status_view.py`'s `render()`.
|
||||
Zero new state, zero conftest change, zero new dependency.
|
||||
- **Stop discarding the reward strings.** `process_week_transition()` returns
|
||||
human-readable celebratory sentences that currently only reach the log. Surface
|
||||
@ -68,17 +67,20 @@ Primary:
|
||||
{phone_verified, runnerup_verified, manual_workout}`). Do not round, pad, or
|
||||
"encourage" the number.
|
||||
|
||||
- must not: **make any reward reduce enforcement.** This is recorded twice in the
|
||||
- must not: **make any reward reduce enforcement.** This is recorded in the
|
||||
repo as a deliberate decision:
|
||||
> `_startup_checks.py` ~:88-93 — "there is no banked 'skip a workout' credit —
|
||||
> `_startup_checks.py` — "there is no banked 'skip a workout' credit —
|
||||
> that mechanic works against the goal of maximizing weekly workouts, so it was
|
||||
> removed in favor of a shutdown-time-only reward"
|
||||
> `_extra_benefits.py` ~:5-8 — "This never reduces enforcement … it only grants
|
||||
> extra comfort time on top of a floor you still have to earn each day."
|
||||
> removed."
|
||||
|
||||
Every reward here is **display or comfort-time only**. Do not reintroduce a
|
||||
Every reward here is **display only**. Do not reintroduce a
|
||||
banked skip, a streak freeze, a grace day, or any mechanic that lowers the
|
||||
floor. A dopamine loop that lets you skip the workout defeats the app.
|
||||
- must not: **grant shutdown time for a streak, a week or a milestone.** The
|
||||
weekly banked shutdown bonus (and the 4-week `_MILESTONE_INTERVAL` +1h) was
|
||||
removed on purpose (2026-10-10): every shutdown minute comes from the
|
||||
`earned_time` ladder and stops at its daily ceiling. Rewards here are display
|
||||
only — no "+Nh" weekly reward, no bonus-hours field, no new shutdown source.
|
||||
- must not: add **sound** to any enforcement or lock path. screen-locker is a
|
||||
self-restriction tool; a chime on lock is punishment audio, and a chime on
|
||||
unlock trains the wrong association. This repo stays silent. (Sound is
|
||||
@ -103,7 +105,7 @@ Primary:
|
||||
## done
|
||||
|
||||
1. Opening the status window (tray icon → click, or `screen-locker-status`) shows
|
||||
the current streak, bonus hours and early-bird state — with the real values
|
||||
the current streak and early-bird state — with the real values
|
||||
from `extra_benefits_state.json`, not placeholders.
|
||||
2. A week-transition milestone reaches the UI instead of only `_logger.info`.
|
||||
3. `cd ~/src/screen-locker && python -m pytest` passes.
|
||||
@ -122,8 +124,8 @@ python -m screen_locker --status # CLI: confirm the values it prints
|
||||
screen-locker-status # the Tk window: confirm they render
|
||||
```
|
||||
|
||||
Paste both outputs. The CLI already prints `streak`/`bonus_hours` (`_status.py`
|
||||
~:138-141), so it is your ground truth: the window must show the **same numbers**.
|
||||
Paste both outputs. The CLI already prints the streak and early-bird state
|
||||
(`_status.py`), so it is your ground truth: the window must show the **same numbers**.
|
||||
If they disagree, the renderer is wrong, not the data.
|
||||
|
||||
Current real state for comparison: `screen_locker/extra_benefits_state.json` and
|
||||
@ -150,10 +152,11 @@ Current real state for comparison: `screen_locker/extra_benefits_state.json` and
|
||||
- All persistence is **JSON files, no sqlite**; paths declared in
|
||||
`screen_locker/_constants.py`. The streak store is
|
||||
`screen_locker/extra_benefits_state.json` (`consecutive_5plus_weeks`,
|
||||
`last_processed_iso_week`, `weekly_shutdown_bonus_hours`,
|
||||
`extended_early_bird_iso_weeks`).
|
||||
- Thresholds live in `_extra_benefits.py`: `_MILESTONE_INTERVAL = 4` (4-week
|
||||
milestone), `_BONUS_THRESHOLD = 5` (workouts per week).
|
||||
`last_processed_iso_week`, `extended_early_bird_iso_weeks`; a legacy
|
||||
`weekly_shutdown_bonus_hours` map is ignored and dropped on the next write).
|
||||
- The threshold lives in `_extra_benefits.py`: `_BONUS_THRESHOLD = 5` (workouts
|
||||
per week, for the streak and the early-bird extension). There is no milestone
|
||||
constant any more.
|
||||
- **There is no config system** — no argparse, no env vars, no config file. Every
|
||||
tunable is a module-level constant. An opt-out toggle has no existing home;
|
||||
for a self-restriction tool, requiring a code edit to disable is arguably
|
||||
|
||||
@ -16,7 +16,7 @@ files in three different strictness tiers.
|
||||
```jsonc
|
||||
// package.json
|
||||
"devDependencies": {
|
||||
"@kuhyx/ts-config": "github:kuhyx/utils#ts_config-v0.1.2&path:/ts_config",
|
||||
"@kuhyx/ts-config": "github:kuhyx/utils#ts_config-v0.1.3&path:/ts_config",
|
||||
"eslint": "10.10.0",
|
||||
"typescript": "6.0.3",
|
||||
"typescript-eslint": "8.70.0"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kuhyx/ts-config",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
"description": "The one lint/TypeScript bar every kuhyx TypeScript repo extends: a strict tsconfig base, ESLint flat-config presets (base, react, vitest, playwright, layer boundaries, a fast editor subset), and Knip / jscpd / Stryker bases. Plain JS, no build step -- consumable straight from a git tag.",
|
||||
|
||||
@ -10,7 +10,7 @@ repos:
|
||||
args: [--severity=warning, --external-sources]
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.6.9
|
||||
rev: v0.17.0
|
||||
hooks:
|
||||
- id: ruff
|
||||
files: ^vmbox/
|
||||
|
||||
@ -179,7 +179,7 @@ stay on the host or stay untested.
|
||||
|
||||
## Tests
|
||||
|
||||
`bats tests/test_vmbox.bats tests/test_rtcwake.bats` — host-side unit tests
|
||||
`bats tests/` — host-side unit tests
|
||||
for name validation, meta handling, serial rotation, the full verdict table,
|
||||
firmware selection and the CMOS alarm decoder. They do not boot a VM; booting
|
||||
is covered by the end-to-end demos (`tests/*_demo.sh`, `tests/rtcwake_e2e.sh`).
|
||||
|
||||
30
vmbox/tests/test_helper.bash
Normal file
30
vmbox/tests/test_helper.bash
Normal file
@ -0,0 +1,30 @@
|
||||
# ============================================================================
|
||||
# vmbox: shared bats fixture for the host-side unit tests (load test_helper).
|
||||
#
|
||||
# VMBOX_HOME is redirected to a per-test temp dir. Nothing here may touch the
|
||||
# real ~/.local/share/vmbox: these tests create and delete VM state, and a
|
||||
# stray write there would clobber a live sandbox's overlay or pidfile.
|
||||
# ============================================================================
|
||||
|
||||
setup() {
|
||||
VMBOX_TEST_HOME="$(mktemp -d)"
|
||||
export VMBOX_HOME="$VMBOX_TEST_HOME"
|
||||
REPO_ROOT="$(cd "$BATS_TEST_DIRNAME/.." && pwd -P)"
|
||||
export REPO_ROOT
|
||||
|
||||
# common.sh guards against double-sourcing with a readonly flag, and bats
|
||||
# runs every test in a fresh subshell, so a plain source is safe here.
|
||||
source "$REPO_ROOT/lib/common.sh"
|
||||
source "$REPO_ROOT/lib/verdict.sh"
|
||||
|
||||
install -d "$VMBOX_VMS_DIR"
|
||||
}
|
||||
|
||||
teardown() {
|
||||
[[ -n "${VMBOX_TEST_HOME:-}" && -d "$VMBOX_TEST_HOME" ]] && rm -rf "$VMBOX_TEST_HOME"
|
||||
}
|
||||
|
||||
# Create a fake VM directory without booting anything.
|
||||
_fake_vm() {
|
||||
install -d "$(vm_dir "$1")"
|
||||
}
|
||||
44
vmbox/tests/test_shim.bats
Normal file
44
vmbox/tests/test_shim.bats
Normal file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bats
|
||||
# ============================================================================
|
||||
# vmbox: host-side unit tests for guest/shim.sh, the fake hardware tools.
|
||||
#
|
||||
# The shim runs on the host against a temp PATH under the per-test VMBOX_HOME
|
||||
# from test_helper.bash; nothing is installed system-wide.
|
||||
# ============================================================================
|
||||
|
||||
load test_helper
|
||||
|
||||
_shim() {
|
||||
VMBOX_SHIM_DIR="$VMBOX_TEST_HOME/sbin" VMBOX_SHIM_LOG_DIR="$VMBOX_TEST_HOME/shimlog" \
|
||||
bash "$REPO_ROOT/guest/shim.sh" "$@"
|
||||
}
|
||||
|
||||
@test "shim: exit mode returns 0 and logs the argv with an epoch" {
|
||||
run _shim openrgb exit
|
||||
[ "$status" -eq 0 ]
|
||||
run "$VMBOX_TEST_HOME/sbin/openrgb" --mode static --color 000000
|
||||
[ "$status" -eq 0 ]
|
||||
run cat "$VMBOX_TEST_HOME/shimlog/openrgb.log"
|
||||
[[ "$output" =~ ^[0-9]{9,}\ --mode\ static\ --color\ 000000$ ]]
|
||||
}
|
||||
|
||||
@test "shim: exit:N returns N" {
|
||||
_shim nvidia-smi exit:3
|
||||
run "$VMBOX_TEST_HOME/sbin/nvidia-smi" -pl 100
|
||||
[ "$status" -eq 3 ]
|
||||
}
|
||||
|
||||
@test "shim: hang mode never returns (the 2026-09-12 openrgb)" {
|
||||
_shim openrgb hang
|
||||
run timeout 1 "$VMBOX_TEST_HOME/sbin/openrgb"
|
||||
[ "$status" -eq 124 ]
|
||||
run cat "$VMBOX_TEST_HOME/shimlog/openrgb.log"
|
||||
[ "${#lines[@]}" -eq 1 ]
|
||||
}
|
||||
|
||||
@test "shim: an unknown mode or a path is refused" {
|
||||
run _shim openrgb explode
|
||||
[ "$status" -eq 1 ]
|
||||
run _shim /usr/bin/openrgb exit
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
182
vmbox/tests/test_verdict.bats
Normal file
182
vmbox/tests/test_verdict.bats
Normal file
@ -0,0 +1,182 @@
|
||||
#!/usr/bin/env bats
|
||||
# ============================================================================
|
||||
# vmbox: host-side unit tests for the shutdown verdict.
|
||||
#
|
||||
# Event parsing, serial completeness and the full exit-code table, all decided
|
||||
# from fake event logs and serial text -- no guest is booted. Fixture (temp
|
||||
# VMBOX_HOME, _fake_vm) is test_helper.bash.
|
||||
# ============================================================================
|
||||
|
||||
load test_helper
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# verdict: event parsing
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@test "verdict_last_event reports none for a missing or empty log" {
|
||||
run verdict_last_event "$VMBOX_HOME/nosuch.jsonl"
|
||||
[ "$output" = "none" ]
|
||||
: > "$VMBOX_HOME/empty.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/empty.jsonl"
|
||||
[ "$output" = "none" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event reads a guest-initiated poweroff" {
|
||||
printf '%s\n' \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-shutdown"}}' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "guest-shutdown" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event distinguishes a reset from a poweroff" {
|
||||
printf '%s\n' \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-reset"}}' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "guest-reset" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event reports a panic" {
|
||||
printf '%s\n' '{"event":"GUEST_PANICKED","data":{"action":"pause"}}' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "panic" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event takes the LAST event, not the first" {
|
||||
# events.jsonl is append-only across boots, so an old poweroff must never
|
||||
# be mistaken for the current run's outcome.
|
||||
printf '%s\n' \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-shutdown"}}' \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-reset"}}' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "guest-reset" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event skips malformed lines instead of dying" {
|
||||
# A truncated final line is normal: the recorder is killed with the VM.
|
||||
printf '%s\n' \
|
||||
'not json at all' \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-shutdown"}}' \
|
||||
'{"event":"SHUT' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "guest-shutdown" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event ignores POWERDOWN, which proves nothing" {
|
||||
# POWERDOWN means the ACPI request was DELIVERED. With no OS booted, qemu
|
||||
# emits it and then runs forever -- treating it as a stop is a false pass.
|
||||
printf '%s\n' '{"event":"POWERDOWN"}' > "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "none" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event marks a host-initiated stop as host" {
|
||||
printf '%s\n' '{"event":"SHUTDOWN","data":{"guest":false}}' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "host" ]
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# verdict: serial completeness
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@test "verdict_serial_complete requires the kernel's final power-down line" {
|
||||
printf 'Reached target System Power Off.\n' > "$VMBOX_HOME/s.log"
|
||||
run verdict_serial_complete "$VMBOX_HOME/s.log"
|
||||
[ "$status" -ne 0 ]
|
||||
|
||||
printf 'Reached target System Power Off.\n[ 85.5] reboot: Power down\n' \
|
||||
> "$VMBOX_HOME/s.log"
|
||||
run verdict_serial_complete "$VMBOX_HOME/s.log"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "verdict_serial_complete fails on an empty or missing log" {
|
||||
: > "$VMBOX_HOME/s.log"
|
||||
run verdict_serial_complete "$VMBOX_HOME/s.log"
|
||||
[ "$status" -ne 0 ]
|
||||
run verdict_serial_complete "$VMBOX_HOME/nosuch.log"
|
||||
[ "$status" -ne 0 ]
|
||||
}
|
||||
|
||||
@test "verdict_serial_complete matches despite ANSI escapes in the log" {
|
||||
# The serial log is a raw console capture, full of colour codes; grep -a
|
||||
# is what keeps it readable as text.
|
||||
printf '\033[0;32m OK \033[0m[ 85.5] reboot: Power down\n' \
|
||||
> "$VMBOX_HOME/s.log"
|
||||
run verdict_serial_complete "$VMBOX_HOME/s.log"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# verdict: the full table, exit code by exit code
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
_verdict_case() {
|
||||
# _verdict_case <events-json-line|""> <serial-text> -> sets $status
|
||||
local name="v1"
|
||||
_fake_vm "$name"
|
||||
local events serial
|
||||
events="$(vm_events "$name")"
|
||||
serial="$(vm_serial "$name" 0)"
|
||||
if [[ -n "$1" ]]; then printf '%s\n' "$1" > "$events"; else : > "$events"; fi
|
||||
printf '%s' "$2" > "$serial"
|
||||
verdict_report "$name" "$serial" "$events"
|
||||
}
|
||||
|
||||
@test "verdict: clean poweroff exits 0" {
|
||||
run _verdict_case \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-shutdown"}}' \
|
||||
'reboot: Power down'
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"clean poweroff"* ]]
|
||||
}
|
||||
|
||||
@test "verdict: a stop that never reached the marker is DIRTY, exit 3" {
|
||||
# This is the discriminator the whole design turns on: guest:true alone
|
||||
# does NOT prove the machine shut down completely.
|
||||
run _verdict_case \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-shutdown"}}' \
|
||||
'Stopping session... (log ends here)'
|
||||
[ "$status" -eq 3 ]
|
||||
[[ "$output" == *"DIRTY"* ]]
|
||||
}
|
||||
|
||||
@test "verdict: a reboot is exit 4, not a poweroff" {
|
||||
run _verdict_case \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-reset"}}' \
|
||||
''
|
||||
[ "$status" -eq 4 ]
|
||||
[[ "$output" == *"REBOOTED"* ]]
|
||||
}
|
||||
|
||||
@test "verdict: a kernel panic is exit 5" {
|
||||
run _verdict_case '{"event":"GUEST_PANICKED","data":{"action":"pause"}}' ''
|
||||
[ "$status" -eq 5 ]
|
||||
[[ "$output" == *"PANIC"* ]]
|
||||
}
|
||||
|
||||
@test "verdict: no event and no live qemu is exit 6" {
|
||||
# No pidfile -> vm_is_running is false -> stopped without a guest event.
|
||||
run _verdict_case '' ''
|
||||
[ "$status" -eq 6 ]
|
||||
}
|
||||
|
||||
@test "verdict: a host-initiated stop is exit 6" {
|
||||
run _verdict_case '{"event":"SHUTDOWN","data":{"guest":false}}' ''
|
||||
[ "$status" -eq 6 ]
|
||||
}
|
||||
|
||||
@test "verdict: an unrecognised reason is exit 6, never a silent pass" {
|
||||
run _verdict_case \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"brand-new-reason"}}' \
|
||||
''
|
||||
[ "$status" -eq 6 ]
|
||||
[[ "$output" == *"unrecognised"* ]]
|
||||
}
|
||||
@ -3,37 +3,15 @@
|
||||
# vmbox: host-side unit tests.
|
||||
#
|
||||
# Scope, deliberately: everything that can be decided WITHOUT booting a guest --
|
||||
# name validation, meta handling, serial rotation and the full verdict table.
|
||||
# name validation, meta handling, serial rotation and the VM path helpers.
|
||||
# Booting is covered by tests/destructive_demo.sh, which is slow and needs a
|
||||
# built base image; these run in well under a second and gate every commit.
|
||||
#
|
||||
# VMBOX_HOME is redirected to a per-test temp dir. Nothing here may touch the
|
||||
# real ~/.local/share/vmbox: these tests create and delete VM state, and a
|
||||
# stray write there would clobber a live sandbox's overlay or pidfile.
|
||||
# The verdict table lives in test_verdict.bats and the hardware shim in
|
||||
# test_shim.bats; the shared fixture (temp VMBOX_HOME) is test_helper.bash.
|
||||
# ============================================================================
|
||||
|
||||
setup() {
|
||||
VMBOX_TEST_HOME="$(mktemp -d)"
|
||||
export VMBOX_HOME="$VMBOX_TEST_HOME"
|
||||
REPO_ROOT="$(cd "$BATS_TEST_DIRNAME/.." && pwd -P)"
|
||||
export REPO_ROOT
|
||||
|
||||
# common.sh guards against double-sourcing with a readonly flag, and bats
|
||||
# runs every test in a fresh subshell, so a plain source is safe here.
|
||||
source "$REPO_ROOT/lib/common.sh"
|
||||
source "$REPO_ROOT/lib/verdict.sh"
|
||||
|
||||
install -d "$VMBOX_VMS_DIR"
|
||||
}
|
||||
|
||||
teardown() {
|
||||
[[ -n "${VMBOX_TEST_HOME:-}" && -d "$VMBOX_TEST_HOME" ]] && rm -rf "$VMBOX_TEST_HOME"
|
||||
}
|
||||
|
||||
# Create a fake VM directory without booting anything.
|
||||
_fake_vm() {
|
||||
install -d "$(vm_dir "$1")"
|
||||
}
|
||||
load test_helper
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# name validation
|
||||
@ -217,213 +195,3 @@ _fake_vm() {
|
||||
run require_vm yes1
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# verdict: event parsing
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@test "verdict_last_event reports none for a missing or empty log" {
|
||||
run verdict_last_event "$VMBOX_HOME/nosuch.jsonl"
|
||||
[ "$output" = "none" ]
|
||||
: > "$VMBOX_HOME/empty.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/empty.jsonl"
|
||||
[ "$output" = "none" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event reads a guest-initiated poweroff" {
|
||||
printf '%s\n' \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-shutdown"}}' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "guest-shutdown" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event distinguishes a reset from a poweroff" {
|
||||
printf '%s\n' \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-reset"}}' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "guest-reset" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event reports a panic" {
|
||||
printf '%s\n' '{"event":"GUEST_PANICKED","data":{"action":"pause"}}' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "panic" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event takes the LAST event, not the first" {
|
||||
# events.jsonl is append-only across boots, so an old poweroff must never
|
||||
# be mistaken for the current run's outcome.
|
||||
printf '%s\n' \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-shutdown"}}' \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-reset"}}' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "guest-reset" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event skips malformed lines instead of dying" {
|
||||
# A truncated final line is normal: the recorder is killed with the VM.
|
||||
printf '%s\n' \
|
||||
'not json at all' \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-shutdown"}}' \
|
||||
'{"event":"SHUT' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "guest-shutdown" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event ignores POWERDOWN, which proves nothing" {
|
||||
# POWERDOWN means the ACPI request was DELIVERED. With no OS booted, qemu
|
||||
# emits it and then runs forever -- treating it as a stop is a false pass.
|
||||
printf '%s\n' '{"event":"POWERDOWN"}' > "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "none" ]
|
||||
}
|
||||
|
||||
@test "verdict_last_event marks a host-initiated stop as host" {
|
||||
printf '%s\n' '{"event":"SHUTDOWN","data":{"guest":false}}' \
|
||||
> "$VMBOX_HOME/e.jsonl"
|
||||
run verdict_last_event "$VMBOX_HOME/e.jsonl"
|
||||
[ "$output" = "host" ]
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# verdict: serial completeness
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@test "verdict_serial_complete requires the kernel's final power-down line" {
|
||||
printf 'Reached target System Power Off.\n' > "$VMBOX_HOME/s.log"
|
||||
run verdict_serial_complete "$VMBOX_HOME/s.log"
|
||||
[ "$status" -ne 0 ]
|
||||
|
||||
printf 'Reached target System Power Off.\n[ 85.5] reboot: Power down\n' \
|
||||
> "$VMBOX_HOME/s.log"
|
||||
run verdict_serial_complete "$VMBOX_HOME/s.log"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "verdict_serial_complete fails on an empty or missing log" {
|
||||
: > "$VMBOX_HOME/s.log"
|
||||
run verdict_serial_complete "$VMBOX_HOME/s.log"
|
||||
[ "$status" -ne 0 ]
|
||||
run verdict_serial_complete "$VMBOX_HOME/nosuch.log"
|
||||
[ "$status" -ne 0 ]
|
||||
}
|
||||
|
||||
@test "verdict_serial_complete matches despite ANSI escapes in the log" {
|
||||
# The serial log is a raw console capture, full of colour codes; grep -a
|
||||
# is what keeps it readable as text.
|
||||
printf '\033[0;32m OK \033[0m[ 85.5] reboot: Power down\n' \
|
||||
> "$VMBOX_HOME/s.log"
|
||||
run verdict_serial_complete "$VMBOX_HOME/s.log"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# verdict: the full table, exit code by exit code
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
_verdict_case() {
|
||||
# _verdict_case <events-json-line|""> <serial-text> -> sets $status
|
||||
local name="v1"
|
||||
_fake_vm "$name"
|
||||
local events serial
|
||||
events="$(vm_events "$name")"
|
||||
serial="$(vm_serial "$name" 0)"
|
||||
if [[ -n "$1" ]]; then printf '%s\n' "$1" > "$events"; else : > "$events"; fi
|
||||
printf '%s' "$2" > "$serial"
|
||||
verdict_report "$name" "$serial" "$events"
|
||||
}
|
||||
|
||||
@test "verdict: clean poweroff exits 0" {
|
||||
run _verdict_case \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-shutdown"}}' \
|
||||
'reboot: Power down'
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"clean poweroff"* ]]
|
||||
}
|
||||
|
||||
@test "verdict: a stop that never reached the marker is DIRTY, exit 3" {
|
||||
# This is the discriminator the whole design turns on: guest:true alone
|
||||
# does NOT prove the machine shut down completely.
|
||||
run _verdict_case \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-shutdown"}}' \
|
||||
'Stopping session... (log ends here)'
|
||||
[ "$status" -eq 3 ]
|
||||
[[ "$output" == *"DIRTY"* ]]
|
||||
}
|
||||
|
||||
@test "verdict: a reboot is exit 4, not a poweroff" {
|
||||
run _verdict_case \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"guest-reset"}}' \
|
||||
''
|
||||
[ "$status" -eq 4 ]
|
||||
[[ "$output" == *"REBOOTED"* ]]
|
||||
}
|
||||
|
||||
@test "verdict: a kernel panic is exit 5" {
|
||||
run _verdict_case '{"event":"GUEST_PANICKED","data":{"action":"pause"}}' ''
|
||||
[ "$status" -eq 5 ]
|
||||
[[ "$output" == *"PANIC"* ]]
|
||||
}
|
||||
|
||||
@test "verdict: no event and no live qemu is exit 6" {
|
||||
# No pidfile -> vm_is_running is false -> stopped without a guest event.
|
||||
run _verdict_case '' ''
|
||||
[ "$status" -eq 6 ]
|
||||
}
|
||||
|
||||
@test "verdict: a host-initiated stop is exit 6" {
|
||||
run _verdict_case '{"event":"SHUTDOWN","data":{"guest":false}}' ''
|
||||
[ "$status" -eq 6 ]
|
||||
}
|
||||
|
||||
@test "verdict: an unrecognised reason is exit 6, never a silent pass" {
|
||||
run _verdict_case \
|
||||
'{"event":"SHUTDOWN","data":{"guest":true,"reason":"brand-new-reason"}}' \
|
||||
''
|
||||
[ "$status" -eq 6 ]
|
||||
[[ "$output" == *"unrecognised"* ]]
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# guest/shim.sh -- fake hardware tools (runs on the host against a temp PATH)
|
||||
# ---------------------------------------------------------------------------
|
||||
_shim() {
|
||||
VMBOX_SHIM_DIR="$VMBOX_TEST_HOME/sbin" VMBOX_SHIM_LOG_DIR="$VMBOX_TEST_HOME/shimlog" \
|
||||
bash "$REPO_ROOT/guest/shim.sh" "$@"
|
||||
}
|
||||
|
||||
@test "shim: exit mode returns 0 and logs the argv with an epoch" {
|
||||
run _shim openrgb exit
|
||||
[ "$status" -eq 0 ]
|
||||
run "$VMBOX_TEST_HOME/sbin/openrgb" --mode static --color 000000
|
||||
[ "$status" -eq 0 ]
|
||||
run cat "$VMBOX_TEST_HOME/shimlog/openrgb.log"
|
||||
[[ "$output" =~ ^[0-9]{9,}\ --mode\ static\ --color\ 000000$ ]]
|
||||
}
|
||||
|
||||
@test "shim: exit:N returns N" {
|
||||
_shim nvidia-smi exit:3
|
||||
run "$VMBOX_TEST_HOME/sbin/nvidia-smi" -pl 100
|
||||
[ "$status" -eq 3 ]
|
||||
}
|
||||
|
||||
@test "shim: hang mode never returns (the 2026-09-12 openrgb)" {
|
||||
_shim openrgb hang
|
||||
run timeout 1 "$VMBOX_TEST_HOME/sbin/openrgb"
|
||||
[ "$status" -eq 124 ]
|
||||
run cat "$VMBOX_TEST_HOME/shimlog/openrgb.log"
|
||||
[ "${#lines[@]}" -eq 1 ]
|
||||
}
|
||||
|
||||
@test "shim: an unknown mode or a path is refused" {
|
||||
run _shim openrgb explode
|
||||
[ "$status" -eq 1 ]
|
||||
run _shim /usr/bin/openrgb exit
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user