From cf2968e7209dd9292de0d5de536b1c8524d0c1c8 Mon Sep 17 00:00:00 2001 From: Catty Steve <4795515+Catty2014@user.noreply.gitee.com> Date: Wed, 20 May 2026 16:30:50 +0800 Subject: [PATCH] refactor: update AGENTS.md and remove osbolete modules Archive 7 deprecated crates. Add Resource model documentation. Remove internal fetch module from workshop-baker. --- AGENTS.md | 98 +- docs/src/SUMMARY.md | 1 + docs/src/zh-CN/vol3_dev/resource_model.md | 88 ++ workshop-baker/Cargo.lock | 1472 +-------------------- workshop-baker/Cargo.toml | 5 - workshop-baker/src/AGENTS.md | 89 +- workshop-baker/src/bake/AGENTS.md | 6 +- workshop-baker/src/finalize/AGENTS.md | 60 +- workshop-baker/src/prebake/AGENTS.md | 13 +- workshop-baker/src/utils/fetch.rs | 45 - workshop-engine/src/AGENTS.md | 51 + workshop-engine/src/cgroups.rs | 115 -- 12 files changed, 264 insertions(+), 1779 deletions(-) create mode 100644 docs/src/zh-CN/vol3_dev/resource_model.md delete mode 100644 workshop-baker/src/utils/fetch.rs create mode 100644 workshop-engine/src/AGENTS.md delete mode 100644 workshop-engine/src/cgroups.rs diff --git a/AGENTS.md b/AGENTS.md index 4de0c0b..dbcecf8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,83 +1,72 @@ # PROJECT KNOWLEDGE BASE -**Generated:** 2026-04-22 -**Commit:** 7b3b71a +**Generated:** 2026-05-19 +**Commit:** 28abc5d **Branch:** master ## OVERVIEW -HoneyBiscuitWorkshop is a Rust-based CI/CD system ("蜜饼工坊") with LLM-powered pipeline auto-configuration. 9 independent Cargo crates, no workspace. +HoneyBiscuitWorkshop ("蜜饼工坊") — Rust CI/CD system with decorator-driven shell pipeline DSL and LLM-powered configuration. 3 independent Cargo crates, no workspace. ## STRUCTURE ``` ./ -├── workshop-baker/ # Main orchestrator (CLI + daemon) -├── workshop-agent/ # HTTP agent server -├── workshop-pipeline/ # Config library (prebake/finalize) -├── workshop-llm-detector/ # LLM repo analyzer -├── workshop-vault/ # Secret management client -├── workshop-cert/ # TLS certificate generator -├── workshop-deviceid/ # Device ID library -├── workshop-builder-native/ # Stub (unused) -├── workshop-helper-mac/ # MAC address utility -├── docs/ # mdBook documentation (zh-CN) -├── playground/ # Experimentation -└── third_party/ # Empty +├── workshop-baker/ # Main orchestrator (CLI + pipeline stages) +├── workshop-engine/ # Execution engine (extracted from baker) +├── workshop-getterurl/ # URL fetching (go-getter style) +├── docs/ # mdBook documentation (zh-CN) +├── templates/ # Pipeline templates (bake.sh, finalize.yml, prebake.yml) +└── archived/ # Deprecated crates (7 moved here) ``` ## WHERE TO LOOK | Task | Location | Notes | |------|----------|-------| -| Baker (main) | `workshop-baker/src/{bake,prebake,engine}/` | Core pipeline logic | -| Agent server | `workshop-agent/src/` | Actix-web HTTP + TLS | -| Pipeline config | `workshop-pipeline/src/config/` | prebake/finalize YAML | -| LLM integration | `workshop-llm-detector/src/llm/` | Ollama/OpenAI clients | -| Secrets | `workshop-vault/src/` | Vault client wrapper | +| Baker (CLI) | `workshop-baker/src/{lib,main}.rs` | Clap CLI + tokio entry | +| Pipeline stages | `workshop-baker/src/{bake,prebake,finalize}/` | Stage orchestration | +| Notifications | `workshop-baker/src/notify/` | Plugin-based event notifications | +|| Engine (execution) | `workshop-engine/src/` | Process mgmt, PM detection | +| URL fetching | `workshop-getterurl/src/` | Git/HTTP/File resource getter | ## CODE MAP | Symbol | Type | Location | Role | |--------|------|----------|------| -| PipelineConfig | struct | workshop-pipeline/src/lib.rs:27 | Full pipeline config | -| CICDLLMHelper | struct | workshop-llm-detector/src/lib.rs:16 | LLM analysis entry | -| Engine | struct | workshop-baker/src/engine.rs | Build executor | -| VaultClient | struct | workshop-vault/src/client.rs | Secret ops | +| Cli | struct | workshop-baker/src/lib.rs:21 | CLI argument struct | +| ExecutionContext | struct | workshop-engine/src/types.rs:10 | Pipeline context | +| Engine | struct | workshop-engine/src/types.rs:99 | Build executor (placeholder) | +| PrebakeConfig | struct | workshop-baker/src/prebake/config.rs | Prebake YAML schema | +| FinalizeConfig | struct | workshop-baker/src/finalize/config.rs:21 | Finalize YAML schema | +| GetterUrl | struct | workshop-getterurl/src/lib.rs:84 | Parsed resource URL | +| Getter | trait | workshop-getterurl/src/getter.rs:18 | Resource fetch trait | ## CONVENTIONS ### Rust -- **Edition**: 2024 (non-standard, requires Rust 1.85+) - - Deprecate `mod.rs` +- **Edition**: 2024 (requires Rust 1.85+), deprecates `mod.rs` - **Naming**: `snake_case` files/modules, `PascalCase` types, `SCREAMING_SNAKE_CASE` consts -- **Error handling**: `thiserror` + `anyhow` combo +- **Error handling**: `thiserror` + `anyhow` combo; `HasExitCode` trait for exit codes - **Async**: `#[tokio::main]` + `tokio` with "full" features - **Imports**: `std` → `external_crate` → `crate::module` +- **Dual-mode**: CLI commands (prebake/bake/finalize) + daemon mode (unimplemented) ### Testing -- **Rust**: `#[test]` inline, `#[tokio::test]` async, `tests/*.rs` integration -- **Python**: `pytest` with `tests/integration/test_*.py` (Docker-based) -- **Benchmarks**: Criterion with `harness = false` +- **Rust**: `#[test]` inline, `#[tokio::test]` async, `tests/` integration +- **Benchmarks**: Criterion (configured in Cargo.toml) -### Build Pipeline -- **prebake.yml**: Environment setup (docker/firecracker/baremetal) -- **bake.sh**: Build execution with `# @pipeline` decorators -- **finalize.yml**: Packaging, deployment, notifications -- **Annotations**: `@timeout()`, `@retry()`, `@parallel`, `@fallible` +### CI +- **GitHub Actions**: rust-toolchain (stable), clippy + rustfmt, `cargo test --all-features` +- **Matrix**: workshop-baker, workshop-engine ## ANTI-PATTERNS (THIS PROJECT) - -1. **Python in Rust project** — workshop-baker has Python tests (pytest.ini, test_prebake.py) -2. **temp/ directory** — Non-standard in Rust projects -3. **Certificates in source** — artifact workshop-cert/certs/ not excluded -4. **Deprecated projects** — workshop-executor.old, workshop-monitor.old still present -5. **Hardcoded mirrors** — Tsinghua University mirrors in configs -6. **Rust 2024 edition** — May not work with stable toolchains +1. **Hardcoded user** — "vulcan" username hardcoded throughout prebake +2. **Unsafe libc** — workshop-baker/src/prebake/security.rs has 5+ unsafe blocks +3. **Rust 2024 edition** — May not work with stable toolchains +4. **Empty daemon** — `daemon/` dir is empty, Daemon command is `unimplemented!()` ## UNIQUE STYLES - - **Pipeline DSL**: Shell scripts with `# @decorator` annotations -- **Dual-mode baker**: CLI commands + daemon mode -- **LLM cookbook system**: YAML cookbooks for language-specific builds +- **Notification system**: Plugin-based with batching, retry, priority groups +- **LLM cookbook system**: YAML cookbooks for language-specific builds (archived) - **Chinese docs** — Documentation primarily in zh-CN -- **User "vulcan"** — Custom build user (not root/runner) ## COMMANDS ```bash @@ -86,23 +75,18 @@ cargo build --release -p workshop-baker # Test cargo test -p workshop-baker -pytest tests/integration/test_prebake.py -v +cargo test -p workshop-engine # Lint cargo clippy -- -D warnings cargo fmt --all -# Run baker -cargo run --bin workshop-baker -- prebake config.yml -cargo run --bin workshop-baker -- bake script.sh - -# Run agent -cargo run --bin workshop-agent +# Run +cargo run --bin workshop-baker -- --pipeline demo --build-id 1 --prebake prebake.yml --bake bake.sh --finalize finalize.yml ``` ## NOTES - - **Docker required** for integration tests -- **workshop-builder-native** is a stub (3-line Hello World) -- No root workspace Cargo.toml — each crate is independent -- `AGENTS.md.old` at root — legacy documentation +- **No root workspace** — each crate independent, build separately +- **7 archived crates** — workshop-agent, workshop-cert, workshop-deviceid, workshop-helper-mac, workshop-llm-detector, workshop-pipeline, workshop-vault +- **Python tests removed** — pytest.ini exists but test files no longer in workspace diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index ecb8faa..8d69f2b 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -35,3 +35,4 @@ - [自定义 Decorator](zh-CN/vol3_dev/custom_decorator.md) - [模板变量](zh-CN/vol3_dev/template_variables.md) - [邮件模板](zh-CN/vol3_dev/mail_template.md) + - [Resource 模型](zh-CN/vol3_dev/resource_model.md) diff --git a/docs/src/zh-CN/vol3_dev/resource_model.md b/docs/src/zh-CN/vol3_dev/resource_model.md new file mode 100644 index 0000000..e78973b --- /dev/null +++ b/docs/src/zh-CN/vol3_dev/resource_model.md @@ -0,0 +1,88 @@ +# Resource 模型 + +## 核心思想 + +整个系统只关心两件事:东西从哪来(fetch),东西到哪去(publish)。 + +fetch 方向:URL → 本地路径 → 使用。 +publish 方向:本地路径 → 变换(插件)→ URL。 + +两个方向共用同一套寻址方式,但 Resource 中间态只存在于 fetch 方向。 + +## URL 格式 + +``` +getter::url?param1=value1¶m2=value2 +``` + +getter 显式声明意图。不是"我猜这是个 git 仓库",而是"使用者告诉我这是什么"。 + +只有三个 getter: + +- `git` — 克隆仓库,必要时 checkout 指定版本 +- `http` / `https` — 下载文件,必要时校验 checksum +- `file` — 复制本地文件或目录 + +版本锁定不用 `@v1.0`(`@` 在 URL 里是认证分隔符),用 `?ref=v1.0`。 + +没有 `github.com/user/repo` 看起来应该 clone 它这种黑魔法。 +没有 `.tar.gz` 看起来应该解压它的惊喜。 +URL 是 URL,行为是行为,两者用 getter:: 显式绑定。 + +## Resource 不是网络地址 + +流水线阶段(prebake / finalize / notify)只接触 Resource:一个名字 + 一个本地路径,已就绪。它们不经由网络、不解析 URL、不碰 getter。 + +所有 fetch 行为在阶段启动前完成: + +- worker 模式:bakerd fetch → 填入 ResourceRegistry → 启动 baker +- standalone 模式:baker 自己 fetch → 填入 ResourceRegistry → 执行阶段 +- bare 模式:不 fetch,传入的必须是 Resource + +ResourceRegistry 是名字到路径的映射。填进去就只读了。 + +## getterurl 是独立的 crate + +URL 格式解析 + 基本 fetch 放在 workshop-getterurl,和 baker 本身没有耦合。任何人都可以用。 + +crate 分两层: + +``` +结构层(parser): + "git::https://host/repo.git?ref=v1.0" → { getter: "git", url: Url, params: Params } + +获取层(builtin getters): + getter.fetch(url, params, dst) → local_path + git: git clone + optional checkout + http: HTTP GET + optional checksum + file: std::fs::copy +``` + +获取层是字面意义的——不解压、不推断、不猜意图。 + +## Checksum + +checksum 作为 URL query 参数传递。三态语义: + +- `?checksum=sha256:abc` — 必须匹配 +- `?checksum=` — 显式禁用校验 +- 无 checksum — 如果服务端返回 Content-Digest 头,校验它 + +getter 不主动校验,它只执行 URL 里指定的操作。 + +## Artifact 不经过 Resource + +artifact 是 bake 的产物,自产生就开始被使用,不存在中间态。它的路径就是 bake 产出的本地路径,不走 ResourceRegistry。 + +artifact 的 publish 方向由插件定义行为——可能上传、可能扫描、可能只记录。插件定义最终的行为,只要是自洽的。 + +## 三种运行模式 + +``` + fetch 执行者 fetch 在阶段内 +daemon 模式 bakerd 否 +standalone baker 自身 否(阶段启动前已完成) +bare 模式 无 否(必须传入 Resource) +``` + +bare 模式下传入的必须是已经就绪的 Resource。外部 URL 是 daemon 或 standalone 的事,bare 不负责。 diff --git a/workshop-baker/Cargo.lock b/workshop-baker/Cargo.lock index e3090b6..1fe400f 100644 --- a/workshop-baker/Cargo.lock +++ b/workshop-baker/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "adler2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" - [[package]] name = "aho-corasick" version = "1.1.4" @@ -17,12 +11,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -94,15 +82,6 @@ version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" -[[package]] -name = "arc-swap" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3a1fd6f75306b68087b831f025c712524bcb19aad54e557b1129cfa0a2b207" -dependencies = [ - "rustversion", -] - [[package]] name = "arraydeque" version = "0.5.1" @@ -520,7 +499,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", - "regex-automata", "serde", ] @@ -530,24 +508,12 @@ version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "bytes" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" -[[package]] -name = "bytesize" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bd91ee7b2422bcb158d90ef4d14f75ef67f340943fc4149891dcce8f8b972a3" - [[package]] name = "cast" version = "0.3.0" @@ -561,8 +527,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" dependencies = [ "find-msvc-tools", - "jobserver", - "libc", "shlex", ] @@ -673,15 +637,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" -[[package]] -name = "clru" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197fd99cb113a8d5d9b6376f3aa817f32c1078f2343b714fff7d2ca44fdf67d5" -dependencies = [ - "hashbrown 0.16.1", -] - [[package]] name = "colorchoice" version = "1.0.4" @@ -771,15 +726,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" -dependencies = [ - "cfg-if", -] - [[package]] name = "criterion" version = "0.5.1" @@ -816,15 +762,6 @@ dependencies = [ "itertools 0.10.5", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.6" @@ -866,20 +803,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "dashmap" -version = "6.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - [[package]] name = "deranged" version = "0.5.5" @@ -930,12 +853,6 @@ dependencies = [ "const-random", ] -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - [[package]] name = "duration-str" version = "0.21.0" @@ -1085,16 +1002,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "faster-hex" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7223ae2d2f179b803433d9c830478527e92b8117eab39460edae7f1614d9fb73" -dependencies = [ - "heapless", - "serde", -] - [[package]] name = "fastrand" version = "2.3.0" @@ -1118,16 +1025,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" -[[package]] -name = "flate2" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" @@ -1140,12 +1037,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1245,10 +1136,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi", - "wasm-bindgen", ] [[package]] @@ -1258,929 +1147,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi", "wasip2", - "wasm-bindgen", -] - -[[package]] -name = "gix" -version = "0.81.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0473c64d9ccbcfb9953a133b47c8b9a335b87ac6c52b983ee4b03d49000b0f3f" -dependencies = [ - "gix-actor", - "gix-archive", - "gix-attributes", - "gix-blame", - "gix-command", - "gix-commitgraph", - "gix-config", - "gix-credentials", - "gix-date", - "gix-diff", - "gix-dir", - "gix-discover", - "gix-error", - "gix-features", - "gix-filter", - "gix-fs", - "gix-glob", - "gix-hash", - "gix-hashtable", - "gix-ignore", - "gix-index", - "gix-lock", - "gix-mailmap", - "gix-merge", - "gix-negotiate", - "gix-object", - "gix-odb", - "gix-pack", - "gix-path", - "gix-pathspec", - "gix-prompt", - "gix-protocol", - "gix-ref", - "gix-refspec", - "gix-revision", - "gix-revwalk", - "gix-sec", - "gix-shallow", - "gix-status", - "gix-submodule", - "gix-tempfile", - "gix-trace", - "gix-traverse", - "gix-url", - "gix-utils", - "gix-validate", - "gix-worktree", - "gix-worktree-state", - "gix-worktree-stream", - "nonempty", - "parking_lot", - "regex", - "signal-hook", - "smallvec", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-actor" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e5e5b518339d5e6718af108fd064d4e9ba33caf728cf487352873d76411df35" -dependencies = [ - "bstr", - "gix-date", - "gix-error", - "winnow", -] - -[[package]] -name = "gix-archive" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "651c99be11aac9b303483193ae50b45eb6e094da4f5ed797019b03948f51aad6" -dependencies = [ - "bstr", - "gix-date", - "gix-error", - "gix-object", - "gix-worktree-stream", -] - -[[package]] -name = "gix-attributes" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c233d6eaa098c0ca5ce03236fd7a96e27f1abe72fad74b46003fbd11fe49563c" -dependencies = [ - "bstr", - "gix-glob", - "gix-path", - "gix-quote", - "gix-trace", - "kstring", - "smallvec", - "thiserror 2.0.18", - "unicode-bom", -] - -[[package]] -name = "gix-bitmap" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7add20f40d060db8c9b1314d499bac6ed7480f33eb113ce3e1cf5d6ff85d989" -dependencies = [ - "gix-error", -] - -[[package]] -name = "gix-blame" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77aaf9f7348f4da3ebfbfbbc35fa0d07155d98377856198dde6f695fd648705" -dependencies = [ - "gix-commitgraph", - "gix-date", - "gix-diff", - "gix-error", - "gix-hash", - "gix-object", - "gix-revwalk", - "gix-trace", - "gix-traverse", - "gix-worktree", - "smallvec", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-chunk" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1096b6608fbe5d27fb4984e20f992b4e76fb8c613f6acb87d07c5831b53a6959" -dependencies = [ - "gix-error", -] - -[[package]] -name = "gix-command" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b849c65a609f50d02f8a2774fe371650b3384a743c79c2a070ce0da49b7fb7da" -dependencies = [ - "bstr", - "gix-path", - "gix-quote", - "gix-trace", - "shell-words", -] - -[[package]] -name = "gix-commitgraph" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3196655fd1443f3c58a48c114aa480be3e4e87b393d7292daaa0d543862eb445" -dependencies = [ - "bstr", - "gix-chunk", - "gix-error", - "gix-hash", - "memmap2", - "nonempty", -] - -[[package]] -name = "gix-config" -version = "0.54.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08939b4c4ed7a663d0e64be9e1e9bdf23a1fb4fcee1febdf449f12229542e50d" -dependencies = [ - "bstr", - "gix-config-value", - "gix-features", - "gix-glob", - "gix-path", - "gix-ref", - "gix-sec", - "memchr", - "smallvec", - "thiserror 2.0.18", - "unicode-bom", - "winnow", -] - -[[package]] -name = "gix-config-value" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "441a300bc3645a1f45cba495b9175f90f47256ce43f2ee161da0031e3ac77c92" -dependencies = [ - "bitflags 2.10.0", - "bstr", - "gix-path", - "libc", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-credentials" -version = "0.37.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b2a34b8715e3bbd514f3d1705f5d51c4b250e5bfe506b9fb60b133c85c93d9" -dependencies = [ - "bstr", - "gix-command", - "gix-config-value", - "gix-date", - "gix-path", - "gix-prompt", - "gix-sec", - "gix-trace", - "gix-url", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-date" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39acf819aa9fee65e4838a2eec5cb2506e47ebb89e02a5ab9918196e491571ea" -dependencies = [ - "bstr", - "gix-error", - "itoa", - "jiff", - "smallvec", -] - -[[package]] -name = "gix-diff" -version = "0.61.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88f3b3475e5d3877d7c30c40827cc2441936ce890efc226e5ba4afe3a7ae33f0" -dependencies = [ - "bstr", - "gix-attributes", - "gix-command", - "gix-filter", - "gix-fs", - "gix-hash", - "gix-index", - "gix-object", - "gix-path", - "gix-pathspec", - "gix-tempfile", - "gix-trace", - "gix-traverse", - "gix-worktree", - "imara-diff 0.1.8", - "imara-diff 0.2.0", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-dir" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da4604a360988f0ba8efe6f90093ca5a844f4a7f8e1a3dcda501ec44e600ea9" -dependencies = [ - "bstr", - "gix-discover", - "gix-fs", - "gix-ignore", - "gix-index", - "gix-object", - "gix-path", - "gix-pathspec", - "gix-trace", - "gix-utils", - "gix-worktree", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-discover" -version = "0.49.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c65bd3330fe0cb9d40d875bf862fd5e8ad6fa4164ddbc4842fbeb889c3f0b2c6" -dependencies = [ - "bstr", - "dunce", - "gix-fs", - "gix-path", - "gix-ref", - "gix-sec", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-error" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e86d01da904d4a9265def43bd42a18c5e6dc7000a73af512946ba14579c9fbd" -dependencies = [ - "bstr", -] - -[[package]] -name = "gix-features" -version = "0.46.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "752493cd4b1d5eaaa0138a7493f65c96863fefa990fc021e0e519579e389ab20" -dependencies = [ - "bytes", - "bytesize", - "crc32fast", - "crossbeam-channel", - "gix-path", - "gix-trace", - "gix-utils", - "libc", - "once_cell", - "parking_lot", - "prodash", - "thiserror 2.0.18", - "walkdir", - "zlib-rs", -] - -[[package]] -name = "gix-filter" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37598282a6566da6fb52667570c7fe0aedcb122ac886724a9e62a2180523e35" -dependencies = [ - "bstr", - "encoding_rs", - "gix-attributes", - "gix-command", - "gix-hash", - "gix-object", - "gix-packetline", - "gix-path", - "gix-quote", - "gix-trace", - "gix-utils", - "smallvec", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-fs" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a964b4aec683eb0bacb87533defa80805bb4768056371a47ab38b00a2d377b72" -dependencies = [ - "bstr", - "fastrand", - "gix-features", - "gix-path", - "gix-utils", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-glob" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03e6cd88cc0dc1eafa1fddac0fb719e4e74b6ea58dd016e71125fde4a326bee" -dependencies = [ - "bitflags 2.10.0", - "bstr", - "gix-features", - "gix-path", -] - -[[package]] -name = "gix-hash" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fb896a02d9ab96fa518475a5f30ad3952010f801a8de5840f633f4a6b985dfb" -dependencies = [ - "faster-hex", - "gix-features", - "sha1-checked", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-hashtable" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2664216fc5e89b51e756a4a3ac676315602ce2dac07acf1da959a22038d69b33" -dependencies = [ - "gix-hash", - "hashbrown 0.16.1", - "parking_lot", -] - -[[package]] -name = "gix-ignore" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f915dcf6911e3027537166d34e13f0fe101ed12225178d2ae29cd1272cff26" -dependencies = [ - "bstr", - "gix-glob", - "gix-path", - "gix-trace", - "unicode-bom", -] - -[[package]] -name = "gix-index" -version = "0.49.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bae54ab14e4e74d5dda60b82ea7afad7c8eb3be68283d6d5f29bd2e6d47fff7" -dependencies = [ - "bitflags 2.10.0", - "bstr", - "filetime", - "fnv", - "gix-bitmap", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-traverse", - "gix-utils", - "gix-validate", - "hashbrown 0.16.1", - "itoa", - "libc", - "memmap2", - "rustix", - "smallvec", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-lock" -version = "21.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054fbd0989700c69dc5aa80bc66944f05df1e15aa7391a9e42aca7366337905f" -dependencies = [ - "gix-tempfile", - "gix-utils", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-mailmap" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b4818da522786ec7e32a00884ee8fc40fa4c215c3997c0b15f7b62684d1199" -dependencies = [ - "bstr", - "gix-actor", - "gix-date", - "gix-error", -] - -[[package]] -name = "gix-merge" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4606747466512d22c2dffc019142e1941238f543987ea51353c938cca80c500" -dependencies = [ - "bstr", - "gix-command", - "gix-diff", - "gix-filter", - "gix-fs", - "gix-hash", - "gix-index", - "gix-object", - "gix-path", - "gix-quote", - "gix-revision", - "gix-revwalk", - "gix-tempfile", - "gix-trace", - "gix-worktree", - "imara-diff 0.1.8", - "nonempty", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-negotiate" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea064c7595eea08fdd01c70748af747d9acc40f727b61f4c8a2145a5c5fc28c" -dependencies = [ - "bitflags 2.10.0", - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-object", - "gix-revwalk", -] - -[[package]] -name = "gix-object" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cafb802bb688a7c1e69ef965612ff5ff859f046bfb616377e4a0ba4c01e43d47" -dependencies = [ - "bstr", - "gix-actor", - "gix-date", - "gix-features", - "gix-hash", - "gix-hashtable", - "gix-path", - "gix-utils", - "gix-validate", - "itoa", - "smallvec", - "thiserror 2.0.18", - "winnow", -] - -[[package]] -name = "gix-odb" -version = "0.78.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24833ae9323b4f7079575fb9f961cf9c414b0afbec428a536ab8e7dd93bc002b" -dependencies = [ - "arc-swap", - "gix-features", - "gix-fs", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-pack", - "gix-path", - "gix-quote", - "parking_lot", - "tempfile", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-pack" -version = "0.68.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3484119cd19859d7d7639413c27e192478fa354d3f4ff5f7e3c041e8040f0f4" -dependencies = [ - "clru", - "gix-chunk", - "gix-error", - "gix-features", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-path", - "memmap2", - "smallvec", - "thiserror 2.0.18", - "uluru", -] - -[[package]] -name = "gix-packetline" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be19313dcdb7dff75a3ce2f99be00878458295bcc3b6c7f0005591597573345c" -dependencies = [ - "bstr", - "faster-hex", - "gix-trace", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-path" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c31d4373bda7fab9eb01822927b55185a378d6e1bf737e0a54c743ad806658" -dependencies = [ - "bstr", - "gix-trace", - "gix-validate", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-pathspec" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f89611f13544ca5ebeb68a502673814ef57200df60c24a61c2ce7b96f612f08b" -dependencies = [ - "bitflags 2.10.0", - "bstr", - "gix-attributes", - "gix-config-value", - "gix-glob", - "gix-path", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-prompt" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f61f6264e1f6c5a951531fe127722c7522bc02ebda80c4528286bda4642055f" -dependencies = [ - "gix-command", - "gix-config-value", - "parking_lot", - "rustix", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-protocol" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38666350736b5877c79f57ddae02bde07a4ce186d889adc391e831cddcbe76" -dependencies = [ - "bstr", - "gix-date", - "gix-features", - "gix-hash", - "gix-ref", - "gix-shallow", - "gix-transport", - "gix-utils", - "maybe-async", - "nonempty", - "thiserror 2.0.18", - "winnow", -] - -[[package]] -name = "gix-quote" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68533db71259c8776dd4e770d2b7b98696213ecdc1f5c9e3507119e274e0c578" -dependencies = [ - "bstr", - "gix-error", - "gix-utils", -] - -[[package]] -name = "gix-ref" -version = "0.61.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2159978abb99b7027c8579d15211e262ef0ef2594d5cecb3334fbcbdfe2997c" -dependencies = [ - "gix-actor", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-path", - "gix-tempfile", - "gix-utils", - "gix-validate", - "memmap2", - "thiserror 2.0.18", - "winnow", -] - -[[package]] -name = "gix-refspec" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc806ee13f437428f8a1ba4c72ecfaa3f20e14f5f0d4c2bc17d0b33e794aa6ac" -dependencies = [ - "bstr", - "gix-error", - "gix-glob", - "gix-hash", - "gix-revision", - "gix-validate", - "smallvec", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-revision" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c08f1ec5d1e6a524f8ba291c41f0ccaef64e48ed0e8cf790b3461cae45f6d3d" -dependencies = [ - "bitflags 2.10.0", - "bstr", - "gix-commitgraph", - "gix-date", - "gix-error", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", - "gix-trace", - "nonempty", -] - -[[package]] -name = "gix-revwalk" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4b2b87772b21ca449249e86d32febadba5cba32b0fcce804ab9cefc6f2111c" -dependencies = [ - "gix-commitgraph", - "gix-date", - "gix-error", - "gix-hash", - "gix-hashtable", - "gix-object", - "smallvec", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-sec" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf82ae037de9c62850ce67beaa92ec8e3e17785ea307cdde7618edc215603b4f" -dependencies = [ - "bitflags 2.10.0", - "gix-path", - "libc", - "windows-sys 0.61.2", -] - -[[package]] -name = "gix-shallow" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf60711c9083b2364b3fac8a352444af76b17201f3682fdebe74fa66d89a772" -dependencies = [ - "bstr", - "gix-hash", - "gix-lock", - "nonempty", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-status" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d6c598e3fdbc352fba1c5ba7e709e69402fafbc44d9295edad2e3c4738996b" -dependencies = [ - "bstr", - "filetime", - "gix-diff", - "gix-dir", - "gix-features", - "gix-filter", - "gix-fs", - "gix-hash", - "gix-index", - "gix-object", - "gix-path", - "gix-pathspec", - "gix-worktree", - "portable-atomic", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-submodule" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5c3929c5e6821f651d35e8420f72fea3cfafe9fc1e928a61e718b462c72a5" -dependencies = [ - "bstr", - "gix-config", - "gix-path", - "gix-pathspec", - "gix-refspec", - "gix-url", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-tempfile" -version = "21.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22227f6b203f511ff451c33c89899e87e4f571fc596b06f68e6e613a6508528" -dependencies = [ - "dashmap", - "gix-fs", - "libc", - "parking_lot", - "signal-hook", - "signal-hook-registry", - "tempfile", -] - -[[package]] -name = "gix-trace" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f69a13643b8437d4ca6845e08143e847a36ca82903eed13303475d0ae8b162e0" - -[[package]] -name = "gix-transport" -version = "0.55.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a521e39c6235ce63ed6c001e2dd79818c830b82c3b7b59247ee7b229c39ec9bb" -dependencies = [ - "bstr", - "gix-command", - "gix-features", - "gix-packetline", - "gix-quote", - "gix-sec", - "gix-url", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-traverse" -version = "0.55.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "963dc2afcdb611092aa587c3f9365e749ac0a0892ff27662dbc75f26c953fbec" -dependencies = [ - "bitflags 2.10.0", - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", - "smallvec", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-url" -version = "0.35.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d28e8af3d42581190da884f013caf254d2fd4d6ab102408f08d21bfa11de6c8d" -dependencies = [ - "bstr", - "gix-path", - "percent-encoding", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-utils" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "befcdbdfb1238d2854591f760a48711bed85e72d80a10e8f2f93f656746ef7c5" -dependencies = [ - "bstr", - "fastrand", - "unicode-normalization", -] - -[[package]] -name = "gix-validate" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec1eff98d91941f47766367cba1be746bab662bad761d9891ae6f7882f7840b" -dependencies = [ - "bstr", -] - -[[package]] -name = "gix-worktree" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6bd5830cbc43c9c00918b826467d2afad685b195cb82329cde2b2d116d2c578" -dependencies = [ - "bstr", - "gix-attributes", - "gix-fs", - "gix-glob", - "gix-hash", - "gix-ignore", - "gix-index", - "gix-object", - "gix-path", - "gix-validate", -] - -[[package]] -name = "gix-worktree-state" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644a1681f96e1be43c2a8384337d9d220e7624f50db54beda70997052aebf707" -dependencies = [ - "bstr", - "gix-features", - "gix-filter", - "gix-fs", - "gix-index", - "gix-object", - "gix-path", - "gix-worktree", - "io-close", - "thiserror 2.0.18", -] - -[[package]] -name = "gix-worktree-stream" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e3fb70a1f650a5cec7d5b8d10d6d6fe86daf3cf15bde08ba0c70988a2932c3" -dependencies = [ - "gix-attributes", - "gix-error", - "gix-features", - "gix-filter", - "gix-fs", - "gix-hash", - "gix-object", - "gix-path", - "gix-traverse", - "parking_lot", ] [[package]] @@ -2232,15 +1201,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "hash32" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" -dependencies = [ - "byteorder", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -2259,7 +1219,7 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "foldhash 0.1.5", + "foldhash", ] [[package]] @@ -2267,11 +1227,6 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash 0.2.0", -] [[package]] name = "hashlink" @@ -2282,16 +1237,6 @@ dependencies = [ "hashbrown 0.15.5", ] -[[package]] -name = "heapless" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" -dependencies = [ - "hash32", - "stable_deref_trait", -] - [[package]] name = "heck" version = "0.5.0" @@ -2364,12 +1309,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "human_format" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaec953f16e5bcf6b8a3cb3aa959b17e5577dbd2693e94554c462c08be22624b" - [[package]] name = "hyper" version = "1.8.1" @@ -2422,7 +1361,6 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots", ] [[package]] @@ -2444,7 +1382,6 @@ version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" dependencies = [ - "base64", "bytes", "futures-channel", "futures-core", @@ -2452,9 +1389,7 @@ dependencies = [ "http", "http-body", "hyper", - "ipnet", "libc", - "percent-encoding", "pin-project-lite", "socket2", "tokio", @@ -2603,25 +1538,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "imara-diff" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d34b7d42178945f775e84bc4c36dde7c1c6cdfea656d3354d009056f2bb3d2" -dependencies = [ - "hashbrown 0.15.5", -] - -[[package]] -name = "imara-diff" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f01d462f766df78ab820dd06f5eb700233c51f0f4c2e846520eaf4ba6aa5c5c" -dependencies = [ - "hashbrown 0.15.5", - "memchr", -] - [[package]] name = "indexmap" version = "1.9.3" @@ -2645,32 +1561,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "io-close" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cadcf447f06744f8ce713d2d6239bb5bde2c357a452397a9ed90c625da390bc" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "ipnet" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" - -[[package]] -name = "iri-string" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "is-terminal" version = "0.4.17" @@ -2719,12 +1609,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" dependencies = [ "jiff-static", - "jiff-tzdb-platform", "log", "portable-atomic", "portable-atomic-util", "serde_core", - "windows-sys 0.61.2", ] [[package]] @@ -2738,31 +1626,6 @@ dependencies = [ "syn", ] -[[package]] -name = "jiff-tzdb" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c900ef84826f1338a557697dc8fc601df9ca9af4ac137c7fb61d4c6f2dfd3076" - -[[package]] -name = "jiff-tzdb-platform" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" -dependencies = [ - "jiff-tzdb", -] - -[[package]] -name = "jobserver" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" -dependencies = [ - "getrandom 0.3.4", - "libc", -] - [[package]] name = "js-sys" version = "0.3.83" @@ -2784,15 +1647,6 @@ dependencies = [ "serde", ] -[[package]] -name = "kstring" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558bf9508a558512042d3095138b1f7b8fe90c5467d94f9f1da28b3731c5dbd1" -dependencies = [ - "static_assertions", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -2871,12 +1725,6 @@ version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" -[[package]] -name = "lru-slab" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" - [[package]] name = "matchit" version = "0.7.3" @@ -2889,32 +1737,12 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" -[[package]] -name = "maybe-async" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "memchr" version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" -[[package]] -name = "memmap2" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" -dependencies = [ - "libc", -] - [[package]] name = "memoffset" version = "0.9.1" @@ -2939,16 +1767,6 @@ dependencies = [ "serde", ] -[[package]] -name = "miniz_oxide" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" -dependencies = [ - "adler2", - "simd-adler32", -] - [[package]] name = "mio" version = "1.1.0" @@ -2994,12 +1812,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "nonempty" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9737e026353e5cd0736f98eddae28665118eb6f6600902a7f50db585621fecb6" - [[package]] name = "num" version = "0.4.3" @@ -3439,12 +2251,6 @@ dependencies = [ "futures-io", ] -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - [[package]] name = "plain" version = "0.2.3" @@ -3560,17 +2366,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prodash" -version = "31.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "962200e2d7d551451297d9fdce85138374019ada198e30ea9ede38034e27604c" -dependencies = [ - "bytesize", - "human_format", - "parking_lot", -] - [[package]] name = "prost" version = "0.14.1" @@ -3603,61 +2398,6 @@ dependencies = [ "prost", ] -[[package]] -name = "quinn" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" -dependencies = [ - "bytes", - "cfg_aliases", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2", - "thiserror 2.0.18", - "tokio", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-proto" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" -dependencies = [ - "bytes", - "getrandom 0.3.4", - "lru-slab", - "rand", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "thiserror 2.0.18", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-udp" -version = "0.5.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.60.2", -] - [[package]] name = "quote" version = "1.0.42" @@ -3795,44 +2535,6 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" -[[package]] -name = "reqwest" -version = "0.12.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" -dependencies = [ - "base64", - "bytes", - "futures-core", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "js-sys", - "log", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-rustls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", -] - [[package]] name = "ring" version = "0.17.14" @@ -3881,12 +2583,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "rustc-hash" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" - [[package]] name = "rustix" version = "1.1.4" @@ -3933,7 +2629,6 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" dependencies = [ - "web-time", "zeroize", ] @@ -4166,27 +2861,6 @@ dependencies = [ "unsafe-libyaml", ] -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha1-checked" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89f599ac0c323ebb1c6082821a54962b839832b03984598375bff3975b804423" -dependencies = [ - "digest", - "sha1", -] - [[package]] name = "sha2" version = "0.10.9" @@ -4204,28 +2878,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f" -[[package]] -name = "shell-words" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" - [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "signal-hook" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a0c28ca5908dbdbcd52e6fdaa00358ab88637f8ab33e1f188dd510eb44b53d" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.8" @@ -4236,12 +2894,6 @@ dependencies = [ "libc", ] -[[package]] -name = "simd-adler32" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" - [[package]] name = "slab" version = "0.4.11" @@ -4304,9 +2956,6 @@ name = "sync_wrapper" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] [[package]] name = "synstructure" @@ -4443,21 +3092,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "tinyvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" version = "1.48.0" @@ -4628,24 +3262,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower-http" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" -dependencies = [ - "bitflags 2.10.0", - "bytes", - "futures-util", - "http", - "http-body", - "iri-string", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-layer" version = "0.3.3" @@ -4725,36 +3341,12 @@ dependencies = [ "winapi", ] -[[package]] -name = "uluru" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c8a2469e56e6e5095c82ccd3afb98dad95f7af7929aab6d8ba8d6e0f73657da" -dependencies = [ - "arrayvec", -] - -[[package]] -name = "unicode-bom" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" - [[package]] name = "unicode-ident" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" -[[package]] -name = "unicode-normalization" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -4896,19 +3488,6 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" -dependencies = [ - "cfg-if", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "wasm-bindgen-macro" version = "0.2.106" @@ -4951,16 +3530,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "webpki-roots" version = "1.0.4" @@ -5255,9 +3824,7 @@ dependencies = [ "criterion", "duration-str", "env_logger", - "flate2", "futures-util", - "gix", "glob", "globset", "lazy_static", @@ -5268,12 +3835,10 @@ dependencies = [ "os_info", "privdrop", "regex", - "reqwest", "semver", "serde", "serde_json", "serde_yaml", - "sha2", "shlex", "tar", "tempfile", @@ -5283,7 +3848,6 @@ dependencies = [ "uuid", "which", "workshop-engine", - "zstd", ] [[package]] @@ -5495,46 +4059,12 @@ dependencies = [ "syn", ] -[[package]] -name = "zlib-rs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be3d40e40a133f9c916ee3f9f4fa2d9d63435b5fbe1bfc6d9dae0aa0ada1513" - [[package]] name = "zmij" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9747e91771f56fd7893e1164abd78febd14a670ceec257caad15e051de35f06" -[[package]] -name = "zstd" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.16+zstd.1.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" -dependencies = [ - "cc", - "pkg-config", -] - [[package]] name = "zvariant" version = "5.8.0" diff --git a/workshop-baker/Cargo.toml b/workshop-baker/Cargo.toml index ccf5737..c3413ed 100644 --- a/workshop-baker/Cargo.toml +++ b/workshop-baker/Cargo.toml @@ -47,12 +47,7 @@ uuid = { version = "1.19.0", features = ["v4"] } libc = "0.2" os_info = "3.14.0" privdrop = "0.5.6" -reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] } which = "8.0.2" -gix = "0.81.0" -sha2 = "0.10" -flate2 = "1.0" -zstd = "0.13" globset = "0.4.18" axum = "0.7" diff --git a/workshop-baker/src/AGENTS.md b/workshop-baker/src/AGENTS.md index e109f18..a41f0a5 100644 --- a/workshop-baker/src/AGENTS.md +++ b/workshop-baker/src/AGENTS.md @@ -1,62 +1,57 @@ # workshop-baker/src -**Generated:** 2026-04-22 -**Commit:** 7b3b71a +**Generated:** 2026-05-19 +**Commit:** 28abc5d -Baker CLI + execution engine for HoneyBiscuitWorkshop pipelines. - -## OVERVIEW - -CLI tool and runtime for executing CI/CD pipelines with resource isolation, privilege dropping, and package management integration. +CLI tool and runtime for executing CI/CD pipelines. Orchestrates prebake → bake → finalize stages with notification dispatch. ## STRUCTURE - ``` src/ -├── bake.rs # Top-level bake orchestration -├── bake/ # Script parsing and building -│ ├── parser.rs # @decorator-aware shell parser -│ ├── decorator.rs # @pipeline, @retry, @parallel, etc. -│ ├── builder.rs # Script template builder -│ └── schedule.rs # Function ordering via @after deps -├── engine/ # Execution runtime -│ ├── executor.rs # Script execution with cgroups -│ ├── cgroups.rs # Linux cgroup resource limits -│ ├── repology.rs # Package name resolution -│ ├── pm.rs # Package manager detection -│ └── upm.rs # User package manager (Nix/Guix) -├── prebake/ # Build environment setup -│ ├── config.rs # PrebakeConfig YAML schema -│ ├── stage/ # Bootstrap, DepsSystem, DepsUser, Hooks -│ └── security.rs # Privilege dropping logic -├── types/ # Shared type definitions -│ ├── repology.rs # RepologyEndpoint enum -│ ├── builderconfig.rs -│ ├── cache.rs -│ └── memsize.rs -├── monitor/ # Resource usage monitoring -│ ├── cgroups.rs # cgroup-based usage collection -│ └── jobobject.rs # Windows job objects (stub) -├── daemon.rs # Unix socket daemon (TODO: refactor) -└── lib.rs # CLI struct + module exports +├── lib.rs # Module declarations + Cli struct + Commands enum +├── main.rs # tokio::main entry point +├── bare.rs # Bare mode (run individual stages) +├── error.rs # CliError (wraps stage errors) +├── bake.rs # Bake orchestration (script → execution) +├── bake/ # Script parsing, decorator DSL, scheduling +├── prebake.rs # Prebake orchestration (env setup) +├── prebake/ # Config, stages, security, env providers +├── finalize.rs # Finalize orchestration (post-build) +├── finalize/ # Config, plugins, hooks, templates +├── notify.rs # Notification system (batching, retry) +├── notify/ # Types, templates, interactive, queue +├── daemon/ # Empty (Daemon command = unimplemented!) +├── monitor/ # Resource usage monitoring (cgroups) +├── types.rs # Module re-exports +├── types/ # buildstatus, resource types +├── utils.rs # Module root (fetch submodule) +└── utils/ # fetch.rs ``` ## WHERE TO LOOK - | Task | Location | |------|----------| -| Script parsing with @decorators | `bake/parser.rs:29` - `parse_script()` | -| Decorator types | `bake/decorator.rs` - `Decorator` enum | -| Build execution | `engine/executor.rs` - `Executor::execute_script()` | -| Resource limits | `engine/types.rs:56` - `ResourceLimits` struct | -| Prebake stages | `prebake/stage/` subdirectories | -| Package detection | `engine/pm.rs:detection()` | -| CLI entry | `lib.rs:26` - `cli::Cli` struct | +| CLI args | `lib.rs:21` - `Cli` struct | +| Entry point | `main.rs:91` - `#[tokio::main]` | +| Pipeline orchestration | `main.rs:68-74` - prebake→bake→finalize chain | +| Bare mode (single stage) | `bare.rs:14` - `run_bare()` | +| Script parsing | `bake/parser.rs:56` - `parse_script()` | +| Decorator DSL | `bake/decorator.rs` - `Decorator` enum | +| Prebake stages | `prebake/stage/` - Bootstrap→DepsSystem→DepsUser→Hooks→Ready | +| Plugin system | `finalize/plugin.rs` + `finalize/plugin/` | +| Notification dispatch | `notify.rs:66` - `notify()` async loop | +| Notification types | `notify/types.rs` - `NotificationRule`, `ParsedTrigger` | ## CONVENTIONS - - **ExecutionContext**: Passed through all stages, carries task_id, username, env_vars, timeout -- **PrebakeStage**: Ordered enum controlling stage execution sequence (Bootstrap -> Ready) -- **Decorator**: Attached to shell functions via `# @name(args)` comments above function declarations -- **Engine**: Lightweight wrapper around cgroup manager for resource isolation -- **Dual-mode**: CLI commands (prebake, bake, finalize) vs daemon mode via Unix socket +- **PrebakeStage**: Ordered enum Bootstrap→EarlyHook→DepsSystem→DepsUser→LateHook→Ready +- **Decorator**: `# @name(args)` comments above shell function declarations +- **Notification**: Plugin-based dispatch with batching, exponential backoff, priority groups +- **Engine**: Delegated to `workshop-engine` crate (formerly in-tree) +- **Dual-mode**: CLI commands (standalone) vs Daemon mode (unimplemented) + +## ANTI-PATTERNS +1. **Empty daemon/** directory — Daemon command is `unimplemented!()` +2. **Dead code allowed** — `lints.rust.dead_code = "allow"` in Cargo.toml +3. **Engine was extracted** — workshop-engine is its own crate now, src/engine/ removed +4. **Python test infra exists but files removed** — pytest.ini remains, test dir is empty diff --git a/workshop-baker/src/bake/AGENTS.md b/workshop-baker/src/bake/AGENTS.md index 9e0f28f..831a7be 100644 --- a/workshop-baker/src/bake/AGENTS.md +++ b/workshop-baker/src/bake/AGENTS.md @@ -12,14 +12,16 @@ bake/ ├── parser.rs # @decorator-aware shell script parser ├── decorator.rs # Decorator enum + 100+ unit tests ├── builder.rs # Script template assembly -└── schedule.rs # Function ordering via @after dependencies +├── schedule.rs # Function ordering via @after dependencies +├── error.rs # BakeError enum +└── constant.rs # DEFAULT_WORKSPACE, TRIVIAL_SCRIPT_NAME ``` ## WHERE TO LOOK | Task | Location | |------|----------| -| Parse script | `parser.rs:29` - `parse_script()` | + Parse script | `parser.rs:56` - `parse_script()` | | Decorator types | `decorator.rs` - `Decorator` enum variants | | Build script | `builder.rs` - template builder | | Schedule deps | `schedule.rs` - @after resolution | diff --git a/workshop-baker/src/finalize/AGENTS.md b/workshop-baker/src/finalize/AGENTS.md index 3b8ce1a..81c6bb2 100644 --- a/workshop-baker/src/finalize/AGENTS.md +++ b/workshop-baker/src/finalize/AGENTS.md @@ -1,56 +1,52 @@ # workshop-baker/src/finalize -**Generated:** 2026-04-22 -**Commit:** 7b3b71a +**Generated:** 2026-05-19 +**Commit:** 28abc5d -Artifact packaging, distribution, deployment, and notifications. +Artifact packaging, plugin-based notifications, and post-build hooks. ## STRUCTURE - ``` finalize/ -├── config.rs # FinalizeConfig YAML (artifacts, deploy, notify) +├── config.rs # FinalizeConfig YAML (379 lines, plugins, notifications) ├── stage.rs # FinalizeStage enum -├── stage/hook.rs # Post-build hooks +├── stage/hook.rs # Post-build hook execution ├── event.rs # Event propagation -├── template.rs # Variable substitution {{VAR}} -├── plugin.rs # Plugin trait + registry +├── template.rs # Variable substitution {{VARIABLE}} +├── plugin.rs # Plugin trait + registration ├── plugin/ │ ├── metadata.rs # Plugin manifest parsing │ ├── dylib.rs # Dynamic library plugins │ ├── rhai.rs # Rhai scripting (todo!()) │ ├── shell.rs # Shell command plugins -│ └── internal/ # Built-in plugins -│ ├── mail/ # Email notifications (SMTP) -│ ├── webhook.rs # HTTP webhooks -│ ├── satori.rs # Satori integration -│ └── insitenotify.rs # In-site notifications -│ └── fetch/ # Artifact fetching -│ ├── git.rs # Git repository fetch -│ ├── http.rs # HTTP download -│ ├── extract.rs # Archive extraction -│ └── checksum.rs# SHA256 verification (SHA1 deprecated) +│ └── internal.rs + internal/ # Built-in plugins (mail, webhook, satori, insitenotify) +├── types.rs +├── types/compression.rs +├── error.rs # FinalizeError +└── constant.rs ``` ## WHERE TO LOOK - | Task | Location | |------|----------| -| Config loading | `config.rs` - FinalizeConfig | -| Email notify | `plugin/internal/mail/` - SMTP templates | +| Config loading | `config.rs:17` - `FinalizeConfig` + `parse()` | +| Plugin registration | `plugin.rs` - `register()` | +| Email notifications | `plugin/internal/mail.rs` - SMTP | | Webhooks | `plugin/internal/webhook.rs` | -| Artifact fetch | `plugin/fetch/` - git/http/extract | -| Checksums | `plugin/fetch/checksum.rs:13` - SHA1 deprecated | +| Satori integration | `plugin/internal/satori.rs` | +| Shell plugins | `plugin/shell.rs` | +| Template rendering | `template.rs` - `{{VARIABLE}}` handlebars-style | ## CONVENTIONS - -- **Plugin System**: Dynamic + internal plugins via Plugin trait -- **Template Syntax**: `{{VARIABLE}}` handlebars-style -- **Stages**: Hook → Fetch → Build → Publish → Notify → Cleanup -- **Fetch**: Supports git, http, with extraction and checksum verify +- **Plugin System**: `FinalizePlugin` trait + registry with both internal and dynamic plugins +- **Template Syntax**: `{{VARIABLE}}` handlebars-style substitution via `template.rs` +- **Stages**: EarlyHook → (Artifacts) → LateHook → Notifications +- **Notification**: `notify.rs` in parent module drives plugin-based notification dispatch +- **ResourceRegistry**: Shared resource cache passed through to plugins ## ANTI-PATTERNS - -1. **SHA1 deprecated** — `checksum.rs:13` warns SHA1 is deprecated -2. **Unimplemented** — `rhai.rs:17` - "todo!()" for Rhai scripting -3. **TODO markers** — Multiple TODOs in config.rs (lines 305-306) +1. **fetch/ subdirectory removed** — was `plugin/fetch/{git,http,extract,checksum}`, no longer exists +2. **SHA1 deprecated** — workshop-getterurl handles checksums now +3. **Unimplemented** — `rhai.rs:17` - "todo!()" for Rhai scripting +4. **TODO markers** — Multiple TODOs in config.rs (lines 305-306) +5. **Artifact stage not implemented** — `finalize.rs:57` — "TODO: artifact stage implementation" diff --git a/workshop-baker/src/prebake/AGENTS.md b/workshop-baker/src/prebake/AGENTS.md index 0fa6f98..0597e97 100644 --- a/workshop-baker/src/prebake/AGENTS.md +++ b/workshop-baker/src/prebake/AGENTS.md @@ -10,7 +10,7 @@ Build environment setup: bootstrap, dependencies, security, hooks. ``` prebake/ ├── config.rs # PrebakeConfig YAML schema (environment, deps, cache) -├── stage.rs # PrebakeStage enum (Bootstrap→Ready ordering) +├── stage.rs # PrebakeStage enum (Bootstrap→EarlyHook→DepsSystem→DepsUser→LateHook→Ready) ├── stage/ │ ├── bootstrap.rs # User creation (vulcan), sudo/doas setup │ ├── environment.rs # Env var injection @@ -24,7 +24,12 @@ prebake/ │ ├── baremetal.rs # Direct host execution │ └── custom.rs # Custom env (todo!()) ├── security.rs # Privilege dropping (unsafe libc calls) -└── event.rs # Event logging +├── event.rs # Event logging +├── error.rs # PrebakeError + BootstrapError +├── types.rs # Module re-exports +├── types/ # memsize, cache, builderconfig, architecture +├── constant.rs # Module constants +└── env.rs # Environment module root ``` ## WHERE TO LOOK @@ -38,13 +43,11 @@ prebake/ | Hooks | `stage/hook.rs` - pre/post stage hooks | ## CONVENTIONS - -- **PrebakeStage**: Ordered enum (Bootstrap→DepsSystem→DepsUser→Environment→Hooks→Ready) +- **PrebakeStage**: Ordered enum Bootstrap→EarlyHook→DepsSystem→DepsUser→LateHook→Ready - **ExecutionContext**: Carries task_id, username, env_vars through all stages - **Target User**: "vulcan" (hardcoded in bootstrap.rs:6-24) ## ANTI-PATTERNS - 1. **Hardcoded user** — "vulcan" username hardcoded throughout 2. **Unsafe blocks** — `security.rs` has 5+ unsafe libc calls 3. **Incomplete** — custom.rs and apt.rs have `todo!()` stubs diff --git a/workshop-baker/src/utils/fetch.rs b/workshop-baker/src/utils/fetch.rs deleted file mode 100644 index f5a3c1e..0000000 --- a/workshop-baker/src/utils/fetch.rs +++ /dev/null @@ -1,45 +0,0 @@ -mod checksum; -mod error; -mod extract; -mod file; -mod git; -mod http; -mod scheme; -mod types; - -use std::path::{Path, PathBuf}; - -pub use error::FetchError; -pub use scheme::Scheme; -pub use types::FetchArgument; - -/// Fetch an external resource to a target directory. Returns the local path. -/// -/// - `git://repo@tag` → clone -/// - `https://url` → download (+ checksum + extract) -/// - `file:///path` → copy to target -/// -/// Note: `workspace://` must be converted to `file://` by the caller before passing. -pub async fn fetch_resource( - name: &str, - url: &str, - target: &Path, -) -> Result { - let scheme = scheme::parse_url(url)?; - match scheme { - Scheme::Git { repo, git_ref } => { - let full_url = if git_ref.is_empty() { - repo.clone() - } else { - format!("{}@{}", repo, git_ref) - }; - git::fetch_git_plugin(&full_url, name, target, None).await?; - Ok(target.join(name)) - } - Scheme::Http { url, checksum } => { - http::fetch_http_plugin(&url, name, target, checksum.as_deref()).await?; - Ok(target.join(name)) - } - Scheme::File { path } => file::fetch_file(&path, name, target).await, - } -} diff --git a/workshop-engine/src/AGENTS.md b/workshop-engine/src/AGENTS.md new file mode 100644 index 0000000..ffc71ca --- /dev/null +++ b/workshop-engine/src/AGENTS.md @@ -0,0 +1,51 @@ +# workshop-engine/src + +**Generated:** 2026-05-19 +**Commit:** 28abc5d + +Execution engine extracted from workshop-baker. Process management, package detection, resource isolation. + +## STRUCTURE +``` +src/ +├── lib.rs # Module declarations + 10+ convenience re-exports +├── error.rs # ExecutionError + DependencyError + HasExitCode trait +├── types.rs # ExecutionContext, ExecutionResult, Engine, etc. +├── child.rs # ManagedChild + TokioChild process wrappers +├── command.rs # CustomCommand builder +├── executor.rs # Script execution +├── time.rs # Duration parsing helpers +├── pm.rs # PackageManager trait + detection +├── pm/ # Backends: apt, apk, dnf, pacman +├── upm.rs # UserPackageManager trait +├── upm/ # Backends: rust (cargo), python (pip), go, custom +├── repology.rs # RepologyEndpoint enum +└── repology/ # Package name resolution (local/) +``` + +## KEY EXPORTS +| Symbol | Type | Role | +|--------|------|------| +| ExecutionContext | struct | Pipeline context (task_id, username, env, etc.) | +| Engine | struct | Script executor (placeholder) | +| ExecutionError | enum | Error types with exit codes | +| HasExitCode | trait | Exit code protocol for all error types | +| ManagedChild | struct | Child process wrapper with managed lifecycle | +| TokioChild | struct | Tokio-based child process wrapper | +| CustomCommand | struct | Builder for command execution | +| PackageManager | trait | System package manager abstraction | +| UserPackageManager | trait | User-level package manager abstraction | +| RepologyEndpoint | enum | Package name resolution endpoint | +| ExecutionEvent | enum | Event stream (TaskStarted, OutputChunk, etc.) | +| ExecutionResult | struct | Command execution result (exit_code, stdout, stderr) | +| EventSender | type alias | `Option>` | + +## CONVENTIONS +- **Exit codes**: Centralized in `error.rs` — EXITCODE_OK=0 through EXITCODE_PRIV_DROP_FAILED=201 +- **ExecutionContext**: Defaults to current directory, bash shell, non-privileged +- **PackageManagers**: Auto-detected via `os_info`, fallback chain (apt→apk→dnf→pacman) +- **Engine**: Currently a unit struct with `execute_script()` method +- **All errors implement HasExitCode**: Enables uniform error propagation up to CLI + +## ANTI-PATTERNS +1. **Engine is a stub** — `types.rs:99` — `pub struct Engine;` with no fields, minimal implementation diff --git a/workshop-engine/src/cgroups.rs b/workshop-engine/src/cgroups.rs deleted file mode 100644 index 02c101c..0000000 --- a/workshop-engine/src/cgroups.rs +++ /dev/null @@ -1,115 +0,0 @@ -use std::fs; -use std::io::{self, Write}; -use std::path::PathBuf; - -/// Linux cgroup resource manager for ws-executor. -/// -/// Manages cgroup v2 hierarchy under `/sys/fs/cgroup/ws-executor/` for -/// CPU, memory, and process isolation. -pub struct CgroupManager { - path: PathBuf, -} - -impl CgroupManager { - /// Creates a new cgroup for the given build ID. - pub fn new(build_id: &str) -> io::Result { - let path = PathBuf::from(format!("/sys/fs/cgroup/ws-executor/{}", build_id)); - - fs::create_dir_all(&path)?; - - Ok(Self { path }) - } - - /// Sets memory limit in bytes. Use 0 for unlimited. - pub fn set_memory_limit(&self, limit_bytes: u64) -> io::Result<()> { - let mem_max_path = self.path.join("memory.max"); - let content = if limit_bytes == 0 { - "max".to_string() - } else { - limit_bytes.to_string() - }; - fs::write(&mem_max_path, content)?; - - let mem_swap_path = self.path.join("memory.swap.max"); - fs::write(&mem_swap_path, "max")?; - - Ok(()) - } - - /// Sets CPU weight (1-10000, higher = more CPU time). - pub fn set_cpu_weight(&self, weight: u64) -> io::Result<()> { - let cpu_weight_path = self.path.join("cpu.weight"); - let weight = weight.clamp(1, 10000); - fs::write(&cpu_weight_path, weight.to_string())?; - Ok(()) - } - - /// Sets CPU max burst in microseconds with optional period. - pub fn set_cpu_max(&self, max_us: u64, period_us: u64) -> io::Result<()> { - let cpu_max_path = self.path.join("cpu.max"); - let content = if max_us == 0 { - "max".to_string() - } else { - format!("{} {}", max_us, period_us) - }; - fs::write(&cpu_max_path, content)?; - Ok(()) - } - - /// Adds a process to this cgroup. - pub fn add_process(&self, pid: u32) -> io::Result<()> { - let cgroup_procs_path = self.path.join("cgroup.procs"); - let mut file = fs::OpenOptions::new() - .append(true) - .open(&cgroup_procs_path)?; - - writeln!(file, "{}", pid)?; - - Ok(()) - } - - /// Destroys the cgroup directory. - pub fn destroy(&self) -> io::Result<()> { - if self.path.exists() { - fs::remove_dir(&self.path)?; - } - Ok(()) - } - - /// Returns the cgroup path. - pub fn path(&self) -> &PathBuf { - &self.path - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - #[ignore] - fn test_cgroup_manager_new() { - let build_id = "test-build-123"; - let manager = CgroupManager::new(build_id).unwrap(); - assert!(manager.path().exists()); - manager.destroy().unwrap(); - } - - #[test] - #[ignore] - fn test_set_memory_limit() { - let build_id = "test-mem-123"; - let manager = CgroupManager::new(build_id).unwrap(); - manager.set_memory_limit(1024 * 1024 * 1024).unwrap(); - manager.destroy().unwrap(); - } - - #[test] - #[ignore] - fn test_set_cpu_weight() { - let build_id = "test-cpu-123"; - let manager = CgroupManager::new(build_id).unwrap(); - manager.set_cpu_weight(1024).unwrap(); - manager.destroy().unwrap(); - } -}