Capsem 黑盒验收测试
ironbank
当 Capsem 的 VM、网络、模型、MCP、凭证代理(credential broker)、安全、包管理器、doctor、benchmark 或发布门禁(release-gate)行为需要黑盒验收证明时使用。
- License 许可
- Apache-2.0
- 所属仓库
- google/capsem
- 最近更新
- 2026-11-14
- Stars
- ★ 186
- Forks
- 26
01 前言 Front Matter
- name
- ironbank
- description
- Use when Capsem VM, network, model, MCP, credential broker, security, package-manager, doctor, benchmark, or release-gate behavior needs black-box acceptance proof
03 SKILL.md 正文
Ironbank
Ironbank is Capsem's full black-box ledger discipline. Use it for release, VM, network, model, MCP, credential broker, package-manager, doctor, benchmark, and security acceptance work.
Core Rule
Do not look at Rust/product internals to decide expected behavior. Ironbank tests are written from public contracts, CLI help, docs, route responses, generated schemas, hermetic fixture definitions, logs, DB rows, and installed package metadata. If the contract is missing, write the RED test for the missing contract.
Ironbank parity rule
The Ironbank parity rule is that every portable release gate belongs in
just test. Local just test rebuilds both artifact families and runs the
complete recipe. Binary and runtime release CI reuse the same checked-in
modules while pulling the unchanged artifact family; green split jobs do not
replace those modules. The shared entrypoints include workspace/runtime tests,
coverage floors,
capsem-doctor, Ironbank acceptance, benchmarks, artifact checks, all web
surfaces, and Docker/systemd Linux install plus a real guest-shell proof. Only
unavoidable platform boundaries may remain outside, and each must be named
with its authoritative final gate.
just test is the strict superset of portable CI work. CI workflows may run a
smaller relevant slice, but no portable artifact may be built only in workflow
YAML. In particular, VM asset publication uses the same just _build-kernel
and just _build-rootfs primitives owned by just test through
just _gate-assets; the canonical gate rebuilds the runtime for arm64 and
x86_64, validates every required artifact and manifest, and boots each rebuilt
host-architecture image to a guest-shell marker. Input-contract tests are not
a substitute for testing the artifact that was actually built.
The accounting applies to host packages too: macOS-local just test must build
the real release-mode .pkg and both release-mode Linux .deb architectures,
then execute the production host-SBOM generator over those exact packages.
Linux-only Rust branches must run locally in Docker as a non-root user through
the same checked-in runner used by Linux CI. Generated files must pass a
generate-and-compare idempotence gate; silently refreshing stale outputs is not
a green test.
Hardcoded release selection is also unaccounted state. The canonical gate must run the grep-backed selection guard covering public channel names, manifest URLs, native postinstall scripts, and both serialized release commands. Defaults may be declared explicitly at API boundaries, but downstream channel routes must carry the selected value and damaged packages must fail closed instead of falling back to stable.
For multi-architecture packages, required applies to the package matching the
release host. Cross artifacts are still built and structurally validated,
but must not fail early merely because they cannot execute natively on the
opposite-architecture runner. Tagged arm64 CI must install and verify its exact
package/service even though that hosted runner lacks KVM; x86_64 CI additionally
owns the mandatory exact-package guest-shell proof.
An exact gate that routinely approaches the hosted runner's observed lifetime is not release proof. Runtime headroom is part of the ledger: record stage durations, treat repeated same-age termination as a deterministic budget bug, and require the expensive production rail to pass locally before spending another CI run. Parallel work is acceptable only when its hidden workspaces, container tags, outputs, and cleanup are isolated and covered by a test.
Enforce Docker caches through /dev-cache and the common typed registry before
concurrent artifact lanes start. The policy owns each cache's description,
scope, warm size, maximum size, and prune strategy; acceptance code must not
inspect Docker's data root or recreate backend-specific capacity logic.
Required Shape
- Suite home:
tests/ironbank/. - Runner: Python black-box tests through Capsem,
capsem-doctor, VM sessions, hermetic local services, UDS routes, HTTP routes, logs, and SQLite ledgers. - One deterministic stimulus asserts the full path: client result, parsed facts, CEL/security decision, detection/enforcement rows, protocol rows, structured logs, status counters, UDS route, HTTP route, and UI JSON shape.
- Every emitted field is exact-value asserted, typed-invariant asserted, or explicitly marked not applicable.
- Unknown DB/log/route fields fail the test until the field ledger is updated.
Forbidden
- Rust parser/unit proof as an Ironbank gate.
- Public-network dependencies.
- Mocks of the Capsem path.
- Fallback routes.
- Status-code-only replay.
- Row-exists checks.
skip,skipif,slow, optional markers, or manual OAuth/client dances as release proof.
Package Managers
Installing is not proof. For apt, npm, uv, pip, node, or OCI image package
rails, assert binary presence/version/hash where relevant and run a command
that proves the package does its job. Example: zstd must compress and
decompress known bytes and match the original.
04 同仓库更多 Skills
Capsem 虚拟机任务执行
use-capsem
通过 MCP 在 Capsem 虚拟机中运行任务。在智能体需要隔离执行、文件分析,或将报告返回到主机时使用。
营销网站内容维护
site-marketing
营销网站 capsem.org。在编辑文案、添加板块或更改网站主题时使用。
文档站基础设施维护
site-infra
文档站点 docs.capsem.org。用于面向用户的 Diátaxis 文档和 Astro Starlight 相关更改。
站点架构设计
site-architecture
暂无简介
版本发布流程
release-process
暂无简介
智能体技能创建与优化
meta-skill-creation
创建、改进和评估技能。在编写新技能、编辑现有技能或调整 description 以优化触发效果时使用。