feat(runtime): default to passthrough and persist execution permissions
This commit is contained in:
@@ -102,10 +102,12 @@ try {
|
||||
assert.equal(current.approvals[0].command, 'node --version');
|
||||
assert.equal(fs.existsSync(path.join(example.root, 'WORKBENCH-NOTES.md')), false);
|
||||
await api('/sessions/' + session.id + '/approvals/' + current.approvals[0].id, { allow: true });
|
||||
await until(async () => { current = await api('/sessions/' + session.id); return current.status === 'needs_review'; });
|
||||
await until(async () => { current = await api('/sessions/' + session.id); return current.status === 'completed'; });
|
||||
const command = current.events.find(event => event.tool === 'run_command');
|
||||
assert.equal(command.phase, 'completed'); assert.match(command.output, new RegExp(manifest.nodeVersion.replaceAll('.', '\\.')));
|
||||
for (const proposal of current.changes.filter(change => change.status === 'pending')) await api('/sessions/' + session.id + '/changes/' + proposal.id + '/reject', {});
|
||||
assert.equal(current.changes.filter(change => change.status === 'pending').length, 0);
|
||||
for (const proposal of current.changes.filter(change => change.status === 'applied')) await api('/sessions/' + session.id + '/changes/' + proposal.id + '/rollback', {});
|
||||
assert.equal(fs.existsSync(path.join(example.root, 'WORKBENCH-NOTES.md')), false);
|
||||
const planned = await api('/sessions/' + session.id + '/check-plans', { names: ['test'] });
|
||||
const plan = planned.execution.plans.at(-1); assert.ok(plan.checks.some(check => check.name === 'test'));
|
||||
const accepted = await api('/sessions/' + session.id + '/check-jobs', { planId: plan.id }); const jobId = accepted.execution.checks.at(-1).id;
|
||||
|
||||
Reference in New Issue
Block a user