scene-capability-engine 3.6.45 → 3.6.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/docs/releases/README.md +1 -0
- package/docs/releases/v3.6.46.md +23 -0
- package/docs/zh/releases/README.md +1 -0
- package/docs/zh/releases/v3.6.46.md +23 -0
- package/package.json +4 -2
- package/scripts/auto-strategy-router.js +231 -0
- package/scripts/capability-mapping-report.js +339 -0
- package/scripts/check-branding-consistency.js +140 -0
- package/scripts/check-sce-tracking.js +54 -0
- package/scripts/check-skip-allowlist.js +94 -0
- package/scripts/errorbook-registry-health-gate.js +172 -0
- package/scripts/errorbook-release-gate.js +132 -0
- package/scripts/failure-attribution-repair.js +317 -0
- package/scripts/git-managed-gate.js +464 -0
- package/scripts/interactive-approval-event-projection.js +400 -0
- package/scripts/interactive-approval-workflow.js +829 -0
- package/scripts/interactive-authorization-tier-evaluate.js +413 -0
- package/scripts/interactive-change-plan-gate.js +225 -0
- package/scripts/interactive-context-bridge.js +617 -0
- package/scripts/interactive-customization-loop.js +1690 -0
- package/scripts/interactive-dialogue-governance.js +842 -0
- package/scripts/interactive-feedback-log.js +253 -0
- package/scripts/interactive-flow-smoke.js +238 -0
- package/scripts/interactive-flow.js +1059 -0
- package/scripts/interactive-governance-report.js +1112 -0
- package/scripts/interactive-intent-build.js +707 -0
- package/scripts/interactive-loop-smoke.js +215 -0
- package/scripts/interactive-moqui-adapter.js +304 -0
- package/scripts/interactive-plan-build.js +426 -0
- package/scripts/interactive-runtime-policy-evaluate.js +495 -0
- package/scripts/interactive-work-order-build.js +552 -0
- package/scripts/matrix-regression-gate.js +167 -0
- package/scripts/moqui-core-regression-suite.js +397 -0
- package/scripts/moqui-lexicon-audit.js +651 -0
- package/scripts/moqui-matrix-remediation-phased-runner.js +865 -0
- package/scripts/moqui-matrix-remediation-queue.js +852 -0
- package/scripts/moqui-metadata-extract.js +1340 -0
- package/scripts/moqui-rebuild-gate.js +167 -0
- package/scripts/moqui-release-summary.js +729 -0
- package/scripts/moqui-standard-rebuild.js +1370 -0
- package/scripts/moqui-template-baseline-report.js +682 -0
- package/scripts/npm-package-runtime-asset-check.js +221 -0
- package/scripts/problem-closure-gate.js +441 -0
- package/scripts/release-asset-integrity-check.js +216 -0
- package/scripts/release-asset-nonempty-normalize.js +166 -0
- package/scripts/release-drift-evaluate.js +223 -0
- package/scripts/release-drift-signals.js +255 -0
- package/scripts/release-governance-snapshot-export.js +132 -0
- package/scripts/release-ops-weekly-summary.js +934 -0
- package/scripts/release-risk-remediation-bundle.js +315 -0
- package/scripts/release-weekly-ops-gate.js +423 -0
- package/scripts/state-migration-reconciliation-gate.js +110 -0
- package/scripts/state-storage-tiering-audit.js +337 -0
- package/scripts/steering-content-audit.js +393 -0
- package/scripts/symbol-evidence-locate.js +366 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs-extra');
|
|
6
|
+
const { spawnSync } = require('child_process');
|
|
7
|
+
|
|
8
|
+
const DEFAULT_METADATA = 'tests/fixtures/moqui-standard-rebuild/metadata.json';
|
|
9
|
+
const DEFAULT_OUT = '.sce/reports/ci/moqui-rebuild-gate.json';
|
|
10
|
+
const DEFAULT_MARKDOWN_OUT = '.sce/reports/ci/moqui-rebuild-gate.md';
|
|
11
|
+
const DEFAULT_BUNDLE_OUT = '.sce/reports/ci/moqui-rebuild-bundle';
|
|
12
|
+
const DEFAULT_MIN_READY = 6;
|
|
13
|
+
const DEFAULT_MAX_PARTIAL = 0;
|
|
14
|
+
const DEFAULT_MAX_GAP = 0;
|
|
15
|
+
|
|
16
|
+
function parseArgs(argv) {
|
|
17
|
+
const options = {
|
|
18
|
+
metadata: DEFAULT_METADATA,
|
|
19
|
+
out: DEFAULT_OUT,
|
|
20
|
+
markdownOut: DEFAULT_MARKDOWN_OUT,
|
|
21
|
+
bundleOut: DEFAULT_BUNDLE_OUT,
|
|
22
|
+
minReady: DEFAULT_MIN_READY,
|
|
23
|
+
maxPartial: DEFAULT_MAX_PARTIAL,
|
|
24
|
+
maxGap: DEFAULT_MAX_GAP
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
28
|
+
const token = argv[i];
|
|
29
|
+
const next = argv[i + 1];
|
|
30
|
+
if (token === '--metadata' && next) {
|
|
31
|
+
options.metadata = next;
|
|
32
|
+
i += 1;
|
|
33
|
+
} else if (token === '--out' && next) {
|
|
34
|
+
options.out = next;
|
|
35
|
+
i += 1;
|
|
36
|
+
} else if (token === '--markdown-out' && next) {
|
|
37
|
+
options.markdownOut = next;
|
|
38
|
+
i += 1;
|
|
39
|
+
} else if (token === '--bundle-out' && next) {
|
|
40
|
+
options.bundleOut = next;
|
|
41
|
+
i += 1;
|
|
42
|
+
} else if (token === '--min-ready' && next) {
|
|
43
|
+
options.minReady = Number(next);
|
|
44
|
+
i += 1;
|
|
45
|
+
} else if (token === '--max-partial' && next) {
|
|
46
|
+
options.maxPartial = Number(next);
|
|
47
|
+
i += 1;
|
|
48
|
+
} else if (token === '--max-gap' && next) {
|
|
49
|
+
options.maxGap = Number(next);
|
|
50
|
+
i += 1;
|
|
51
|
+
} else if (token === '--help' || token === '-h') {
|
|
52
|
+
printHelpAndExit(0);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return options;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function printHelpAndExit(code) {
|
|
60
|
+
const lines = [
|
|
61
|
+
'Usage: node scripts/moqui-rebuild-gate.js [options]',
|
|
62
|
+
'',
|
|
63
|
+
'Options:',
|
|
64
|
+
` --metadata <path> Metadata JSON for rebuild (default: ${DEFAULT_METADATA})`,
|
|
65
|
+
` --out <path> Rebuild JSON output path (default: ${DEFAULT_OUT})`,
|
|
66
|
+
` --markdown-out <path> Rebuild markdown output path (default: ${DEFAULT_MARKDOWN_OUT})`,
|
|
67
|
+
` --bundle-out <path> Rebuild bundle output directory (default: ${DEFAULT_BUNDLE_OUT})`,
|
|
68
|
+
` --min-ready <n> Minimum ready template count (default: ${DEFAULT_MIN_READY})`,
|
|
69
|
+
` --max-partial <n> Maximum partial template count (default: ${DEFAULT_MAX_PARTIAL})`,
|
|
70
|
+
` --max-gap <n> Maximum gap template count (default: ${DEFAULT_MAX_GAP})`,
|
|
71
|
+
' -h, --help Show this help'
|
|
72
|
+
];
|
|
73
|
+
console.log(lines.join('\n'));
|
|
74
|
+
process.exit(code);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function isFiniteNumber(value) {
|
|
78
|
+
return Number.isFinite(Number(value));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function runRebuild(options) {
|
|
82
|
+
const projectRoot = process.cwd();
|
|
83
|
+
const scriptPath = path.resolve(projectRoot, 'scripts', 'moqui-standard-rebuild.js');
|
|
84
|
+
const result = spawnSync(
|
|
85
|
+
process.execPath,
|
|
86
|
+
[
|
|
87
|
+
scriptPath,
|
|
88
|
+
'--metadata',
|
|
89
|
+
options.metadata,
|
|
90
|
+
'--out',
|
|
91
|
+
options.out,
|
|
92
|
+
'--markdown-out',
|
|
93
|
+
options.markdownOut,
|
|
94
|
+
'--bundle-out',
|
|
95
|
+
options.bundleOut,
|
|
96
|
+
'--json'
|
|
97
|
+
],
|
|
98
|
+
{
|
|
99
|
+
cwd: projectRoot,
|
|
100
|
+
encoding: 'utf8'
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
if (result.status !== 0) {
|
|
105
|
+
const stderr = (result.stderr || '').trim();
|
|
106
|
+
const stdout = (result.stdout || '').trim();
|
|
107
|
+
throw new Error(
|
|
108
|
+
`moqui-standard-rebuild failed (${result.status}): ${stderr || stdout || 'unknown error'}`
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const payloadText = `${result.stdout || ''}`.trim();
|
|
113
|
+
if (!payloadText) {
|
|
114
|
+
throw new Error('moqui-standard-rebuild returned empty stdout');
|
|
115
|
+
}
|
|
116
|
+
return JSON.parse(payloadText);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async function main() {
|
|
120
|
+
const options = parseArgs(process.argv.slice(2));
|
|
121
|
+
if (!isFiniteNumber(options.minReady) || !isFiniteNumber(options.maxPartial) || !isFiniteNumber(options.maxGap)) {
|
|
122
|
+
throw new Error('gate thresholds must be finite numbers');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const payload = runRebuild(options);
|
|
126
|
+
const summary = payload && payload.recovery && payload.recovery.readiness_summary
|
|
127
|
+
? payload.recovery.readiness_summary
|
|
128
|
+
: {};
|
|
129
|
+
const ready = Number(summary.ready) || 0;
|
|
130
|
+
const partial = Number(summary.partial) || 0;
|
|
131
|
+
const gap = Number(summary.gap) || 0;
|
|
132
|
+
|
|
133
|
+
const checks = [
|
|
134
|
+
{ id: 'min_ready', expected: Number(options.minReady), actual: ready, passed: ready >= Number(options.minReady) },
|
|
135
|
+
{ id: 'max_partial', expected: Number(options.maxPartial), actual: partial, passed: partial <= Number(options.maxPartial) },
|
|
136
|
+
{ id: 'max_gap', expected: Number(options.maxGap), actual: gap, passed: gap <= Number(options.maxGap) }
|
|
137
|
+
];
|
|
138
|
+
const passed = checks.every(item => item.passed);
|
|
139
|
+
|
|
140
|
+
const report = {
|
|
141
|
+
mode: 'moqui-rebuild-gate',
|
|
142
|
+
generated_at: new Date().toISOString(),
|
|
143
|
+
rebuild_report: {
|
|
144
|
+
json: path.relative(process.cwd(), path.resolve(process.cwd(), options.out)),
|
|
145
|
+
markdown: path.relative(process.cwd(), path.resolve(process.cwd(), options.markdownOut)),
|
|
146
|
+
bundle: path.relative(process.cwd(), path.resolve(process.cwd(), options.bundleOut))
|
|
147
|
+
},
|
|
148
|
+
readiness_summary: summary,
|
|
149
|
+
checks,
|
|
150
|
+
passed
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const gateOut = path.resolve(process.cwd(), '.sce/reports/ci/moqui-rebuild-gate-check.json');
|
|
154
|
+
await fs.ensureDir(path.dirname(gateOut));
|
|
155
|
+
await fs.writeJson(gateOut, report, { spaces: 2 });
|
|
156
|
+
|
|
157
|
+
console.log(JSON.stringify(report, null, 2));
|
|
158
|
+
if (!passed) {
|
|
159
|
+
process.exitCode = 2;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
main().catch((error) => {
|
|
164
|
+
console.error(`Failed to run moqui rebuild gate: ${error.message}`);
|
|
165
|
+
process.exitCode = 1;
|
|
166
|
+
});
|
|
167
|
+
|