Repository navigation
Epic: move inference/ out of the host into tinyinference, tinyagents and tinyjuice #8092
Description
Summary
crates/openhuman-core/src/inference/ is 13.8k non-test lines (plus 11.7k test lines). Most of it is generic model and provider plumbing that already half-exists in tinyinference (vendored at vendor/tinyagents/vendor/tinyinference) and tinyagents. This issue gives a verdict for every non-test file under inference/, plus three files the goal pulls in:
crates/openhuman-tinyhumans/src/inference/(managed model, 1.3k);agent/tinyagents/routes.rs;config/schema/cloud_providers.rs.
That is 85 files and 15,636 lines in total, audited on main at c1ef2a11d0, after #7929 merged. Format follows #7929.
It supersedes the older #7393, #7394 and #7403 (parent #7390). Those were scoped when inference/ was about 25k lines, and their remaining items are folded into the leaves below.
Ownership rule.
- tinyinference owns everything about models and providers:
- building a provider from a spec, and the provider-string grammar and route kinds;
- the builtin preset catalog, local runtimes,
/modelscatalogs, and context-window resolution; - reasoning and temperature, failure classification and demotion, product-neutral failure copy;
- usage, embeddings (catalog, factory, verification), the OpenAI-compatible server, and STT/TTS transport;
- the TinyHumans managed model, as a provider like any other.
- tinyagents owns the harness: workload routing, per-call model resolution and the turn model set, one-shot completions, stop/halt copy, and route enrichment.
- tinyjuice owns compression and its host-side tool adapters.
- OpenHuman keeps only:
- the config schema and the config→spec mapping;
- the seam implementations:
CredentialResolver,ErrorReporter,ModelFactory/ModelBuildGate,CopyProvider,RouteSource,CostEstimator; - Privacy Mode, access gates and the egress ledger;
- the
inference.*,embeddings.*,tokenjuice.*andlocal_ai.*RPC surfaces, and mounting the/v1router; - OpenHuman-branded copy, i18n and bus events.
- openhuman-tinyhumans keeps only registration, bearer resolution and session-expiry handling.
Invariants.
- Dependency direction: tinyagents → tinyinference; tinyinference never depends on tinyagents or OpenHuman.
- RPC namespace/method strings, model-facing tool names,
chat_error.*i18n keys and embedding signatures do not change. - Tests move with the code. No shims are left behind.
Verdicts
- DELETE: a shim, re-export, dead code or duplicate. Callers import the real thing directly.
- UPSTREAM: generic logic with no upstream equivalent yet. It moves to the named crate and module, and the host keeps the named seam.
- REIMPLEMENT: the host rebuilt something upstream already has. Replace it with the upstream symbol; the listed gaps land upstream first.
- RELOCATE: product or host code in the wrong host directory or crate.
- KEEP: genuine wiring or a port implementation.
New modules proposed
- New crate
tinyjuice-host(tinyjuice repo, J1).- Contents: the retrieve tool (updated to the shipped
juice_retrievetoken+range contract), the REPL tool wrappers withQuerySourceand the artifact reader,MlHost.Generatetickets, the summary-focus helpers, and the recovery-name tables and pass-through helper. - Dependencies:
tinyjuice-bus,tinytools,tokio,uuid. OpenHuman links it next totinyjuice-bus. - It replaces the unused
vendor/tinyjuice/src/host/copies, and keeps the bus contract free of runtime dependencies.
- Contents: the retrieve tool (updated to the shipped
- New module
tinyinference-llm/src/providers/tinyhumans/(U4):TinyHumansModelwith a dynamic bearer, the reasoning wire, the usage-envelope projection, discovery, and anon_auth_failurecallback. - New modules in existing crates:
tinyinference-llm:catalog/fetch.rs(U2),failure/{demotion,copy}.rs(U3),providers/overrides.rs(U8, owner decision).tinyinference-embeddings:verify.rs(U9).tinyagents-harness:oneshot.rs(T1),host::{ModelFactory, ModelBuildGate, TurnModelSet}(T2).tinyagents-registry:router::RouteSource(T3).
- No new host domain.
agent_chatmoves into the existingsrc/agent_runs/(R1), and the cloud-provider config code intosrc/config/(R2).
Totals
| Verdict | Lines | Files | Share |
|---|---|---|---|
| KEEP | 5,347 | 34 | 34% |
| REIMPLEMENT | 4,728 | 20 | 30% |
| UPSTREAM | 3,328 | 18 | 21% |
| RELOCATE | 2,085 | 9 | 13% |
| DELETE | 148 | 4 | 1% |
Projected size. If every row lands:
inference/drops from about 13.8k to about 5.5k lines: RPC controllers, config mapping, seam impls, branded copy, and about 1k of thin residue left by REIMPLEMENT rows.openhuman-tinyhumans/src/inference/drops from 1.3k to about 0.3k.- About 7k lines leave the host. Some move upstream as new code; the rest are deleted in favour of upstream code that already exists.
- About 2k lines move to
agent_runs,config,securityandopenhuman-tinyhumans.
KEEP files that stay oversized and get split on touch: ops.rs 494, tokenjuice/mod.rs 466, tokenjuice/schemas.rs 438, schemas/catalog.rs 389 (data), host_runtime/schemas.rs 368.
Sub-issues (tracker)
Work order:
- Bugs and deletes (OpenHuman only).
- Relocations: one destination per PR, OpenHuman only, wire names unchanged.
- Upstream work in tinyinference, tinyagents and tinyjuice.
- Host adoption: each leaf is blocked on its upstream leaves, bumps the gitlink and deletes the host copy.
Every upstream item follows the same chain: upstream PR → tag/release → OpenHuman gitlink bump (and module digest re-pin for tinyjuice) plus deletion of the host copy, per .claude/skills/migrate-to-submodule.
1. Bugs found in the audit
- [inference-out] bug: managed embeddings send expired or offline-local session tokens to the backend senamakel/openhuman#244 managed embeddings send expired or offline-local session tokens
- [inference-out] bug: local TTS writes to an unvalidated output_path and synthesizes empty text senamakel/openhuman#245 local TTS writes to an unvalidated output_path and synthesizes empty text
- [inference-out] bug: local_ai_status starts a new bootstrap on every poll senamakel/openhuman#246 local_ai_status starts a new bootstrap on every poll
- [inference-out] bug: embeddings.update_settings reports the signature of a provider string it never stores senamakel/openhuman#247 embeddings.update_settings reports the signature of a provider string it never stores
- [inference-out] bug: stop summaries are classified by substring-matching English halt prose senamakel/openhuman#248 stop summaries are classified by substring-matching English halt prose
- [inference-out] bug: tokenjuice RPC handlers ignore the request's config and reload the default one senamakel/openhuman#249 tokenjuice RPC handlers ignore the request's config
1. Deletes (OpenHuman only)
- [inference-out] delete: inference re-export hubs, legacy provider stubs and dead helpers senamakel/openhuman#250 inference re-export hubs, legacy provider stubs and dead helpers
2. Relocations (OpenHuman only; wire names unchanged)
- [inference-out] relocate: agent_chat entry points and turn guards from inference/host_runtime to src/agent_runs/ senamakel/openhuman#266 agent_chat and turn guards →
src/agent_runs/ - [inference-out] relocate: cloud-provider config compatibility and update validation into src/config/ senamakel/openhuman#267 cloud-provider config compatibility and update validation →
src/config/ - [inference-out] relocate: managed-backend construction, tier vocabulary and backend errorCode rules into openhuman-tinyhumans senamakel/openhuman#268 managed backend, tier vocabulary and backend errorCode rules →
openhuman-tinyhumans - [inference-out] relocate: embedding credential state-dir resolution out of embedding_host/cloud_adapter.rs senamakel/openhuman#269 embedding credential state-dir resolution →
src/security/credentials/
3. Upstream: tinyinference
- [inference-out] upstream: typed provider-route kinds, custom-endpoint helpers and host-extensible builtin presets in tinyinference-providers senamakel/tinyinference#5 typed route kinds, custom-endpoint helpers, host-extensible builtin presets (providers)
- [inference-out] upstream: async /models catalog fetch, OpenRouter key check and local-runtime listing endpoints senamakel/tinyinference#6 async
/modelsfetch, OpenRouter key check, local listing endpoints - [inference-out] upstream: provider-failure demotion ladder and neutral failure copy in tinyinference-llm failure/ senamakel/tinyinference#7 failure demotion ladder and neutral failure copy
- [inference-out] upstream: TinyHumans managed model (dynamic bearer, reasoning wire, usage envelope, catalog) in tinyinference-llm providers/tinyhumans/ senamakel/tinyinference#8 TinyHumans managed model (
providers/tinyhumans/) - [inference-out] upstream: billed usage, response conversion, reasoning-effort parsing and sentiment prompt in tinyinference-llm senamakel/tinyinference#9 billed usage, response conversion, reasoning parsing, sentiment prompt
- [inference-out] upstream: route-level context-window resolution in tinyinference-llm senamakel/tinyinference#10 route-level context-window resolution
- [inference-out] upstream: cloud-slug build options (Codex routing, custom CA client, slug model fallback) in tinyinference-llm senamakel/tinyinference#11 cloud build options, Codex routing, custom CA client
- [inference-out] upstream: id-keyed provider overrides (managed-gateway bypass seam) in tinyinference-llm senamakel/tinyinference#12 id-keyed provider overrides (decision 2)
- [inference-out] upstream: custom-endpoint verification, connection test and unavailable embedder in tinyinference-embeddings senamakel/tinyinference#13 embedding custom-endpoint verification and unavailable embedder
- [inference-out] upstream: LocalAiService ensure_ready/status overlay and file-level STT/TTS helpers in tinyinference-local/-voice senamakel/tinyinference#4 LocalAiService
ensure_readyand STT/TTS file helpers
3. Upstream: tinyagents
- [inference-out] upstream: one-shot completion helper (tinyagents-harness oneshot.rs) senamakel/tinyagents#72 one-shot completion helper (
oneshot.rs) - [inference-out] upstream: role-keyed model factory and turn model set (tier loop, build gate, subprocess routes) in tinyagents-harness senamakel/tinyagents#73 role-keyed
ModelFactory,ModelBuildGate,TurnModelSet - [inference-out] upstream: WorkloadRouter route source, default-model routes, cloud-fallback roles and hint resolution in tinyagents-registry senamakel/tinyagents#74
WorkloadRouterroute source, cloud-fallback roles, hint resolution - [inference-out] upstream: resolved-route enrichment middleware with a cost-estimator callback senamakel/tinyagents#75 resolved-route enrichment middleware with
CostEstimator - [inference-out] upstream: user-facing stop and halt copy with a host CopyProvider (turn_stop + hooks stop) senamakel/tinyagents#76 stop and halt copy with a host
CopyProvider - [inference-out] upstream: per-thread reasoning effort and turn output cap in tinyagents-harness run policy senamakel/tinyagents#77 per-thread reasoning effort and turn output cap
3. Upstream: tinyjuice
- [inference-out] upstream: new tinyjuice-host crate (retrieve and REPL tools, Generate tickets, focus helpers) and current juice_retrieve declarations senamakel/tinyjuice#6 new
tinyjuice-hostcrate and currentjuice_retrievedeclarations
4. Host adoption (each blocked on its upstream leaves)
- [inference-out] adopt: provider-route kinds and builtin presets; delete host prefix chains and preset helpers senamakel/openhuman#257 route kinds and builtin presets (← U1)
- [inference-out] adopt: upstream /models catalog fetch; delete host catalog listing senamakel/openhuman#258 catalog fetch (← U2)
- [inference-out] adopt: upstream failure demotion and neutral failure copy; shrink http_error to the ErrorReporter impl senamakel/openhuman#259 failure demotion and neutral copy (← U3)
- [inference-out] adopt: TinyHumansModel and CloudEmbeddingModel guard in openhuman-tinyhumans; collapse the managed model files senamakel/openhuman#260 TinyHumansModel and embedding guard (← U4, U9, R3, B1)
- [inference-out] adopt: upstream billed usage, response conversion, reasoning parsing and sentiment prompt senamakel/openhuman#261 usage, response conversion, reasoning, sentiment (← U5, T6)
- [inference-out] adopt: route-level context-window resolution; shrink context_window.rs and model_context.rs senamakel/openhuman#262 context-window resolution (← U6)
- [inference-out] adopt: upstream cloud build options and Codex routing; delete CloudBuild senamakel/openhuman#263 cloud build options and Codex routing (← U7)
- [inference-out] adopt: harness ModelFactory and TurnModelSet; collapse chat_model/turn_model/turn_models senamakel/openhuman#264 ModelFactory and TurnModelSet (← T2, U1, U7, H7)
- [inference-out] adopt: WorkloadRouter route source, fallback diagnostics and route middleware senamakel/openhuman#265 WorkloadRouter route source and route middleware (← T3, T4)
- [inference-out] adopt: harness one-shot helper; delete complete_once and agent_chat_simple bodies senamakel/openhuman#251 one-shot helper (← T1, R1)
- [inference-out] adopt: upstream stop and halt copy; delete failure_copy halt and stop_summary senamakel/openhuman#252 stop and halt copy (← T5, B5)
- [inference-out] adopt: upstream embedding verification; shrink embeddings settings RPC and delete cloud_adapter senamakel/openhuman#253 embedding verification (← U9, R4)
- [inference-out] adopt: LocalAiService ensure_ready and voice file helpers; shrink runtime_ops and speech senamakel/openhuman#254 LocalAiService and voice helpers (← U10, B2, B3)
- [inference-out] adopt: tinyjuice-host crate; delete host tokenjuice tool copies senamakel/openhuman#255
tinyjuice-hostadoption and module re-pin (← J1) - [inference-out] adopt: upstream ProviderOverrides; inference/registry.rs keeps only the host slot senamakel/openhuman#256 ProviderOverrides (← U8)
Bugs found in the audit
Each bug has its own leaf, except one:
- Privacy Mode bypass.
make_openhuman_backend_model_for_options(provider/factory/managed_backend.rs:139) builds the managed model with noLocalOnlygate and no egress record. The config-drivendelegatetool (tools/delegate.rs:252) reaches it. This is fixed by deleting that tool in [tinyagents-slim] delete: sync and graph delegation (delegate_graph,delegate,agent_work.*, fleet tools) senamakel/openhuman#200 (Epic: one async spawn_subagent; goals, session and tools upstream; prune tinyagents to what OpenHuman uses #8088 D5); a comment there flags the priority.
Open decisions
- f64 vs micro-unit charges (U5). Upstream
ChargedAmountis integer micros, while the host persists exact f64 USD. Either add f64 upstream, or migrate stored cost rows. - Provider overrides upstream (U8/H15). Moving
inference/registry.rs's id-keyed tables gives tinyinference a host-seam type, which is whatProviderRegistry's "managed gateway should bypass this factory" doc anticipates. KEEP is the alternative. - TinyHumans model in tinyinference (U4).
providers/registry.rs:142says the managed gateway bypasses the factory. PuttingTinyHumansModelupstream reads that as "a separate provider module, not aProviderSpeckind". Confirm that reading. The wire keysopenhuman_usage_metaand theopenhumanenvelope keep their spelling. tinyjuice-hostas a new crate (J1), versus feature-gating tokio/uuid/tinytools intotinyjuice-bus. The contract rules require bus crates to stay sync and free of runtime dependencies, so a new crate is recommended.- Crate-chain seams for R3. Core cannot depend on
openhuman-tinyhumans, so movingerror_code.rsandtiers.rsout of core needs a registeredBackendErrorCodeClassifierslot. The managed-default lookup goes through the existinginference::registryentry. /v1role.http/backend.rsresolves every/v1request as theagenticrole, so Privacy Mode and fallback follow that workload. Confirm this is intended before H1 touches it.- Subprocess providers. Claude Code and the Claude Agent SDK stay in tinyagents-harness, because tinyinference cannot depend on tinyagents. tinyinference only parses their route kind (U1), and the harness builds them (T2).
Evaluation
Evaluation A: provider/factory/ (2958 non-test lines)
UPSTREAM 255 (1 files) · KEEP 679 (4 files) · RELOCATE 497 (3 files) · REIMPLEMENT 1527 (6 files)
| File | Lines | Verdict | Target | Reason |
|---|---|---|---|---|
crates/openhuman-core/src/inference/provider/factory.rs |
155 | KEEP | host | Module root. Prefix consts and grammar doc duplicate tinyinference_providers::route / tinyinference_local::profile; after U1 only the test-override seam and re-exports remain. Replace the use super::* web with explicit imports. |
crates/openhuman-core/src/inference/provider/factory/access_gates.rs |
229 | KEEP | host (split) | Privacy LocalOnly, egress emission, session checks are host policy. external_provider_label / "is external" string classification becomes ProviderRoute::kind()/is_external() upstream (U1). |
crates/openhuman-core/src/inference/provider/factory/chat_model.rs |
439 | REIMPLEMENT | tinyagents-harness ModelResolver; tinyinference-llm ModelRequestDefaults |
DefaultTemperatureChatModel re-implements ModelRequestDefaults/ProfileOverrideModel; the managed→SDK→claude-code→local→cloud cascade is duplicated with turn_model.rs. Host keeps probe_inference_readiness and a build-gate callback. Gap: role-keyed model factory (T2). |
crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs |
419 | REIMPLEMENT | tinyinference-llm ProviderRegistry::build_with, providers::openai::codex |
Slug→model fallback, hint:* remap, Codex header/user-agent assembly and custom-CA client are generic. Host keeps the cloud_providers lookup, ephemeral headers, egress, gates. Gaps in U7. |
crates/openhuman-core/src/inference/provider/factory/cloud_spec.rs |
121 | REIMPLEMENT | tinyinference-llm ProviderBuildOptions, CredentialResolver |
CloudBuild mirrors ProviderBuildOptions; per-call closure resolver should be a direct CredentialResolver impl; registry_auth_style → From<AuthStyle>. |
crates/openhuman-core/src/inference/provider/factory/credentials.rs |
177 | KEEP | host CredentialResolver impl |
Auth profiles, OAuth fallback, ephemeral key, legacy api_key. redact_endpoint is a weaker copy of tinyinference_core::sanitize::redact_url (delete in H7). |
crates/openhuman-core/src/inference/provider/factory/discovery.rs |
98 | REIMPLEMENT | tinyinference-llm ProviderRegistry::discovery_request |
Re-derives "can I discover limits" per route and builds a dummy CloudBuild. Gap: discovery_request(ProviderRoute, Option<ProviderSpec>) (U1/U7). Host keeps the managed catalog limits hook. |
crates/openhuman-core/src/inference/provider/factory/local_runtime.rs |
118 | KEEP | host | Thin over resolve_local_runtime + build_local_runtime_chat_model; gates, egress and LocalRuntimeInputs from config.local_ai. |
crates/openhuman-core/src/inference/provider/factory/managed_backend.rs |
161 | RELOCATE | crates/openhuman-tinyhumans/src/inference/ | Pinned managed default, alias handling, managed_unavailable_error are TinyHumans-specific. Privacy gate + egress stay as a core wrapper. make_openhuman_backend_model_for_options goes with tools/delegate.rs (senamakel#200). |
crates/openhuman-core/src/inference/provider/factory/primary_cloud.rs |
187 | RELOCATE | src/config/ | Config-compat (primary_cloud, legacy inference_url, BYOK-incomplete detection); no model logic. redact_inference_url duplicates redact_url (delete). Deprecation timer "keep until v0.66 (review after 2027-01-11)" is preserved. |
crates/openhuman-core/src/inference/provider/factory/routing.rs |
255 | UPSTREAM | tinyagents-registry router/ (WorkloadRouter + RouteSource) |
provider_for_role, default-model route honouring (#6938) and cloud-fallback logging are generic workload routing. Host keeps configured_route_for_role (config field per role) as the RouteSource impl. |
crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs |
152 | REIMPLEMENT | tinyagents-harness providers::{claude_code, claude_agent_sdk} |
Glue that parses claude-code:/claude_agent_sdk: prefixes. Gap: route kinds (U1) + harness builds them from the route (T2). Host keeps OpenHumanMcpEndpoint, workspace path, gates. |
crates/openhuman-core/src/inference/provider/factory/tiers.rs |
149 | RELOCATE | crates/openhuman-tinyhumans/src/inference/tiers.rs | Managed tier vocabulary (legacy_tier_role, managed_default_model, oh_tier_supports_vision). hint_role should use upstream ROUTE_*; resolve_model_for_hint/role_for_model_tier go to WorkloadRouter (T3). |
crates/openhuman-core/src/inference/provider/factory/turn_model.rs |
298 | REIMPLEMENT | tinyagents-harness host::model_resolver (ModelResolver, ModelResolveRequest) |
Eight create_turn_chat_model* variants repeat chat_model.rs's cascade with native-tools/egress flags. Collapse into one resolver impl fed by a host model factory (T2). |
Evaluation B: provider/ (rest), provider/ops/, config/schema/cloud_providers.rs (2101 non-test lines)
UPSTREAM 923 (6 files) · KEEP 37 (1 files) · DELETE 116 (3 files) · RELOCATE 284 (2 files) · REIMPLEMENT 741 (4 files)
| File | Lines | Verdict | Target | Reason |
|---|---|---|---|---|
crates/openhuman-core/src/inference/provider/mod.rs |
37 | KEEP | host | Module list; shrinks as children move. |
crates/openhuman-core/src/inference/provider/types.rs |
170 | UPSTREAM | tinyinference-llm usage/, model/ |
BilledUsage (f64 USD, cost_is_estimate, charge_reported), ChatResponse, ProviderDelta are generic. AGENT_TURN_MAX_OUTPUT_TOKENS → tinyagents-harness turn_policy. Owner note: f64 vs ChargedAmount micros. |
crates/openhuman-core/src/inference/provider/model.rs |
202 | UPSTREAM | tinyinference-llm usage/; tinyagents-harness |
response_to_model_response (incl. p-format text tool-call fallback), billed_usage_report, usage_info_from_response have no host policy. TurnChatModel/TierRoutes/BuiltTurnModels aliases die with T2. |
crates/openhuman-core/src/inference/provider/error_classify.rs |
41 | REIMPLEMENT | tinyinference-llm classify_provider_failure; tinyagents-harness retry::FailoverReason |
Wraps the upstream classifier plus three NonRetryable predicates. Gap: host is_session_expired predicate seam (U3). Only caller triage/evaluator/arm.rs. |
crates/openhuman-core/src/inference/provider/error_code.rs |
217 | RELOCATE | crates/openhuman-tinyhumans (backend_error_code.rs) behind a core classifier slot |
Managed-backend errorCode contract and Sentry-ownership rules. Core callers (core/observability.rs, web_chat/web_errors) cannot depend on tinyhumans, so core keeps a registered BackendErrorCodeClassifier slot (R3). |
crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs |
169 | UPSTREAM | tinyagents-registry router/ (role fallback set + diagnostics); copy stays host |
CLOUD_FALLBACK_ROLES/role_falls_back_to_cloud/override_knob_for_role duplicate routing.rs's role knowledge and belong on WorkloadRoute. The branded "Connections → LLM" strings stay as host copy. |
crates/openhuman-core/src/inference/provider/openai_codex.rs |
45 | REIMPLEMENT | tinyinference-llm OpenAiCodexRouting::oauth/standard |
Hand-builds the routing struct. Gap: resolve_codex_routing(slug, endpoint, bearer_is_oauth, creds) (U7). |
crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs |
67 | RELOCATE | crates/openhuman-tinyhumans | PROVIDER_LABEL, REASONING_OFF_METADATA_KEY, without_reasoning go with the managed model; is_safe_endpoint_for_managed_bearer duplicates the tinyhumans copy (delete in D1). |
crates/openhuman-core/src/inference/provider/ops/mod.rs |
34 | DELETE | — | Re-export hub with a stale doc naming a non-existent sanitize module and a test-only re-export shim. Callers import the real modules. |
crates/openhuman-core/src/inference/provider/ops/http_error.rs |
259 | UPSTREAM | tinyinference-llm failure/demotion.rs |
The Sentry demotion ladder (budget, no-model-loaded, custom upstream, access policy, config rejection, context window, quota → demote kind) is generic. Host keeps the ErrorReporter impl (Sentry + SessionExpired/ProviderApiKeyRejected bus publishes); backend polarity guards → tinyhumans. |
crates/openhuman-core/src/inference/provider/ops/provider_factory.rs |
43 | DELETE | — | list_providers returns a hard-coded one-entry legacy list ("remote providers were removed"); callers channels/routes.rs:13, platform/doctor/core/run.rs:68 switch to configured cloud_providers. ProviderRuntimeOptions only feeds tools/delegate.rs (deleted by senamakel#200). |
crates/openhuman-core/src/inference/provider/ops/models.rs |
39 | DELETE | — | use super::* glue; doc lists sub-modules that no longer exist; test-only re-exports. |
crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs |
338 | REIMPLEMENT | tinyinference-llm catalog/ + ProviderRegistry::discovery_request |
Full /models pipeline (codex query param, OAuth headers, auth-style headers, 404 hint, 200-with-error check). Gap: async catalog::fetch::list_models(client, DiscoveryRequest) (U2). Host keeps CA client + Outcome wrapping. Builds the CA/proxy client twice. |
crates/openhuman-core/src/inference/provider/ops/models/local_runtime.rs |
58 | UPSTREAM | tinyinference-local provider.rs |
Endpoint synthesis for ollama/lmstudio listing over upstream base-url helpers → local_runtime_models_endpoint(slug, base_url). |
crates/openhuman-core/src/inference/provider/ops/models/openrouter.rs |
65 | UPSTREAM | tinyinference-llm catalog/ |
validate_openrouter_api_key ({base}/key + error payload) is generic; host passes the client. |
crates/openhuman-core/src/config/schema/cloud_providers.rs |
317 | REIMPLEMENT | tinyinference-providers builtin.rs |
endpoint_host, host_is_builtin_cloud_provider, endpoint_host_is_chat_completions_only, builtin_cloud_supports_responses_api, is_builtin_cloud_slug, builtin_cloud_provider re-implemented over host list = upstream + OPENHUMAN_PRESET. Gap: builtin registry accepting host presets (U1). Keep AuthStyle, CloudProviderCreds, is_slug_reserved. |
Evaluation C: host_runtime/, turn models, reasoning, context window, auth registry, agent/tinyagents/routes.rs (3347 non-test lines)
UPSTREAM 549 (3 files) · KEEP 537 (6 files) · RELOCATE 834 (2 files) · REIMPLEMENT 1427 (5 files)
| File | Lines | Verdict | Target | Reason |
|---|---|---|---|---|
crates/openhuman-core/src/inference/host_runtime/mod.rs |
35 | KEEP | host | Module wiring; drop the rpc alias/globs (D1). |
crates/openhuman-core/src/inference/host_runtime/core.rs |
15 | KEEP | host | Process singleton LocalAiService. |
crates/openhuman-core/src/inference/host_runtime/ops.rs |
26 | KEEP | host | Re-export hub for ops/; shrinks after R1. |
crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs |
696 | RELOCATE | src/agent_runs/ | Agent-turn entry (OpenHumanSessionHost, attachment staging, seed/resume, RPC envelope) is not local-runtime code, contrary to the host_runtime README. agent_chat_simple (~50 lines) adopts the harness one-shot helper (T1/H10). Oversized: split on move. |
crates/openhuman-core/src/inference/host_runtime/ops/complete_once.rs |
133 | UPSTREAM | tinyagents-harness oneshot.rs |
Stateless call: refuse tools, reject reserved provider_options, require model, build an OpenAI-compatible model, optional budget, invoke. No upstream equivalent. Model build should use ProviderRegistry. Host keeps ModelBudget wiring. |
crates/openhuman-core/src/inference/host_runtime/ops/runtime_ops.rs |
191 | REIMPLEMENT | tinyinference-local LocalAiService |
Repeated bootstrap-if-not-ready and status provider overlay are service concerns (ensure_ready()); local_ai_transcribe_bytes (temp file, extension sanitising) → tinyinference-voice. Host keeps prompt guard + llm_gate. |
crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs |
138 | RELOCATE | src/agent_runs/ | Prompt-injection enforcement, grant_turn_cwd, effective_agent_chat_origin serve agent_chat only; move with it. |
crates/openhuman-core/src/inference/host_runtime/schemas.rs |
368 | KEEP | host (split) | inference.*/local_ai.* controllers stay; the two agent_chat* controllers move to agent_runs (R1) and AgentChatParams merges with the near-copy there. Wire names unchanged. |
crates/openhuman-core/src/inference/host_runtime/service/mod.rs |
5 | KEEP | host | Re-export. |
crates/openhuman-core/src/inference/host_runtime/service/speech.rs |
155 | REIMPLEMENT | tinyinference-voice piper::synthesize, ExternalSttClient |
tts hand-copies piper::synthesize; transcribe is read+mime+base64 → provider. Gaps: synthesize_to_file, configurable length scale, transcribe_file (U10). Host keeps effective_stt_provider, mark_*_ready. |
crates/openhuman-core/src/inference/turn_models.rs |
693 | REIMPLEMENT | tinyagents-harness ModelResolver/PrebuiltModelResolver, model_registry/ |
Same managed-vs-BYOK construction three times (primary, per-tier routes, summarizer) plus override injection and attachments wrap. Upstream owns the tier loop over WORKLOAD_ROUTE_TIERS (skip-failed, RouteRecordingModel, ErrorSlotModel) behind a host ModelFactory (T2). |
crates/openhuman-core/src/inference/reasoning.rs |
222 | UPSTREAM | tinyinference-llm model/types.rs; tinyagents-harness RunPolicy |
parse_reasoning_effort (aliases), with_output_room (55% budget, 1024 floor), "disabled means none" are generic; per-thread effort map sits next to RunPolicy.default_reasoning. Host keeps the runtime.reasoning_effort* mapping. |
crates/openhuman-core/src/inference/context_window.rs |
244 | REIMPLEMENT | tinyinference-llm ContextWindowResolver, model::discover |
Thin caller plus generic Ollama limits URL, warn-once static guess, fetcher client builder. Gap: resolve_for_route(provider, model, local_kind) with a fetcher factory (U6). Host keeps config_override and the CA/proxy client callback. |
crates/openhuman-core/src/inference/model_context.rs |
144 | REIMPLEMENT | tinyinference-llm context_window_for_model_id; tinyagents-registry pricing::lookup |
Fallback chain already upstream; tier aliases belong to workload.rs; MODEL_MANAGED_DEFAULT → tinyhumans. model_vision_enabled (config lookup) stays. |
crates/openhuman-core/src/inference/auth_error_registry.rs |
88 | KEEP | host | Registry/latch already upstream; what remains is the singleton, clock and branded "Connections → API keys → LLM" copy. |
crates/openhuman-core/src/agent/tinyagents/routes.rs |
194 | UPSTREAM | tinyagents-harness middleware/library/workload.rs |
ResolvedRouteMiddleware (emit enrichment, record route, :free pricing, pricing::lookup) is generic apart from a cost-estimator callback and the run-context slot. turn_required_capabilities/route_fallback_policy are one-line wrappers to inline. |
Evaluation D: embedding_host/, http/, registry.rs, mod.rs, ops.rs, schemas/ (3592 non-test lines)
UPSTREAM 679 (2 files) · KEEP 2443 (15 files) · RELOCATE 470 (2 files)
| File | Lines | Verdict | Target | Reason |
|---|---|---|---|---|
crates/openhuman-core/src/inference/embedding_host/mod.rs |
37 | KEEP | host | Module wiring; drop unused DEFAULT_CLOUD_EMBEDDING_* re-exports (D1). |
crates/openhuman-core/src/inference/embedding_host/cloud_adapter.rs |
148 | RELOCATE | src/security/credentials/ (state-dir); tinyinference-embeddings (UnavailableEmbeddingModel) |
~90 lines are credential state-dir resolution mirroring config::load; ~50 lines are a generic erroring EmbeddingModel (U9). File name is stale. |
crates/openhuman-core/src/inference/embedding_host/factory.rs |
182 | KEEP | host | Config → EmbeddingFactorySettings/CredentialResolver/ManagedModelFactory. The managed-factory closure is written twice; custom:<url> rewrite uses the U1 helper. |
crates/openhuman-core/src/inference/embedding_host/rpc.rs |
82 | KEEP | host | provider_from_config, build_embedder, resolve_api_key (host credential impl). |
crates/openhuman-core/src/inference/embedding_host/rpc/api_keys.rs |
62 | KEEP | host | Credential-store RPC. |
crates/openhuman-core/src/inference/embedding_host/rpc/embed.rs |
147 | KEEP | host | embed/test_connection RPC. Custom-vs-factory branch collapses onto test_embedding_connection (U9). |
crates/openhuman-core/src/inference/embedding_host/rpc/settings.rs |
432 | UPSTREAM | tinyinference-embeddings verify.rs (new) |
~230 lines orchestrate custom-endpoint verification (timeout, classify_embed_probe, served-model guidance, final_probe_dims, signature change) over upstream pieces; effective_embedder_slug is a pure fn. Host keeps config load/save and AuthService lookups. |
crates/openhuman-core/src/inference/embedding_host/schemas.rs |
293 | KEEP | host | embeddings.* controllers. optional_bool is dead (D1); schema helpers duplicated with inference/schemas. |
crates/openhuman-core/src/inference/http/mod.rs |
37 | KEEP | host | Mounts the upstream server_http::router. |
crates/openhuman-core/src/inference/http/backend.rs |
158 | KEEP | host | ChatBackend impl over config. Bare-name→ollama: and route→(id, owned_by) mapping use U1 helpers. Hard-codes the agentic role for every /v1 call (note). |
crates/openhuman-core/src/inference/registry.rs |
247 | UPSTREAM | tinyinference-llm providers/overrides.rs (new) |
Id-keyed chat/embedding/catalog override tables — the "managed gateway bypass" ProviderRegistry's doc expects. Make request types generic over Ctx; host keeps the HookSlot storage. Owner decision (note). |
crates/openhuman-core/src/inference/mod.rs |
132 | KEEP | host | local_runtime_config and impl LocalModelConfig for Config. pub use ops as rpc alias goes (D1). |
crates/openhuman-core/src/inference/ops.rs |
494 | KEEP | host (split) | Mostly logged passthroughs. inference_analyze_sentiment prompt → tinyinference_llm::sentiment (U5); hand-rolled local-prefix check re-implements is_local_provider_string (H5); Sentry demotion policy stays. Split into ops/{status,oauth,models,sentiment}.rs. |
crates/openhuman-core/src/inference/schemas.rs |
159 | KEEP | host | Controller registry (inference.*). |
crates/openhuman-core/src/inference/schemas/catalog.rs |
389 | KEEP | host | Schema data. |
crates/openhuman-core/src/inference/schemas/claude_code_handlers.rs |
84 | KEEP | host | Thin RPC over tinyagents_harness::providers::claude_code. |
crates/openhuman-core/src/inference/schemas/oauth_handlers.rs |
72 | KEEP | host | Thin RPC; flow already on tinyinference_providers::oauth::OAuthFlow. |
crates/openhuman-core/src/inference/schemas/prompt_handlers.rs |
115 | KEEP | host | Thin RPC handlers. |
crates/openhuman-core/src/inference/schemas/settings_handlers.rs |
322 | RELOCATE | src/config/ops/ | ~110 lines turn InferenceCloudProviderUpdate into CloudProviderCreds (reserved slugs, legacy type, auth_style parse, defaults): config validation, not RPC. AuthStyle::parse → config::schema::cloud_providers. |
Evaluation E: tokenjuice/, failure_copy/ (2319 non-test lines)
UPSTREAM 604 (3 files) · KEEP 1444 (6 files) · DELETE 32 (1 files) · REIMPLEMENT 239 (2 files)
| File | Lines | Verdict | Target | Reason |
|---|---|---|---|---|
crates/openhuman-core/src/inference/tokenjuice/mod.rs |
466 | KEEP | host (split) | Host adapter (config → InstallRequest, ModuleClient calls, pass-through, install fingerprint, gates). Recovery name tables and the compaction pass-through helper move to tinyjuice-host (J1). |
crates/openhuman-core/src/inference/tokenjuice/config_patch.rs |
74 | KEEP | host | tokenjuice.settings_update config patch. |
crates/openhuman-core/src/inference/tokenjuice/focus.rs |
32 | DELETE | tinyjuice-host (copy exists at vendor/tinyjuice/src/host/focus.rs) | Byte-near-identical to the root-crate copy; OH links only tinyjuice-bus, so both copies live. Consolidate in tinyjuice-host. |
crates/openhuman-core/src/inference/tokenjuice/generate.rs |
96 | REIMPLEMENT | vendor/tinyjuice/src/host/generate.rs → tinyjuice-host |
Identical ticket registry for MlHost.Generate. Host keeps the per-turn PreparedGenerate closure and ML_HOST wiring. |
crates/openhuman-core/src/inference/tokenjuice/repl_tools.rs |
394 | UPSTREAM | tinyjuice-host (new crate) |
~280 lines generic (ModuleReplTool, QuerySource, error mapping, dispatch) + ~60 lines artifact containment reader. Host keeps repl_tools_for*, dispatch ctx, artifacts dir. Not tinytools-std (deleted by #8088). |
crates/openhuman-core/src/inference/tokenjuice/savings.rs |
116 | KEEP | host | Attribution model + price lookup is host policy (should read tinyagents-registry pricing). |
crates/openhuman-core/src/inference/tokenjuice/schemas.rs |
438 | KEEP | host | tokenjuice.* controllers; generate ContentKind lists from the enum. |
crates/openhuman-core/src/inference/tokenjuice/tools.rs |
143 | REIMPLEMENT | vendor/tinyjuice/src/host/retrieve_tool.rs (RetrieveToolOutputTool) |
Upstream retrieve tool + bus declarations are the stale hash/retrieve_tool_output form; OH ships juice_retrieve with token+range. Gap: update bus declarations and the tool to the OH contract (J1). |
crates/openhuman-core/src/inference/failure_copy/mod.rs |
23 | KEEP | host | Re-export module. |
crates/openhuman-core/src/inference/failure_copy/halt.rs |
173 | UPSTREAM | tinyagents-hooks stop/ (copy seam) |
Retry/no-progress/budget/provider-config halt summaries and terminal_inference_failure_kind are product-neutral bar one settings path. user_actionable_escalation (Composio/Connections) moves to its only caller middleware/repeated_failure.rs. |
crates/openhuman-core/src/inference/failure_copy/stop_summary.rs |
37 | UPSTREAM | tinyagents-harness turn_stop.rs |
English fallback per turn_stop.<class>; upstream owns the class + keys but only status_message(). Add TurnStopKind::user_copy() with a CopyProvider override. |
crates/openhuman-core/src/inference/failure_copy/table.rs |
327 | KEEP | host (split) | 29 rows class→error_type/source/retryable/copy/i18n key. ~15 neutral provider-failure rows → tinyinference_llm::failure::copy defaults behind FailureCopyProvider (U3); ~14 OpenHuman-branded rows stay. |
Evaluation F: crates/openhuman-tinyhumans/src/inference/ (1319 non-test lines)
UPSTREAM 318 (3 files) · KEEP 207 (2 files) · REIMPLEMENT 794 (3 files)
| File | Lines | Verdict | Target | Reason |
|---|---|---|---|---|
crates/openhuman-tinyhumans/src/inference/mod.rs |
111 | KEEP | openhuman-tinyhumans | Registration into core's inference::registry; maps Config → ManagedOptions. |
crates/openhuman-tinyhumans/src/inference/managed_calls.rs |
160 | UPSTREAM | tinyinference-llm providers/tinyhumans/ |
ChatModel decoration around OpenAiModel (reasoning/thread_id injection, usage projection, profile, cache identity, failure logging). Only maybe_publish_session_expired is host → on_auth_failure callback. |
crates/openhuman-tinyhumans/src/inference/managed_catalog.rs |
259 | REIMPLEMENT | tinyinference-llm catalog/ (+ U2 fetch); tinyhumans-sdk InferenceApi::list_models |
~150 lines are a hand-rolled GET with bearer/status/error-payload handling. Host keeps listing_auth, managed_401_means_signed_out, entry(). |
crates/openhuman-tinyhumans/src/inference/managed_embedding.rs |
149 | REIMPLEMENT | tinyinference-embeddings CloudEmbeddingModel::with_egress_guard |
Wrapper only forwards and calls the guard. Gap: empty-batch guard behaviour (U9). Bearer resolution must share the chat model's checks (bug). |
crates/openhuman-tinyhumans/src/inference/managed_model.rs |
386 | REIMPLEMENT | tinyinference-llm ProviderKind::TinyHumans → providers/tinyhumans/ |
Core is OpenAiModel::compatible_provider over /openai/v1, rebuilt per call for a fresh JWT. Gaps: dynamic BearerResolver, pooled client builder, readiness probe, empty-model fallback (U4). Host keeps resolve_bearer. |
crates/openhuman-tinyhumans/src/inference/managed_reasoning.rs |
83 | UPSTREAM | tinyinference-llm providers/tinyhumans/reasoning.rs |
Pure ModelRequest shaping (reasoning object, thread_id); the reasoning-off metadata key moves upstream with it. |
crates/openhuman-tinyhumans/src/inference/managed_session.rs |
96 | KEEP | openhuman-tinyhumans | Session-token policy and SessionExpired publishing: the on_auth_failure impl. Match on a typed flag, not the "OpenHuman" label literal. |
crates/openhuman-tinyhumans/src/inference/managed_usage.rs |
75 | UPSTREAM | tinyinference-llm usage/meta.rs |
Projects the openhuman.{billing,usage} envelope into merge_usage_meta; no host dependency. |
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
23 remaining items
senamakel commentedon Oct 18, 2026
core-shrink audit: inference rows handed to this epic
The reworked #7390 audit found these config files that belong to this epic. #7390 files no leaves for them.
config/schema/cloud_providers.rsconfig/schema/types/model_ids.rscrates/openhuman-tinyhumans/src/inference/(managed model catalog)config/schema/ephemeral_route.rscloud_providers.rs: about 90 lines re-implementtinyinference_providers::builtin::{endpoint_host, host_is_builtin_cloud_provider, ...}. Theopenhumanpreset (api.openhuman.ai/v1,AuthStyle::OpenhumanJwt) belongs in openhuman-tinyhumans.generate_provider_idduplicatesgenerate_voice_provider_id.model_ids.rs: managed tier slugs andMODEL_MANAGED_DEFAULTare TinyHumans catalog data. Core needs a neutral default-model hook.ephemeral_route.rs::apply()is route policy that importsinference::provider::factory::redact_endpoint.model_contextreimplementation.senamakel commentedon Oct 21, 2026
Paused handoff — 2026-10-21
Stopped at the user's explicit request. The native goal is paused, all workers are finished, and no build/test process remains running. 35 of 43 leaves are merged into the fork epic branches. The epic is not complete and no final upstream PR has been opened. No PR was opened or merged after the stop request; the completed, unmerged #264 feature branch was pushed solely to preserve the handoff.
Resume here: OpenHuman #264
5561a5506ebbda5b7076e92e9585087d2d7b1e5f; tree:b5d628ab641357086b4cc93f80061f4c1e8f3898.7b174a921b094b91f5f331026c6080b4d4a51db0(PR #557)./home/enamakel/work/openhuman/worktrees/epic-8092-264-model-factory. It is clean; all 55 recursive submodule pins match.senamakel/openhuman:epic/8092-inference-out, read full review channels, merge normally pinned to the tested head, verify the merge/tree, close fork issue #264, and update the ledger. Do not restart this implementation or count it as merged yet.The change adopts host
ModelFactory/ModelBuildGateand nativeTurnModelSet; removes the eight turn-model constructors, obsolete aliases, generic subprocess assembly, and discovery module; preserves host privacy/session/egress, credentials, explicit context/injection, attachments, and readiness policy. Native model defaults preserve optional profiles and explicit request values. Attachments use the actual resolved route. Budget decoration updates the native resolver/error slots with the wrapped models.Owner prerequisites already merged with all nonzero exact-head hosted checks green:
adc2d0967aaa22d881790af66b94c22b3eda051f; 829 local tests; 6 hosted checks.c29ab0ee8724e1a500f9ad0bb648546b34fd3c34; 17 focused model-factory tests; 10 hosted checks.Verified #264 gates:
-D warnings5561a55; receipt8092-264-oh-default-strict-r7.json8092-264-oh-core-product-strict-r3.jsonos-keyring8092-264-oh-cli-product-strict-r3.json8092-264-oh-product-inference-r3.json446821beb418d8fa585b67f08aa3fbd01a837af6. Its only delta to final5561a55moves one existing test unchanged into an external sibling module. The moved test passed again on final source (8092-264-cloud-slug-test-r1.json). Do not claim the full 613 executed exactly at final HEAD.6174b0din inference R2, then passed after the host attachment wrapper preservedOption<ModelProfile>; focused receipt8092-264-profileless-attachment-test-r2.json; same assertion retained.cargo check --workspace --all-targets8092-264-oh-workspace-alltargets-check-r1.jsoncargo check --manifest-path crates/openhuman-app/Cargo.toml8092-264-oh-app-manifest-check-r1.json8092-264-oh-attachments-product-r1.json. This is a focused-p openhuman --lib attachments::lane, separate from the mandatory workspace lane. Global workspace env was unset; fixtures use explicit temporary roots and local Probe/CaptureModel instances, with remote rejection before inference.pnpm rust:layout8092-264-oh-rust-layout-r1.json. Earlier unrecorded layout output had no durable final receipt and was not accepted; this recorded rerun closes that gap.Production privacy → explicit-host session → egress ordering is positively tested without a cfg-test gate bypass. Constructor-only fake-provider fixtures now run under actual Library host scopes; the explicit CLI policy test remains unchanged. Both Some-profile and None-profile injection, independent workloads, DeepSeek route remapping, explicit provider selection, and native budget error slots passed.
Durable local state and evidence
Admin root:
/home/enamakel/work/openhuman/.git/implementing-an-epic/.tinyhumansai-openhuman-8092.json(43 ordered leaves, merges, prerequisite PRs, gate evidence, paused handoff).8092-completion-audit.json(87 rows; final completion remains unproven).agent-contract.md; #264 brief:8092-264-worker-brief.txt.8092-264-oh-pr-body-prepared.md(all required gate results updated; no PR created).evidence/:8092-264-parent-final-strict-verification.json,8092-264-parent-runtime-source-and-profileless-regression-verification.json,8092-264-parent-workspace-check-verification.json,8092-264-parent-app-check-verification.json,8092-264-parent-final-remaining-gates-verification.json,8092-264-parent-final-fmt-diff-pins-verification.json,8092-264-parent-row-ownership-source-scan.json..log, actual terminal exit, source identity, controls, and SHA-256. Earlier failing compiler/runtime attempts remain preserved, not relabeled as passes. Full test-log audits are stored as*-parent-log-audit.json.All repositories use fork epic branch
epic/8092-inference-out. Last verified tips:7b174a921b094b91f5f331026c6080b4d4a51db0adc2d0967aaa22d881790af66b94c22b3eda051fc29ab0ee8724e1a500f9ad0bb648546b34fd3c347cdfee4d84e1536fc9980886e9a9973e263562b1— not yet adopted by OpenHumanOpenHuman still pins TinyJuice
7c43eedd7d7917fa41ea1bd488649fe233d00531until #255. Do not confuse the fork owner tip with the host gitlink.Remaining leaves, in execution order
Finish #264 PR/review/merge first, then dispatch fresh workers for:
senamakel/openhuman#265— native WorkloadRouter, branded fallback diagnostics, native route middleware / host CostEstimator. Preserve full billed usage, reported/submicro charge precision, free pricing, non-response outcomes, and the routing deprecation timer through the v0.66 review after 2027-01-11. Delete the old routes hub instead of relocating it. Prepared brief:8092-265-worker-brief-prepared.txt; API research:evidence/8092-265-parent-prepared-api-scope.json. Refresh actual merged source before dispatch.senamakel/openhuman#251— native one-shot helpers, remove complete_once body. Native simple_chat does not set model/temperature itself; preserve selected defaults mechanically and avoid double budgeting.senamakel/openhuman#252— native stop/halt copy, move only host-specific actionable escalation; retain permission/scope exclusions from missing-connection detection.senamakel/openhuman#253— native embedding verification/connection helpers and unavailable placeholder; consolidate managed factory; persisted embedding signatures must remain byte-identical.senamakel/openhuman#254— native LocalAiService readiness/status and voice file/byte helpers; retain host prompt/capacity gates, credentials/STT selection, and B2 output-path security checks.senamakel/openhuman#255— TinyJuice adoption. Prepared release-readiness evidence:evidence/8092-255-parent-release-readiness-refresh.json. Canonical release/artifact compatibility still needs proof; inspect the existing release before deciding tags/releases are required. No tag/release/workflow dispatch was authorized by the intermediate-fork exception.senamakel/openhuman#256— provider registry ownership. Preserve all current ProviderModelHooks metadata and explicit-context-then-process fallback; native ProviderOverrides currently covers build/probe only, so missing owner APIs must land in the owner first. Prepared evidence:evidence/8092-256-parent-prepared-api-scope.json.Prepared issue snapshots for #251–254 and shared API notes are in
evidence/8092-251-254-parent-prepared-api-scope.json. These are preparation only, not implementation or completion credit.Final-union work that must not be waived
All 43 leaf merges are necessary but insufficient. Before completing the epic:
final_union_consumer_gate_obligations.OH268_embed_broader_audit.evidence/8092-264-parent-boundary-audit-review.json. The TinyHumans native.with_thread_idbuilder is caught by a broad accessor-name rule: investigate a narrow regression-tested distinction from actual task-local functions, not a blanket allowance. TinyAgents hooks reexports nativetruncate_for_halt; remove forwarding residue through the owner repo and update its tests/imports with an owner PR. Remove obsolete baseline entries only after proving source absence.evidence/8092-262-oh-consumer-json-usage.json. Failure:json_rpc_cron_manual_worker_survives_caller_cancel_on_published_tinyflows,tests/json_rpc_e2e.rs:3010.caller.abort(); caller.await.unwrap_err()can encounter a request that already returned a queued acknowledgement before callback start. Source supports a fixture timing/semantics investigation, but no baseline runtime or final resolution has been proved. Narrow usage/context passes do not erase this failure.scripts/ci/self-hosted/diff-cover.sh, andscripts/ci/assert-coverage-presence.sh; zero measured executable lines and weakened exclusions are not proof. Preflight:evidence/8092-final-union-coverage-toolchain-preflight.json.Workflow constraints retained for the next agent
Use
$implementing-an-epic. The user explicitly approved intermediate fork PRs, followed by final canonical upstream PRs, overriding the local canonical-only intermediate convention; do not ask again. Use fresh Luna workers per leaf; root orchestrates/reviews/merges rather than implements leaf code. Preserve all checkpoint commits, never squash/rebase/reset/amend.Create each next worktree at the superproject level using
worktree <slug>after checking/fetching latest canonical and preserving primary checkout commits/edits. No nested submodule worktrees. Every linked-worktree command startscd -- "<absolute-worktree>" &&. Primary checkout has preserved tree-identical checkpoint commits and submodule dirt; inspect rather than reset them.Run long gates through
run-recorded-gate.py(already wrapsci-cancel-aware.sh). Use jobs=1, privateSCCACHE_SERVER_UDS=/home/enamakel/work/openhuman/.git/implementing-an-epic/sccache.sock, fsync-probed temp/profile directories outside Git,CARGO_PROFILE_TEST_DEBUG=0,RUST_MIN_STACK=16777216, and no CARGO_TARGET_DIR. Preserve healthy running handles. Shell heredocs on/tmphave failed EDQUOT despite free disk; use apply_patch or properly quoted Python, never delete other goals' preserved evidence/build output.Mandatory inference command is
pnpm debug rust inference --verbose -- --no-default-features --no-fail-fast, with an actual Cargo--workspaceproduct graph. Do not substitute--libfor that gate. For focused mock cases use positional filters with flags after--; the runner's special--testbranch does not forward feature flags as expected. Install frozen pnpm deps and verifywsbefore new mock worktrees. Record actual test matches and exits, not outer-command success.Owner PRs require nonzero all-green exact-head hosted checks and normal pinned merges. OpenHuman fork PRs use verified local gates, normal
--merge --admin --match-head-commit, without awaiting hosted CI. Read all channels withpr-comments; persist before each nonempty review round (maximum two), reply to every resolved thread, and never dismiss valid feedback. After merge verify metadata/tree, close the fork sub-issue, update ledger/audit, then dispatch the next leaf.Completed leaves and rolled-up PRs
The table below is the ledger's 35 merged leaves. Additional owner prerequisites (including TinyInference #39 / TinyAgents #157 above) do not add leaf credit. The local ledger retains merge SHAs, per-leaf gate evidence, review rounds, and any unresolved review notes.
23 unresolved broader embed aggregate cases
a_harness_runs_a_turn_against_the_provider_it_was_givena_profiles_cron_run_waits_for_its_chat_turn_but_other_profiles_do_nota_telegram_message_is_answered_by_the_bound_runtime_agenta_tool_loop_ends_in_a_structured_answerattaching_before_first_turn_preserves_and_executes_native_toolsbackground_services_drive_the_scheduler_and_stop_with_the_runtimechat_and_relay_use_only_selected_tools_inside_their_profilecwd_and_identity_follow_the_turn_and_then_return_to_the_agent_defaultsdeferred_services_wait_for_the_host_so_a_due_job_finds_its_handlerdue_jobs_run_once_as_their_own_profile_even_when_the_profile_is_closedempty_truncated_terminal_answers_use_only_the_explicit_repair_allowancehost_only_forces_read_only_access_and_sandboxhost_only_refuses_builtin_tools_the_model_namesone_runtime_hosts_independently_configured_agentsoperator_named_cron_and_time_tools_run_on_a_direct_provider_within_the_iteration_capoperator_system_prompt_is_the_only_system_prompt_a_profile_seesprofile_uses_operator_direct_chat_and_search_with_no_managed_trafficprofiles_are_isolated_held_and_relayedrefused_tool_call_does_not_mark_an_earlier_turns_result_with_the_same_call_id_as_failedshared_budget_stops_the_tool_loop_before_its_next_provider_callsuccessful_turn_preserves_reported_charges_and_invalid_buyer_cost_is_unknownterminal_schema_validation_retries_without_accepting_a_wrong_typeuntrusted_input_passes_the_prompt_guard_only_on_a_host_only_agent