Repository navigation
Conversation
…tored Squash of the redrob-code ENGINE work that was spread across seven open PRs into a single change on develop. The Electron/desktop app and the build-off/Quality-Lab stack move to the alpha/desktop branch separately and are not part of this. Rolled up: - #67 insights route + /v1/chat/completions (serve the OpenAI face for real, forward x-redrob-session to the Console). - #68 regenerate the JS SDK that had fallen behind the routes. - #69-#74 the media tools and endpoints: image_generate (edit / reference images), speech_generate (mp3), POST /redrob/speech and POST /redrob/transcribe, all on the engine own Redrob credential. - #79 the shared on-device labellers (route-labeller, work-labeller) as source workspace packages, consumed downstream by Cowork/Office/Design. Integration fix found by combining the PRs: - packages/server/src/routes.ts: the chat-completion handler reads LLMClient inside the request, so it was a per-request requirement of the embedded API that Layer.provide(serviceLayer) did not discharge, leaking as a residual requirement and flipping the web.handler signature so the untouched sdk-next caller stopped type-checking. LLMClient is a global service, so it is now provided once via HttpRouter.provideRequest inside makeRoutes. Review + lean/documentation pass (behaviour-preserving): - image_generate / speech_generate: size-limit messages derive from their constants instead of hand-kept 10 MB / 50 MB literals (drift-proof). - speech_generate: characters() uses [...text].length (idiomatic code-point count). - core/insights.ts: tightened the ErrorEnvelope describe() union guard (identical runtime behaviour). - plugin/host.ts: removed a misleading comment on skill.list; it matches the uniform mutable() pattern now. - docs/LOCAL-ENGINE-API.md: documented the shipped /redrob/speech and /redrob/transcribe endpoints (sections 1c, 1d). Verified: bun turbo typecheck 20/20; bun install --frozen-lockfile clean; engine tool/server tests 42/42; core 6/6; work-labeller 77/77.
…act, clarify CI Answers the four questions the CTO raised, as docs + tests, no runtime change. Stacked on the engine consolidation (#80), where the labeller packages live. - docs/ON-DEVICE-LABELLING.md (new): the single why-we-wrote-encoder-code answer. We wrap pinned off-the-shelf models (distiluse, multilingual-e5-base), not our own encoders, for on-device privacy + one implementation across products. Only the small trained layers are ours and live in git (work-head.json 159KB, prototypes.json 232KB); the base weights are hash-pinned downloads. Includes the where-the-tensors-live table, the model-free-CI vs opt-in-eval story, and the backwards-compat model for third-party clients. Also carries the pending checklist to move the e5 release asset from redrob-cowork to redrob-code (the SHA pins stay; only the url changes once the asset is re-hosted -- not flipped now because a not-yet-uploaded redrob-code release would 404 every download). - httpapi-chat-completion.test.ts: two new v1-contract cases -- the newer optional fields (max_completion_tokens, reasoning_effort, user) stay accepted, and unknown request fields (a Console-style redrob block, a bogus key) are IGNORED not rejected. The second is the exact forward/third-party-compat guarantee; it fails CI if someone makes the schema reject excess properties. - test.yml: expand the labellers job comment so the model-free-CI vs needs-the-real-model-only-for-opt-in-eval distinction is written where a maintainer reads it (the CTO's "tests seem to assume local files" concern). Verified: redrob typecheck clean; the 7 contract cases pass (the local 5s-timeout flakes are the Windows in-process app+DB startup, ~7s each -- green at --timeout 30000 and on Linux CI).
This was referenced Oct 12, 2026
flxkm522
force-pushed
the
feature/engine-consolidation
branch
from
October 12, 2026 12:07
8194746 to
3f5d322
Compare
Author
|
Folded into #80 — its three files (docs/ON-DEVICE-LABELLING.md, the chat-completion contract-test cases, and the test.yml comment) are now part of #80's single commit, so the engine consolidation and its labelling docs/compat land as one PR. Closing; nothing lost. The feat/labelling-docs-and-compat branch is no longer needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
Docs + tests answering the four questions raised about the on-device labellers. No runtime change. Stacked on #80 (the engine consolidation), where the labeller packages live — retarget to
developonce #80 merges.Changes
docs/ON-DEVICE-LABELLING.md(new) — the single reference for why there is encoder code (we wrap pinned off-the-shelf models — distiluse, multilingual-e5-base — not our own encoders, for on-device privacy + one implementation across Cowork/Office/Design), where the tensors live (only the small trained layers are ours and in git:work-head.json159KB,prototypes.json232KB; base weights are hash-pinned downloads), the model-free-CI vs opt-in-eval story, and the backwards-compat model for third-party clients.httpapi-chat-completion.test.ts— two new v1-contract cases: the newer optional fields (max_completion_tokens,reasoning_effort,user) stay accepted, and unknown request fields are ignored, not rejected (a Console-styleredrobblock + a bogus key). The second pins the exact forward/third-party-compat guarantee and fails CI if the schema ever starts rejecting excess properties.test.yml— expanded thelabellers (linux)comment so the "unit tests are model-free and CI-safe; the real model is needed only by opt-ineval" distinction is written where a maintainer reads it.Answers to the four questions (summary)
encoder.ts/classifier.tsare glue around pinned OSS models. On-device privacy (text never leaves the machine), one runtime-neutral implementation across three products, and distiluse's cross-language coverage (reuses the privacy detector's tokenizer; one prototype set covers en/ko/hi).work-head.json+prototypes.json, committed to git. Base encoders are pinned, SHA-verified downloads, not in git.eval/modeldev commands need the real weights — deliberately off the PR path./v1) contract; unknown fields ignored not rejected; labeller degrades tomode: lexical→ legacy routing when the model is absent. Now pinned by the new contract test.Pending (noted in the doc, not done here)
Move the e5 model release asset from
redrob-coworktoredrob-codeand update the twomanifest.jsonURLs (SHA pins unchanged). Not flipped in this PR because a not-yet-uploaded redrob-code release would 404 every download — the checklist is in the doc.Verified
redrobtypecheck clean; the 7 contract cases pass (local 5s-timeout flakes are the Windows in-process app+DB startup ~7s each — green at--timeout 30000; Linux CI runs them comfortably).