candidate: pin the explicit-package extensions and gate their consumption
ci/woodpecker/push/eco Pipeline was canceled
ci/woodpecker/pr/eco Pipeline failed

Pin ext-http/ext-regex/ext-archive at the merged explicit-Package candidates
(they stay planned, never join the default Bundle) and extend the root
acceptance gate to run any extension checkout that publishes the current
package layout (marqdo.yaml + index.mq.md + scripts/test.sh). Record the actual
package-entry decision in the ledger and evidence: the three domain modules are
consumed through the public @alias import after marqdo lock, with the original
domain tests and baseline terminal values preserved.

Refs cflmy/marqdo#9
This commit is contained in:
cflmy committed 2026-11-27 00:10:11 +08:00
1 parent 0c7430ede0
commit 4fade3e981
6 files changed
+54 -10

No files matched your search

+40
View File
@@ -169,6 +169,26 @@ def load_components() -> list[dict]:
]
def load_explicit_packages() -> list[dict]:
"""Planned extensions that already publish an explicit Package entry.
A component is gated as an explicit package only when its pinned checkout
carries the current package layout (``marqdo.yaml`` + ``index.mq.md`` +
``scripts/test.sh``); it is never silently loaded into the default Bundle.
"""
catalog = tomllib.loads((ROOT / "components.toml").read_text())
packages = []
for component in catalog["component"]:
if component.get("kind") != "extension":
continue
checkout = ROOT / component["path"]
if (checkout / "marqdo.yaml").is_file() and (
checkout / "index.mq.md"
).is_file() and (checkout / "scripts" / "test.sh").is_file():
packages.append(component)
return packages
def component_gates(cli: str, bundle: Path) -> list[dict]:
results = []
for component in load_components():
@@ -194,6 +214,26 @@ def component_gates(cli: str, bundle: Path) -> list[dict]:
"output": output,
}
)
for component in load_explicit_packages():
entry = ROOT / component["path"] / "scripts" / "test.sh"
env = os.environ.copy()
env["MARQDO_BIN"] = cli
env["MARQDO_STDLIB_DIR"] = str(bundle)
result = run([str(entry)], cwd=ROOT / component["path"], env=env)
output = (result.stdout + result.stderr).decode(errors="replace").strip()
if result.returncode != 0:
raise AcceptanceError(
f"explicit package {component['id']} failed: {output}"
)
results.append(
{
"id": component["id"],
"entry": "scripts/test.sh",
"kind": "explicit-package",
"status": "PASS",
"output": output,
}
)
return results