aura-life 0.2.0
aura-life v0.2.0 — pre-publication hardening
First public release. Everything here landed after the v0.1.0 tag (which does
not contain these changes) and before the repository was made public: 0.1.0's
"behaviour identical to the origin, defects recorded rather than fixed" contract
ended, a five-dimension audit ran (privacy, security, memory leaks, mock data,
docs accuracy), and the approved findings were fixed test-first.
This release contains breaking changes. If you consumed v0.1.0, read the
list below before upgrading.
Breaking changes
PersonaScheduleno longer ships three hardcoded characters. The
florence/samantha/alicedispatch and their authored weekly schedules
are removed;PersonaSchedule(persona_id, events=None)is now a
host-populated container withadd_event(), and empty is the documented
default for every id.LifeService(db_path=...)is effectively required. The default is no
longer the CWD-relative"life.db"; with no hostget_config()and no
db_path, the constructor raisesValueErrorinstead of scattering a
database file.emotion_engine.TRAITSis renamedDEFAULT_OCEAN_TRAITSand revalued to
a neutral 0.5-across profile (it was one specific character's OCEAN scores).
Imports ofTRAITSbreak; personas relying on the implicit baseline now get a
flat one.MultiPersonalityManager.current_idreturnsOptional[str], initially
None(previously a hardcoded persona id nobody had registered).ProfileDatabase.update_field()raisesValueErroron an unknown field
(previouslysqlite3.OperationalError), and field names are now validated
against the table schema — it no longer builds SQL from caller input.GoalEngine.to_dict()["completed_count"]/["abandoned_count"]are
retained-history counts, not lifetime totals, a consequence of capping goal
history.- Persona-id case is uniform (lowercased) at every id → path boundary, and
ids must match[a-z0-9_-]{1,64}— invalid ids are rejected with
ValueError, never repaired.
Security
- Persona ids are validated at every id → path boundary (
safe_persona_id()/
safe_join()); the..path-traversal escape fromdata_dir— including an
arbitrary-read primitive viaget_owner_device_id()— is closed. ProfileDatabase.update_field()SQL-injection sink closed (schema whitelist,
quoted identifiers).- The place kill switch fails closed: an unreadable host config now means
"off", not "on". save_device_location()enforces its documented contract: coordinates are
range-checked and rounded to 2 decimals before storage.
Fixed
- Public calendar API (
add_calendar_entry/get_upcoming_calendar_entries)
no longer raisesAttributeError, and calendar triggers — which had silently
never fired in any deployment — now run;datastoreis an optional final
constructor argument. persona_idis no longer silently discarded for relativedb_pathvalues,
and activity emotions are never persisted under an invented fallback id.- Silent
except Exception: passswallows narrowed and logged; broken host
providers now degrade loudly instead of invisibly. - Eleven unbounded collections/tables capped (applied on write and on load),
and teardown paths fixed:LifeScheduler.stop()waits and releases,
LifeService.stop()joins its background threads before saving state.
Added
clear_persona_schedule()joins the public facade (__all__: 116 → 117
names);clear_emotion_persistence()and
MultiPersonalityManager.remove_personality()add teardown for the remaining
process-global caches.EmotionEngine(ocean_traits=...)and
personality_config.set_default_languages(...)replace two origin-app
hardcodes with inputs.- Six new test modules; the suite grows from 129 tests across 13 modules to 298
across 19, with the original 129 passing unchanged.
Full detail: CHANGELOG.md ([0.2.0]) and DEFERRED.md. License: Apache-2.0 —
see LICENSE and NOTICE.