Skip to content

Keep the OpenHuman pin bump non-breaking (#18 audit follow-up) - #60

Merged
YellowSnnowmann merged 1 commit into
tinyhumansai:mainfrom
YellowSnnowmann:feat/18-pin-bump-compat
Aug 19, 2026
Merged

Keep the OpenHuman pin bump non-breaking (#18 audit follow-up)#60
YellowSnnowmann merged 1 commit into
tinyhumansai:mainfrom
YellowSnnowmann:feat/18-pin-bump-compat

Conversation

@YellowSnnowmann

@YellowSnnowmann YellowSnnowmann commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

The #18 end-to-end audit's downstream dimension resolved every path OpenHuman imports (1,111 path tokens, 33 re-export shim files, signatures diffed old-pin vs new) against the post-#48 tree. Four tinymemory-side breaks would have hit at the next submodule pin bump. Each gets the smallest compat surface, marked for deletion once downstream migrates:

Break at bump Fix here
tinymemory_core::tinycortex gone (§C1 rename to engine) — OpenHuman re-exports it wholesale, 25 call sites #[doc(hidden)] pub use engine as tinycortex at the core root
memory::tinycortex::SyncAuditEntry unresolvable — embedded in an OpenHuman RPC response type type re-exported from the engine seam (stays core-owned)
extract_item_id deleted in §B1a as dead — OpenHuman's raw-coverage tests import it through the pin restored; the deletion's grep never covered downstream tests
core's SyncState::load/save take core's SyncStateStore; OpenHuman tests pair that with HostSyncAdapter, which only implemented the engine trait adapter implements both traits (same KV calls) during the transition

Confirmed for the bump PR on OpenHuman's side (not fixable here): store_golden.rs must absorb fts5::episodic_insertResult<i64> (main drift), and both its cargo workspaces need a [patch] mapping tinymemory-api's git URL to the submodule path.

Validated-safe by the audit's refutation pass: the reported live new_local() caller was a stale checkout — OpenHuman main migrated in openhuman#5575. load_composio_sync_state's retype and every seam-fn signature check shape-compatible for their actual consumers.

Validation: 847 + e2e tests green, clippy clean, engine-containment.sh holds (the alias is as tinycortex, not a tinycortex:: code path — and the script was probe-tested against exactly this).

Summary by CodeRabbit

  • Improvements
    • Improved synchronization state handling for more consistent sync operations.
    • Enhanced identification of synchronized items when data contains nested or formatted values.
    • Added compatibility support for existing integrations and module access patterns.

The tinyhumansai#18 end-to-end audit's downstream dimension resolved every path
OpenHuman imports (1,111 tokens across 33 shim files) against the
post-tinyhumansai#48 tree. Four tinymemory-side breaks would have surfaced at the
next submodule pin bump; each gets the smallest surface that keeps the
old path resolving, marked for deletion once downstream migrates.

1. `pub use engine as tinycortex` (doc-hidden) at the core root.
   OpenHuman re-exports `tinymemory_core::tinycortex` wholesale and 25
   call sites reach through it; the §C1 rename would have made the bump
   a coordinated two-repo edit for zero behavioural gain.

2. `SyncAuditEntry` re-exported from the engine seam. OpenHuman's
   sources RPC embeds `memory::tinycortex::SyncAuditEntry` in a
   response type. The type stays core-owned (§B1a); only the address is
   preserved.

3. `extract_item_id` restored in sync_state. Deleted in §B1a as dead --
   measured with too small a grep: OpenHuman's raw-coverage integration
   tests import and exercise it through the pin.

4. `HostSyncAdapter` also implements core's `SyncStateStore`, beside
   the engine trait of the same shape. Core's `SyncState::load`/`save`
   take the core trait now, and OpenHuman pairs that type with this
   adapter in its integration tests. Same KV calls; one storage, two
   trait names during the transition.

Not fixed here, confirmed for the bump PR on OpenHuman's side: its
`store_golden.rs` seeder must absorb `fts5::episodic_insert` now
returning `Result<i64>` (main drift), and both its cargo workspaces
need a `[patch]` entry mapping tinymemory-api's git URL to the
submodule path before the vendored tinycortex resolves.

Also validated by the audit's refutation pass: the reported live
`MemoryClient::new_local()` caller was a stale checkout -- OpenHuman
main migrated to `active_memory_client()` in openhuman#5575.

cargo test -p tinymemory-core: 847 + e2e passed
cargo clippy --all-targets: clean
scripts/ci/engine-containment.sh: holds (the alias is `as tinycortex`,
  not a `tinycortex::` code path)
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 66877688-5a25-4bde-87c4-bc5cef4ac7b6

📥 Commits

Reviewing files that changed from the base of the PR and between d1bdee2 and 7d2dac0.

📒 Files selected for processing (4)
  • core/src/engine/mod.rs
  • core/src/engine/sync.rs
  • core/src/lib.rs
  • core/src/sync/composio/providers/sync_state.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The PR adds a memory-backed sync state adapter, a helper for extracting item IDs from nested JSON values, and public engine exports for SyncAuditEntry and the tinycortex alias.

Changes

Sync API integration

Layer / File(s) Summary
Sync state storage and item identification
core/src/engine/sync.rs, core/src/sync/composio/providers/sync_state.rs
HostSyncAdapter now reads and writes sync state through the memory KV store. extract_item_id returns the first valid trimmed string found at the configured JSON paths.
Public engine exports
core/src/engine/mod.rs, core/src/lib.rs
The engine publicly re-exports SyncAuditEntry and is also available through the tinycortex alias.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 7d2da

This PR adds narrowly scoped compatibility shims for the upcoming dependency pin bump, with validation reported as passing; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: senamakel

Poem

I hop through keys where sync states sleep,
And find bright IDs in JSON deep.
The engine blooms with names anew,
SyncAuditEntry joins the queue.
Tinycortex shines in view!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main objective: preserving compatibility for the upcoming OpenHuman pin bump.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

$0.0000 · 0 in / 0 out · 219 embedded · openrouter/openai/text-embedding-3-small

@tinysweeper

tinysweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown

How this change flows

1 changed behaviour across 12 relationships. 5 surrounding behaviours are shown (60 graph nodes walked). 38 further behaviours left out to keep the diagram readable.

flowchart LR
  n0["HostSyncAdapter<br/>changed"]:::changed
  n1["composio_sync_document_reaches_memory_tree"]:::impacted
  n2["...pe_item_is_skipped_for_memory_tree_ingest"]:::impacted
  n3["..._is_tolerated_and_skill_store_is_retained"]:::impacted
  n4["new"]:::impacted
  n5["config_less_adapter_skips_memory_tree_ingest"]:::impacted
  n1 -->|uses| n0
  n1 -->|calls| n4
  n1 -->|tests| n4
  n2 -->|uses| n0
  n2 -->|calls| n4
  n2 -->|tests| n4
  n3 -->|uses| n0
  n3 -->|calls| n4
  n3 -->|tests| n4
  n5 -->|uses| n0
  n5 -->|calls| n4
  n5 -->|tests| n4
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading

Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge.

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Aug 19, 2026
@YellowSnnowmann

Copy link
Copy Markdown
Contributor Author

Scope note: this PR is API compatibility only — it fixes none of #59's checklist items (those remain for their own single PR). It is the tinymemory half of the pin-bump story; #59's item 7 lists the openhuman-side half (episodic_insert Result absorption, [patch] entries, coordinated tinycortex bump). Merge this before the next openhuman submodule bump.

@YellowSnnowmann
YellowSnnowmann merged commit ed18377 into tinyhumansai:main Aug 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant