feat(reporting-governance): add package-first portability smoke

This commit is contained in:
Eve
2026-05-08 15:39:56 +08:00
parent 2eaa6e3bb3
commit 54ad955ac2
20 changed files with 2195 additions and 32 deletions

View File

@@ -81,12 +81,12 @@ spec:
`;
test('deployment profile yaml parser reads strict-manager-mode profile shape', () => {
const artifact = generateDeploymentProfileArtifactFromFile(path.join(repoRoot, 'profiles', 'strict-manager-mode.yaml'));
const artifact = generateDeploymentProfileArtifactFromFile(path.join(packageRoot, 'profiles-src', 'strict-manager-mode.yaml'));
assert.equal(artifact.metadata.id, 'strict-manager-mode');
assert.equal(artifact.metadata.runtime, 'openclaw');
assert.equal(artifact.spec.package.pluginVersion, '0.1.0-mainline');
assert.equal(artifact.metadata.source_profile, 'profiles/strict-manager-mode.yaml');
assert.equal(artifact.metadata.source_profile, 'profiles-src/strict-manager-mode.yaml');
});
test('deployment profile schema validator rejects malformed profile', () => {
@@ -385,7 +385,7 @@ test('yaml to artifact generation produces validator-compatible package artifact
});
test('strict-manager YAML generation matches checked-in package artifact snapshot', () => {
const generated = generateDeploymentProfileArtifactFromFile(path.join(repoRoot, 'profiles', 'strict-manager-mode.yaml'));
const generated = generateDeploymentProfileArtifactFromFile(path.join(packageRoot, 'profiles-src', 'strict-manager-mode.yaml'));
const checkedIn = validateDeploymentProfileArtifact(
JSON.parse(
fs.readFileSync(