Decide: keep the in-memory hosted engine and napi addon as a supported product, or delete them
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
This is a design decision for a project owner, not a code change to start from. Read the hosted in-memory engine in crates/socket-patch-core/src/hosted/memory/mod.rs and the contract line at crates/socket-patch-cli/CLI_CONTRACT.md#L670. Done means an owner has chosen option A, B or C and stated whether that contract line stands, and the follow-up issues are filed.
由索引模型根據 Issue 內容生成。
描述
[agent] Filed by the scheduled architecture audit routine (ecosystems and formats). Register: discussion #560 register.
Kind: decision. Source: review §6 Q1 and Part 3.7 #6 (recommendation 5 in the summary); register E44.
Question
Is the in-memory hosted engine (hosted/memory/), with its napi addon (crates/socket-patch-node) and the hidden hosted-bundle harness, a product socket-patch supports? The answer decides how the hosted orchestrator gets unified (E32), and about 4.5K production lines.
A note on the current state: since #1029, the contract says "N-API and the hosted in-memory engine remain supported for callers such as the future GitHub App" (CLI_CONTRACT.md#L670). The review predates that line, and it asked whether depscan would adopt the engine. This issue asks an owner to confirm or overturn the line, and to choose what "supported" means.
Options
- A. Keep it, as a supported engine with the disk engine's coverage. The in-memory path becomes the one hosted pipeline: disk runs build a
DiskSnapshot→MemoryProjectand call oneredirect_root(view, selected, api, hooks), with host-only effects as hooks (apply lock, takeover, online vlt preflight, pipenv probe, write-back, VEX). The parity suites become ordinary tests. The coverage gaps listed below become bugs to close, or documented tier cuts. Estimated −700 to −900 production lines (E32), done in several PRs. - B. Keep it as it is today: a private, partial engine for one future caller. The gaps stay documented. Both orchestrators and the parity suites stay, and each new hosted feature is written twice or refused in memory.
- C. Delete it. Remove
hosted/memory/, the addon,hosted-bundle, theProjectView::Memoryarms and the parity suites. If a future GitHub App needs an engine, it starts from the disk engine over a checkout. That is −4.5K production and −4.7K test lines, plus a CI job.
The audit recommends A if the GitHub App is a committed consumer, and C otherwise. B is the most expensive option in the long run, because every hosted change pays for two orchestrators.
Facts (main @ 03b9418)
- Size. Production code before
#[cfg(test)]:hosted/memory/*.rs: 3,660 lines (mod.rs1,350,types.rs549,select.rs462,discover.rs411,stages.rs360,limits.rs345,roots.rs183);crates/socket-patch-node/src: 649 lines;commands/hosted_bundle.rs: 183 lines;- 75
ProjectView::Memoryarms outsidehosted/memory/: 27 inhosted/engine.rs, 27 inlock_inventory/view.rs, and the rest in the crawlers,sbt_readsandvlt.
- Tests.
hosted_memory_engine.rs(1,337),hosted_memory_parity.rs(1,228),hosted_memory_rollout.rs(702) andhosted_memory_common(473), plus about 950 inline test lines. - Distribution.
@socketsecurity/socket-patch-nodeis"private": trueand has never been released. CI builds the addon and smoke-tests it on every PR (ci.yml#L115-L122). - What the memory engine can't do today, each documented in the module header (
memory/mod.rs#L8-L18) or the contract:- Maven and NuGet files raise
ecosystem_unsupported_in_memory(roots.rs#L17-L25).`` - sbt always answers
redirect_sbt_no_resolution_evidence(contract L170). - vlt is preflighted offline, without registry metadata (
stages.rs#L180-L198).`` - Vendored→hosted takeovers are refused (
refuse_takeovers).`` - The npm allow-remote planner sees no user or global npm config.
- Maven and NuGet files raise
- Orchestration written twice. The disk path is
run_redirect_selectedin the CLI, and the memory path isengine/stages/discover. The step-by-step table is in the living document, Part 3.3: reference fetch, vlt preflight, wheel metadata, rollout second pass, selection, concurrency and warning order. #1058 already moved "is this pinned" into one shared gate for both, which shows how A would proceed.
Symptoms
None filed against the memory engine itself. The cost is structural: every hosted change in the past month (#1029, #1039, #1058) touched both orchestrators and the parity suites.
Size and scope
This is a decision only. After the decision:
- A is the E32 tracking work, filed as separate issues;
- C is roughly two mechanical PRs: the addon,
hosted-bundleand the parity suites first, then theProjectView::Memoryarms.
Depscan and the GitHub App are out of scope for this repository; only their need for the engine matters here.
Acceptance criteria
- An owner picks A, B or C, and says whether the contract line at L670 stands.
- Under A: the audit files the E32 tracking issue, with the first child (
DiskSnapshot→MemoryProjectfor one ecosystem), and states which coverage gaps are bugs and which are tier cuts. - Under C: the audit files the deletion issues, and the contract line and
hosted-bundleparagraph (L41) are removed with the code.
Dependencies
Blocks E32 (one hosted pipeline). It is independent of #1130 (hosted rollback), but under A, any originals sidecar chosen there must also work in memory.
- 主要語言
- Rust
- 星號
- 9
- 分支
- 2
- 平均合併
- 18 小時 47 分鐘
- 30 天內合併 PR
- 637
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
SocketDev/socket-patch 的其他 Issue
-
agent:triaged arch-audit priority:p3 refactor
難度 2/5 1-3 小時 新手友好度 83/100
SocketDev/socket-patch#1860 ·
維護者通常 1 天內回覆
-
agent:triaged arch-audit priority:p3 refactor
難度 2/5 1-3 小時 新手友好度 78/100
SocketDev/socket-patch#1838 ·
維護者通常 1 天內回覆
-
arch-audit refactor
難度 4/5 3-5 天 新手友好度 35/100
SocketDev/socket-patch#1987 ·
維護者通常 1 天內回覆
-
agent:triaged arch-audit priority:p3 refactor
難度 4/5 3-5 天 新手友好度 35/100
SocketDev/socket-patch#1983 · 1 則留言 ·
維護者通常 1 天內回覆
-
agent:triaged arch-audit bug priority:p3
難度 3/5 半天 新手友好度 55/100
SocketDev/socket-patch#1982 · 1 則留言 ·
維護者通常 1 天內回覆
查看 SocketDev/socket-patch 的全部 Issue
相似的 Issue
-
area:docs documentation good first issue priority:medium
難度 1/5 1 小時以內 新手友好度 78/100
維護者通常 1 天內回覆
-
feature
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
[Bug]: streamed Responses API flex_unavailable error maps to 500 InternalServerError instead of 429未關閉llm translation
難度 2/5 1 小時以內 新手友好度 85/100
BerriAI/litellm#49736 · 1 則留言 ·
維護者通常 1 天內回覆
-
question
難度 1/5 1 小時以內 新手友好度 72/100
維護者通常 1 天內回覆
-
field-report
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆