docs: consolidate v0.2 documentation governance
This commit is contained in:
@@ -1972,11 +1972,10 @@ function createReport({ args, repo, commitId, shortCommit, mode, services, artif
|
||||
sourceContract: {
|
||||
status: fatalBlocked ? "blocked" : "pass",
|
||||
documents: [
|
||||
"docs/dev-acceptance-matrix.md",
|
||||
"docs/m0-contract-audit.md",
|
||||
"docs/artifact-catalog.md",
|
||||
"docs/reference/MVP-e2e-acceptance.md",
|
||||
"docs/reference/spec-v02-documentation-governance.md",
|
||||
"docs/reference/g14-gitops-cicd.md",
|
||||
"docs/dev-base-image-preflight.md"
|
||||
"docs/reference/spec-v02-cicd.md"
|
||||
],
|
||||
summary: `${environment} artifact publish evidence; runtime acceptance stays separate from artifact publication.`
|
||||
},
|
||||
|
||||
@@ -1415,8 +1415,8 @@ function baseReport({ commitId, observedAt }) {
|
||||
sourceContract: {
|
||||
status: "pass",
|
||||
documents: [
|
||||
"docs/dev-acceptance-matrix.md",
|
||||
"docs/m3-hardware-loop.md",
|
||||
"docs/reference/MVP-e2e-acceptance.md",
|
||||
"docs/reference/m3-loop-rollout-runbook.md",
|
||||
"fixtures/mvp/m3-hardware-loop/topology.json"
|
||||
],
|
||||
summary: "Source contracts define DEV-only M3 simulator wiring and prohibit fixture output as live evidence."
|
||||
@@ -1463,8 +1463,8 @@ function baseReport({ commitId, observedAt }) {
|
||||
status: "pass",
|
||||
summary: "DEV M3 smoke contract files were readable before live probing.",
|
||||
evidence: [
|
||||
"docs/dev-acceptance-matrix.md",
|
||||
"docs/m3-hardware-loop.md"
|
||||
"docs/reference/MVP-e2e-acceptance.md",
|
||||
"docs/reference/m3-loop-rollout-runbook.md"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1611,8 +1611,8 @@ function addNotRunM3Checks(report, reason) {
|
||||
}
|
||||
|
||||
async function ensureContractFiles() {
|
||||
await access(path.join(repoRoot, "docs/dev-acceptance-matrix.md"));
|
||||
await access(path.join(repoRoot, "docs/m3-hardware-loop.md"));
|
||||
await access(path.join(repoRoot, "docs/reference/MVP-e2e-acceptance.md"));
|
||||
await access(path.join(repoRoot, "docs/reference/m3-loop-rollout-runbook.md"));
|
||||
await access(path.join(repoRoot, "fixtures/mvp/m3-hardware-loop/topology.json"));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
|
||||
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const fixedNow = () => "2026-05-22T00:00:00.000Z";
|
||||
const requiredDocs = ["docs/dev-acceptance-matrix.md", "docs/dev-m4-agent-loop.md"];
|
||||
const requiredDocs = ["docs/reference/MVP-e2e-acceptance.md", "docs/reference/code-agent-chat-readiness.md"];
|
||||
const reportPath = tempReportPath("dev-m4-agent-loop.json");
|
||||
const preflightCommand = "node scripts/dev-m4-agent-loop-smoke.mjs --live --confirm-dev --confirmed-non-production";
|
||||
const dryRunCommand = "node scripts/dev-m4-agent-loop-smoke.mjs --dry-run";
|
||||
|
||||
@@ -9,8 +9,8 @@ import { DEV_ENDPOINT, ENVIRONMENT_DEV } from "../internal/protocol/index.mjs";
|
||||
|
||||
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const planPath = "fixtures/mvp/m5-e2e/dry-run-plan.json";
|
||||
const checklistPath = "docs/dev-acceptance-checklist.json";
|
||||
const matrixPath = "docs/dev-acceptance-matrix.md";
|
||||
const checklistPath = "fixtures/mvp/m5-e2e/dev-acceptance-checklist.json";
|
||||
const matrixPath = "docs/reference/MVP-e2e-acceptance.md";
|
||||
const runtimePath = "fixtures/mvp/runtime.json";
|
||||
const contractPath = "protocol/mvp-e2e-contract.md";
|
||||
const commonSchemaPath = "protocol/schemas/common.json";
|
||||
@@ -598,7 +598,7 @@ const [plan, checklist, runtime, contract, matrix, commonSchema] = await Promise
|
||||
serviceIds = commonSchema.$defs.serviceId.enum;
|
||||
serviceIdSet = new Set(serviceIds);
|
||||
|
||||
assert.equal(matrix.includes("HWLAB DEV Acceptance Matrix"), true, "acceptance matrix exists");
|
||||
assert.equal(matrix.includes("HWLAB MVP E2E"), true, "MVP E2E reference exists");
|
||||
assertObjectHasOnlyDryRunSafety(plan);
|
||||
assertEndpointFreeze(plan, checklist, runtime, contract);
|
||||
const artifacts = assertArtifacts(plan, checklist);
|
||||
|
||||
@@ -1384,7 +1384,6 @@ function layoutSourceContract() {
|
||||
return {
|
||||
status: "pass",
|
||||
documents: [
|
||||
"docs/cloud-web-workbench.md",
|
||||
"docs/reference/cloud-workbench.md",
|
||||
"docs/reference/code-agent-chat-readiness.md"
|
||||
],
|
||||
@@ -1518,7 +1517,6 @@ function baseReport({
|
||||
sourceContract: {
|
||||
status: "pass",
|
||||
documents: [
|
||||
"docs/cloud-web-workbench.md",
|
||||
"docs/reference/cloud-workbench.md",
|
||||
"docs/reference/code-agent-chat-readiness.md"
|
||||
],
|
||||
@@ -2704,8 +2702,7 @@ function findHelpMarkdownFiles() {
|
||||
"web/hwlab-cloud-web/help.md",
|
||||
"web/hwlab-cloud-web/help/README.md",
|
||||
"web/hwlab-cloud-web/help/index.md",
|
||||
"docs/dev-cloud-workbench-help.md",
|
||||
"docs/cloud-web-workbench.md"
|
||||
"docs/reference/cloud-workbench.md"
|
||||
];
|
||||
return files.filter((relativePath) => fs.existsSync(path.join(repoRoot, relativePath)));
|
||||
}
|
||||
|
||||
@@ -165,9 +165,9 @@ async function createDevGateReport(edgeHealth) {
|
||||
sourceContract: {
|
||||
status: "pass",
|
||||
documents: [
|
||||
"docs/dev-acceptance-matrix.md",
|
||||
"docs/m0-contract-audit.md",
|
||||
"docs/dev-edge-health.md",
|
||||
"docs/reference/dev-runtime-boundary.md",
|
||||
"docs/reference/spec-v02-documentation-governance.md",
|
||||
"docs/reference/g14-gitops-cicd.md",
|
||||
"deploy/frp/README.md",
|
||||
"deploy/master-edge/README.md"
|
||||
],
|
||||
|
||||
@@ -307,7 +307,7 @@ function buildEvidence() {
|
||||
category: "contract",
|
||||
level: "SOURCE",
|
||||
status: "pass",
|
||||
sources: ["protocol/README.md", "docs/dev-acceptance-matrix.md"],
|
||||
sources: ["protocol/README.md", "docs/reference/MVP-e2e-acceptance.md"],
|
||||
commands: ["node scripts/validate-contract.mjs"],
|
||||
summary: "Frozen contracts remain the source-ready baseline."
|
||||
}),
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
|
||||
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const examplesDir = "protocol/examples/m0-contract";
|
||||
const auditDocPath = "docs/m0-contract-audit.md";
|
||||
const auditDocPath = "docs/reference/spec-v02-documentation-governance.md";
|
||||
|
||||
const timestampPattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
||||
const idPattern = /^[a-z][a-z0-9]*_[A-Za-z0-9._:-]+$/;
|
||||
@@ -226,16 +226,13 @@ function assertDeployManifest(doc) {
|
||||
async function assertAuditMarkdown() {
|
||||
const doc = await readFile(path.join(repoRoot, auditDocPath), "utf8");
|
||||
for (const needle of [
|
||||
"# M0 Contract Audit",
|
||||
"## Audit Result",
|
||||
"## Coverage Matrix",
|
||||
"## Rework Risk Register",
|
||||
"## Validation"
|
||||
"# v0.2 文档治理规格",
|
||||
"docs/m0-*",
|
||||
"旧里程碑",
|
||||
"#532"
|
||||
]) {
|
||||
assert.ok(doc.includes(needle), `${auditDocPath} missing ${needle}`);
|
||||
}
|
||||
assert.ok(doc.includes("Blocker"), `${auditDocPath} must classify blocker risks`);
|
||||
assert.ok(doc.includes("Enhancement"), `${auditDocPath} must classify enhancement risks`);
|
||||
}
|
||||
|
||||
const examples = await loadExamples();
|
||||
|
||||
Reference in New Issue
Block a user