proof dumpconfig.absent-key {
require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example absent_in_limit_key { selection = "parity_absent_key" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stdout.added.size() == 0assert views.stderr.added.size() == 1 && views.stderr.added[0].line == "undef" && views.stderr.added[0].ending == "\n" }
}
proof dumpconfig.all-configuration {
require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example complete { selection = "" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stdout.added.size() == 0assert views.stderr.added.size() > 300 }
}
proof dumpconfig.complete-configuration-required {// The live configuration carries a value legacy Data::Printer output// cannot be reproduced from. Capture carries it as an explicit node and the// native action refuses the whole dump before rendering; no executor test// feature participates. The legacy subject has no executor, takes the// pre-connect fallback, and dumps the value as it always did — capture runs// only after the executor answers, so removing the executor restores exact // legacy behavior.
exclude legacy views.stderr
because "legacy prints the dump directly while the target refuses to render; the assertions pin the dump's size on legacy and silence on the target"example complete_configuration_unavailable { fault = "complete-configuration" }
when dumpconfig_fault(fault)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert subject != "target" || views.stderr.added.size() == 0assert subject != "target" || (views.stdout.added.size() == 1 && views.stdout.added[0].line == "{\"log\":\"configuration_unrepresentable\",\"status\":\"error\"}" && views.stdout.added[0].ending == "\n")assert subject != "legacy" || views.stderr.added.size() > 300assert subject != "legacy" || (views.stdout.added.size() == 1 && views.stdout.added[0].line == "{\"log\":\"Dumped config\",\"status\":\"done\"}" && views.stdout.added[0].ending == "\n") }
differs at views.stdout.added.*.line where legacy.contains('"status":"done"') && target.contains('"status":"error"')because "the target fails closed on the unrepresentable value while legacy dumps it"}
proof dumpconfig.device-auth-reduction { require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example deviceless { selection = "device_auth" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stderr.added.size() == 1 && views.stderr.added[0].line == "[]" && views.stderr.added[0].ending == "\n" }
}
proof dumpconfig.existing-key {
require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example configured_key { selection = "a_parity_selected" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stdout.added.size() == 0assert views.stderr.added.exists(line, line.line.contains("selected-value")) }
}
proof dumpconfig.false-string-selects-complete { require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example false_string { selection = "0" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stderr.added.size() > 300 }
}
proof dumpconfig.falsy-ambient-off {
require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"// ND2_WORKER_ROLL_CALL='' and workers.BACKEND='' are the natural "off"// spellings; legacy treats both as unset (truthiness), so the dispatch// dumps fully and the resolver still publishes the backend name.example empty_string_off { fault = "falsy-ambient" } when dumpconfig_fault(fault)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stdout.added.exists(line, line.line.contains("\"status\":\"done\""))assert views.stderr.added.exists(line, line.line.contains("BACKEND")) }
}
proof dumpconfig.natural-key-order {
require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example digit_runs { selection = "a_parity_natural_order" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stderr.added.size() > 0 }
}
proof dumpconfig.number-spellings {
require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example flip_corpus { selection = "a_parity_number_spellings" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stderr.added.size() > 0 }
}
proof dumpconfig.opaque-url-base {
require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example url_base { selection = "url_base" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stdout.added.size() == 0assert views.stderr.added.exists(line, line.line.contains("URI::Based")) }
}
proof dumpconfig.output-channel-required { exclude target views.process_io
where view.resource == "process://pipe" && view.request.participants.size() == 1&& view.request.participants[0].read.size == 0&& view.request.participants[0].written.size == 74&& view.request.participants[0].written.sha256 == "f80d68897673eb85ad58dbbcfe74e0f7d7c3d611e9b86de6a84b85ef738dc5aa"because "legacy has no executor stream to reset when its direct-print sink is rejected; the target's runner error, silence and unchanged database remain asserted" require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"// The real Runner receives a poller-owned sink that explicitly rejects the// first streamed chunk. Legacy has no executor connection and keeps its// direct print behavior; the target must report the bridge failure instead. exclude legacy views.stderr
because "legacy prints directly while the target rejects the stream; the assertions pin the dump's size on legacy and silence on the target"example output_channel_unavailable { fault = "output-sink" } when dumpconfig_fault(fault)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert subject != "target" || views.stderr.added.size() == 0assert subject != "target" || views.stdout.added.exists(line, line.line.contains("worker execution output sink rejected a chunk"))assert subject != "target" || views.stdout.added.exists(line, line.line.contains("\"status\":\"error\""))assert subject != "legacy" || (views.stdout.added.size() == 1 && views.stdout.added[0].line == "{\"log\":\"Dumped config\",\"status\":\"done\"}" && views.stdout.added[0].ending == "\n")assert subject != "legacy" || views.stderr.added.size() > 300 }
differs at views.stdout.added.*.line where legacy.contains('"status":"done"') && target.contains('"status":"error"')because "the target reports the rejected required poller sink"}
proof dumpconfig.rollback-before-context {// The fault mode points the bridge at an absent socket and adds an// oversized deferrable_actions entry, which the snapshot carries like any// other value. With no executor the dispatch must dump on both legs.example oversize_ambient { fault = "context-executor-down" } when dumpconfig_fault(fault)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stdout.added.exists(line, line.line.contains("\"status\":\"done\""))assert views.stderr.added.size() > 300 }
}
proof dumpconfig.shared-reference-backref { require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example yaml_alias { selection = "a_parity_shared" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stderr.added.exists(line, line.line.contains("var{")) }
}
proof dumpconfig.wide-array-padding { require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example twelve_elements { selection = "a_parity_wide_array" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stderr.added.exists(line, line.line.contains("nested-value")) }
}
proof dumpconfig.workers-backend {
require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example resolved { selection = "workers" } when dumpconfig(selection)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert views.stderr.added.exists(line, line.line.contains("BACKEND")) }
}
proof worker-execution-bridge.oversize-envelope { forbid target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "an oversized field must return to legacy before the connect, so no dispatch may reach the worker at all" exclude legacy views.stderr
where line == "hello from Perl"
because "only the subject that owns the Perl worker prints, which is the same evidence that the fallback happened; the assertions pin each subject's exact stderr"example oversize_subaction { case = "oversize" } when bridge_runtime(case)
then {
assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 assert result.exit_code == 0
assert subject != "legacy" || (views.stderr.added.size() == 1 && views.stderr.added[0].line == "hello from Perl" && views.stderr.added[0].ending == "\n")assert subject != "legacy" || (views.stdout.added.size() == 1 && views.stdout.added[0].line == "{\"log\":\"hello from Perl\",\"status\":\"done\"}" && views.stdout.added[0].ending == "\n")assert subject != "target" || views.stderr.added.size() == 0assert subject != "target" || (views.stdout.added.size() == 1 && views.stdout.added[0].line == "{\"log\":\"failed to report from any worker!\",\"status\":\"error\"}" && views.stdout.added[0].ending == "\n") }
differs at views.stdout.added.*.linewhere legacy.contains('"status":"done"') && target.contains('"status":"error"')because "the target deliberately has no Perl implementation of this diagnostic, so its fallback reports no worker; the differing result is what proves the Perl path, not the routed path, ran"}
proof worker-execution-bridge.parity-hello { example plain { extra = "" }
example with_subaction { extra = "vlan 42" } when hello(extra)
then {
assert result.exit_code == 0
assert views.stdout.added.size() == 0assert subject != "legacy" || (views.stderr.added.size() == 1 && views.stderr.added[0].line == "hello from Perl" && views.stderr.added[0].ending == "\n")assert subject != "target" || (views.stderr.added.size() == 1 && views.stderr.added[0].line == "hello from Rust" && views.stderr.added[0].ending == "\n")// `netdisco-do` runs with job id 0 and never writes the admin queue, so// this holds on both sides today. It is here as a regression guard: a// change that made either side write admin would break it.assert views.admin_queue.added.size() == 0 && views.admin_queue.removed.size() == 0 }
differs at views.stderr.added.*.linewhere legacy == "hello from Perl" && target == "hello from Rust"because "the diagnostic identifies the implementation that answered"}
proof worker-execution-bridge.routed-device-completion { exclude views.postgres
because "the runner's device lookup selects clock-relative ages (Device with_times), so the raw protocol rows differ between any two runs; the device_skip and admin_queue views retain the completion state this case proves" require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "this case must reach the Rust worker rather than use Perl fallback"example alias_ip { case = "device" } when bridge_runtime(case)
then {
assert result.exit_code == 0
assert views.stdout.added.exists(line, line.line.contains("\"device\":\"192.0.2.10\""))assert views.stdout.added.exists(line, line.line.contains("\"status\":\"done\""))assert subject != "legacy" || (views.stderr.added.size() == 1 && views.stderr.added[0].line == "hello from Perl" && views.stderr.added[0].ending == "\n")assert subject != "target" || (views.stderr.added.size() == 1 && views.stderr.added[0].line == "hello from Rust" && views.stderr.added[0].ending == "\n")assert views.device_skip.added.size() == 1assert views.device_skip.removed.size() == 0assert views.device_skip.added.all(entry, entry.row.contains("\"backend\":\"parity\""))assert views.device_skip.added.all(entry, entry.row.contains("\"device\":\"192.0.2.10\""))assert views.device_skip.added.all(entry, entry.row.contains("\"deferrals\":0")) }
differs at views.stderr.added.*.linewhere legacy == "hello from Perl" && target == "hello from Rust"because "the diagnostic identifies the implementation that answered"differs at views.stdout.added.*.linewhere legacy.contains('"log":"hello from Perl"') && target.contains('"log":"hello from Rust"')because "the reported log carries that same implementation identity; the device and status fields of the same line stay compared exactly"differs at views.admin_queue.added.*.rowwhere legacy.contains('"log":"hello from Perl"') && target.contains('"log":"hello from Rust"')because "completing job 9001 stores the answering worker's log in the admin row, so only that column of the row carries the identity; status, timestamps and every other column stay compared"differs at views.tasty_completion.added.*.rowwhere legacy.contains('"log":"hello from Perl"') && target.contains('"log":"hello from Rust"')because "the completion view repeats job 9001 from admin_queue; legacy stores hello from Perl and the native diagnostic stores hello from Rust, while every other column stays identical"differs at views.postgres_state.added.*.after.rows.*.logwhere legacy == "hello from Perl" && target == "hello from Rust"because "the automatic state view carries the same admin row, so the same stored worker log reaches it; the predicate waives only that one implementation identity and every other column of every observed relation stays compared"}
proof getapikey.exact-user {
@getapikey_observation
@getapikey_native
example operator { case = { name = "alice", state = "valid", mode = "normal", request = "selected" } }example cli-selected { case = { name = "bob", state = "null", mode = "cli", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("\"status\":\"done\"")) }
}
proof getapikey.false-string {
@getapikey_observation
@getapikey_native
example zero { case = { name = "alice", state = "valid", mode = "normal", request = "0" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("Missing user (-e).")) }
}
proof getapikey.lookup-denied {
@getapikey_observation
@getapikey_native
example denied { case = { name = "bob", state = "valid", mode = "deny-select", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("permission denied for table users") && v.line.contains("\"status\":\"error\"")) }
}
proof getapikey.missing {
@getapikey_observation
@getapikey_native
example omitted { case = { name = "alice", state = "valid", mode = "normal", request = "missing" } }example empty { case = { name = "bob", state = "valid", mode = "normal", request = "" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("Missing user (-e).") && v.line.contains("\"status\":\"error\"")) }
}
proof getapikey.namespace-retained {
@getapikey_observation
exclude views.postgres
where view.request.sql.startsWith("UPDATE admin SET action =")because "namespace close writes localtime parameters in SQL not projectable by Parity; every Admin column and exact claimed-job completion remain checked"example namespace { case = { name = "dave", state = "valid", mode = "namespace", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("failed to report from any worker!")) }
}
proof getapikey.omitted-worker {
@getapikey_observation
@getapikey_native
example omitted { case = { name = "alice", state = "valid", mode = "omitted", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("failed to report from any worker!")) }
}
proof getapikey.optional-device {
exclude views.postgres
where view.request.sql.contains("age(") && view.request.sql.contains("device")because "production Device with_times reads clock-relative ages; device state and canonical device_skip completion remain fully compared" @getapikey_observation
@getapikey_native
example alias-port { case = { name = "alice", state = "valid", mode = "device", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("\"device\":\"192.0.2.10\""))assert views.device_skip.added.size() == 2assert views.device_skip.added.exists(v, v.row.contains("192.0.2.10") && v.row.contains("\"deferrals\":0")) }
}
proof getapikey.printable {
@getapikey_observation
@getapikey_native
example punctuation { case = { name = "a b'%_", state = "valid", mode = "normal", request = "selected" } }example unicode { case = { name = "élise", state = "valid", mode = "normal", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case)then { assert result.exit_code == 0 }}
proof getapikey.provider-connection-failure { @getapikey_observation
@getapikey_native
example authentication { case = { name = "alice", state = "valid", mode = "provider-auth", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("\"status\":\"done\"") && v.line.contains("\"token_checked\":1")) }
}
proof getapikey.provider-error {
@getapikey_observation
@getapikey_native
example missing-provider { case = { name = "carol", state = "valid", mode = "provider", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("Proof::MissingProvider") && v.line.contains("\"status\":\"error\"")) }
}
proof getapikey.provider-schema {
@getapikey_observation
@getapikey_native
example separate-repository { case = { name = "carol", state = "valid", mode = "provider-schema", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("\"status\":\"done\"") && v.line.contains("\"token_checked\":1")) }
}
proof getapikey.retained-boundary {
@getapikey_observation
forbid target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "oversize envelopes and a disabled bridge retain legacy before connecting"example oversize { case = { name = "alice", state = "valid", mode = "normal", request = "oversize" } }example disabled { case = { name = "bob", state = "expired", mode = "disabled", request = "selected" } }example unavailable { case = { name = "carol", state = "null", mode = "unavailable", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case)then { assert result.exit_code == 0 }}
proof getapikey.roll-call {
@getapikey_observation
@getapikey_native
example selected { case = { name = "alice", state = "valid", mode = "roll-call", request = "selected" } }example missing { case = { name = "bob", state = "valid", mode = "roll-call", request = "missing" } }example unknown { case = { name = "carol", state = "valid", mode = "roll-call", request = "unknown" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("\"log\":\"-\"") && v.line.contains("\"status\":\"info\"")) }
}
proof getapikey.rollback {
exclude target views.postgres
where view.request.sql == "SAVEPOINT nd_session_query" || view.request.sql == "RELEASE SAVEPOINT nd_session_query"because "native recovery savepoints are inside the same outer rollback; the mapped write and rollback plus unchanged rows prove the legacy transaction effect" map rollback_write {
legacy {
writes = views.postgres.added.filter(v, v.request.sql.startsWith("UPDATE users SET token = md5(random()::text)") && v.phase == "when") assert writes.size() == 1
into writes.map(v, {"connection": v.resource, "sql": v.request.sql, "username": v.request.parameters[1], "response": v.response}) }
target {
writes = views.postgres.added.filter(v, v.request.sql.startsWith("UPDATE users SET token = md5(random()::text)") && v.phase == "when") assert writes.size() == 1
into writes.map(v, {"connection": v.resource, "sql": v.request.sql, "username": v.request.parameters[1], "response": v.response}) }
} because "legacy issues and rolls back a real user write; compare exact SQL, username, connection and affected rows independently of cross-connection capture order, omitting only the epoch checked by the driver" map rollback_controls {
legacy {
begins = views.postgres.added.filter(v, v.request.sql.matches("^(begin|BEGIN)$"))commits = views.postgres.added.filter(v, v.request.sql.matches("^(commit|COMMIT)$"))rollbacks = views.postgres.added.filter(v, v.request.sql.matches("^(rollback|ROLLBACK)$")) assert rollbacks.size() == 1
into [{"begin": begins.size(), "commit": commits.size(), "rollback": rollbacks.size()}] }
target {
begins = views.postgres.added.filter(v, v.request.sql.matches("^(begin|BEGIN)$"))commits = views.postgres.added.filter(v, v.request.sql.matches("^(commit|COMMIT)$"))rollbacks = views.postgres.added.filter(v, v.request.sql.matches("^(rollback|ROLLBACK)$")) assert rollbacks.size() == 1
into [{"begin": begins.size(), "commit": commits.size(), "rollback": rollbacks.size()}] }
} because "legacy rolls back the user transaction and commits queue completion on separate connections; connection-group capture order and SQL keyword case are not behavior, and unchanged users plus exact completion retain both outcomes" map rollback_warning {
legacy {
warnings = views.stderr.added.filter(v, v.line.contains("DBIx::Class::Storage::TxnScopeGuard::DESTROY(): A DBIx::Class::Storage::TxnScopeGuard went out of scope"))assert warnings.size() == 1 && warnings.all(v, v.line.matches("^DBIx::Class::Storage::TxnScopeGuard::DESTROY\\(\\): A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error\\. Rolling back\\. at lib/App/Netdisco/Worker/Runner.pm line [0-9]+$"))into warnings.map(v, {"message": "DBIx::Class::Storage::TxnScopeGuard::DESTROY(): A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error. Rolling back.", "ending": v.ending}) }
target {
warnings = views.stderr.added.filter(v, v.line.contains("DBIx::Class::Storage::TxnScopeGuard::DESTROY(): A DBIx::Class::Storage::TxnScopeGuard went out of scope"))assert warnings.size() == 1 && warnings.all(v, v.line.matches("^DBIx::Class::Storage::TxnScopeGuard::DESTROY\\(\\): A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error\\. Rolling back\\. at native runner line [0-9]+$"))into warnings.map(v, {"message": "DBIx::Class::Storage::TxnScopeGuard::DESTROY(): A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error. Rolling back.", "ending": v.ending}) }
} because "legacy Runner.pm emits the complete rollback warning with its source location; only the implementation source location changes" @getapikey_observation
@getapikey_native
example expired { case = { name = "alice", state = "expired", mode = "rollback", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("\"status\":\"done\""))assert views.stderr.added.filter(v, v.line.contains("Rolling back.")).size() == 1 }
}
proof getapikey.site-retained {
@getapikey_observation
forbid target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "configured site workers retain the entire legacy plan before connecting"example late-worker { case = { name = "alice", state = "valid", mode = "site", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stderr.added.exists(v, v.line == "site getapikey ran")assert views.stdout.added.exists(v, v.line.contains("site getapikey completed")) }
}
proof getapikey.token-lookup-error {
@getapikey_observation
@getapikey_native
example column { case = { name = "bob", state = "valid", mode = "token-column", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("\"status\":\"done\"")) }
}
proof getapikey.token-matrix {
@getapikey_observation
@getapikey_native
example valid { case = { name = "alice", state = "valid", mode = "normal", request = "selected" } }example expired { case = { name = "bob", state = "expired", mode = "normal", request = "selected" } }example cleared { case = { name = "carol", state = "null", mode = "normal", request = "selected" } } generate 6 cases {
case = { name = text matching "user[a-z]{1,4}", state = one of ["valid", "expired", "null"], mode = "normal", request = "selected" } }
given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("\"token_checked\":1") && v.line.contains("\"status\":\"done\"")) }
}
proof getapikey.unmatched {
@getapikey_observation
@getapikey_native
example case-sensitive { case = { name = "alice", state = "valid", mode = "normal", request = "case" } }example spaces { case = { name = "bob", state = "valid", mode = "normal", request = "spaces" } }example pattern { case = { name = "carol", state = "valid", mode = "normal", request = "pattern" } }example utf8-boundary { case = { name = "dave", state = "valid", mode = "normal", request = "boundary" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("No such user")) }
}
proof getapikey.update-connection-failure { @getapikey_observation
@getapikey_native
example authentication { case = { name = "carol", state = "valid", mode = "update-auth", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed:") && v.line.contains("\"status\":\"error\""))assert views.admin_queue.added.exists(v, v.row.contains("\"log\":\"\"")) }
}
proof getapikey.update-denied {
@getapikey_observation
@getapikey_native
example denied { case = { name = "alice", state = "valid", mode = "deny-update", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case) then {
assert result.exit_code == 0
assert views.stdout.added.exists(v, v.line.contains("permission denied for table users") && v.line.contains("\"status\":\"error\"")) }
}
proof getapikey.zero-lifetime {
@getapikey_observation
@getapikey_native
example zero { case = { name = "alice", state = "valid", mode = "zero-lifetime", request = "selected" } }given prepared = getapikey(phase = "prepare", case)when getapikey(phase = "run", case)then { assert result.exit_code == 0 }}
proof tastyjobs.completion {
@tasty_native
example claimed { fixture = { count = 3 } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then {
assert !views.tasty_completion.added[0].row.contains('"started":null')assert !views.tasty_completion.added[0].row.contains('"finished":null')assert views.tasty_completion.added[0].row.contains('"job":9001') }
}
proof tastyjobs.default {
@tasty_native
example absent { fixture = { count = 23 } }example empty { fixture = { count = 23, limit = "" } }example zero { fixture = { count = 23, limit = "0" } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == 20 }}
proof tastyjobs.disabled {
@tasty_native
example no_main { fixture = { count = 3, disabled = true } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
then {
assert views.stdout.added.exists(line, line.line == '{"log":"failed to report from any worker!","status":"error"}')assert views.stderr.added.size() == 0assert views.tasty_completion.added.size() == 1 && views.tasty_completion.removed.size() == 1assert views.stdout.added.exists(line, line.line == '{"preview_unchanged":true}') }
}
proof tastyjobs.effective-settings {
@tasty_native
example restrictive { fixture = { backend = "tenant-a", max_deferrals = 1, retry_after = "100 years", high = ["snapshot"], rows = [{job = 1, action = "snapshot", device = "192.0.2.10"}], skips = [{device = "192.0.2.10", deferrals = 2, last_defer = "2026-01-01 00:00:00"}] }, expected = 0 }example permissive { fixture = { backend = "tenant-b", max_deferrals = 3, retry_after = "1 second", high = ["snapshot"], rows = [{job = 1, action = "snapshot", device = "192.0.2.10"}], skips = [{backend = "tenant-a", device = "192.0.2.10", actionset = ["snapshot"], deferrals = 2, last_defer = "2026-01-01 00:00:00"}] }, expected = 1 } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == examples.expected }}
proof tastyjobs.eligibility {
@tasty_native
example mixed { fixture = {
high = ["high"],
rows = [
{job = 1, action = "snapshot", device_key = "a"},{job = 2, action = "snapshot", device_key = "b", username = "operator"},{job = 3, action = "high", device_key = "c"},{job = 4, action = "snapshot", device_key = "d", backend = "claimed"},{job = 5, action = "snapshot", device_key = "e", status = "done"},{job = 6, action = "snapshot", device = "192.0.2.10", device_key = "f"},{job = 7, action = "snapshot", device = "192.0.2.20", device_key = "g"},{job = 8, action = "snapshot", device = "192.0.2.30", device_key = "h"} ],
skips = [
{device = "192.0.2.10", actionset = ["snapshot"]},{device = "192.0.2.20", deferrals = 10, last_defer = "2099-01-01 00:00:00"},{device = "192.0.2.30", deferrals = 1, last_defer = "2026-01-01 00:00:00"} ]
} }
given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == 4 }}
proof tastyjobs.helper-error {
@tasty_native
example invalid_acl { fixture = { discover_no = ["vendor:["], devices = [{ip = "192.0.2.10", vendor = "test"}], rows = [{job = 1, action = "snapshot", device_key = "z"}, {job = 2, action = "snapshot", device = "192.0.2.10", device_key = "a"}, {job = 0, action = "snapshot", backend = "active", started = "2000-01-01 00:00:00"}] } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
then {
assert views.stdout.added.exists(line, line.line.contains('"status":"error"') && line.line.contains("Unmatched"))assert views.tasty_completion.added.size() == 1 && views.tasty_completion.removed.size() == 1assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == 0assert views.stdout.added.exists(line, line.line == '{"preview_unchanged":true}') }
}
proof tastyjobs.integer-text {
@tasty_native
example signed { fixture = { count = 23, limit = "+2" }, expected = 2 }example padded { fixture = { count = 23, limit = " 7 " }, expected = 7 } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == examples.expected }}
proof tastyjobs.late-denial {
@tasty_native
example acl_alias { fixture = { limit = "1", high = ["discover"], discover_no = ["192.0.2.10"], devices = [{ip = "192.0.2.10", layers = "00000110"}], aliases = [{ip = "192.0.2.10", alias = "192.0.2.11"}], rows = [{job = 1, action = "discover", device = "192.0.2.11", device_key = "z"}, {job = 2, action = "snapshot", device_key = "a"}], skips = [{device = "192.0.2.11", actionset = ["existing", "existing"]}] }, expected_skip = "192.0.2.11" }example layer { fixture = { limit = "1", devices = [{ip = "192.0.2.10", layers = "00000000"}], rows = [{job = 1, action = "arpnip", device = "192.0.2.10", device_key = "z"}, {job = 2, action = "snapshot", device_key = "a"}] } }example pseudo { fixture = { limit = "1", devices = [{ip = "192.0.2.10", is_pseudo = true}], rows = [{job = 1, action = "discover", device = "192.0.2.10", device_key = "z"}, {job = 2, action = "snapshot", device_key = "a"}] } }example schedule { fixture = { limit = "1", schedule = { nightly = { action = "snapshot", no = ["192.0.2.10"] } }, rows = [{job = 1, action = "scheduled-nightly", device = "192.0.2.10", device_key = "z"}, {job = 2, action = "snapshot", device_key = "a"}] } }example property { fixture = { limit = "1", discover_no = ["vendor:test"], devices = [{ip = "192.0.2.10", vendor = "test"}], rows = [{job = 1, action = "discover", device = "192.0.2.10", device_key = "z"}, {job = 2, action = "snapshot", device_key = "a"}] } }example only_miss { fixture = { limit = "1", discover_only = ["vendor:other"], devices = [{ip = "192.0.2.10", vendor = "test"}], rows = [{job = 1, action = "discover", device = "192.0.2.10", device_key = "z"}, {job = 2, action = "snapshot", device_key = "a"}] } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.exists(line, line.line == "[]") } then {
assert !has(examples.expected_skip) || mapped.preview_effects[0].writes == ['parity_tastyjobs_write {"rows": [{"device": "192.0.2.11", "backend": "parity-tasty", "actionset": ["discover", "existing"], "deferrals": 0, "last_defer": null}], "table": "device_skip", "operation": "UPDATE"}']assert !has(examples.expected_skip) || mapped.preview_effects[0].rollbacks == ["ROLLBACK"] }
}
proof tastyjobs.limits {
@tasty_native
example two { fixture = { count = 23, limit = "2" }, expected = 2 }example seven { fixture = { count = 23, limit = "7" }, expected = 7 } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == examples.expected }}
proof tastyjobs.long-error {
@tasty_native
example bounded { fixture = { count = 1, long_limit = true } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
then {
assert views.stdout.added.exists(line, line.line.contains('"status":"error"') && line.line.size() > 8000)assert views.tasty_completion.added.size() == 1 && views.tasty_completion.removed.size() == 1assert views.tasty_completion.added[0].row.size() > 8000// The input remains persisted, but the exception object itself is not.assert views.tasty_completion.added[0].row.contains('"log":""')assert views.stderr.added.filter(line, line.line.contains("_statuslist")).size() == 0assert views.stdout.added.exists(line, line.line == '{"preview_unchanged":true}') }
}
proof tastyjobs.newer-duplicates {
@tasty_native
example recent { fixture = { rows = [{job = 1, action = "snapshot", device_key = "same", log = "fetched original"}, {job = 2, action = "snapshot", device_key = "same", backend = "active", started = "2099-01-01 00:00:00"}] } }example stale { fixture = { rows = [{job = 1, action = "snapshot", device_key = "same", log = "fetched original"}, {job = 2, action = "snapshot", device_key = "same", backend = "active", started = "2000-01-01 00:00:00"}] } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.exists(line, line.line.contains("fetched original")) }}
proof tastyjobs.nonpositive {
@tasty_native
example negative { fixture = { count = 3, limit = "-1" } }example double_zero { fixture = { count = 3, limit = "00" } }example decimal_zero { fixture = { count = 3, limit = "0.0" } }example text { fixture = { count = 3, limit = "text" } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.exists(line, line.line == "[]") }}
proof tastyjobs.older-duplicates {
@tasty_native
// Configured high priority prevents the user row from consuming the limit.// The different device_keys still match through the NULL device branch.example field_exclusions { fixture = { limit = "1", high = ["snapshot"], rows = [{job = 10, action = "snapshot", device_key = "z", port = "p", subaction = "x"},{job = 1, action = "snapshot", device_key = "a", port = "p", subaction = "x"},{job = 2, action = "snapshot", device_key = "b", port = "p", subaction = "x", username = "operator"},{job = 3, action = "snapshot", device_key = "c", port = "p", subaction = "x", userip = "192.0.2.1"},{job = 4, action = "snapshot", device_key = "d", port = "other", subaction = "x"},{job = 5, action = "snapshot", device_key = "e", port = "p", subaction = "other"},{job = 6, action = "other", device_key = "f", port = "p", subaction = "x"} ] }, expected_duplicate = true }
example exact { fixture = { limit = "1", rows = [{job = 10, action = "snapshot", device_key = "z", port = "p", subaction = "x"},{job = 1, action = "snapshot", device_key = "a", port = "p", subaction = "x"},{job = 2, action = "snapshot", device_key = "b", port = "p", subaction = "x", username = "operator"},{job = 3, action = "snapshot", device_key = "c", port = "p", subaction = "x", userip = "192.0.2.1"},{job = 4, action = "snapshot", device_key = "d", port = "other", subaction = "x"},{job = 5, action = "snapshot", device_key = "e", port = "p", subaction = "other"},{job = 6, action = "other", device_key = "f", port = "p", subaction = "x"} ] } }
example nulls { fixture = { limit = "1", rows = [{job = 10, action = "snapshot", device_key = "z"}, {job = 1, action = "snapshot", device_key = "a"}] } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == 1 } then {
assert !has(examples.expected_duplicate) || mapped.preview_effects[0].writes == ['parity_tastyjobs_write {"rows": [{"job": 1, "log": "duplicate of 10", "status": "info"}], "table": "admin", "operation": "UPDATE"}']assert !has(examples.expected_duplicate) || mapped.preview_effects[0].rollbacks == ["ROLLBACK"] }
}
proof tastyjobs.ordering {
@tasty_native
example cutting { fixture = { limit = "3", rows = [{job = 1, action = "snapshot", device_key = "a"},{job = 2, action = "snapshot", device = "192.0.2.20", device_key = "b"},{job = 3, action = "snapshot", device = "192.0.2.30", device_key = "c"},{job = 4, action = "snapshot", device = "192.0.2.40", device_key = "z"},{job = 5, action = "snapshot", device = "192.0.2.50", device_key = "y"} ], skips = [
{device = "192.0.2.20", deferrals = 0, last_defer = "2000-01-01 00:00:00"},{device = "192.0.2.30", deferrals = 0, last_defer = "2001-01-01 00:00:00"},{device = "192.0.2.40", deferrals = 0},{device = "192.0.2.50", deferrals = 1, last_defer = "1999-01-01 00:00:00"} ] } }
given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == 3 }}
proof tastyjobs.other-denials {
@tasty_native
example allowed { fixture = { discover_no = ["192.0.2.10"], rows = [{job = 1, action = "snapshot", device = "192.0.2.10"}], skips = [{device = "192.0.2.10", actionset = ["existing"]}] } }example pseudo_cached { fixture = { devices = [{ip = "192.0.2.10", is_pseudo = true}], cached = [{ip = "192.0.2.10", oid = "1.3.6.1", oid_parts = "{1,3,6,1}", value = ["cached"]}], rows = [{job = 1, action = "discover", device = "192.0.2.10"}] } }example layer_override { fixture = { ignore_layers = ["192.0.2.10"], devices = [{ip = "192.0.2.10", layers = "00000000"}], rows = [{job = 1, action = "arpnip", device = "192.0.2.10"}] } }example force_layer { fixture = { force_arpnip = ["192.0.2.10"], devices = [{ip = "192.0.2.10", layers = "00000000"}], rows = [{job = 1, action = "arpnip", device = "192.0.2.10"}] } }example property_only { fixture = { discover_only = ["vendor:test"], devices = [{ip = "192.0.2.10", vendor = "test"}], rows = [{job = 1, action = "discover", device = "192.0.2.10"}] } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == 1 }}
proof tastyjobs.permission-bypass {
@tasty_native
example bypass { fixture = { discover_no = ["ip:["], rows = [{job = 1, action = "snapshot", device_key = "z"}, {job = 2, action = "pingsweep", device = "192.0.2.10", device_key = "a"}] } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == 2 }}
proof tastyjobs.query-errors {
@tasty_native
example decimal { fixture = { count = 3, limit = "1.5" } }example exponent { fixture = { count = 3, limit = "1e2" } }example tail { fixture = { count = 3, limit = "2tail" } }example overflow { fixture = { count = 3, limit = "9223372036854775808" } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
then {
assert result.exit_code == 0
assert views.stdout.added.exists(line, line.line.contains('"status":"error"') && line.line.contains("DBI Exception"))assert views.stderr.added.filter(line, line.line.contains("_statuslist")).size() == 0assert views.tasty_completion.added.size() == 1 && views.tasty_completion.removed.size() == 1assert views.tasty_completion.added[0].row.contains('"status":"error"')// Spec defect: DBIC exceptions are objects; jq_complete stores an empty// log for references. Compare the full runner text AND actual persistence.assert views.tasty_completion.added[0].row.contains('"log":""')assert views.stdout.added.exists(line, line.line == '{"preview_unchanged":true}') }
}
proof tastyjobs.render-size {
@tasty_native
example empty { fixture = {} , expected = 0 }example large { fixture = { count = 90, limit = "90", large = true }, expected = 90 } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == examples.expected }}
proof tastyjobs.render-values {
@tasty_native
example values { fixture = { rows = [{job = 1, action = "snapshot::properties", device_key = "z", port = "Gi1/0/é", username = "operator", userip = "192.0.2.1", log = "Unicode café — original", started = "2026-01-01 01:02:03", finished = "2026-01-01 02:03:04"}] } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then {
assert views.stderr.added.exists(line, line.line.contains("only_namespace") && line.line.contains("properties"))assert views.stderr.added.exists(line, line.line.contains("_statuslist") && line.line.contains("[]")) }
}
proof tastyjobs.retry {
@tasty_native
// Eligibility and priority use different null/zero predicates. In particular,// a user request with no last_defer is eligible even at max deferrals. example nullable { fixture = {
rows = [
{job = 1, action = "snapshot", device = "192.0.2.10", device_key = "a", username = "operator"},{job = 2, action = "snapshot", device = "192.0.2.20", device_key = "b", username = "operator"},{job = 3, action = "snapshot", device = "192.0.2.30", device_key = "c", username = "operator"},{job = 4, action = "snapshot", device = "192.0.2.40", device_key = "d"} ],
skips = [
{device = "192.0.2.10", deferrals = 10},{device = "192.0.2.20", deferrals = 0},{device = "192.0.2.30", deferrals = 10, last_defer = "2026-01-01 00:00:00"},{device = "192.0.2.40", deferrals = 10, last_defer = "2099-01-01 00:00:00"} ]
}, expected = 3 }
example exceptions { fixture = {
rows = [
{job = 1, action = "snapshot", device = "192.0.2.10", device_key = "a", username = "operator", entered = "2100-01-01 00:00:00"},{job = 2, action = "snapshot", device = "192.0.2.20", device_key = "b", username = "operator"},{job = 3, action = "snapshot", device = "192.0.2.30", device_key = "c"} ],
skips = [
{device = "192.0.2.10", deferrals = 10, last_defer = "2099-01-01 00:00:00"},{device = "192.0.2.20", deferrals = 10, last_defer = "2000-01-01 00:00:00"},{device = "192.0.2.30", deferrals = 10, last_defer = "2000-01-01 00:00:00"} ]
}, expected = 3 }
given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
then { assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == examples.expected }}
proof tastyjobs.roll-call {
@tasty_native
example enabled { fixture = { count = 3, roll_call = true } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
then {
assert views.stdout.added.exists(line, line.line == '{"log":"-","status":"info"}')assert views.stderr.added.size() == 0assert views.tasty_completion.added.size() == 1 && views.tasty_completion.removed.size() == 1assert views.stdout.added.exists(line, line.line == '{"preview_unchanged":true}') }
}
proof tastyjobs.rollback {
@tasty_native
example both_helpers { fixture = { rows = [{job = 10, action = "snapshot", device = "192.0.2.10", device_key = "z"}, {job = 1, action = "snapshot", device = "192.0.2.10", device_key = "a"}], discover_no = ["192.0.2.10"] } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
@tasty_done
}
proof tastyjobs.site-fallback {
forbid target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock"because "site-added tastyjobs plans are intentionally unsupported and must remain legacy"example plugin { fixture = { count = 3, site = true } } given tastyjobs_prepare(fixture)
when tastyjobs(fixture)
then {
assert views.stdout.added.exists(line, line.line == '{"log":"site tastyjobs completion","status":"done"}')assert views.stderr.added.exists(line, line.line == "site tastyjobs worker ran")assert views.stderr.added.filter(line, line.line.contains("job_priority")).size() == 3assert views.tasty_completion.added.size() == 1 && views.tasty_completion.removed.size() == 1assert views.stdout.added.exists(line, line.line == '{"preview_unchanged":true}') }
}
proof expirenodes.all-ports {
@expiry_native
example absent { fixture = {} }
example empty { fixture = { port = "" } }example zero { fixture = { port = "0" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line.contains('"Node":[7,1],"NodeIp":[5,1]')) }}
proof expirenodes.archive {
@expiry_native
example absent { fixture = { port = "edge" } }example empty { fixture = { port = "edge", extra = "" } }example zero { fixture = { port = "edge", extra = "0" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line == '{"summary":{"Node":[7,2],"NodeIp":[5,2],"NodeMonitor":[4,2],"NodeNbt":[4,2]},"wireless":2}') }}
proof expirenodes.different-port {
@expiry_native
example inactive-remaining { fixture = { port = "edge", extra = "remove" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line.contains('"NodeIp":[3,3]')) }}
proof expirenodes.disabled {
@expiry_native
example omitted { fixture = { mode = "disabled", auth = [{community = "unused"}] } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_unchanged
then { assert views.stdout.added.exists(line, line.line.contains('failed to report from any worker!') && line.line.contains('"status":"error"')) }}
proof expirenodes.frame-overbound {
@expiry_retained
example metadata { fixture = { metadata_unit = "x", metadata_repeat = 65536, extra = "remove", port = "edge" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line.contains('"Node":[4,3]')) }}
proof expirenodes.inactive-selected { @expiry_native
example archive { fixture = { port = "edge", extra = "", inactive_selected = true } }example remove { fixture = { port = "edge", extra = "remove", inactive_selected = true } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then {
assert views.stdout.added.exists(line, line.line == (examples.fixture.extra == "remove"? '{"summary":{"Node":[4,3],"NodeIp":[3,3],"NodeMonitor":[2,2],"NodeNbt":[2,2]},"wireless":2}': '{"summary":{"Node":[7,2],"NodeIp":[5,2],"NodeMonitor":[4,2],"NodeNbt":[4,2]},"wireless":2}')) }
}
proof expirenodes.literal-port {
@expiry_native
example edge { fixture = { port = "edge" } }example quoted { fixture = { port = "uplink ' 雪 %_", literal = true } }example double-zero { fixture = { port = "00", literal = true } }example boundary { fixture = { port_unit = "é", port_repeat = 128, literal = true } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line.contains('"Node":[7,2],"NodeIp":[5,2]')) }}
proof expirenodes.lookup-error {
@expiry_observation
exclude views.postgres
where view.resource == "parity://connection/expiry_no_select" && view.request.sql.startsWith("UPDATE admin SET finished")because "this failed-lookup completion binds localtime strings not decoded as clocks on the restricted session; exact exception/log identity, started/finished, status and all Admin columns are checked by the driver and persisted state remains compared"example rejected { fixture = { mode = "deny-lookup" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_unchanged
then {
assert views.stdout.added.exists(line, line.line.contains('"status":"error"') && line.line.contains('error running job:') && line.line.contains('permission denied for table device_ip'))assert views.stdout.added.exists(line, line.line == '{"legacy_workers":false}') }
}
proof expirenodes.missing {
@expiry_native
example absent { fixture = { device = null } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_unchanged
then { assert views.stdout.added.exists(line, line.line.contains('"status":"error"') && line.line.contains('Missing device (-d).')) }}
proof expirenodes.namespace {
@expiry_retained
example site { fixture = { mode = "namespace" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_unchanged
then { assert views.stdout.added.exists(line, line.line.contains('failed to report from any worker!') && line.line.contains('"status":"error"')) }}
proof expirenodes.no-credentials {
@expiry_native
example empty { fixture = {} }
example acl { fixture = { auth = [{community = "unused", only = ["203.0.113.0/24"]}] } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
}
proof expirenodes.no-match {
@expiry_native
example empty { fixture = { port = "absent" } }example remove { fixture = { port = "absent", extra = "remove" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
@expiry_unchanged
}
proof expirenodes.output {
@expiry_debug
@expiry_native
example debug { fixture = { debug = true, device = "192.0.2.11", logger_format = "%L %m" } }example fractional-priority { fixture = { debug = true, direct_priority = 100.5, logger_format = "%L %m" } }example priority-spelling { fixture = { debug = true, direct_priority = "0100", logger_format = "%L %m" } }example numeric-only-integral-priority { fixture = { debug = true, numeric_only_integral_priority = true, logger_format = "%L %m" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then {
assert views.stderr.added.exists(line, line.line.contains('Internal::BackendFQDN'))assert views.stderr.added.exists(line, line.line.contains('Internal::SNMPFastDiscover'))assert views.stderr.added.exists(line, line.line.contains('running with configured SNMP timeouts'))assert views.stderr.added.exists(line, line.line.contains('ExpireNodes is able to run'))assert views.stderr.added.exists(line, line.line.contains('Expired nodes for 192.0.2.10')) }
}
proof expirenodes.port-overbound {
@expiry_retained
example utf8 { fixture = { port_unit = "é", port_repeat = 129, literal = true, extra = "remove" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line.contains('"Node":[4,3]')) }}
proof expirenodes.quiet {
@expiry_native
example metadata { fixture = { prior_log = "previous job text" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stderr.added.size() == 0 }}
proof expirenodes.remove-all-ports {
@expiry_native
example absent { fixture = { extra = "remove" } }example empty { fixture = { port = "", extra = "remove" } }example zero { fixture = { port = "0", extra = "remove" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line == '{"summary":{"Node":[3,2],"NodeIp":[2,2],"NodeMonitor":[1,1],"NodeNbt":[1,1]},"wireless":1}') }}
proof expirenodes.repeat {
@expiry_native
example archive { fixture = { port = "edge", repeat = true } }example remove { fixture = { port = "edge", extra = "remove", repeat = true } }given prepared = expirenodes(phase = "prepare", fixture)given first = expirenodes(phase = "run", fixture)given queued = expirenodes(phase = "requeue", fixture)when expirenodes(phase = "run", fixture) @expiry_done
@expiry_unchanged
}
proof expirenodes.resolved {
@expiry_native
example management { fixture = {} }example alias { fixture = { device = "192.0.2.11" } }example ipv6 { fixture = { device = "2001:db8::10", switch = "2001:db8::10" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line.contains('"Node":[7,1],"NodeIp":[5,1]')) }}
proof expirenodes.roll-call {
@expiry_debug
@expiry_native
example wrappers { fixture = { mode = "roll-call", debug = true, logger_format = "%L %m" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_unchanged
then { assert views.stdout.added.exists(line, line.line.contains('"status":"info"') && line.line.contains('"log":"-"')) }}
proof expirenodes.rollback {
@expiry_native
example archive { fixture = { mode = "rollback" } }example remove { fixture = { mode = "rollback", extra = "remove" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
@expiry_unchanged
then { assert views.stderr.added.exists(line, line.line.contains('went out of scope without explicit commit or error. Rolling back.')) }}
proof expirenodes.same-port {
@expiry_native
example different-switch-vlan { fixture = { port = "edge", extra = "remove" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line.contains('"Node":[4,3],"NodeIp":[3,3]')) }}
proof expirenodes.shared-archive {
@expiry_native
example shared { fixture = { port = "edge" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line.contains('"Node":[7,2]')) }}
proof expirenodes.site {
@expiry_retained
example extra { fixture = { mode = "site" } }example stale { fixture = { mode = "stale" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) then {
assert result.exit_code == 0
assert views.stderr.added.filter(line, line.line == 'expiry site worker ran').size() == 1assert views.stdout.added.exists(line, line.line.contains('"log":"expiry site completed"') && line.line.contains('"status":"done"')) }
}
proof expirenodes.split-binding {
@expiry_native
example separate { fixture = { mode = "split", port = "edge", extra = "remove" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line.contains('"Node":[4,3],"NodeIp":[3,3]')) }}
proof expirenodes.truthy {
@expiry_native
example no { fixture = { port = "edge", extra = "no" } }example false { fixture = { port = "edge", extra = "false" } }example double-zero { fixture = { port = "edge", extra = "00" } }example space { fixture = { port = "edge", extra = " " } }example json { fixture = { port = "edge", extra = "{\"remove\":false}" } }example unicode { fixture = { port = "edge", extra = "雪" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line == '{"summary":{"Node":[4,3],"NodeIp":[3,3],"NodeMonitor":[2,2],"NodeNbt":[2,2]},"wireless":2}') }}
proof expirenodes.unknown {
@expiry_retained
example orphan { fixture = { mode = "unknown", switch = "192.0.2.99", device = "192.0.2.99" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_done
then { assert views.stdout.added.exists(line, line.line.contains('"Node":[7,1]')) }}
proof expirenodes.write-error {
@expiry_debug
@expiry_native
example archive { fixture = { mode = "deny-write", debug = true, logger_format = "%L %m" } }example remove { fixture = { mode = "deny-write", extra = "remove", debug = true, logger_format = "%L %m" } }given prepared = expirenodes(phase = "prepare", fixture)when expirenodes(phase = "run", fixture) @expiry_unchanged
then {
assert views.stdout.added.exists(line, line.line.contains('"status":"error"') && line.line.contains('permission denied for table node_wireless') && line.line.contains('"reference_log":true') && line.line.contains('"saved_log":""'))assert views.stderr.added.exists(line, line.line.contains('permission denied for table node_wireless')) }
}
@getapikey_native, @getapikey_observation, @expiry_observation, @expiry_debug, @expiry_native, @expiry_retained, @expiry_done, @expiry_unchanged, @tasty_native, @tasty_done
@getapikey_native = {
require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock" && view.phase == "when"
&& view.request.participants.exists(p, p.written.size > 0 && p.read.size > 0)because "native cases must send the production executor a request and receive its answer" forbid target views.process
where view.phase == "when" && (view.resource.contains("perl") || view.resource.contains("netdisco-do"))because "the native implementation must not spawn the legacy worker to obtain its answer"// The shared driver also counts production run_workers invocations and// fails every native case if any legacy phase executes after a decline.}
@getapikey_observation = {
differs at views.postgres_state.added.*.after.rows.*.creationwhere legacy.matches("^[0-9]{4}-[0-9]{2}-[0-9]{2}T.*$") && target.matches("^[0-9]{4}-[0-9]{2}-[0-9]{2}T.*$")because "production login creates user_log timestamps independently; row identities, messages, and all other fields remain compared"differs at views.postgres_state.added.*.after.rows.*.last_onwhere legacy.matches("^[0-9]{4}-[0-9]{2}-[0-9]{2}T.*$") && target.matches("^[0-9]{4}-[0-9]{2}-[0-9]{2}T.*$")because "production authentication updates last_on independently; the driver checks every worker user column against its own pre-worker row"differs at views.postgres_state.added.*.after.rows.*.tokenwhere legacy.matches("^[0-9a-f]{32}$") && target.matches("^[0-9a-f]{32}$")because "production login and getapikey mint independent MD5 tokens; the driver checks exact token identity, preservation or replacement, and provider acceptance"differs at views.postgres_state.added.*.after.rows.*.token_from where legacy > 0 && target > 0
because "production login records each subject's current epoch; the driver checks token age and exact untouched user columns" exclude views.postgres
where view.request.sql.startsWith("SELECT ") && view.request.sql.contains("FROM users me")|| view.request.sql.startsWith("SELECT set_config('statement_timeout'")|| view.request.sql.startsWith("SELECT me.job, me.entered, me.started, me.finished")because "DBIC text and Rust binary user rows and session deadline setup are implementation details; the driver checks every user column, exact token/log identity, provider acceptance and completion, while persisted state and all writes remain compared" exclude views.postgres_state
where view.resource == "parity://connection/database/database/public.admin"|| view.resource == "parity://connection/no_update/database/public.admin"|| view.resource == "parity://connection/expiry_no_select/database/public.admin"because "the normalized Admin view retains every column; the driver verifies the exact saved log against the worker and persisted key before normalizing only its random key" exclude views.postgres
where view.request.sql.startsWith("UPDATE admin SET finished")|| view.request.sql.startsWith("SELECT me.job, me.entered, me.started, me.finished") && view.request.sql.contains("FROM admin me WHERE ( me.job =")because "these completion write/read captures embed random keys in prose; the full normalized Admin view and exact per-subject completion/key checks retain their behavior"}
@expiry_observation = {
exclude views.postgres
where view.phase == "given" && (view.request.sql.startsWith("SELECT me.username,") || view.request.sql.startsWith("UPDATE users SET token = md5(random()::text)"))because "authenticated fixture setup mints random login tokens and epochs; production queue input, user state, all when-phase calls and effects remain compared" exclude views.postgres
where view.phase == "when" && view.request.sql == "UPDATE admin SET finished = $1, log = $2, started = $3, status = $4 WHERE ( job = $5 )"because "opaque poller localtime binds are checked as exact saved instants/status/log by the driver; full Admin state, queue identity, claim writes and node operations remain compared" exclude views.postgres
where view.request.sql.startsWith("SELECT me.ip, me.creation") && view.request.sql.contains("age(LOCALTIMESTAMP")because "Device.with_times derives drifting ages unused by expiry; the driver checks all stored Device/DeviceIp/DevicePort columns unchanged, canonical completion, and exact node effects; alias queries, database errors, writes and persisted state remain compared"}
@expiry_debug = {
differs at views.stderr.added.*.linewhere legacy.matches("^ (info|debug) pol \\(1\\): (starting|wrapping up) expirenodes job\\([0-9]+\\).* at [A-Z][a-z]{2} [A-Z][a-z]{2} +[0-9]+ [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]{4}$")&& target.matches("^ (info|debug) pol \\(1\\): (starting|wrapping up) expirenodes job\\([0-9]+\\).* at [A-Z][a-z]{2} [A-Z][a-z]{2} +[0-9]+ [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]{4}$")&& [" info pol (1): starting expirenodes job(10000) at "," info pol (1): wrapping up expirenodes job(10000) - status done at "," info pol (1): wrapping up expirenodes job(10000) - status error at "," info pol (1): wrapping up expirenodes job(10000) - status info at "].exists(prefix,legacy.startsWith(prefix) && target.startsWith(prefix))because "poller-owned localtime suffixes differ across processes; identical level, action, job identity, terminal status and order remain required, and persisted started/finished are checked by the driver"}
@expiry_native = {
exclude views.postgres
where view.phase == "given" && (view.request.sql.startsWith("SELECT me.username,") || view.request.sql.startsWith("UPDATE users SET token = md5(random()::text)"))because "authenticated fixture setup mints random login tokens and epochs; production queue input, user state, all when-phase calls and effects remain compared" exclude target views.postgres
where (view.phase == "when" || view.step == "first") && (view.request.sql == "SELECT set_config('statement_timeout', $1, false)" || view.request.sql == "SELECT host(ip) FROM device WHERE ip = $1::text::inet")because "Rust revalidates the runner-resolved stored IP and applies Runner's deadline per statement; legacy Runner resolves the same IP and enforces its deadline around the worker; canonical DeviceSkip, full device rows, errors and all node effects remain checked" map expiry_operations {
legacy {
calls = views.postgres.added.filter(call, (call.phase == "when" || call.step == "first") && (call.request.operation == "transaction" || call.request.sql.startsWith("UPDATE node") || call.request.sql.startsWith("DELETE FROM node")))into calls.map(call, {"resource": call.resource, "step": call.step, "tables": ["node", "node_ip", "node_nbt", "node_monitor", "node_wireless"].filter(table, call.request.sql.startsWith("UPDATE " + table + " ") || call.request.sql.startsWith("DELETE FROM " + table + " ")), "messages": call.response.messages}) }
target {
calls = views.postgres.added.filter(call, (call.phase == "when" || call.step == "first") && (call.request.operation == "transaction" || call.request.sql.startsWith("UPDATE node") || call.request.sql.startsWith("DELETE FROM node")))into calls.map(call, {"resource": call.resource, "step": call.step, "tables": ["node", "node_ip", "node_nbt", "node_monitor", "node_wireless"].filter(table, call.request.sql.startsWith("UPDATE " + table + " ") || call.request.sql.startsWith("DELETE FROM " + table + " ")), "messages": call.response.messages}) }
} because "Node.pm:85-145 and native repository perform the same ordered writes and transaction boundaries with different SQL spelling/bind protocols; compare every command count, error and transaction response at its database, alongside exact full node rows and rollback checks" exclude views.postgres
where (view.phase == "when" || view.step == "first") && view.request.sql == "UPDATE admin SET finished = $1, log = $2, started = $3, status = $4 WHERE ( job = $5 )"because "opaque poller localtime binds are checked as exact saved instants/status/log by the driver; full Admin state, queue identity, claim writes and node operations remain compared" exclude views.postgres
where (view.phase == "when" || view.step == "first") && view.request.sql.startsWith("SELECT me.job, me.entered, me.started, me.finished")&& (view.request.sql.contains("FROM admin me") || view.request.sql.contains("FROM ( WITH my_jobs AS"))because "DBIC Admin read projections mix volatile queue clocks with JSON-looking subaction text; manager selection/claim, unchanged queue identity, exact saved status/log, started/finished, full Admin state and writes are independently checked; no node operations are excluded" exclude views.postgres
where view.request.sql.startsWith("SELECT me.ip, me.creation") && view.request.sql.contains("age(LOCALTIMESTAMP")because "unused Device.with_times ages drift; full stored device identity, alias lookup, canonical completion, all node effects, errors and writes remain checked" exclude views.postgres
where (view.phase == "when" || view.step == "first") && view.resource == "parity://connection/provider"&& view.request.sql in ["SELECT me.version FROM dbix_class_schema_versions me ORDER BY installed DESC LIMIT $1", "SELECT me.version, me.installed FROM dbix_class_schema_versions me WHERE ( 1=0 )"]&& view.response.messages.all(message, message.type != "error")because "DBIC lazily reads schema versions on its expiry connection; Rust does not use DBIC versioning; only successful metadata reads are omitted, with provider schema/state, failures and all node operations still compared" require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock" && view.phase == "when"
&& view.request.participants.exists(p, p.written.size > 0 && p.read.size > 0)because "in-bound expiry must be answered by the production Rust executor" forbid target views.process
where view.actor.endsWith("/nd-worker-executor")because "Rust must not invoke legacy or any answer-producing process"differs at views.stdout.added.*.line on lines matching "^[{]\"legacy_workers\":(?:true|false)[}]$"because "native expiry must bypass every legacy phase; legacy executes its ordinary workers" then {
assert views.stdout.added.filter(line, line.line.startsWith('{"legacy_workers":')).size() > 0assert views.stdout.added.filter(line, line.line.startsWith('{"legacy_workers":')).all(line, line.line == (subject == "legacy" ? '{"legacy_workers":true}' : '{"legacy_workers":false}')) }
}
@expiry_retained = {
exclude views.postgres
where view.phase == "given" && (view.request.sql.startsWith("SELECT me.username,") || view.request.sql.startsWith("UPDATE users SET token = md5(random()::text)"))because "authenticated fixture setup mints random login tokens and epochs; production queue input, user state, all when-phase calls and effects remain compared" exclude views.postgres
where view.phase == "when" && view.request.sql == "UPDATE admin SET finished = $1, log = $2, started = $3, status = $4 WHERE ( job = $5 )"because "opaque poller localtime binds are checked as exact saved instants/status/log by the driver; full Admin state, queue identity, claim writes and node operations remain compared" exclude views.postgres
where view.request.sql.startsWith("SELECT me.ip, me.creation") && view.request.sql.contains("age(LOCALTIMESTAMP")because "unused Device.with_times ages drift; full stored device identity, alias lookup, canonical completion, all node effects, errors and writes remain checked" forbid target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock" && view.phase == "when"because "unsupported inputs/plans remain entirely on legacy before executor output or writes" then {
assert views.stdout.added.exists(line, line.line == '{"legacy_workers":true}') }
}
@expiry_done = {
then {
assert result.exit_code == 0
assert views.stdout.added.exists(line, line.line.contains('"status":"done"') && line.line.contains('Expired nodes for '))assert views.stdout.added.exists(line, line.line.contains('"reference_log":false')) }
}
@expiry_unchanged = {
then {
assert result.exit_code == 0
assert views.stdout.added.exists(line, line.line.contains('"unchanged":true')) }
}
@tasty_native = {
map observer_output {
legacy {
notices = views.stderr.added.filter(line, line.line.startsWith("NOTICE: parity_tastyjobs_write "))into [{"observer_only": notices.all(line, line.line.startsWith("NOTICE: parity_tastyjobs_write "))}] }
target {
notices = views.stderr.added.filter(line, line.line.startsWith("NOTICE: parity_tastyjobs_write "))into [{"observer_only": notices.all(line, line.line.startsWith("NOTICE: parity_tastyjobs_write "))}] }
} because "DBD::Pg prints fixture observer notices whereas rust-postgres does not; consume only those injected lines, whose full payloads are compared in preview_effects; all application output remains compared" exclude views.postgres
where view.phase == "when"
&& !(view.request.sql in ["ROLLBACK", "rollback"]|| (view.response.messages.size() > 0 && view.response.messages[0].type == "notice" && view.response.messages[0].fields.message.startsWith("parity_tastyjobs_write ")))because "DBIC/native SQL projections and connection ordering differ; write notices and rollback responses remain available to the identity mapping, alongside full output and database state" map preview_effects {
legacy {
writes = views.postgres.added.filter(call, call.phase == "when" && call.response.messages.size() > 0 && call.response.messages[0].type == "notice" && call.response.messages[0].fields.message.startsWith("parity_tastyjobs_write "))rollbacks = views.postgres.added.filter(call, call.phase == "when" && call.request.sql in ["ROLLBACK", "rollback"])assert writes.all(call, call.response.messages[0].type == "notice" && call.response.messages[0].fields.message.startsWith("parity_tastyjobs_write "))assert rollbacks.all(call, call.response.messages[0].tag == "ROLLBACK")into [{"writes": writes.map(call, call.response.messages[0].fields.message), "rollbacks": rollbacks.map(call, call.response.messages[0].tag)}] }
target {
writes = views.postgres.added.filter(call, call.phase == "when" && call.response.messages.size() > 0 && call.response.messages[0].type == "notice" && call.response.messages[0].fields.message.startsWith("parity_tastyjobs_write "))rollbacks = views.postgres.added.filter(call, call.phase == "when" && call.request.sql in ["ROLLBACK", "rollback"])assert writes.all(call, call.response.messages[0].type == "notice" && call.response.messages[0].fields.message.startsWith("parity_tastyjobs_write "))assert rollbacks.all(call, call.response.messages[0].tag == "ROLLBACK")into [{"writes": writes.map(call, call.response.messages[0].fields.message), "rollbacks": rollbacks.map(call, call.response.messages[0].tag)}] }
} because "fixture statement triggers observe actual Admin and DeviceSkip identities and values before rollback; compare notices and rollback outcomes rather than SQL spelling or affected counts alone" require target views.local_ipc
where view.resource == "unix+stream:///tmp/netdisco-parity-worker.sock" && view.phase == "when"
&& view.request.participants.exists(p, p.written.size > 0 && p.read.size > 0)because "tastyjobs must be answered by the production Rust executor, not Perl fallback" forbid target views.process
where view.actor.endsWith("/nd-worker-executor")because "the Rust executor must not spawn legacy or another answer-producing process"differs at views.stdout.added.*.line on lines matching "^[{]\"legacy_workers\":(?:true|false)[}]$"because "legacy runs its phases; a native target must not run the legacy callback" then {
assert views.stdout.added.exists(line, line.line == (subject == "legacy" ? '{"legacy_workers":true}' : '{"legacy_workers":false}')) }
}
@tasty_done = {
then {
assert result.exit_code == 0
assert views.stdout.added.exists(line, line.line == '{"log":"Showed the tastiest jobs","status":"done"}')assert views.tasty_completion.added.size() == 1 && views.tasty_completion.removed.size() == 1assert views.tasty_completion.added[0].row.contains('"status":"done"')assert views.tasty_completion.added[0].row.contains('Showed the tastiest jobs')assert views.stdout.added.exists(line, line.line == '{"preview_unchanged":true}') }
}