Skip to content

refactor: rename Profile* types to Persistent* for semantic clarity #82

@chaizhenhua

Description

@chaizhenhua

Context

After unifying shared state and profile state into a single mechanism (PR #81), the Profile* naming no longer reflects the actual role of these types:

Current Name Actual Role Proposed Name
ProfileStore (trait) Raw async KV backend StorageBackend
ProfileAccess (struct) Typed read/write layer PersistentStore
ProfileKey (trait) Namespace definition PersistentKey
ProfileOwner (enum) Internal addressing Keep (already internal)

Why

  • ProfileAccess now serves both profile and shared state — the "Profile" prefix is misleading
  • access as a noun is vague; store better describes a typed KV read/write interface
  • Persistent* unifies the naming and contrasts naturally with State* (in-memory transient)

Scope

~15 non-test files reference these types. The rename is mechanical but touches multiple crates:

  • awaken-contract (trait definitions + re-exports)
  • awaken-runtime (ProfileAccess, ProfileKeyRegistry, PluginRegistrar)
  • awaken-stores (FileStore, InMemoryStore implementations)
  • awaken-ext-deferred-tools (caller)
  • Documentation (ADR, book, reference)

Approach

  1. Rename at source, re-export old names as deprecated type aliases for one release cycle
  2. Update all internal usages
  3. Remove deprecated aliases in next breaking release

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions