This commit is contained in:
commit
f8b82d4143
94 files changed
+3905
-546
No files matched your search
@@ -0,0 +1,107 @@
|
||||
# Evidence — issue #13 Engine / Host Contract boundary (candidate)
|
||||
|
||||
Date: 2026-11-26 (Asia/Shanghai)
|
||||
Issue: <https://git.cflmy.cn/cflmy/marqdo-cli/issues/13>
|
||||
Decision: [ADR-0071](../adr/0071-engine-host-contract-boundary.md)
|
||||
Branch: `architecture/issue-13-engine-host-boundary`
|
||||
Baseline: `master` at `4bbefc92449ee480c8a2c89b0308feb4cda8d0e7`
|
||||
Candidate: the merge candidate built from this branch; the PR records the exact
|
||||
source SHA. This file is not a release approval and does not reuse RC.4 evidence.
|
||||
|
||||
## Scope actually landed (M0–M3 core)
|
||||
|
||||
| Item | State |
|
||||
|---|---|
|
||||
| Neutral `marqdo-host-contract` crate (`Host`, `HostOp`, `ExecutionContext`, `ResourceRead`, `FrameId`, `ParameterSource`, `LoopTransfer`, `RuntimeObservation`) | **implemented** |
|
||||
| `marqdo-runtime` depends on the contract, not `marqdo-host` | **implemented** (runtime test `marqdo-host` remains a dev-dependency only) |
|
||||
| `marqdo-host` implements the contract; no reverse dependency on runtime/frontend/IR | **implemented** |
|
||||
| Independent real consumer `tests/embedding` (own workspace + lock), Markdown→frontend→IR→runtime, bounded test host | **implemented and executed** |
|
||||
| `marqdo-plugin-abi` reduced to the public contract (C ABI, wire, errors) | **implemented** |
|
||||
| Loader/worker/manifest/artifact moved to `marqdo-host::plugin` | **implemented** |
|
||||
| SDK consumes only the contract (no libloading/worker/host) | **implemented** |
|
||||
| Real SDK plugin built and invoked by the real CLI; tampered digest rejected | **implemented and executed** |
|
||||
| Dependency-direction gate from Cargo metadata + negative unit cases | **implemented** |
|
||||
| Current architecture/doc entry, ADR, historical banners, status | **implemented** |
|
||||
| New remote repository (`marqdo-cli-*`, engine/host) | **deliberately not created** — issue #13 §9.2 admission is not met; keep-in-workspace is recorded in ADR-0071/CURRENT.md §7 |
|
||||
| Stdlib Bundle Phase B, SDK physical migration, regex/compression migration, foreign F-B | **not in this candidate**; separate issues/decisions, listed in `docs/STATUS.md` |
|
||||
|
||||
## Commands and results
|
||||
|
||||
All commands were run in this checkout with the repository-local Rust toolchain
|
||||
(`rustc 1.100.0`, `cargo 1.100.0`) and `--offline` where the environment requires
|
||||
the warm cache. The candidate source SHA is on the PR; do not copy these results
|
||||
to a different commit.
|
||||
|
||||
| Gate | Command | Result |
|
||||
|---|---|---|
|
||||
| Formatting | `cargo fmt --all -- --check` | PASS |
|
||||
| Clippy | `cargo clippy --workspace --all-targets --locked -- -D warnings` | PASS |
|
||||
| Rust tests | `cargo test --workspace --locked --offline --no-fail-fast` | PASS — **636 passed / 0 failed / 2 ignored** across 74 test binaries (includes `docs_consistency`, `architecture_boundaries`, `stdlib_product`); baseline `4bbefc9` in a detached worktree is **633 passed / 0 failed / 2 ignored** (no regression; the candidate adds three architecture-boundary tests) |
|
||||
| Architecture boundaries | `cargo test -p marqdo-cli --test architecture_boundaries --locked` | PASS (15) |
|
||||
| Docs consistency | `cargo test -p marqdo-cli --test docs_consistency --locked` | PASS |
|
||||
| Dependency gate | `python3 tools/ci/check_dependency_boundaries.py` | PASS |
|
||||
| Dependency gate negative cases | `python3 -m unittest tools.ci.test_dependency_boundaries` / `python3 -m unittest discover -s tools/ci` | PASS (54 tool tests) |
|
||||
| Engine independence and differential execution | `python3 tools/ci/check_engine_boundary.py` | PASS |
|
||||
| Plugin SDK real consumption | `python3 tools/ci/check_plugin_sdk.py` | PASS |
|
||||
| Existing product/conformance suites | included in workspace run; stdlib product suite additionally run | PASS |
|
||||
|
||||
Behavioral facts from the engine gate:
|
||||
|
||||
- the independent consumer returns `sum_to(10) = Int(55)` and a structural
|
||||
`types(7)` map whose terminal Value Wire bytes equal a real CLI `call
|
||||
--output json` on the same file;
|
||||
- the consumer rejects real fuel exhaustion, stack-depth exceedance, expired
|
||||
deadline, out-of-bounds `Memory` access, a host that grants no external effect
|
||||
(`permission.denied`), and a host with no resource implementation
|
||||
(`resource.unsupported`);
|
||||
- `cargo tree -p marqdo-runtime -e normal,build` in the consumer graph has no
|
||||
`marqdo-host`, sandbox, foreign or libloading/rustls dependency;
|
||||
- `marqdo-plugin-sdk` normal tree contains only `marqdo-plugin-abi`,
|
||||
`marqdo-value` and serialization primitives.
|
||||
|
||||
Behavioral facts from the SDK gate:
|
||||
|
||||
- `tests/sdk-plugin` builds with only `marqdo-plugin-sdk` as a path dependency;
|
||||
- the real CLI loads it with `--trust-native-plugin` and
|
||||
`--allow-plugin sdk.demo` and returns `Int 42`;
|
||||
- a tampered `sha256` in `plugin.yaml` is rejected with an artifact/sha256
|
||||
diagnostic.
|
||||
|
||||
## CI evidence (remote, same code SHA)
|
||||
|
||||
Woodpecker PR pipeline **#101** for commit
|
||||
`9b4f0a08228e9932bf3b0a8c5cf80e0d04626ccb` finished **success** with every step
|
||||
green: `clone`, `contract`, `test`, `minimum-rust`, `build`. The `build` step
|
||||
builds the release binaries, packages the deterministic archive for
|
||||
`$CI_COMMIT_SHA`, runs the from-archive smoke test and the frozen external
|
||||
conformance suite, so C11/G05 get same-candidate CI evidence rather than an old
|
||||
release claim. The first pipeline (#100) failed in one unrelated pre-existing
|
||||
`provider_cli` test with `ETXTBSY` while executing a freshly copied binary; the
|
||||
same tree passed on straight rerun (#101), so it is recorded as an environment
|
||||
flake, not a candidate defect.
|
||||
|
||||
This evidence file was updated by a docs-only commit after that code SHA; code
|
||||
and lock bytes are unchanged by it. The PR check list shows the final run.
|
||||
|
||||
## Not verified here (honest state)
|
||||
|
||||
| Item | State | Reason / owner |
|
||||
|---|---|---|
|
||||
| Minimum Rust 1.89 | **UNVERIFIED** locally | only Rust 1.100 is installed in this environment; the Woodpecker `minimum-rust` lane runs `cargo check --locked --workspace --all-targets` on `rust:1.89-bookworm` |
|
||||
| Windows GNU cross-target compile | **PASS (cross-check only)** | `cargo check --workspace --all-targets --locked --target x86_64-pc-windows-gnu` finished successfully (pre-existing unrelated warnings); native Windows runtime and the GitHub/Woodpecker native lanes remain the actual platform gate |
|
||||
| Windows/macOS native runtime | **UNVERIFIED** locally | no native runner here; existing GitHub/Woodpecker lanes remain the gate |
|
||||
| `wasm32-unknown-unknown` Engine probe (E12) | **UNVERIFIED** | target std not installed and no network here; `cargo check -p marqdo-runtime --target wasm32-unknown-unknown` fails with `E0463: can't find crate for core/std`, i.e. a missing target toolchain rather than a forbidden native dependency. E01 is green, so no P0 violation is implied, but this is not a PASS |
|
||||
| strict OS-isolation lane | **UNVERIFIED** | needs the disposable VM; `strict` remains fail-closed |
|
||||
| Performance/RSS budget (G06) | **UNVERIFIED** | shared-node measurement is not valid evidence; no performance claim is made |
|
||||
| Frozen external conformance / release archive (C11/G05) | **CI PASS at code SHA `9b4f0a0`** | Woodpecker pipeline #101 `build` step: release archive from that SHA, archive smoke, frozen external conformance, PASS. This is not a new release tag. |
|
||||
| SDK physical repository, stdlib Phase B, regex/compression migration | **DEFERRED** | separate issues; see `docs/STATUS.md` |
|
||||
|
||||
## Boundary confirmation
|
||||
|
||||
- No new top-level CLI command, no `HostOp`/builtin/Value variant, no second
|
||||
interpreter, no `legacy` feature, no compatibility re-export of removed
|
||||
`marqdo_host::{Host, HostOp, ...}` paths.
|
||||
- Public protocols and their revisions are unchanged. This evidence covers an
|
||||
internal Rust boundary change, not a protocol migration.
|
||||
- No remote repository was created or modified for this work beyond pushing the
|
||||
candidate branch and PR; no empty candidate repository exists.
|
||||
@@ -0,0 +1,84 @@
|
||||
# Evidence — issue #15 independent `marqdo-plugin-sdk` repository
|
||||
|
||||
> **Superseded.** This snapshot records the (later reverted) ADR-0072 split.
|
||||
> The SDK is back in the CLI workspace under
|
||||
> [ADR-0073](../adr/0073-sdk-stays-in-cli-workspace.md); the remote repository
|
||||
> was deleted. See `2026-11-26-issue-15-sdk-split-reverted.md`. Do not read this
|
||||
> file as current architecture.
|
||||
|
||||
Date: 2026-11-26 (Asia/Shanghai)
|
||||
Tracking issue: <https://git.cflmy.cn/cflmy/marqdo-cli/issues/15>
|
||||
Decision: [ADR-0072](../adr/0072-sdk-independent-repository.md)
|
||||
Parent: issue #13 / [ADR-0071](../adr/0071-engine-host-contract-boundary.md)
|
||||
|
||||
## Topology and identity
|
||||
|
||||
| Object | Exact identity |
|
||||
|---|---|
|
||||
| SDK repository | `cflmy/marqdo-plugin-sdk` (public), `main` at `b31187a` |
|
||||
| CLI contract input | `marqdo-plugin-abi` from `https://git.cflmy.cn/cflmy/marqdo-cli.git` `rev = 2585915e16906dac75f8571bed02e7f6f868c6bc` (merge of PR #14) |
|
||||
| CLI candidate | `architecture/sdk-independent-repository`; PR/CI SHA recorded by the PR |
|
||||
| Frozen CLI acceptance binary | `marqdo` 3.0.0-rc.4 Linux x86_64 release archive, SHA-256 from the release `.sha256` asset |
|
||||
| ABI | Plugin ABI 1.0 / Value Wire 1 / package + provider formats unchanged |
|
||||
|
||||
The SDK repository is its own Cargo workspace and lock. The CLI does not depend
|
||||
on it, and the SDK does not depend on the CLI checkout, the native host, a
|
||||
loader/worker, a sandbox or the CLI product.
|
||||
|
||||
## SDK repository verification (clean clone, independent of CLI checkout)
|
||||
|
||||
Commands run in a fresh `git clone https://git.cflmy.cn/cflmy/marqdo-plugin-sdk.git`
|
||||
outside this repository:
|
||||
|
||||
| Gate | Command | Result |
|
||||
|---|---|---|
|
||||
| Locked build | `cargo build --locked` | PASS (contract fetched from the pinned public CLI git `rev`) |
|
||||
| SDK tests | `cargo test --locked` | PASS (4 unit tests + 1 doc-test, 2 ignored doc examples) |
|
||||
| Third-party fixture | `cargo build --locked --manifest-path tests/fixture/Cargo.toml` | PASS (built only from the SDK) |
|
||||
| Frozen CLI invocation (S04/S07) | `python3 tools/check_with_frozen_cli.py --marqdo-bin frozen/marqdo` | PASS — real CLI returns `Int 42` |
|
||||
| Tampered artifact (S05/S06) | same script, `sha256` replaced | PASS — rejected with artifact/sha256 diagnostic |
|
||||
|
||||
The frozen binary was the released 3.0.0-rc.4 archive, not a locally rebuilt CLI;
|
||||
the plugin ABI is unchanged across the #13 decoupling, which is exactly the
|
||||
cross-repository compatibility being tested.
|
||||
|
||||
SDK repository CI (`.woodpecker/main.yml`) repeats the workspace checks, the
|
||||
fixture build and the frozen-CLI integration after downloading that released
|
||||
archive. Enabling the Woodpecker project/webhook for the new repository is a
|
||||
repository-administration step outside this change; the pipeline definition is
|
||||
checked in and the same commands were executed manually above.
|
||||
|
||||
## CLI repository verification (this change)
|
||||
|
||||
| Gate | Command | Result |
|
||||
|---|---|---|
|
||||
| Workspace resolution | `cargo check --workspace --locked` | PASS; `marqdo-plugin-sdk` no longer appears in `Cargo.lock` |
|
||||
| Formatting | `cargo fmt --all -- --check` | PASS |
|
||||
| Clippy | `cargo clippy --workspace --all-targets --locked -- -D warnings` | PASS |
|
||||
| Rust tests | `cargo test --workspace --locked --no-fail-fast` | PASS — 631 passed / 0 failed / 0 ignored (the removed SDK 4 unit + 1 doc test now run in the SDK repository; the two previously ignored SDK doc examples moved with them) |
|
||||
| Architecture boundaries | `cargo test -p marqdo-cli --test architecture_boundaries --locked` | PASS — SDK absence/moved-repository assertion |
|
||||
| Docs consistency | `cargo test -p marqdo-cli --test docs_consistency --locked` | PASS |
|
||||
| Dependency direction | `python3 tools/ci/check_dependency_boundaries.py` | PASS — SDK no longer a workspace member; negative case added |
|
||||
| Tools unit tests | `python3 -m unittest discover -s tools/ci -p "test_*.py"` | PASS |
|
||||
| Engine differential | `python3 tools/ci/check_engine_boundary.py` | PASS (unchanged) |
|
||||
|
||||
Removed from the CLI workspace/repository in the same integration:
|
||||
|
||||
- `crates/marqdo-plugin-sdk/` (moved to the independent repository);
|
||||
- `tests/sdk-plugin/` (fixture moved to `tests/fixture` in the SDK repository);
|
||||
- `tools/ci/check_plugin_sdk.py` (its superset lives in the SDK repository and
|
||||
uses a frozen CLI binary);
|
||||
- workspace/lock entry, architecture/layer docs, CI lane entries and current
|
||||
developer references.
|
||||
|
||||
## Not verified / follow-ups
|
||||
|
||||
- **Woodpecker activation** for the new public repository is administrative; the
|
||||
pipeline definition is committed, but no remote pipeline run is claimed here.
|
||||
- **Registry publication** of the contract crate is not introduced; the public
|
||||
CLI git `rev` is the precise, fetchable input. A future published artifact
|
||||
would be a new decision and would not change contract authority.
|
||||
- Engine/Native Host remain in the CLI workspace under ADR-0071; this split does
|
||||
not reopen that decision.
|
||||
- No second ABI, wire encoder, loader or host copy exists in the SDK repository;
|
||||
no compatibility/submodule path was added to the CLI repository.
|
||||
@@ -0,0 +1,62 @@
|
||||
# Evidence — issue #15 plugin SDK split reverted to the CLI workspace
|
||||
|
||||
Date: 2026-11-26 (Asia/Shanghai)
|
||||
Tracking issue: <https://git.cflmy.cn/cflmy/marqdo-cli/issues/15>
|
||||
Decision: [ADR-0073](../adr/0073-sdk-stays-in-cli-workspace.md) (supersedes
|
||||
[ADR-0072](../adr/0072-sdk-independent-repository.md))
|
||||
Parent: issue #13 / [ADR-0071](../adr/0071-engine-host-contract-boundary.md)
|
||||
|
||||
## Decision
|
||||
|
||||
Parent CLI contract merge: `2585915e16906dac75f8571bed02e7f6f868c6bc`.
|
||||
Deleted split repository commits: `b31187a` / `c3134e4` (kept in Git history
|
||||
of the former repository only; no source copy remains).
|
||||
|
||||
The plugin SDK stays in the CLI workspace as a contract-only crate. The public
|
||||
repository `cflmy/marqdo-plugin-sdk` created by ADR-0072 was deleted; its source
|
||||
was restored from CLI Git history. The pre-stable line prioritizes atomic
|
||||
ABI/header/spec/SDK/loader changes in one workspace, lock and candidate SHA.
|
||||
The logical ADR-0071 boundaries are unchanged.
|
||||
|
||||
## Actions executed
|
||||
|
||||
| Step | Result |
|
||||
|---|---|
|
||||
| Restore `crates/marqdo-plugin-sdk` from CLI history | Restored contract-only crate (`marqdo-plugin-abi` + serde/serde_json); no loader/host/worker dependency |
|
||||
| Restore workspace member and lock | `cargo check --workspace --all-targets --locked` resolves the SDK in the workspace; `Cargo.lock` contains it again |
|
||||
| Restore `tests/sdk-plugin` and `tools/ci/check_plugin_sdk.py` | Real fixture/gate back in the CLI; builds only against the public SDK and invokes via the real CLI |
|
||||
| Restore architecture/dependency/docs references | `architecture_boundaries.rs`, `check_dependency_boundaries.py`, `docs_consistency` paths, README/AGENTS/spec/developer guides point at the in-repo crate again |
|
||||
| Delete remote `cflmy/marqdo-plugin-sdk` | Authorized by the maintainer; the repository and its branches are gone, no mirror remains |
|
||||
| No temporary branch | The revert is committed directly on `master` and pushed; old merged feature branches are deleted separately |
|
||||
| Record superseded history | ADR-0072 and the old issue-#15 evidence carry Superseded banners; ADR-0073 is the current decision |
|
||||
|
||||
## Verification (local, Linux x86_64, Rust 1.100)
|
||||
|
||||
| Gate | Command | Result |
|
||||
|---|---|---|
|
||||
| Formatting | `cargo fmt --all -- --check` | PASS |
|
||||
| Clippy | `cargo clippy --workspace --all-targets --locked -- -D warnings` | PASS |
|
||||
| Rust tests | `cargo test --workspace --locked --offline --no-fail-fast` | PASS — **636 passed / 0 failed / 2 ignored** (same as the pre-split workspace) |
|
||||
| Architecture boundaries | `cargo test -p marqdo-cli --test architecture_boundaries --locked` | PASS |
|
||||
| Docs consistency | `cargo test -p marqdo-cli --test docs_consistency --locked` | PASS |
|
||||
| Dependency direction | `python3 tools/ci/check_dependency_boundaries.py` | PASS — SDK back in the reviewed workspace allowlist with contract-only edges |
|
||||
| SDK real consumption | `python3 tools/ci/check_plugin_sdk.py` | PASS — builds fixture with only the SDK; real CLI returns `Int 42`; tampered digest rejected |
|
||||
| Engine differential | `python3 tools/ci/check_engine_boundary.py` | PASS |
|
||||
| Tools unit tests | `python3 -m unittest discover -s tools/ci -p "test_*.py"` | PASS |
|
||||
|
||||
Remote CI on the code commit `98d256f`: Woodpecker push pipeline **#112**
|
||||
success (contract/test/minimum-rust/build) and Gitea commit status `success`.
|
||||
This evidence-only follow-up does not change code, lock or protocol bytes. No
|
||||
split repository, mirror or submodule exists after the deletion.
|
||||
|
||||
## Current architecture facts
|
||||
|
||||
- `marqdo-plugin-abi` is still the pure public contract; loader/worker/manifest/
|
||||
artifact remain in `marqdo-host::plugin` (ADR-0071).
|
||||
- `marqdo-plugin-sdk` is a CLI workspace member with normal/build dependencies
|
||||
only on the contract + serde; the CLI product is the only assembly point.
|
||||
- Plugin authors get header, spec, SDK, examples and loader from one public CLI
|
||||
repository/release; they compile their plugin, not the CLI.
|
||||
- The CLI runtime does not depend on the SDK; external plugin loading remains
|
||||
available (C ABI header + `--plugin`/`--trust-native-plugin`/`--allow-plugin`
|
||||
+ worker transport).
|
||||
Reference in new issue
Block a user