Skip to content

feat(workspacedeps): immutable remote definitions, script runner and discovery - #1135

Merged
sheepbox8646 merged 8 commits into
mainfrom
workspace-deps/01-core
Sep 9, 2026
Merged

feat(workspacedeps): immutable remote definitions, script runner and discovery#1135
sheepbox8646 merged 8 commits into
mainfrom
workspace-deps/01-core

Conversation

@sheepbox8646

@sheepbox8646 sheepbox8646 commented Sep 2, 2026

Copy link
Copy Markdown
Member

新增 workspace 依赖执行与发现基础设施,并移除 Memoh 内嵌的五个生产配方。catalog 接收 Supermarket 的不可变 release/artifact,验证 revision、manifest 投影、脚本摘要、压缩包路径和大小,以及图标摘要;仓库中的发布样本仅用于测试。

包含 bridge CloseSend/reset hook、stdin 脚本 runner、平台探测、image/managed/PATH 来源发现和缓存。发现缓存绑定目录摘要;state.json 保存当前与上一版本的发布来源和 entrypoints。配方与 ShellCheck 由 supermarket#20 维护。

栈第 2/6 层:#1132 → 本 PR → #1137。此层独立通过 workspacedeps/catalog 与 cmd 包测试;跨仓库发布样本覆盖损坏数据、归档边界和不可变快照。

⚠️ No human QA — this PR has not been verified by a human yet. Remove this line once a human confirms the happy path.

@sheepbox8646 sheepbox8646 changed the title workspace deps/01 core feat(workspacedeps): core — bridge CloseSend, dependency catalog, runner and discovery Sep 2, 2026
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch 2 times, most recently from 9191043 to 9010b53 Compare September 3, 2026 09:32
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch from 9010b53 to 2a0ac1c Compare September 3, 2026 09:44
@sheepbox8646 sheepbox8646 changed the title feat(workspacedeps): core — bridge CloseSend, dependency catalog, runner and discovery feat(workspacedeps): core — bridge CloseSend, dependency catalog with runtime overlays, runner and discovery Sep 3, 2026
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch from 264291c to 3f09ffb Compare September 6, 2026 08:17
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch from 3f09ffb to dc29cc2 Compare September 7, 2026 15:45
@sheepbox8646 sheepbox8646 changed the title feat(workspacedeps): core — bridge CloseSend, dependency catalog with runtime overlays, runner and discovery feat(workspacedeps): immutable remote definitions, script runner and discovery Sep 7, 2026
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch from dc29cc2 to 2abd8f9 Compare September 7, 2026 15:58
@sheepbox8646
sheepbox8646 marked this pull request as ready for review September 8, 2026 11:17
@sheepbox8646
sheepbox8646 requested review from a team as code owners September 8, 2026 11:17
@chen-ran
chen-ran force-pushed the workspace-deps/01-core branch from d023601 to b242be8 Compare September 8, 2026 19:17
@chen-ran
chen-ran force-pushed the workspace-deps/01-core branch from b242be8 to 7873d48 Compare September 8, 2026 20:52
Base automatically changed from workspace-deps/00-docs to main September 9, 2026 06:34
sheepbox8646 and others added 5 commits September 9, 2026 14:34
CloseSend half-closes the exec stream so a process fed over stdin sees EOF
while its output keeps streaming; Close still cancels. The bridge pool's
seven eviction sites now go through Manager.resetBridge, which notifies
OnBridgeReset subscribers so per-container caches can invalidate in one
place. Tests run against the real in-process bridgesvc.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
Adds internal/workspacedeps/catalog: an embedded catalog of workspace
dependencies (node, python, uv from the image; codex and claude-code as
managed agent CLIs) with strict manifest decoding, validation, script
lookup and a manifest digest. Agent entries are pinned and a test in
cmd/internal/core asserts the pins equal the runtime protocol snapshots.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
…nd cache

The runner feeds catalog scripts to `exec sh -s` over the bridge exec
stream with a prelude that neutralises stdin, takes a per-dependency lock
and switches `current` atomically; results come back through a temp file
so stdout/stderr stay pure log streams. Discovery probes every dependency
in one exec (state.json, toolkit fallback, PATH copy, --version or the
optional version script) and the cache holds per-(bot,target) snapshots
that invalidate on bridge reset. Tests run scripts through the real
in-process bridgesvc.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
… to the catalog

Agent CLIs are no longer pinned to the server's protocol snapshot: the
codex and claude-code manifests drop version.pin, install resolves the
latest upstream release by default (or MEMOH_DEP_VERSION when set), and
every dependency gains a check-update script. node, python and uv keep the
image copy as their baseline but now ship install/update/remove scripts
(LTS Node from nodejs.org, CPython via uv, uv from its releases) so a
managed overlay can be installed over the image copy; the manifest model
gains HasImageBaseline/Installable and lets an image-sourced dependency
carry scripts. The catalog-vs-protocol pin test goes away with the pin.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
sheepbox8646 and others added 3 commits September 9, 2026 14:34
…npm 11

npm 11 skips a global package's install scripts unless they are allowed
explicitly, so Claude Code's postinstall was silently skipped and the log
filled with allowScripts warnings. Pass --allow-scripts for the package
when npm is 11 or newer; npm 10 keeps its default behaviour.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
Exercise public prelude helpers in the lint fixture so ShellCheck 0.9 checks reachable recipe code. Remove declarations whose consumers belong to the service layer.

Model: gpt-6
Remove the five compressed recipe fixtures, their release and index metadata, and tests and helpers that consume them.

Model: gpt-6
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch from 7873d48 to 0d5076c Compare September 9, 2026 06:34
@sheepbox8646
sheepbox8646 merged commit 7f38c9e into main Sep 9, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant