ci: aggregate SHA-bound release evidence and clear status drift
CI / fmt + clippy + test (Linux x86_64) (push) Waiting to run
CI / schema instance validation + consumers (push) Waiting to run
CI / runtime contract (macos-latest) (push) Waiting to run
CI / runtime contract (windows-latest) (push) Waiting to run
Linux strict security lane (G-C) / strict isolation escape matrix (push) Waiting to run
ci/woodpecker/push/woodpecker Pipeline was successful
CI / fmt + clippy + test (Linux x86_64) (push) Waiting to run
CI / schema instance validation + consumers (push) Waiting to run
CI / runtime contract (macos-latest) (push) Waiting to run
CI / runtime contract (windows-latest) (push) Waiting to run
Linux strict security lane (G-C) / strict isolation escape matrix (push) Waiting to run
ci/woodpecker/push/woodpecker Pipeline was successful
Add tools/ci/release_evidence.py (marqdo.release-gates.v1) plus unit tests: missing/skipped/FAIL/UNVERIFIED and tested_sha mismatches stay DO_NOT_RELEASE, performance may be PASS/WARN, unknown gate names are rejected. The GitHub CI now has a release-evidence job that maps the Linux/schema and native matrix results onto the manifest and uploads it, and both CI systems run the evidence-tool tests. Clear the contradictions the RFC calls out: remove the stale CURRENT.md rows that claimed DNS/TLS/UDP and fs metadata were absent while the same table said they were implemented; correct docs/ci.md to state that the GitHub-hosted Windows/macOS matrix exists (Woodpecker has no such agent); keep the old convergence plan historical; require the evidence manifest in releasing.md; and add a docs-consistency guard for these claims. This is step 6 of the CI/security RFC (B05/B06/B07).
This commit is contained in:
1 parent
d2267e912a
commit
0d7e11b6f1
12 files changed
+483
-36
No files matched your search
@@ -15,6 +15,13 @@
|
||||
> 为目标语法并标注历史;现行规范见 `spec/mapping.md` / `spec/expression.ebnf`。
|
||||
|
||||
|
||||
> **CI status refresh (2026-11-21):** the GitHub-hosted Windows/macOS matrix
|
||||
> exists in `.github/workflows/ci.yml`; it is not "unconfigured". The platform
|
||||
> `E0425`/`E0433` defect and the strict `--json` empty-stdout defect are fixed in
|
||||
> the RFC-CI-0001 series (ADR-0053). Those fixes do not turn this file's
|
||||
> `c9f01aa8` rows into current evidence: re-run the matrix on the candidate SHA
|
||||
> and record the result in `docs/evidence/ci/<SHA>/manifest.json`.
|
||||
>
|
||||
> **文档性质:** 可直接入库的执行规范 / Release Convergence Plan。供未阅读任何历史聊天的维护者、贡献者与 DeepSeek Harness 使用。
|
||||
>
|
||||
> **仓库:** `https://github.com/cflmy/marqdo-cli`;开发者的本地 Git 远端可能是 Gitee,不应混淆远端提交、GitHub 镜像与真实 CI 状态。
|
||||
|
||||
@@ -111,8 +111,6 @@ review RFC, not a new crate per provider.
|
||||
| `std:compress` | `compress.压缩/解压` -> gzip byte list <-> Text; 8 MiB caps | implemented (project mode; no grant) | `resource_streams`, `stdlib_product` |
|
||||
| network endpoints | `tcp`/`udp`/`tcp-listener`/`tls` open + `resource.accept`; exact host grant, DNS after grant, TLS certificate validation | implemented (project mode) | `resource_streams` |
|
||||
| `std:net/http` | byte-exact HTTP/1.1 parse/build; chunk sizes are byte counts; text wrapper compatible | implemented (pure `.mq.md`) | `stdlib_http` |
|
||||
| file metadata / directory / rename / remove / mkdir | not part of the current Resource contract | **not implemented**; needs a separate Resource Operation ADR | — |
|
||||
| TCP | `resource.open("tcp", ip:port, ["read","write"])`; exact IP grant, 5 s timeout | implemented; no DNS/TLS/server socket/UDP | `tcp_endpoint`, `http_over_tcp` |
|
||||
| HTTP/1.1 | `stdlib/net/http.mq.md`: status/header/chunked-byte parse, request build | implemented over an already-authorized TCP stream; not a DNS/TLS client | `stdlib_http`, `http_over_tcp`, `stdlib_product` |
|
||||
| print | bundled `io.mq.md`/`console.mq.md` through `resource.write`; legacy `HostOp::Print` removed | implemented (Compat-C) | `print_routing`, `stdlib_product` |
|
||||
| strict mode | only the pure/Math execution path and the built-in stdout console channel; project/foreign/plugin/tool/trace/file/network grants are rejected | implemented L1; L2 not implemented | `tests/security`, `resource_streams`, `stdlib_product` |
|
||||
|
||||
+17
-5
@@ -14,10 +14,11 @@ The default Docker pipeline runs on push and pull request:
|
||||
```text
|
||||
test:
|
||||
rustup component add clippy rustfmt
|
||||
apt install curl/ca-certificates + Node.js 22
|
||||
apt install curl/ca-certificates/python3 + Node.js 22
|
||||
cargo fmt --all -- --check
|
||||
cargo clippy --workspace --all-targets -- -D warnings
|
||||
cargo test --workspace --locked
|
||||
python3 -m unittest discover -s tools/ci -p "test_*.py"
|
||||
|
||||
build (depends on test):
|
||||
cargo build --release --locked -p marqdo-cli
|
||||
@@ -38,10 +39,21 @@ syntax; Debian bookworm's Node 18 fails those tests.
|
||||
## What this pipeline does not cover
|
||||
|
||||
- **Strict security lane**: needs a disposable VM/self-hosted runner with
|
||||
Bubblewrap/AppArmor namespace support. See [security-vm.md](security-vm.md).
|
||||
The Docker pipeline is not an OS-isolation proof.
|
||||
- **Windows/macOS native lanes**: no runners are configured.
|
||||
- **Release publication/signing**: no release job is defined.
|
||||
Bubblewrap/AppArmor namespace support. See [security-vm.md](security-vm.md)
|
||||
and [security-gate.md](security-gate.md). The Docker pipeline is not an
|
||||
OS-isolation proof.
|
||||
- **Windows/macOS native lanes**: the GitHub-hosted
|
||||
`.github/workflows/ci.yml` matrix **does exist and does run** on
|
||||
`windows-latest` and `macos-latest`. The Woodpecker instance itself has no
|
||||
Windows/macOS agent, so a Woodpecker-only green pipeline cannot substitute
|
||||
for those native jobs. A remote Windows/macOS PASS requires the GitHub
|
||||
matrix (or an equivalent real native runner) on the same SHA.
|
||||
- **Performance baseline (G4)**: needs a fixed Linux node; see
|
||||
[performance.md](performance.md). Development-container or TCG/QEMU timings
|
||||
are `SMOKE`, never release evidence.
|
||||
- **Release publication/signing**: no publication job is defined. The
|
||||
`release-evidence` job produces a SHA-bound manifest artifact; it does not
|
||||
tag or upload a release.
|
||||
|
||||
## Local reproduction
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# CI release-evidence manifests
|
||||
|
||||
`docs/evidence/ci/<full-40-hex-sha>/manifest.json` is generated by
|
||||
`tools/ci/release_evidence.py` (schema `marqdo.release-gates.v1`) and uploaded
|
||||
by the `release-evidence` CI job. Do not hand-edit a manifest into `PASS`.
|
||||
|
||||
Rules:
|
||||
|
||||
* every gate records its own `tested_sha`; it must equal `target_sha`;
|
||||
* skipped, cancelled, queued, timed-out, missing or older-SHA jobs are
|
||||
`UNVERIFIED`/`FAIL`, never `PASS`;
|
||||
* `strict_vm` needs a real disposable-VM `strict-evidence.json` (schema
|
||||
`marqdo.strict-evidence.v1`) with `outcome: PASS`, non-root `uid` and the
|
||||
same SHA; a URL alone is not enough;
|
||||
* `performance` needs a `MEASURED` report from the fixed node; TCG/QEMU or
|
||||
development-container numbers are not a baseline;
|
||||
* `release_decision` is `RELEASE_CANDIDATE` only when every required gate is
|
||||
PASS with the same SHA and performance is PASS/WARN. Anything else is
|
||||
`DO_NOT_RELEASE`.
|
||||
|
||||
The manifest is evidence, not permission to tag; owner approval is separate.
|
||||
+14
-4
@@ -7,8 +7,12 @@ required CI matrix on the exact commit.
|
||||
## 1. Preconditions
|
||||
|
||||
- All applicable gates in
|
||||
[`NEXT_RELEASE_CI_CONVERGENCE.md`](NEXT_RELEASE_CI_CONVERGENCE.md) §7 are
|
||||
PASS with a CI URL for the same SHA.
|
||||
[`STABLE_RELEASE_IMPLEMENTATION.md`](STABLE_RELEASE_IMPLEMENTATION.md) are
|
||||
PASS, and `docs/evidence/ci/<SHA>/manifest.json` has
|
||||
`release_decision: RELEASE_CANDIDATE` with every gate's `tested_sha` equal to
|
||||
the release SHA. The manifest is produced by
|
||||
`tools/ci/release_evidence.py`; a missing, skipped, timed-out or
|
||||
SHA-mismatched gate is not PASS.
|
||||
- **Language migration is closed through the release SHA.** The source language
|
||||
is [RFC-LANG-0002](architecture/RFC-LANG-0002-unified-semantics.md); the
|
||||
release notes must state that this is a **breaking** change and that pre-RFC
|
||||
@@ -18,8 +22,14 @@ required CI matrix on the exact commit.
|
||||
release SHA. Platform and strict-lane evidence are still required before this
|
||||
is a releasable state; see [`STATUS.md`](STATUS.md) and
|
||||
[`migration/README.md`](migration/README.md).
|
||||
- G-C is either PASS with a security-lane URL, or the release explicitly says
|
||||
strict isolation is unavailable. Never claim G-C from local root/sudo runs.
|
||||
- G-C is either PASS with a security-lane URL **and** a
|
||||
`strict-evidence.json` whose `tested_sha` is the release SHA, or the release
|
||||
explicitly says strict isolation is unavailable with owner approval. Never
|
||||
claim G-C from a local root/sudo run, a container, or a TCG/QEMU timing run.
|
||||
See [`security-gate.md`](security-gate.md) and [`security-vm.md`](security-vm.md).
|
||||
- G4 performance is `MEASURED` on the fixed node with `--approved-node`, or
|
||||
explicitly `UNVERIFIED`/`WARN` with the reason recorded. Never copy a
|
||||
development-container or TCG number. See [`performance.md`](performance.md).
|
||||
- `git status --porcelain` is clean apart from intended release files.
|
||||
- `Cargo.lock` is committed and the build uses `--locked`.
|
||||
|
||||
|
||||
+78
-24
@@ -5,12 +5,13 @@ development host is a container that cannot create namespaces. This document
|
||||
records how that VM was built so the result can be reproduced and so the VM can
|
||||
be registered as a dedicated self-hosted security runner.
|
||||
|
||||
> **Language-syntax migration note.** The lane fixtures are `.mq.md` sources and
|
||||
> are migrated to RFC-LANG-0002
|
||||
> **Current evidence rule.** The lane fixtures are `.mq.md` sources under
|
||||
> RFC-LANG-0002
|
||||
> ([`architecture/RFC-LANG-0002-unified-semantics.md`](architecture/RFC-LANG-0002-unified-semantics.md)).
|
||||
> The lane has not been re-run at `ffd1cc9`; run `tests/security/run-lane.sh` on
|
||||
> the migrated tree before using this VM as evidence for the current syntax. The
|
||||
> VM/OS-isolation procedure itself is unchanged. See [`STATUS.md`](STATUS.md).
|
||||
> The lane is only evidence for the **exact SHA in its
|
||||
> `strict-evidence.json`**; a PASS at an older SHA or on another host is
|
||||
> historical. Every candidate release must rerun `tests/security/run-lane.sh`
|
||||
> and archive the evidence document. See [`STATUS.md`](STATUS.md).
|
||||
|
||||
**Do not run this on a daily host with valuable data.** The VM is disposable;
|
||||
the commands below do not disable AppArmor or any global host protection.
|
||||
@@ -28,14 +29,36 @@ gitignored and is not part of the repository.
|
||||
|
||||
## 2. Cloud image and seed
|
||||
|
||||
**Pin the base image.** Do not run a release gate from a mutable `current`
|
||||
URL. Download one dated release, verify it against Ubuntu's published
|
||||
`SHA256SUMS`, record the digest, and keep that file immutable:
|
||||
|
||||
```bash
|
||||
mkdir -p .tools/vm && cd .tools/vm
|
||||
curl -L -o resolute.img \
|
||||
https://cloud-images.ubuntu.com/resolute/current/resolute-server-cloudimg-amd64.img
|
||||
qemu-img create -f qcow2 -b resolute.img -F qcow2 disk.qcow2 20G
|
||||
ssh-keygen -t ed25519 -N '' -f marqdo_vm_key
|
||||
# Replace with the reviewed dated release URL, never .../current/...
|
||||
curl -L -o ubuntu-base.img \
|
||||
https://cloud-images.ubuntu.com/releases/26.04/release-20261120/ubuntu-26.04-server-cloudimg-amd64.img
|
||||
curl -L -o SHA256SUMS \
|
||||
https://cloud-images.ubuntu.com/releases/26.04/release-20261120/SHA256SUMS
|
||||
grep 'ubuntu-26.04-server-cloudimg-amd64.img' SHA256SUMS | sha256sum -c -
|
||||
sha256sum ubuntu-base.img | tee ubuntu-base.img.sha256
|
||||
qemu-img create -f qcow2 -b ubuntu-base.img -F qcow2 \
|
||||
"strict-${SOURCE_SHA}.qcow2" 24G
|
||||
ssh-keygen -t ed25519 -N '' -f "marqdo_vm_key-${SOURCE_SHA}"
|
||||
```
|
||||
|
||||
The local reference run used this base image; the digest belongs in the
|
||||
evidence document as `runner_image_sha256`, not in a claim about a remote
|
||||
runner:
|
||||
|
||||
```text
|
||||
ubuntu-base.img sha256:
|
||||
7b90593f5532b49b7e3fe3d2743f0d1f0d822e5b07cebcd8e00c0df8069ecab9
|
||||
```
|
||||
|
||||
Create a fresh qcow2 overlay and a fresh cloud-init seed for every tested SHA.
|
||||
Never reuse a writable overlay that may contain state from another run.
|
||||
|
||||
Create `user-data` with an ordinary `dev` user (passwordless sudo only for
|
||||
test setup), `meta-data` with a unique instance id, and wrap both into a
|
||||
NoCloud ISO with volume label `cidata`. Any ISO builder works; the reference
|
||||
@@ -115,37 +138,68 @@ globally.
|
||||
|
||||
## 5. Copy the source and run the lane
|
||||
|
||||
From the host repository root (or from `git archive <sha>`):
|
||||
Build the archive from the reviewed commit, never from a dirty working tree:
|
||||
|
||||
```bash
|
||||
tar --exclude=.git --exclude=.tools --exclude=.cache --exclude=.cargo-home \
|
||||
--exclude=target --exclude=dist -czf /tmp/marqdo-src.tgz .
|
||||
scp -P 2222 -i .tools/vm/marqdo_vm_key /tmp/marqdo-src.tgz dev@127.0.0.1:/home/dev/
|
||||
ssh -p 2222 -i .tools/vm/marqdo_vm_key dev@127.0.0.1
|
||||
export SOURCE_SHA="$(git rev-parse HEAD)" # must be the reviewed SHA
|
||||
git status --porcelain # must be empty
|
||||
git archive --format=tar "$SOURCE_SHA" > "marqdo-${SOURCE_SHA}.tar"
|
||||
sha256sum "marqdo-${SOURCE_SHA}.tar" | tee "marqdo-${SOURCE_SHA}.tar.sha256"
|
||||
scp -P 2222 -i .tools/vm/marqdo_vm_key \
|
||||
"marqdo-${SOURCE_SHA}.tar" dev@127.0.0.1:/home/dev/
|
||||
```
|
||||
|
||||
Inside the guest:
|
||||
Inside the guest (ordinary user, not root):
|
||||
|
||||
```bash
|
||||
mkdir -p ~/marqdo-src && tar -C ~/marqdo-src -xzf ~/marqdo-src.tgz
|
||||
cd ~/marqdo-src
|
||||
sed -n '1p' ~/marqdo-${SOURCE_SHA}.tar.sha256
|
||||
sha256sum ~/marqdo-${SOURCE_SHA}.tar
|
||||
mkdir -p ~/marqdo-${SOURCE_SHA}
|
||||
tar -C ~/marqdo-${SOURCE_SHA} -xf ~/marqdo-${SOURCE_SHA}.tar
|
||||
cd ~/marqdo-${SOURCE_SHA}
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export MARQDO_TESTED_SHA="$SOURCE_SHA"
|
||||
export MARQDO_SOURCE_ARCHIVE="$HOME/marqdo-${SOURCE_SHA}.tar"
|
||||
export MARQDO_SOURCE_ARCHIVE_SHA256="sha256:<digest from the host>"
|
||||
export MARQDO_STRICT_EVIDENCE="$HOME/evidence-${SOURCE_SHA}/strict-evidence.json"
|
||||
export MARQDO_STRICT_LANE_LOG="$HOME/evidence-${SOURCE_SHA}/gc-lane.log"
|
||||
mkdir -p "$(dirname "$MARQDO_STRICT_EVIDENCE")"
|
||||
./tests/security/run-lane.sh
|
||||
```
|
||||
|
||||
Expected final line: `G-C security lane: PASS`. The lane also checks that the read-only bundled stdlib works for `打印` and that a project-file `resource.open` is refused in strict mode. The script exports
|
||||
`MARQDO_REQUIRE_STRICT_SECURITY=1`; a missing bubblewrap, compiler or helper is
|
||||
a failure, never a skip.
|
||||
Expected final line: `G-C security lane: PASS`, followed by the evidence path.
|
||||
The evidence document records the tested SHA, archive digest, `uid`, `uname`,
|
||||
bwrap/rustc/cargo versions, cgroup2 view, runner kind and outcome. A root-only
|
||||
PASS is rejected. A missing bubblewrap, compiler, helper or skipped test is a
|
||||
failure, never a skip.
|
||||
|
||||
If the archive digest in the guest does not match the host digest, stop: the
|
||||
transfer or the extraction is wrong and the run is not evidence.
|
||||
|
||||
## 6. Registering as a security runner
|
||||
|
||||
Register this VM (not the development container) as a GitHub self-hosted
|
||||
runner with labels `linux` and `marqdo-security`. The workflow
|
||||
`.github/workflows/security-linux.yml` targets
|
||||
`runs-on: [self-hosted, linux, marqdo-security]`. Keep the runner disposable
|
||||
and recreate it from this document; do not give the runner access to secrets or
|
||||
the primary workspace. A CI URL from that runner is still required before a
|
||||
release may call G-C CI-verified.
|
||||
`runs-on: [self-hosted, linux, marqdo-security]`.
|
||||
|
||||
The runner must be **ephemeral**:
|
||||
|
||||
* provision a fresh VM (or a self-hosted runner with a genuinely one-shot
|
||||
lifetime) for each job, from a pinned base image;
|
||||
* no persistent home, host mounts, Docker socket, SSH/Git/cloud credentials or
|
||||
release token; only the short-lived runner registration credential;
|
||||
* job `permissions: contents: read`, `actions/checkout` with
|
||||
`persist-credentials: false` (already in the workflow);
|
||||
* do not run arbitrary fork PRs on it: the workflow only runs on `master`
|
||||
pushes or an explicit reviewed `source_sha`;
|
||||
* destroy the whole VM after the job and keep the uploaded
|
||||
`strict-evidence.json` and lane log.
|
||||
|
||||
A PASS from a persistent runner with production credentials is not acceptable
|
||||
evidence, even if the test output is green. If no ephemeral runner is
|
||||
available, report "local disposable-VM PASS, remote G3 UNVERIFIED" instead of a
|
||||
green CI claim.
|
||||
|
||||
## Reference environment
|
||||
|
||||
|
||||
Reference in new issue
Block a user