refactor: accept the ecosystem stdlib Bundle and remove the in-repo sources
Phase B of ADR-0070 (issue #11): the CLI no longer owns standard-library sources. The pin names the accepted ecosystem Bundle (marqdo-stdlib@0.2.0, root commit + tree/alias digests); tools/ci/fetch_ecosystem_bundle.py materializes it from the pinned root commit and stdlib gitlinks and verifies the digests. bundle.py and the test harness require an explicit verified Bundle for the accepted identity, and runtime discovery has no compile-time source fallback in any profile. Delete stdlib/ (modules, self-tests, aliases manifest). Module and domain tests stay with their component owners; the CLI product lane now verifies the external Bundle's public surface, std: resolution and official print/打印 alias routing (tests/product-stdlib). Composition assertions whose owner is the ecosystem (Table split, print-format equivalence) moved to the root Bundle acceptance; the generic TCP round-trip stays a CLI test. Spawned-CLI tests name the verified Bundle explicitly. CI (Woodpecker + GitHub) materializes the pinned Bundle before product tests, packaging and performance lanes; packaging and release take --stdlib-dir from that artifact. Docs, STATUS, ADR-0070 and a Phase B evidence record updated. Refs cflmy/marqdo#9, cflmy/marqdo-cli#11
This commit is contained in:
1 parent
f8b82d4143
commit
72f57beee0
85 files changed
+796
-5939
No files matched your search
@@ -1,6 +1,7 @@
|
||||
# ADR-0070 — One explicit stdlib Bundle build input (Phase A)
|
||||
|
||||
Status: **Accepted for implementation on the 3.0 prerelease line** (2026-11-26).
|
||||
Status: **Phase A accepted and implemented (2026-11-26); Phase B accepted and
|
||||
implemented on the 3.0 prerelease line (2026-11-27).**
|
||||
Relates to: issue
|
||||
[#11](https://git.cflmy.cn/cflmy/marqdo-cli/issues/11), ADR-0028 (bundled
|
||||
stdlib and `std:` imports), ADR-0039 (deferred extraction), ADR-0058 (public
|
||||
@@ -99,6 +100,31 @@ replacement evidence named by issue #11. This ADR records the Phase A input
|
||||
boundary only; it does not authorize deleting sources or changing `std:`
|
||||
semantics.
|
||||
|
||||
## Phase B implementation (2026-11-27)
|
||||
|
||||
The gate above was met by ecosystem issue #9's candidate combination, so the
|
||||
pin and CI changed and the sources were removed:
|
||||
|
||||
* `tools/stdlib/bundle-pin.json` names
|
||||
`source.kind = "ecosystem"`, `repository = cflmy/marqdo`, the exact root
|
||||
commit that pins the component gitlinks, and the accepted digests. The pin no
|
||||
longer records a vendored `source.path`.
|
||||
* `crates/cli/src/stdlib.rs` has no compile-time source fallback in any build
|
||||
profile; discovery is `MARQDO_STDLIB_DIR` then the installed sibling Bundle.
|
||||
* The in-repo `stdlib/` tree is deleted. Module sources, self-tests and domain
|
||||
behaviour tests live in the component repositories.
|
||||
* `tools/ci/fetch_ecosystem_bundle.py` materializes the pinned Bundle from the
|
||||
ecosystem root commit + stdlib gitlinks and verifies it against the pin;
|
||||
Woodpecker and GitHub CI use it before product tests, packaging and
|
||||
performance lanes.
|
||||
* Product tests (`crates/cli/tests/stdlib_product.rs`) verify the CLI's own
|
||||
responsibility against the external Bundle: required public surface,
|
||||
`std:` execution and official alias routing. Composition fixtures whose
|
||||
ownership is the ecosystem (Table split, print-format equivalence) live in
|
||||
the root Bundle acceptance; removed CLI tests were not replaced by mocks.
|
||||
* A missing `MARQDO_TEST_STDLIB_BUNDLE` fails the product lane closed; the
|
||||
product contract never reads a sibling source tree.
|
||||
|
||||
## Consequences
|
||||
|
||||
* A packaging run can be pointed at a downloaded or separately built Bundle and
|
||||
|
||||
Reference in new issue
Block a user