feat: add approval bound full maintenance script console and executors
Rust development slice / linux (push) Failing after 6s

This commit is contained in:
2026-11-14 16:35:11 +01:00
parent 287a784c8f
commit ff78b6a498
51 changed files with 8880 additions and 278 deletions
+2
View File
@@ -33,10 +33,12 @@ fn fixture() -> (RootScope, JobPayload, Vec<String>) {
enrollment_generation: 1,
assignment_version: 1,
principals: vec!["selected".into()],
helper_binary_sha256: None,
helper_policy_sha256: "ab".repeat(32),
acceptance_evidence_id: "reviewed-helper-record".into(),
allowed_services: vec!["mutation-only.service".into()],
allow_root_scripts: false,
allowed_script_profiles: None,
allow_reboot: false,
apt: None,
root_logs: Some(RootLogPolicy {
+4 -4
View File
@@ -61,8 +61,8 @@ test('simulated human prepares root request through UI only, without approving',
await page.getByLabel('Begründung', { exact: true }).fill(text(request.reason));
await page.getByRole('button', { name: 'Plan erstellen · noch keine Ausführung' }).click();
const detail = page.locator('section').filter({ has: page.getByRole('heading', { name: 'Unveränderlicher Plan / Genehmigungsdetail', exact: true }) });
await expect(detail.locator('pre')).toBeVisible();
const plan = object(JSON.parse(await detail.locator('pre').innerText()));
await expect(detail.locator('pre[aria-label^="Alle festen Zielpreviews"]')).toBeVisible();
const plan = object(JSON.parse(await detail.locator('pre[aria-label^="Alle festen Zielpreviews"]').innerText()));
expect(createHash('sha256').update(bytes(plan.plan_payload_bytes)).digest('hex')).toBe(plan.plan_hash);
await detail.getByRole('button', { name: 'Antrag absenden · pending_approval' }).click();
const op = page.locator('section').filter({ has: page.getByRole('heading', { name: /^Antrag \/ Ausführung / }) });
@@ -102,8 +102,8 @@ test('one opted-in immutable dev/test action: inspect all fixed bytes → UI cli
await expect(op.locator('pre').first()).toContainText('"execution_state": null');
await op.getByRole('button', { name: 'Unveränderlichen Plan zur Prüfung öffnen' }).click();
const detail = page.locator('section').filter({ has: page.getByRole('heading', { name: 'Unveränderlicher Plan / Genehmigungsdetail', exact: true }) });
await expect(detail.locator('pre')).toBeVisible();
const plan = object(JSON.parse(await detail.locator('pre').innerText()));
await expect(detail.locator('pre[aria-label^="Alle festen Zielpreviews"]')).toBeVisible();
const plan = object(JSON.parse(await detail.locator('pre[aria-label^="Alle festen Zielpreviews"]').innerText()));
expect(plan.plan_hash).toBe(expected.plan_hash);
expect(bytes(plan.plan_payload_bytes)).toEqual(bytes(expected.plan_payload_bytes));
expect(createHash('sha256').update(bytes(plan.plan_payload_bytes)).digest('hex')).toBe(expected.plan_hash);
+2 -2
View File
@@ -15,10 +15,10 @@ test('preserved real VM: pending fixed Hello World → UI click → confirmed re
await expect(op.locator('pre').first()).toContainText('"execution_state": null');
await op.getByRole('button', { name: 'Unveränderlichen Plan zur Prüfung öffnen' }).click();
const detail = page.locator('section').filter({ has: page.getByRole('heading', { name: 'Unveränderlicher Plan / Genehmigungsdetail', exact: true }) });
await expect(detail.locator('pre')).toBeVisible();
await expect(detail.locator('pre[aria-label^="Alle festen Zielpreviews"]')).toBeVisible();
// Inspect the complete rendered immutable preview, not a separately fetched
// or caller-supplied payload. Refuse all root/package/reboot/extra-target jobs.
const plan = JSON.parse(await detail.locator('pre').innerText());
const plan = JSON.parse(await detail.locator('pre[aria-label^="Alle festen Zielpreviews"]').innerText());
expect(plan.resolved_targets).toHaveLength(1);
expect(plan.resolved_targets[0].asset_id).toBe(asset);
expect(plan.jobs).toHaveLength(1);
File diff suppressed because it is too large Load Diff