Repository navigation
AndroidForge v0.9.1 - Agent Mode Hardening
AndroidForge v0.9.1 (Alpha) - Agent Mode Hardening
AndroidForge v0.9.1 is a stability patch for the defects reported by the CalcSuite, DiscountHunter
and IronPulse agents that validated v0.9.0. It does not add a new workflow; it makes long agent runs
and failure evidence trustworthy.
Why this release exists
The v0.9.0 validation found five classes of problems that matter to unattended agents:
- A full observation store could delete the observation it had just written.
- Refs changed on every observation even when the screen did not change.
- A ref to text inside a clickable row was rejected as non-actionable.
--clickablestopped matching a clickable ancestor.- Failure, observation and bundle metadata could describe a different run or omit its identity.
These are fixed here, with regression tests and real-emulator checks.
Observation retention and durability
- Retention is ordered by the stored
observed_at, then file modification time, never by the random
token filename. - The store makes room before writing and always preserves the observation just written.
- Eviction failures return an explicit error instead of a token that cannot be used.
latest_observationuses the same recorded-time ordering.
Validation: 25 observations in one session retained at the cap, the final token existed on disk and a
subsequent ui wait --ref ... --expect-token matched. Five additional rapid observations all
persisted.
Stable refs
- Ref material no longer contains the observation token.
- An unchanged node keeps the same
el-...ref across repeated observations. - A changed label, bounds, class or actionability produces a different ref.
- Refs remain scoped to the observation token for action validation; there is still no text or
coordinate fallback.
Validation: two observations with no action between them returned the same ref for every common node
(18/18 in the compact lists; 2/2 actionable), while the observation tokens differed.
Context refs and --clickable
- Context text inside a clickable ancestor is marked
actionable_via: "ancestor". ui tapandui long-pressaccept those refs and still re-check the current identity and
clickable ancestor before dispatch.--clickablematches a clickable ancestor, restoring the v0.4 behavior used by existing
conformance scripts.E_SELECTOR_NOT_FOUNDputs the requested label (or labels containing it) first and reports
visible_labels_totalandvisible_labels_truncated.
Validation: the Settings Search Settings context ref tapped through its clickable ancestor, and
ui find --text "Search Settings" --clickable returned the node with parent_clickable:true.
Failure diagnosis
Two categories are now first-class:
element_referenceforE_ELEMENT_REF_UNKNOWN,E_ELEMENT_REF_STALE,
E_ELEMENT_IDENTITY_CHANGED,E_ELEMENT_NOT_ACTIONABLEandE_ELEMENT_DEVICE_MISMATCH.observationforE_OBSERVATION_NOT_FOUND,E_OBSERVATION_EXPIREDand
E_OBSERVATION_SESSION_MISMATCH.
Both are high confidence with targeted ui observe next actions. Observation-store failures are
marked non-comparable in recurrence memory, so a later unrelated passing run cannot auto-resolve
them.
Report and bundle selection
report explainandreport bundlenow share one resolver.latestis the newest completed run for the selected project.latest-failureis the newest failed, partial, cancelled, interrupted or abandoned run.- Runs are filtered by their recorded
project_root; a newer run from another app is never selected. report explain lateston a passing run adds alatest-failurenext action.
Evidence identity
- ZIP bundle
manifest.jsonrecordschecksums_verified:trueafter the generated archive passes
verification; the archive is rebuilt after the flag is set. diagnostics performancereturnsrun_id,run_dirand artifact paths in its result.- The brief performance summary includes the jank frame sample, for example
jank 80.0% (4/5 frames).
Hook route verification
Hook verification supports three UI postconditions:
[hooks.focus-streak.verify]
ui_text = "CURRENT STREAK"
# ui_activity = ".MainActivity"
# ui_package = "com.example.app"The UI hierarchy is polled until the label, activity or package matches. A shell hook that exits 0
while the app stays on the previous route now fails with E_HOOK_VERIFICATION_FAILED. The IronPulse
example hooks use ui_text.
Brief agent test
Brief agent test keeps compact stage entries (name, status, failure detail) and next_actions
instead of emptying both lists.
Compatibility
- Full JSON remains the default and keeps the v0.9.0 fields.
- v0.6.0-v0.9.0 releases, tags and assets are untouched.
- No destructive behavior, uninstall, data clearing, Gradle execution, cloud service or hidden retry
was added. - Workspace, CLI, desktop, installer and compatibility version are
0.9.1.
Validation
Automated checks cover retention beyond 20 observations, stable refs for unchanged nodes, context ref
metadata, clickable-ancestor selector matching, requested-label prioritization, new diagnosis
categories, recurrence non-resolution, project-scoped latest/latest-failure, bundle manifest
verification, performance identity and brief agent-test stages.
Real-emulator checks on Android 16 / API 36 cover observation retention at the cap, ref stability,
context ref tap through a clickable ancestor, --clickable matching, failure explanation and bundle
selection, performance run identity and hook UI postconditions. Exact commands and measurements are
recorded in VERIFICATION.md.