Repository navigation
ASB-V24
π AutoSystemBoost β Changelog
V24 β Persistent Intelligence
V23 = first session-aware governor with memory.
V24 = first governor that learns from its own past and changes behavior.
π§ Core: Persistent Decision Layer
V24 adds three feedback loops that read session history at startup and adjust governor behavior based on accumulated patterns. This is the transition from reactive governor to adaptive system with memory.
Battery Feedback Loop #1 β Idle Discipline
Governor reads average bat_ttd (time-to-first-DEEP_IDLE) from past battery sessions:
| Historical Pattern | Action | Result |
|---|---|---|
avg(bat_ttd) > 60s |
bat_fast_idle_s 15 β 10 |
Faster sleep entry |
avg(bat_ttd) > 30s |
bat_fast_idle_s 15 β 12 |
Moderately faster |
bat_fast_idle_s < 5 |
Clamped to floor 5s | Safety guard |
Battery Feedback Loop #2 β MODERATE Domination
If battery sessions historically spend >60% of tracked idle time in MODERATE (instead of DEEP/LIGHT_IDLE), wake discipline is too loose:
feedback: battery MODERATE=68% of idle time β bat_fast_idle 12β8
Auto History-Aware Startup
If >50% of accumulated sessions degraded from burst to stable, highload_mode=auto starts directly as stable β skipping the futile burst phase:
feedback: 6/10 sessions degraded β auto starting as stable
π Session History (session_history.jsonl)
Full session summaries stored as JSON Lines. Last 10 sessions, survives reboots.
Each entry contains 24 fields with schema version:
{"v":1,"ts":"2026-03-15 14:30","profile":"performance","mode":"auto","end":"screen_off",
"gaming":3,"sustained":2,"thermal":1,"unreachable":1,
"t_heavy":180,"t_gaming":95,"t_sustained":45,
"avg_gap":420000,"max_temp":67,"degraded":0,
"t2s":120,"t2th":180,"t2g":30,"eff":82,"recovery":1,"sus_pct":18,
"bat_deep":0,"bat_light":0,"bat_mod":0,"bat_wake":0,"bat_ttd":0}Session End Reasons
"end" |
Trigger |
|---|---|
screen_off |
Screen turned off (natural boundary) |
shutdown |
Governor stopped (reboot / kill) |
new_session |
start-session:* command received |
idle_boundary |
30 minutes of continuous DEEP_IDLE |
Atomic Write Protection
History is written to .tmp first, then rename() to final path. If governor is killed mid-write, the previous valid history is preserved.
π Battery Telemetry V2
Three new FSM fields bring battery branch to the same maturity level as high-load:
| Field | Description |
|---|---|
bat_time_moderate_sec |
Time spent in MODERATE during battery mode |
bat_screen_off_count |
Number of screen-off events in battery mode |
bat_time_to_first_deep |
Seconds from session start to first DEEP_IDLE entry |
All fields tracked in FSM, exposed in write_state, included in session_end log and session_history JSONL.
β±οΈ New Metric: ses_time_to_first_gaming (t2g)
How fast does a gaming session actually start? Recorded on first GAMING entry, visible in:
/dev/.asb/stateasses_t2gsession_endlog markersession_history.jsonlas"t2g"
π‘οΈ DEEP_IDLE Auto-Boundary
30 minutes of continuous DEEP_IDLE = automatic session end. Governor saves history, saves persistent stats, resets telemetry. Prevents stale metrics from accumulating during overnight sleep.
πΎ Persistent Stats β Improvements
| Change | V23 | V24 |
|---|---|---|
| Storage path | /dev/.asb/ (tmpfs β lost on reboot) |
/data/adb/.../runtime/ (survives reboot) |
| Save trigger | Governor shutdown only | Every screen-off + shutdown + start-session |
| Fields | count, t2s, t2th, temp, gap, eff | + degrade_count (sessions where auto degraded) |
| State file | hist_sessions, hist_t2s, hist_temp, hist_gap, hist_eff |
+ hist_deg |
Critical fix: V23's cross-session memory was stored in tmpfs and silently lost on every reboot. The entire
hist_*feature was non-functional. V24 moves it to/data/partition.
π― Atomic Session Start
New socket command for clean test setup:
asb start-session:performance:autoAtomically: save previous session stats β save history β set profile β set highload mode β reset telemetry β log session_start marker. Eliminates dirty test data from mixed states.
π Session Markers
Machine-readable log entries for automated analysis:
On startup / start-session:
session_start profile=performance highload=auto bat=85% temp=32
On shutdown:
session_end gaming=3 sustained=2 thermal=1 unreachable=1 t_heavy=180s t_gaming=95s t_sustained=45s avg_gap=420000 max_temp=67 auto_degraded=0 t2s=120s t2thermal=180s t2g=30s efficiency=82 recovery=1 bat_deep=0s bat_light=0s bat_mod=0s bat_wake=0 bat_ttd=0s sus_pct=18%
π οΈ New Tools
| Tool | Purpose |
|---|---|
tools/asb_session_report.py |
Markdown report from session_history.jsonl β trends, battery analysis, recommendations |
tools/asb_compare_sessions.py |
Side-by-side comparison of multiple test log files |
Session Report Example Output
# π ASB Session History Report
Sessions: 8
## π Trends
| Metric | Average | Min | Max |
|---------------------|---------|-----|------|
| Max temperature | 65Β°C | 58Β°C| 72Β°C |
| Avg cap gap | 380 kHz | 0 | 920k |
| Efficiency | 78% | 45% | 95% |
## π‘ Recommendations
- β οΈ Auto degraded in 5/8 sessions β burst often non-viable
β V24 Summary
| Feature | Status |
|---|---|
| Session history (JSONL, last 10, atomic write) | β |
Schema version ("v":1) |
β |
| 4 formal session end reasons | β |
| Battery feedback loop #1 (bat_ttd β idle discipline) | β |
| Battery feedback loop #2 (MODERATE domination) | β |
| Auto history-aware startup (degrade β stable) | β |
| Safety floor for bat_fast_idle_s (5s minimum) | β |
| DEEP_IDLE 30-min auto-boundary | β |
Persistent stats on /data/ (survives reboot) |
β |
| Screen-off save (stats + history) | β |
degrade_count in persistent stats |
β |
ses_time_to_first_gaming (t2g) |
β |
bat_time_moderate_sec / bat_screen_off_count / bat_time_to_first_deep |
β |
start-session:profile:mode atomic command |
β |
| Session markers in log (session_start / session_end) | β |
tools/asb_session_report.py |
β |
tools/asb_compare_sessions.py |
β |
| README.md + README.ru.md rewritten | β |
V24 makes ASB not just remember what happened β but change its own behavior based on what it learned.