Skip to content

[memory→tinymemory] tinymemory-api: stable error codes, account-wide errors, typed recall skip reason, EngineStatus #1

Closed

Description

@senamakel

Moved from tinyhumansai#280, which is closed in favour of this issue. Part of tinyhumansai/openhuman#8000.

For openhuman's memory/error.rs (153) and memory/status.rs (49).

  • Error::code() returns the seven stable codes OpenHuman maps to RPC (MEMORY_OFF, UNSUPPORTED, INVALID_REQUEST, …). Add the Off (with reason) and InsufficientCredits kinds and Error::is_account_wide(). The account-wide check currently lives three times: host MemoryError::is_account_wide, layout_migration::error::is_account_wide, and integrations::cortex::is_insufficient_credits. Keep one.
  • Bug fix: holistic_recall reports skipped sections as strings. The host recovers a typed refusal by matching Display prefixes ("unauthorized: ", "unavailable: ", "engine error: "; memory/error.rs refusal_from_skip_reason), so any wording change upstream silently turns an account-wide refusal into a skip. Return a typed skip reason instead.
  • engine::EngineStatus { health, reason, capabilities, contract_version }, built from EngineDescriptor + EngineHealth, with an Off case, plus the operation list currently hard-coded in status.rs.
  • Housekeeping left over from [openhuman#7523] tinymemory: move generic memory mechanics out of openhuman-core tinyhumansai/tinymemory#266: AGENTS.md/README still say "exactly three crates" (tinyredact exists) and mention tinycortex/tinymemory-import.

The host keeps only impl From<Error> for StructuredRpcError and the SubsystemStatus wire struct (senamakel/openhuman#86).

Done when: the new API is merged with its tests (moved host tests travel with the code), cargo test --workspace and cargo clippy --workspace --all-targets -- -D warnings pass, and a tag is cut so OpenHuman can bump the gitlink. tinymemory-tools stays tokio-free (spawn/clock are traits); schemars only behind an optional schema feature.

Agent brief

  • Files to consider: host memory/error.rs, memory/status.rs; upstream tinymemory-api/src/{error,engine}/
  • Research: the gaps listed above
  • Workflow: an implementing-an-epic step; follow the migrate-to-submodule skill (upstream PR → tag → OpenHuman gitlink bump + delete host copy).
  • Subagent: tdd-implementer.

Parent: tinyhumansai/openhuman#8000

Activity

  1. added
    enhancementNew feature or request
    priority: p2Soon. Real but survivable — a rough edge, a gap, a thing that will bite later.
    rustPull requests that update rust code
    on Oct 16, 2026
  2. senamakel commented on Oct 17, 2026

    @senamakel
    OwnerAuthor

    Merged in #15 (87dd692). All 34 hosted checks passed on the reviewed head; fork-only snapshot tag epic-8000-1 resolves to the verified merge commit. Spreadsheet restoration remains tracked separately in upstream tinyhumansai#293 (P1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: p2Soon. Real but survivable — a rough edge, a gap, a thing that will bite later.rustPull requests that update rust code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions