scene-capability-engine 3.6.32 → 3.6.37
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 +109 -11
- package/README.md +119 -122
- package/README.zh.md +123 -121
- package/bin/scene-capability-engine.js +12 -1
- package/docs/331-poc-adaptation-roadmap.md +3 -3
- package/docs/README.md +21 -32
- package/docs/auto-refactor-index.md +384 -0
- package/docs/command-reference.md +99 -7
- package/docs/faq.md +1 -1
- package/docs/interactive-customization/331-poc-sce-integration-checklist.md +3 -3
- package/docs/interactive-customization/moqui-interactive-template-playbook.md +4 -4
- package/docs/interactive-customization/phase-acceptance-evidence.md +2 -2
- package/docs/magicball-adaptation-task-checklist-v1.md +385 -0
- package/docs/magicball-app-bundle-sqlite-and-command-draft.md +539 -0
- package/docs/magicball-capability-iteration-api.md +2 -0
- package/docs/magicball-capability-iteration-ui.md +2 -0
- package/docs/magicball-capability-library.md +2 -0
- package/docs/magicball-cli-invocation-examples.md +336 -0
- package/docs/magicball-frontend-state-and-command-mapping.md +244 -0
- package/docs/magicball-integration-doc-index.md +137 -0
- package/docs/magicball-integration-issue-tracker.md +218 -0
- package/docs/magicball-mode-home-and-ontology-empty-state-playbook.md +249 -0
- package/docs/magicball-sce-adaptation-guide.md +203 -0
- package/docs/magicball-three-mode-alignment-plan.md +551 -0
- package/docs/magicball-ui-surface-checklist.md +126 -0
- package/docs/magicball-write-auth-adaptation-guide.md +328 -0
- package/docs/moqui-standard-rebuild-guide.md +6 -6
- package/docs/moqui-template-core-library-playbook.md +1 -1
- package/docs/refactor-completion-roadmap.md +116 -0
- package/docs/release-checklist.md +50 -27
- package/docs/releases/README.md +1 -0
- package/docs/releases/v3.6.37.md +22 -0
- package/docs/steering-strategy-guide.md +7 -7
- package/docs/troubleshooting.md +1 -1
- package/docs/zh/README.md +27 -30
- package/docs/zh/refactor-completion-roadmap.md +116 -0
- package/docs/zh/release-checklist.md +40 -17
- package/docs/zh/releases/README.md +1 -0
- package/docs/zh/releases/v3.6.37.md +22 -0
- package/lib/app/registry-config.js +73 -0
- package/lib/app/registry-sync-service.js +228 -0
- package/lib/auto/archive-schema-service.js +276 -0
- package/lib/auto/archive-summary.js +60 -0
- package/lib/auto/batch-goal-input-service.js +543 -0
- package/lib/auto/batch-output.js +201 -0
- package/lib/auto/batch-summary-storage-service.js +110 -0
- package/lib/auto/close-loop-batch-service.js +116 -0
- package/lib/auto/close-loop-controller-service.js +287 -0
- package/lib/auto/close-loop-program-service.js +283 -0
- package/lib/auto/close-loop-recovery-service.js +191 -0
- package/lib/auto/close-loop-session-storage-service.js +50 -0
- package/lib/auto/controller-lock-service.js +55 -0
- package/lib/auto/controller-output.js +32 -0
- package/lib/auto/controller-queue-service.js +127 -0
- package/lib/auto/controller-session-storage-service.js +105 -0
- package/lib/auto/governance-advisory-service.js +208 -0
- package/lib/auto/governance-close-loop-service.js +411 -0
- package/lib/auto/governance-maintenance-presenter.js +162 -0
- package/lib/auto/governance-maintenance-service.js +112 -0
- package/lib/auto/governance-session-presenter.js +70 -0
- package/lib/auto/governance-session-storage-service.js +198 -0
- package/lib/auto/governance-signals.js +139 -0
- package/lib/auto/governance-stats-presenter.js +337 -0
- package/lib/auto/governance-stats-service.js +115 -0
- package/lib/auto/governance-summary.js +703 -0
- package/lib/auto/handoff-capability-matrix-service.js +281 -0
- package/lib/auto/handoff-evidence-review-service.js +251 -0
- package/lib/auto/handoff-release-evidence-service.js +190 -0
- package/lib/auto/handoff-release-gate-history-loaders-service.js +502 -0
- package/lib/auto/handoff-release-gate-history-service.js +257 -0
- package/lib/auto/handoff-reporting-service.js +1407 -0
- package/lib/auto/handoff-run-service.js +486 -0
- package/lib/auto/handoff-snapshots-service.js +645 -0
- package/lib/auto/observability-service.js +132 -0
- package/lib/auto/output-writer.js +34 -0
- package/lib/auto/program-auto-remediation-service.js +130 -0
- package/lib/auto/program-diagnostics.js +138 -0
- package/lib/auto/program-governance-helpers.js +306 -0
- package/lib/auto/program-governance-loop-service.js +413 -0
- package/lib/auto/program-output.js +106 -0
- package/lib/auto/program-summary.js +183 -0
- package/lib/auto/recovery-memory-service.js +684 -0
- package/lib/auto/recovery-selection-service.js +52 -0
- package/lib/auto/retention-policy.js +98 -0
- package/lib/auto/session-persistence-service.js +106 -0
- package/lib/auto/session-presenter.js +105 -0
- package/lib/auto/session-prune-service.js +190 -0
- package/lib/auto/session-query-service.js +249 -0
- package/lib/auto/spec-protection.js +141 -0
- package/lib/commands/adopt.js +4 -4
- package/lib/commands/app.js +911 -0
- package/lib/commands/assurance.js +212 -0
- package/lib/commands/auto.js +1093 -11065
- package/lib/commands/mode.js +321 -0
- package/lib/commands/ontology.js +415 -0
- package/lib/commands/pm.js +422 -0
- package/lib/ontology/seed-profiles.js +160 -0
- package/lib/spec/bootstrap/context-collector.js +1 -1
- package/lib/state/sce-state-store.js +3369 -1200
- package/lib/steering/adoption-config.js +2 -2
- package/lib/steering/compliance-cache.js +2 -2
- package/lib/steering/steering-manager.js +4 -4
- package/lib/task/task-claimer.js +1 -2
- package/lib/workspace/multi/workspace-context-resolver.js +3 -3
- package/lib/workspace/multi/workspace-state-manager.js +0 -164
- package/lib/workspace/sce-tracking-audit.js +1 -1
- package/lib/workspace/takeover-baseline.js +1 -1
- package/package.json +1 -1
- package/template/.sce/README.md +1 -1
- package/template/.sce/steering/CORE_PRINCIPLES.md +1 -1
- package/bin/kse.js +0 -3
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
async function buildAutoHandoffReleaseGateHistoryIndex(projectPath, options = {}, dependencies = {}) {
|
|
2
|
+
const {
|
|
3
|
+
normalizeHandoffGateHistoryKeep,
|
|
4
|
+
resolveAutoHandoffReleaseGateHistoryFile,
|
|
5
|
+
loadAutoHandoffReleaseGateReports,
|
|
6
|
+
loadAutoHandoffReleaseGateHistorySeed,
|
|
7
|
+
mergeAutoHandoffReleaseGateHistoryEntries,
|
|
8
|
+
toAutoHandoffTimestamp,
|
|
9
|
+
normalizeHandoffText,
|
|
10
|
+
buildAutoHandoffReleaseGateHistoryAggregates,
|
|
11
|
+
now = () => new Date().toISOString()
|
|
12
|
+
} = dependencies;
|
|
13
|
+
|
|
14
|
+
const keep = normalizeHandoffGateHistoryKeep(options.keep);
|
|
15
|
+
const outFile = resolveAutoHandoffReleaseGateHistoryFile(projectPath, options.out);
|
|
16
|
+
const historySeedFile = typeof options.historyFile === 'string' && options.historyFile.trim()
|
|
17
|
+
? resolveAutoHandoffReleaseGateHistoryFile(projectPath, options.historyFile)
|
|
18
|
+
: outFile;
|
|
19
|
+
const reportResult = await loadAutoHandoffReleaseGateReports(projectPath, options.dir);
|
|
20
|
+
const historySeed = await loadAutoHandoffReleaseGateHistorySeed(projectPath, historySeedFile);
|
|
21
|
+
const mergedEntries = mergeAutoHandoffReleaseGateHistoryEntries([
|
|
22
|
+
...reportResult.entries,
|
|
23
|
+
...historySeed.entries
|
|
24
|
+
]);
|
|
25
|
+
|
|
26
|
+
if (mergedEntries.length === 0) {
|
|
27
|
+
throw new Error(`no release gate reports found: ${reportResult.dir}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
mergedEntries.sort((left, right) => {
|
|
31
|
+
const leftTs = toAutoHandoffTimestamp(left && left.evaluated_at);
|
|
32
|
+
const rightTs = toAutoHandoffTimestamp(right && right.evaluated_at);
|
|
33
|
+
if (rightTs !== leftTs) {
|
|
34
|
+
return rightTs - leftTs;
|
|
35
|
+
}
|
|
36
|
+
const leftTag = normalizeHandoffText(left && left.tag) || '';
|
|
37
|
+
const rightTag = normalizeHandoffText(right && right.tag) || '';
|
|
38
|
+
return rightTag.localeCompare(leftTag);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const entries = mergedEntries.slice(0, keep);
|
|
42
|
+
const latestEntry = entries[0] || null;
|
|
43
|
+
const warnings = [...reportResult.warnings, ...historySeed.warnings];
|
|
44
|
+
return {
|
|
45
|
+
mode: 'auto-handoff-release-gate-history',
|
|
46
|
+
generated_at: now(),
|
|
47
|
+
source_dir: reportResult.dir,
|
|
48
|
+
report_file_count: reportResult.report_files.length,
|
|
49
|
+
report_entry_count: reportResult.entries.length,
|
|
50
|
+
seed_file: historySeed.file,
|
|
51
|
+
seed_entry_count: historySeed.entries.length,
|
|
52
|
+
keep,
|
|
53
|
+
total_entries: entries.length,
|
|
54
|
+
latest: latestEntry
|
|
55
|
+
? {
|
|
56
|
+
tag: latestEntry.tag,
|
|
57
|
+
evaluated_at: latestEntry.evaluated_at,
|
|
58
|
+
gate_passed: latestEntry.gate_passed,
|
|
59
|
+
risk_level: latestEntry.risk_level,
|
|
60
|
+
scene_package_batch_passed: latestEntry.scene_package_batch_passed,
|
|
61
|
+
scene_package_batch_failure_count: latestEntry.scene_package_batch_failure_count,
|
|
62
|
+
capability_expected_unknown_count: latestEntry.capability_expected_unknown_count,
|
|
63
|
+
capability_provided_unknown_count: latestEntry.capability_provided_unknown_count,
|
|
64
|
+
release_gate_preflight_available: latestEntry.release_gate_preflight_available,
|
|
65
|
+
release_gate_preflight_blocked: latestEntry.release_gate_preflight_blocked,
|
|
66
|
+
require_release_gate_preflight: latestEntry.require_release_gate_preflight,
|
|
67
|
+
weekly_ops_blocked: latestEntry.weekly_ops_blocked,
|
|
68
|
+
weekly_ops_risk_level: latestEntry.weekly_ops_risk_level,
|
|
69
|
+
weekly_ops_governance_status: latestEntry.weekly_ops_governance_status,
|
|
70
|
+
weekly_ops_authorization_tier_block_rate_percent: latestEntry.weekly_ops_authorization_tier_block_rate_percent,
|
|
71
|
+
weekly_ops_dialogue_authorization_block_rate_percent: latestEntry.weekly_ops_dialogue_authorization_block_rate_percent,
|
|
72
|
+
weekly_ops_matrix_regression_positive_rate_percent: latestEntry.weekly_ops_matrix_regression_positive_rate_percent,
|
|
73
|
+
weekly_ops_runtime_block_rate_percent: latestEntry.weekly_ops_runtime_block_rate_percent,
|
|
74
|
+
weekly_ops_runtime_ui_mode_violation_total: latestEntry.weekly_ops_runtime_ui_mode_violation_total,
|
|
75
|
+
weekly_ops_runtime_ui_mode_violation_rate_percent: latestEntry.weekly_ops_runtime_ui_mode_violation_rate_percent,
|
|
76
|
+
weekly_ops_violations_count: latestEntry.weekly_ops_violations_count,
|
|
77
|
+
weekly_ops_warning_count: latestEntry.weekly_ops_warning_count,
|
|
78
|
+
weekly_ops_config_warning_count: latestEntry.weekly_ops_config_warning_count,
|
|
79
|
+
drift_alert_count: latestEntry.drift_alert_count,
|
|
80
|
+
drift_blocked: latestEntry.drift_blocked
|
|
81
|
+
}
|
|
82
|
+
: null,
|
|
83
|
+
aggregates: buildAutoHandoffReleaseGateHistoryAggregates(entries),
|
|
84
|
+
warnings,
|
|
85
|
+
warnings_count: warnings.length,
|
|
86
|
+
entries
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function renderAutoHandoffReleaseGateHistoryMarkdown(payload = {}, dependencies = {}) {
|
|
91
|
+
const { formatAutoHandoffRegressionValue } = dependencies;
|
|
92
|
+
const entries = Array.isArray(payload.entries) ? payload.entries : [];
|
|
93
|
+
const aggregates = payload.aggregates && typeof payload.aggregates === 'object'
|
|
94
|
+
? payload.aggregates
|
|
95
|
+
: {};
|
|
96
|
+
const latest = payload.latest && typeof payload.latest === 'object'
|
|
97
|
+
? payload.latest
|
|
98
|
+
: null;
|
|
99
|
+
const warnings = Array.isArray(payload.warnings) ? payload.warnings : [];
|
|
100
|
+
const recentEntries = entries.slice(0, 10);
|
|
101
|
+
|
|
102
|
+
const lines = [
|
|
103
|
+
'# Auto Handoff Release Gate History',
|
|
104
|
+
'',
|
|
105
|
+
`- Generated at: ${formatAutoHandoffRegressionValue(payload.generated_at)}`,
|
|
106
|
+
`- Source dir: ${formatAutoHandoffRegressionValue(payload.source_dir)}`,
|
|
107
|
+
`- Total entries: ${formatAutoHandoffRegressionValue(payload.total_entries, '0')}`,
|
|
108
|
+
`- Keep: ${formatAutoHandoffRegressionValue(payload.keep, '0')}`,
|
|
109
|
+
''
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
if (latest) {
|
|
113
|
+
lines.push('## Latest');
|
|
114
|
+
lines.push('');
|
|
115
|
+
lines.push(`- Tag: ${formatAutoHandoffRegressionValue(latest.tag)}`);
|
|
116
|
+
lines.push(`- Evaluated at: ${formatAutoHandoffRegressionValue(latest.evaluated_at)}`);
|
|
117
|
+
lines.push(`- Gate passed: ${latest.gate_passed === true ? 'yes' : (latest.gate_passed === false ? 'no' : 'n/a')}`);
|
|
118
|
+
lines.push(`- Risk level: ${formatAutoHandoffRegressionValue(latest.risk_level)}`);
|
|
119
|
+
lines.push(`- Scene package batch: ${latest.scene_package_batch_passed === true ? 'pass' : (latest.scene_package_batch_passed === false ? 'fail' : 'n/a')}`);
|
|
120
|
+
lines.push(`- Scene package batch failures: ${formatAutoHandoffRegressionValue(latest.scene_package_batch_failure_count)}`);
|
|
121
|
+
lines.push(`- Capability expected unknown count: ${formatAutoHandoffRegressionValue(latest.capability_expected_unknown_count, '0')}`);
|
|
122
|
+
lines.push(`- Capability provided unknown count: ${formatAutoHandoffRegressionValue(latest.capability_provided_unknown_count, '0')}`);
|
|
123
|
+
lines.push(`- Release preflight available: ${latest.release_gate_preflight_available === true ? 'yes' : (latest.release_gate_preflight_available === false ? 'no' : 'n/a')}`);
|
|
124
|
+
lines.push(`- Release preflight blocked: ${latest.release_gate_preflight_blocked === true ? 'yes' : (latest.release_gate_preflight_blocked === false ? 'no' : 'n/a')}`);
|
|
125
|
+
lines.push(`- Release preflight hard-gate: ${latest.require_release_gate_preflight === true ? 'enabled' : (latest.require_release_gate_preflight === false ? 'advisory' : 'n/a')}`);
|
|
126
|
+
lines.push(`- Weekly ops blocked: ${latest.weekly_ops_blocked === true ? 'yes' : (latest.weekly_ops_blocked === false ? 'no' : 'n/a')}`);
|
|
127
|
+
lines.push(`- Weekly ops risk: ${formatAutoHandoffRegressionValue(latest.weekly_ops_risk_level)}`);
|
|
128
|
+
lines.push(`- Weekly ops governance status: ${formatAutoHandoffRegressionValue(latest.weekly_ops_governance_status)}`);
|
|
129
|
+
lines.push(`- Weekly ops auth-tier block rate: ${formatAutoHandoffRegressionValue(latest.weekly_ops_authorization_tier_block_rate_percent)}%`);
|
|
130
|
+
lines.push(`- Weekly ops dialogue-auth block rate: ${formatAutoHandoffRegressionValue(latest.weekly_ops_dialogue_authorization_block_rate_percent)}%`);
|
|
131
|
+
lines.push(`- Weekly ops matrix regression-positive rate: ${formatAutoHandoffRegressionValue(latest.weekly_ops_matrix_regression_positive_rate_percent)}%`);
|
|
132
|
+
lines.push(`- Weekly ops runtime block rate: ${formatAutoHandoffRegressionValue(latest.weekly_ops_runtime_block_rate_percent)}%`);
|
|
133
|
+
lines.push(`- Weekly ops runtime ui-mode violations: ${formatAutoHandoffRegressionValue(latest.weekly_ops_runtime_ui_mode_violation_total, '0')}`);
|
|
134
|
+
lines.push(`- Weekly ops runtime ui-mode violation rate: ${formatAutoHandoffRegressionValue(latest.weekly_ops_runtime_ui_mode_violation_rate_percent)}%`);
|
|
135
|
+
lines.push(`- Weekly ops violations: ${formatAutoHandoffRegressionValue(latest.weekly_ops_violations_count, '0')}`);
|
|
136
|
+
lines.push(`- Weekly ops warnings: ${formatAutoHandoffRegressionValue(latest.weekly_ops_warning_count, '0')}`);
|
|
137
|
+
lines.push(`- Weekly ops config warnings: ${formatAutoHandoffRegressionValue(latest.weekly_ops_config_warning_count, '0')}`);
|
|
138
|
+
lines.push(`- Drift alerts: ${formatAutoHandoffRegressionValue(latest.drift_alert_count, '0')}`);
|
|
139
|
+
lines.push(`- Drift blocked: ${latest.drift_blocked === true ? 'yes' : (latest.drift_blocked === false ? 'no' : 'n/a')}`);
|
|
140
|
+
lines.push('');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
lines.push('## Aggregates');
|
|
144
|
+
lines.push('');
|
|
145
|
+
lines.push(`- Gate pass rate: ${formatAutoHandoffRegressionValue(aggregates.pass_rate_percent)}%`);
|
|
146
|
+
lines.push(`- Passed: ${formatAutoHandoffRegressionValue(aggregates.gate_passed_count, '0')}`);
|
|
147
|
+
lines.push(`- Failed: ${formatAutoHandoffRegressionValue(aggregates.gate_failed_count, '0')}`);
|
|
148
|
+
lines.push(`- Unknown: ${formatAutoHandoffRegressionValue(aggregates.gate_unknown_count, '0')}`);
|
|
149
|
+
lines.push(`- Evidence used: ${formatAutoHandoffRegressionValue(aggregates.evidence_used_count, '0')}`);
|
|
150
|
+
lines.push(`- Enforce mode runs: ${formatAutoHandoffRegressionValue(aggregates.enforce_count, '0')}`);
|
|
151
|
+
lines.push(`- Advisory mode runs: ${formatAutoHandoffRegressionValue(aggregates.advisory_count, '0')}`);
|
|
152
|
+
lines.push(`- Avg spec success rate: ${formatAutoHandoffRegressionValue(aggregates.avg_spec_success_rate_percent)}`);
|
|
153
|
+
lines.push(`- Scene package batch pass rate: ${formatAutoHandoffRegressionValue(aggregates.scene_package_batch_pass_rate_percent)}%`);
|
|
154
|
+
lines.push(`- Scene package batch failed: ${formatAutoHandoffRegressionValue(aggregates.scene_package_batch_failed_count, '0')}`);
|
|
155
|
+
lines.push(`- Avg scene package batch failures: ${formatAutoHandoffRegressionValue(aggregates.avg_scene_package_batch_failure_count)}`);
|
|
156
|
+
lines.push(`- Capability expected unknown positive rate: ${formatAutoHandoffRegressionValue(aggregates.capability_expected_unknown_positive_rate_percent)}%`);
|
|
157
|
+
lines.push(`- Avg capability expected unknown count: ${formatAutoHandoffRegressionValue(aggregates.avg_capability_expected_unknown_count)}`);
|
|
158
|
+
lines.push(`- Max capability expected unknown count: ${formatAutoHandoffRegressionValue(aggregates.max_capability_expected_unknown_count)}`);
|
|
159
|
+
lines.push(`- Capability provided unknown positive rate: ${formatAutoHandoffRegressionValue(aggregates.capability_provided_unknown_positive_rate_percent)}%`);
|
|
160
|
+
lines.push(`- Avg capability provided unknown count: ${formatAutoHandoffRegressionValue(aggregates.avg_capability_provided_unknown_count)}`);
|
|
161
|
+
lines.push(`- Max capability provided unknown count: ${formatAutoHandoffRegressionValue(aggregates.max_capability_provided_unknown_count)}`);
|
|
162
|
+
lines.push(`- Drift alert runs: ${formatAutoHandoffRegressionValue(aggregates.drift_alert_runs, '0')}`);
|
|
163
|
+
lines.push(`- Drift blocked runs: ${formatAutoHandoffRegressionValue(aggregates.drift_blocked_runs, '0')}`);
|
|
164
|
+
lines.push(`- Drift alert rate: ${formatAutoHandoffRegressionValue(aggregates.drift_alert_rate_percent)}%`);
|
|
165
|
+
lines.push(`- Drift block rate: ${formatAutoHandoffRegressionValue(aggregates.drift_block_rate_percent)}%`);
|
|
166
|
+
lines.push(`- Weekly ops known runs: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_known_runs, '0')}`);
|
|
167
|
+
lines.push(`- Weekly ops blocked runs: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_blocked_runs, '0')}`);
|
|
168
|
+
lines.push(`- Weekly ops block rate: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_block_rate_percent)}%`);
|
|
169
|
+
lines.push(`- Weekly ops violations total: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_violations_total, '0')}`);
|
|
170
|
+
lines.push(`- Weekly ops warnings total: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_warnings_total, '0')}`);
|
|
171
|
+
lines.push(`- Weekly ops config warnings total: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_config_warnings_total, '0')}`);
|
|
172
|
+
lines.push(`- Weekly ops config warning runs: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_config_warning_runs, '0')}`);
|
|
173
|
+
lines.push(`- Weekly ops config warning run rate: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_config_warning_run_rate_percent)}%`);
|
|
174
|
+
lines.push(`- Weekly ops auth-tier block rate avg/max: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_authorization_tier_block_rate_avg_percent)}/${formatAutoHandoffRegressionValue(aggregates.weekly_ops_authorization_tier_block_rate_max_percent)}%`);
|
|
175
|
+
lines.push(`- Weekly ops dialogue-auth block rate avg/max: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_dialogue_authorization_block_rate_avg_percent)}/${formatAutoHandoffRegressionValue(aggregates.weekly_ops_dialogue_authorization_block_rate_max_percent)}%`);
|
|
176
|
+
lines.push(`- Weekly ops matrix regression-positive rate avg/max: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_matrix_regression_positive_rate_avg_percent)}/${formatAutoHandoffRegressionValue(aggregates.weekly_ops_matrix_regression_positive_rate_max_percent)}%`);
|
|
177
|
+
lines.push(`- Weekly ops runtime block rate avg/max: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_runtime_block_rate_avg_percent)}/${formatAutoHandoffRegressionValue(aggregates.weekly_ops_runtime_block_rate_max_percent)}%`);
|
|
178
|
+
lines.push(`- Weekly ops runtime ui-mode known runs: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_runtime_ui_mode_violation_known_runs, '0')}`);
|
|
179
|
+
lines.push(`- Weekly ops runtime ui-mode violation runs: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_runtime_ui_mode_violation_runs, '0')}`);
|
|
180
|
+
lines.push(`- Weekly ops runtime ui-mode violation run rate: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_runtime_ui_mode_violation_run_rate_percent)}%`);
|
|
181
|
+
lines.push(`- Weekly ops runtime ui-mode violations total: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_runtime_ui_mode_violation_total, '0')}`);
|
|
182
|
+
lines.push(`- Weekly ops runtime ui-mode violation rate avg/max: ${formatAutoHandoffRegressionValue(aggregates.weekly_ops_runtime_ui_mode_violation_rate_avg_percent)}/${formatAutoHandoffRegressionValue(aggregates.weekly_ops_runtime_ui_mode_violation_rate_max_percent)}%`);
|
|
183
|
+
lines.push(`- Release preflight known runs: ${formatAutoHandoffRegressionValue(aggregates.release_gate_preflight_known_runs, '0')}`);
|
|
184
|
+
lines.push(`- Release preflight available runs: ${formatAutoHandoffRegressionValue(aggregates.release_gate_preflight_available_runs, '0')}`);
|
|
185
|
+
lines.push(`- Release preflight blocked runs: ${formatAutoHandoffRegressionValue(aggregates.release_gate_preflight_blocked_runs, '0')}`);
|
|
186
|
+
lines.push(`- Release preflight hard-gate runs: ${formatAutoHandoffRegressionValue(aggregates.release_gate_preflight_hard_gate_runs, '0')}`);
|
|
187
|
+
lines.push(`- Release preflight availability rate: ${formatAutoHandoffRegressionValue(aggregates.release_gate_preflight_availability_rate_percent)}%`);
|
|
188
|
+
lines.push(`- Release preflight block rate: ${formatAutoHandoffRegressionValue(aggregates.release_gate_preflight_block_rate_percent)}%`);
|
|
189
|
+
lines.push(`- Risk levels: low=${formatAutoHandoffRegressionValue(aggregates.risk_levels && aggregates.risk_levels.low, '0')}, medium=${formatAutoHandoffRegressionValue(aggregates.risk_levels && aggregates.risk_levels.medium, '0')}, high=${formatAutoHandoffRegressionValue(aggregates.risk_levels && aggregates.risk_levels.high, '0')}, unknown=${formatAutoHandoffRegressionValue(aggregates.risk_levels && aggregates.risk_levels.unknown, '0')}`);
|
|
190
|
+
lines.push('');
|
|
191
|
+
lines.push('## Recent Entries');
|
|
192
|
+
lines.push('');
|
|
193
|
+
|
|
194
|
+
if (recentEntries.length === 0) {
|
|
195
|
+
lines.push('- None');
|
|
196
|
+
} else {
|
|
197
|
+
recentEntries.forEach(entry => {
|
|
198
|
+
const tag = formatAutoHandoffRegressionValue(entry && entry.tag);
|
|
199
|
+
const passed = entry && entry.gate_passed === true ? 'yes' : (entry && entry.gate_passed === false ? 'no' : 'n/a');
|
|
200
|
+
const risk = formatAutoHandoffRegressionValue(entry && entry.risk_level);
|
|
201
|
+
const successRate = formatAutoHandoffRegressionValue(entry && entry.spec_success_rate_percent);
|
|
202
|
+
const evaluatedAt = formatAutoHandoffRegressionValue(entry && entry.evaluated_at);
|
|
203
|
+
const violations = formatAutoHandoffRegressionValue(entry && entry.violations_count, '0');
|
|
204
|
+
const sceneBatch = entry && entry.scene_package_batch_passed === true
|
|
205
|
+
? 'pass'
|
|
206
|
+
: (entry && entry.scene_package_batch_passed === false ? 'fail' : 'n/a');
|
|
207
|
+
const sceneBatchFailures = formatAutoHandoffRegressionValue(entry && entry.scene_package_batch_failure_count);
|
|
208
|
+
const capabilityExpectedUnknown = formatAutoHandoffRegressionValue(entry && entry.capability_expected_unknown_count, '0');
|
|
209
|
+
const capabilityProvidedUnknown = formatAutoHandoffRegressionValue(entry && entry.capability_provided_unknown_count, '0');
|
|
210
|
+
const preflightBlocked = entry && entry.release_gate_preflight_blocked === true
|
|
211
|
+
? 'yes'
|
|
212
|
+
: (entry && entry.release_gate_preflight_blocked === false ? 'no' : 'n/a');
|
|
213
|
+
const preflightHardGate = entry && entry.require_release_gate_preflight === true
|
|
214
|
+
? 'enabled'
|
|
215
|
+
: (entry && entry.require_release_gate_preflight === false ? 'advisory' : 'n/a');
|
|
216
|
+
const driftAlerts = formatAutoHandoffRegressionValue(entry && entry.drift_alert_count, '0');
|
|
217
|
+
const driftBlocked = entry && entry.drift_blocked === true
|
|
218
|
+
? 'yes'
|
|
219
|
+
: (entry && entry.drift_blocked === false ? 'no' : 'n/a');
|
|
220
|
+
const weeklyOpsBlocked = entry && entry.weekly_ops_blocked === true
|
|
221
|
+
? 'yes'
|
|
222
|
+
: (entry && entry.weekly_ops_blocked === false ? 'no' : 'n/a');
|
|
223
|
+
const weeklyOpsConfigWarnings = formatAutoHandoffRegressionValue(entry && entry.weekly_ops_config_warning_count, '0');
|
|
224
|
+
const weeklyOpsDialogueRate = formatAutoHandoffRegressionValue(entry && entry.weekly_ops_dialogue_authorization_block_rate_percent);
|
|
225
|
+
const weeklyOpsAuthTierRate = formatAutoHandoffRegressionValue(entry && entry.weekly_ops_authorization_tier_block_rate_percent);
|
|
226
|
+
const weeklyOpsRuntimeBlockRate = formatAutoHandoffRegressionValue(entry && entry.weekly_ops_runtime_block_rate_percent);
|
|
227
|
+
const weeklyOpsRuntimeUiModeViolationTotal = formatAutoHandoffRegressionValue(entry && entry.weekly_ops_runtime_ui_mode_violation_total, '0');
|
|
228
|
+
const weeklyOpsRuntimeUiModeViolationRate = formatAutoHandoffRegressionValue(entry && entry.weekly_ops_runtime_ui_mode_violation_rate_percent);
|
|
229
|
+
lines.push(
|
|
230
|
+
`- ${tag} | passed=${passed} | risk=${risk} | scene-batch=${sceneBatch} | ` +
|
|
231
|
+
`scene-failures=${sceneBatchFailures} | capability-unknown=${capabilityExpectedUnknown}/${capabilityProvidedUnknown} | ` +
|
|
232
|
+
`preflight-blocked=${preflightBlocked} | hard-gate=${preflightHardGate} | ` +
|
|
233
|
+
`drift-alerts=${driftAlerts} | drift-blocked=${driftBlocked} | ` +
|
|
234
|
+
`weekly-blocked=${weeklyOpsBlocked} | weekly-config-warnings=${weeklyOpsConfigWarnings} | ` +
|
|
235
|
+
`weekly-auth-tier-rate=${weeklyOpsAuthTierRate}% | weekly-dialogue-rate=${weeklyOpsDialogueRate}% | ` +
|
|
236
|
+
`weekly-runtime-block-rate=${weeklyOpsRuntimeBlockRate}% | ` +
|
|
237
|
+
`weekly-runtime-ui-mode=${weeklyOpsRuntimeUiModeViolationTotal}/${weeklyOpsRuntimeUiModeViolationRate}% | ` +
|
|
238
|
+
`success=${successRate} | violations=${violations} | at=${evaluatedAt}`
|
|
239
|
+
);
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (warnings.length > 0) {
|
|
244
|
+
lines.push('');
|
|
245
|
+
lines.push('## Warnings');
|
|
246
|
+
warnings.forEach(item => {
|
|
247
|
+
lines.push('', `- ${item}`);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return `${lines.join('\n')}\n`;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
module.exports = {
|
|
255
|
+
buildAutoHandoffReleaseGateHistoryIndex,
|
|
256
|
+
renderAutoHandoffReleaseGateHistoryMarkdown
|
|
257
|
+
};
|