Skip to content

aura-life 0.2.0

Choose a tag to compare

@Redrum624 Redrum624 released this 27 Aug 12:34
· 25 commits to main since this release

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

  • PersonaSchedule no longer ships three hardcoded characters. The
    florence / samantha / alice dispatch and their authored weekly schedules
    are removed; PersonaSchedule(persona_id, events=None) is now a
    host-populated container with add_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 host get_config() and no
    db_path, the constructor raises ValueError instead of scattering a
    database file.
  • emotion_engine.TRAITS is renamed DEFAULT_OCEAN_TRAITS and revalued to
    a neutral 0.5-across profile (it was one specific character's OCEAN scores).
    Imports of TRAITS break; personas relying on the implicit baseline now get a
    flat one.
  • MultiPersonalityManager.current_id returns Optional[str], initially
    None (previously a hardcoded persona id nobody had registered).
  • ProfileDatabase.update_field() raises ValueError on an unknown field
    (previously sqlite3.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 from data_dir — including an
    arbitrary-read primitive via get_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 raises AttributeError, and calendar triggers — which had silently
    never fired in any deployment — now run; datastore is an optional final
    constructor argument.
  • persona_id is no longer silently discarded for relative db_path values,
    and activity emotions are never persisted under an invented fallback id.
  • Silent except Exception: pass swallows 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.