fix reporting governance adapter boundary regressions

This commit is contained in:
Eve
2026-05-08 17:02:59 +08:00
parent 55fe51483b
commit 9c6afad864
4 changed files with 13 additions and 5 deletions

View File

@@ -68,8 +68,16 @@ function main() {
fs.writeFileSync(artifactPath, `${JSON.stringify(artifact, null, 2)}\n`, 'utf8'); fs.writeFileSync(artifactPath, `${JSON.stringify(artifact, null, 2)}\n`, 'utf8');
const result = runOrchestratorAdapter({ const result = runOrchestratorAdapter({
profileArtifact: artifact, runtimeBinding: {
repoRootOverride: packageRoot, cwd: process.cwd(),
scripts: {
orchestrator: path.join(packageRoot, 'scripts', 'watchdog_auto_notify_orchestrator.mjs'),
watchdog: path.join(packageRoot, 'scripts', 'long_task_watchdog.mjs'),
dispatcher: path.join(packageRoot, 'scripts', 'operator_notify_dispatcher.mjs'),
bridgeSupervisor: path.join(packageRoot, 'scripts', 'operator_notify_bridge_supervisor.mjs'),
senderBinding: path.join(packageRoot, 'scripts', 'operator_notify_sender_binding.mjs'),
},
},
state, state,
evidenceDir: path.join(workspace, 'evidence'), evidenceDir: path.join(workspace, 'evidence'),
eventDir: path.join(workspace, 'events'), eventDir: path.join(workspace, 'events'),

View File

@@ -3,8 +3,6 @@ export { runDispatcherAdapter } from './dispatcher.mjs';
export { runBridgeSupervisorAdapter } from './bridge-supervisor.mjs'; export { runBridgeSupervisorAdapter } from './bridge-supervisor.mjs';
export { runSenderBindingAdapter } from './sender-binding.mjs'; export { runSenderBindingAdapter } from './sender-binding.mjs';
export { runOrchestratorAdapter } from './orchestrator.mjs'; export { runOrchestratorAdapter } from './orchestrator.mjs';
export { createDefaultOrchestratorExecutionArgs, buildSenderCommand, runOrchestratorExecution } from './orchestrator-execution.mjs';
export { parseOrchestratorCliArgs, formatOrchestratorHelp, runWatchdogAutoNotifyOrchestrator, runOrchestratorCli } from './orchestrator-cli.mjs';
export { createRuntimeBinding } from './runtime-binding.mjs'; export { createRuntimeBinding } from './runtime-binding.mjs';
export { loadDeploymentProfileArtifact, createDeploymentBindingContract } from '../storage/profile-artifact.mjs'; export { loadDeploymentProfileArtifact, createDeploymentBindingContract } from '../storage/profile-artifact.mjs';

View File

@@ -46,6 +46,7 @@ export function runOrchestratorAdapter({
const resolvedWatchdogScript = path.resolve(watchdogScript ?? resolveScriptPath('watchdog', { runtimeBinding: binding })); const resolvedWatchdogScript = path.resolve(watchdogScript ?? resolveScriptPath('watchdog', { runtimeBinding: binding }));
const resolvedDispatcherScript = path.resolve(dispatcherScript ?? resolveScriptPath('dispatcher', { runtimeBinding: binding })); const resolvedDispatcherScript = path.resolve(dispatcherScript ?? resolveScriptPath('dispatcher', { runtimeBinding: binding }));
const resolvedSupervisorScript = path.resolve(supervisorScript ?? resolveScriptPath('bridgeSupervisor', { runtimeBinding: binding })); const resolvedSupervisorScript = path.resolve(supervisorScript ?? resolveScriptPath('bridgeSupervisor', { runtimeBinding: binding }));
const resolvedSenderBindingScript = path.resolve(senderCommand ? (binding?.scripts?.senderBinding ?? resolveScriptPath('senderBinding', { runtimeBinding: binding })) : resolveScriptPath('senderBinding', { runtimeBinding: binding }));
const resolvedQueueDir = queueDir const resolvedQueueDir = queueDir
? path.resolve(queueDir) ? path.resolve(queueDir)
@@ -78,7 +79,7 @@ export function runOrchestratorAdapter({
claim, claim,
dryRun, dryRun,
}, { }, {
senderBindingScript: resolveScriptPath('senderBinding', { runtimeBinding: binding }), senderBindingScript: resolvedSenderBindingScript,
}); });
return { return {

View File

@@ -169,6 +169,7 @@ test('leaf subpath export resolves and can execute through injected runtime bind
watchdog: ${JSON.stringify(path.resolve(packageRoot, 'scripts', 'long_task_watchdog.mjs'))}, watchdog: ${JSON.stringify(path.resolve(packageRoot, 'scripts', 'long_task_watchdog.mjs'))},
dispatcher: ${JSON.stringify(path.resolve(packageRoot, 'scripts', 'operator_notify_dispatcher.mjs'))}, dispatcher: ${JSON.stringify(path.resolve(packageRoot, 'scripts', 'operator_notify_dispatcher.mjs'))},
bridgeSupervisor: ${JSON.stringify(path.resolve(packageRoot, 'scripts', 'operator_notify_bridge_supervisor.mjs'))}, bridgeSupervisor: ${JSON.stringify(path.resolve(packageRoot, 'scripts', 'operator_notify_bridge_supervisor.mjs'))},
senderBinding: ${JSON.stringify(path.resolve(packageRoot, 'scripts', 'operator_notify_sender_binding.mjs'))},
}, },
}, },
state: ${JSON.stringify(statePath)}, state: ${JSON.stringify(statePath)},