Compare commits
10
Commits
c2a7d327e5
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a031fedb73 | ||
|
|
7db401a836 | ||
|
|
5838ba028e | ||
|
|
a23b7ddb5d | ||
|
|
161600102d | ||
|
|
f4e51b504f | ||
|
|
3f8e591ce5 | ||
|
|
73fcf769c1 | ||
|
|
f4939c2862 | ||
|
|
5b5d3b67c3 |
No files matched your search
@@ -0,0 +1,23 @@
|
|||||||
|
# Unified Woodpecker CI for a source-only Marqdo component.
|
||||||
|
#
|
||||||
|
# The published `marqdo-ci-shell` image is the only runtime dependency: one
|
||||||
|
# Ubuntu 24.04 base, the released CLI/Bundle, and common test tools. No image
|
||||||
|
# variance, apt install, Rust toolchain download, CLI rebuild or sibling checkout.
|
||||||
|
when:
|
||||||
|
- event: [pull_request, manual]
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
steps:
|
||||||
|
test:
|
||||||
|
image: git.cflmy.cn/cflmy/marqdo-ci-shell:3.0.0-rc.5
|
||||||
|
commands:
|
||||||
|
- sh scripts/test.sh
|
||||||
|
- |
|
||||||
|
set -eu
|
||||||
|
out=$(mktemp -d)
|
||||||
|
trap 'rm -rf -- "$out"' EXIT
|
||||||
|
archive=$(sh scripts/package.sh "$out")
|
||||||
|
(cd "$out" && sha256sum -c "$(basename "$archive").sha256")
|
||||||
|
git rev-parse HEAD
|
||||||
|
cat "$archive.sha256"
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Fast-path notification: a completed Gitea release asks the root reconcile
|
||||||
|
# workflow to check it. The payload is only a hint; the root reconcile verifies
|
||||||
|
# the release/assets from the authoritative Gitea API. A lost call is recovered
|
||||||
|
# by the root `release-reconcile` cron.
|
||||||
|
when:
|
||||||
|
event: [release]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
notify:
|
||||||
|
image: git.cflmy.cn/cflmy/marqdo-ci-shell:3.0.0-rc.5
|
||||||
|
environment:
|
||||||
|
WOODPECKER_TOKEN:
|
||||||
|
from_secret: woodpecker_token
|
||||||
|
commands:
|
||||||
|
- |
|
||||||
|
set -eu
|
||||||
|
test -n "${WOODPECKER_TOKEN:?woodpecker_token secret missing}"
|
||||||
|
curl -fsS -X POST -H "Authorization: Bearer $WOODPECKER_TOKEN" -H "Content-Type: application/json" -d '{"branch":"main","workflow":"reconcile"}' https://ci.cflmy.cn/api/repos/6/pipelines
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<!-- marqdo:repo-conventions v1 -->
|
||||||
|
# AGENTS.md — std-text
|
||||||
|
|
||||||
|
全局规范唯一来源:[marqdo 仓库开发规范](https://git.cflmy.cn/cflmy/marqdo/src/branch/main/docs/REPOSITORY-CONVENTIONS.md)。本文件只写本仓边界,不复制全局规范或合同正文。
|
||||||
|
|
||||||
|
## 1. 本仓定位与唯一权威
|
||||||
|
|
||||||
|
- catalog ID:`std-text`;父级:根;角色:stdlib;状态:active。
|
||||||
|
- 职责/本仓拥有:Unicode 文本、字节值与 UTF-8;唯一模块源码
|
||||||
|
- 本仓不拥有:CLI 语法/运行时、Bundle 打包实现、其它 stdlib 模块的算法或序列化
|
||||||
|
- 权威输入/合同:真实 CLI `MARQDO_BIN` + 显式 `MARQDO_STDLIB_DIR` Bundle 的公开模块接口;根 Bundle 生产者
|
||||||
|
|
||||||
|
## 2. 必做 / 禁止
|
||||||
|
|
||||||
|
| 必做 | 禁止 |
|
||||||
|
| --- | --- |
|
||||||
|
| 只在本仓职责内修改,先开本仓工单 | 实现其它仓库功能,复制 parser/实现/合同 |
|
||||||
|
| 用真实 CLI/制品与独立期望测试 | mock、字符串检查或原型冒充真实验收/PASS |
|
||||||
|
| 依赖使用固定 SHA/摘要与显式输入 | 依赖父仓 checkout、兄弟仓相对路径、浮动分支 |
|
||||||
|
| 未运行写 `UNVERIFIED` | 伪造 entry/版本/CI 徽章/gitlink/发布资产 |
|
||||||
|
| 记录 SHA、制品摘要、平台、命令、退出码 | 提交密钥、凭证、构建产物或本地绝对路径 |
|
||||||
|
| 跨仓变更走 C2 → B2 → A2 晋升 | 自动 tag/release/合并,或直接改父仓/兄弟仓 |
|
||||||
|
|
||||||
|
- 不新增第二 catalog/manifest/lock/版本表/发布流程;不为单功能拆仓或建空壳仓。
|
||||||
|
- 不在本仓登记其它仓库后代路径;治理树最多两级 gitlink。
|
||||||
|
|
||||||
|
## 3. 构建、测试与证据
|
||||||
|
|
||||||
|
- CI/验收入口:`scripts/test.sh`(非交互、失败非零、不打印秘密、只写声明输出;构建与发布权限分离)。
|
||||||
|
- 输入与依赖:真实 CLI `MARQDO_BIN` + 显式 `MARQDO_STDLIB_DIR` Bundle 的公开模块接口;根 Bundle 生产者
|
||||||
|
- 交付:唯一模块源码 + 断言 + 确定性源码归档/证据(不强制二进制)
|
||||||
|
- 证据:候选 SHA、依赖/制品 SHA-256、平台/工具链、命令与退出码、日志位置、测试范围;FAIL/UNVERIFIED 不得写成 PASS。
|
||||||
|
|
||||||
|
## 4. 工单路由
|
||||||
|
|
||||||
|
- 语言/模块加载/Bundle 协议 → `marqdo-cli`;Bundle 装配/路径 → 根 Bundle 生产者;模块语义 → 本仓。
|
||||||
|
- 模块边界按迁移台账;不复制其它 stdlib 的算法或序列化实现。
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# marqdo-std-text
|
# marqdo-std-text
|
||||||
|
|
||||||
本仓负责 Unicode 文本、字节值与 UTF-8。当前处于**标准库源码归位迁移**阶段:源码与断言已迁入本仓,等待父仓候选组合验收(父仓工单 [marqdo#9](https://git.cflmy.cn/cflmy/marqdo/issues/9),本仓工单 [#1](https://git.cflmy.cn/cflmy/marqdo-std-text/issues/1))。
|
本仓负责 Unicode 文本、字节值与 UTF-8,已作为 active 标准库组件接入根仓。迁移与验收证据见 [marqdo#9](https://git.cflmy.cn/cflmy/marqdo/issues/9) 和 [本仓 #1](https://git.cflmy.cn/cflmy/marqdo-std-text/issues/1)。
|
||||||
|
|
||||||
## 唯一公开入口(Bundle 根相对路径)
|
## 唯一公开入口(Bundle 根相对路径)
|
||||||
|
|
||||||
@@ -33,6 +33,12 @@ scripts/test.sh
|
|||||||
|
|
||||||
## 边界
|
## 边界
|
||||||
|
|
||||||
不实现语言内核、Host 权限、资源原语或其他标准库;UTF-8 算法只存在于 `text/utf8.mq.md`。标准库聚合(`marqdo-stdlib`)尚未建立,本仓保持父仓 catalog 的 `planned` 状态,直到同候选组合验收通过。
|
本仓拥有文本和 UTF-8 的模块源码及断言。根仓依据精确 gitlink 装配唯一官方 Bundle。使用干净检出可在 Linux 生成带完整提交 SHA 的源码归档及校验文件。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
scripts/package.sh "$(mktemp -d)"
|
||||||
|
```
|
||||||
|
|
||||||
|
独立 CI 在 PR、`main` 推送和手动运行时检验真实 CLI 行为与归档摘要。正式发版走生态受保护发布流程。
|
||||||
|
|
||||||
[生态迁移台账](https://git.cflmy.cn/cflmy/marqdo/src/branch/main/docs/MIGRATION.md) · [开发流程](https://git.cflmy.cn/cflmy/marqdo/src/branch/main/docs/DEVELOPMENT.md)
|
[生态迁移台账](https://git.cflmy.cn/cflmy/marqdo/src/branch/main/docs/MIGRATION.md) · [开发流程](https://git.cflmy.cn/cflmy/marqdo/src/branch/main/docs/DEVELOPMENT.md)
|
||||||
Executable
+32
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Build a repeatable source archive from this component's clean Git commit.
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "usage: scripts/package.sh OUTPUT_DIRECTORY" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||||
|
source=$(git -C "$root" rev-parse --verify HEAD)
|
||||||
|
if [ -n "$(git -C "$root" status --porcelain)" ]; then
|
||||||
|
echo "package: source checkout has uncommitted changes" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
output=$(realpath -m -- "$1")
|
||||||
|
case "$output/" in
|
||||||
|
"$root/"*) echo "package: use an output directory outside the source checkout" >&2; exit 2 ;;
|
||||||
|
esac
|
||||||
|
mkdir -p -- "$output"
|
||||||
|
work=$(mktemp -d "$output/.std-text.XXXXXX")
|
||||||
|
trap 'rm -rf -- "$work"' EXIT
|
||||||
|
|
||||||
|
name="marqdo-std-text-$source"
|
||||||
|
archive="$name-source.tar.gz"
|
||||||
|
# Keep the operations separate so a failed git archive cannot be masked by gzip.
|
||||||
|
git -C "$root" archive --format=tar --prefix="$name/" "$source" > "$work/source.tar"
|
||||||
|
gzip -n < "$work/source.tar" > "$work/$archive"
|
||||||
|
(cd "$work" && sha256sum "$archive" > "$archive.sha256")
|
||||||
|
mv -- "$work/$archive" "$work/$archive.sha256" "$output/"
|
||||||
|
printf '%s\n' "$output/$archive"
|
||||||
Reference in new issue
Block a user