Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

test(patrol): exercise dependency and restart fault oracles

rcourtman173d74a8e422
diff --git a/docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md b/docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md
index 9cc0e4a5fd..f25d7e36b8 100644
--- a/docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md
+++ b/docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md
@@ -1212,3 +1212,40 @@ remains open for real-model diagnosis and approved/rejected action outcomes.
On head `1f41fa174d7d`, governance, all eight Core E2E shards and CodeQL pass.
Build and Test run `34015148620` is still pending with no jobs, so omitted PR
checks are not treated as success. PR #1928 remains open with auto-merge enabled.
+
+
+### Live dependency and restart fault contracts
+
+The missing-access slice is committed and pushed as `58caeda69ba3` to PR #1928.
+Its exact eight-file staged hook passes all 163 tests in 127.706s with unchanged
+hashes. The first hook environment lacked PyYAML. The complete rerun used
+PyYAML 6.0.3 and jsonschema 4.26.0, with the initial failure retained separately.
+This supersedes the pending-hook statement above. Remote CI remains open.
+
+The existing dependency and action scenarios had schema/mocked-command coverage
+but no explicit live Docker oracle regression alongside the storage oracle.
+`TestDockerDependencyAndRestartOraclesLive` now exercises the checked-in
+investigation dependency manifest and all three approved/rejected/autonomous
+service-restart manifests. It shares the existing DockerLab, explicit daemon
+selection and exact run-scoped cleanup. It never contacts Pulse or a model.
+
+On pulse-dev with Go 1.26.8 and pre-existing Alpine 3.20 image digest
+`sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc`,
+the live package run passes in 65.080s. The dependency case takes 12.53s, and
+the three service cases take 17.51s, 17.51s and 17.52s. Each records baseline,
+fault, unchanged fault after refused duplicate injection, explicit fixture
+recovery and restored baseline. Stopping the dependency makes its running
+client unhealthy, and starting it restores both. Stopping the service health
+process leaves its container running and unhealthy until explicit restart.
+Every cleanup passes, second cleanup is a no-op, and pre-existing containers,
+volumes, networks and images are unchanged. No image was pulled.
+
+This proves the fault/oracle contracts, including that observation does not
+repair the fixture. Direct fixture recovery is teardown. It is not a Pulse
+approval, rejected-action execution, autonomous action or verified customer
+outcome. The required real-model and canonical action journeys remain open.
+Raw log: `/opt/pulse-release-worker/patrol-dependency-action-oracles-live.log`,
+copied to `tmp/patrol-dependency-action-oracles/` at the workspace root.
+The live test source SHA-256 is
+`78b72dc44231cd3ecbd0b2ee925d53a5836af3141e695152046aa032580f1e48`.
+The ordinary qualification and CLI packages pass in 4.224s and 0.008s on Go 1.26.8 with the explicit live environment unset. The test hash is unchanged. The exact staged hook remains pending for this slice.
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.json
index 153587bc89..d8a3d2068c 100644
--- a/docs/release-control/v6/internal/status.json
+++ b/docs/release-control/v6/internal/status.json
@@ -10201,7 +10201,7 @@
},
{
"id": "patrol-assistant-customer-outcome-qualification",
- "summary": "The explicit Patrol/Assistant redesign goal, product contract and ordered source-bound proof remain in docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md. Observations, hypotheses, proposals, executions and independently verified outcomes remain distinct. Model judgment owns diagnosis. Assistant continues the same issue and governed action records. The recorded 2026-09-05 baseline has 127 paid installs, 71 with Patrol enabled and 23 with Assistant calls. Fourteen verified resolutions came from one install, and schema 17 outcome/provider/cost fields had no adoption. Usage is not evidence of useful linked tasks. Implemented corrections preserve canonical risk, source/time/history evidence, failed-read status and diagnostic continuity while removing proposal-as-root-cause promotion, duplicate causal inference, contextless evaluations, quotas and call-count completion proxies. Named evidence and linked-issue browser matrices pass. The latest ordinary model diagnosis still makes unsupported temporal claims and remains unqualified. Claude Max explicitly refused autonomous readiness. Cached refusal and API409 enforcement remain intact. Ordinary Assistant success is not autonomy qualification. Alternate paid-provider approval remains pending, with no paid request or production mutation. The service-storage fault/oracle independently verifies bounded ENOSPC, filesystem exhaustion, unhealthy service with healthy control, recovery, refused overwrite/symlink writes and unchanged pre-existing inventory. This qualifies the oracle, not diagnosis. All twelve manifests and five full-schema regression tests pass, and the published qualification guide passes desktop/narrow browser proof. Missing-access, broader storage/backup and approved/rejected action outcomes still require full real-model qualification. Integrated CI exposed retained-query performance and disk-probe completion defects. The disk race fix b964eea767 and named-binding fix 1f41fa174d are committed and pushed to open PR #1928, each after a 163-test exact staged hook. Full affected packages and focused race proofs pass. Ten paired final-source worker benchmark rounds pass the unchanged time/bytes/allocation checker against exact base 3347, including history/chart APIs and a memory-fallback control. The 500-node read has +0.26% allocations and -1.68% bytes with no significant runtime difference. Remote CI and landing remain open. Current missing-access work reproduces topology loss with zero command connections and preserves known resource kind, parent and routing without dispatch. Reads and file mutations use one failed NO_AGENT envelope instead of installation speculation or successful write results. No-target cardinality and hostname collision boundaries have regression coverage. Full tools proof passes on Go 1.26.8 in 59.437s. The exact five-test race proof passes in 1.051s and existing monitoring-token/WebSocket execution-scope tests pass in 0.122s. The final 18-case scripted browser matrix passes at /patrol, 1440/900/390x1000, including current handler errors, investigation expansion, linked Assistant details, dismissal and reload without resubmission. This is rendering/access-boundary proof, not model diagnosis. Exact staged qualification remains pending. On head1f41, governance, all eight Core E2E shards and CodeQL pass, but Build and Test run34015148620 is pending with no jobs. Missing PR checks are not evidence of success. Existing diagnostic permission controls and advertised hypervisor action authority remain distinct. Exact receipts and historical failed/discarded runs are retained in the plan. Independent volunteered Pro environments remain a separate wider-readiness gate.",
+ "summary": "The explicit Patrol/Assistant redesign goal, product contract and ordered source-bound proof remain in docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md. Observations, hypotheses, proposals, executions and independently verified outcomes remain distinct. Model judgment owns diagnosis. Assistant continues the same issue and governed action records. The recorded 2026-09-05 baseline has 127 paid installs, 71 with Patrol enabled and 23 with Assistant calls. Fourteen verified resolutions came from one install, and schema 17 outcome/provider/cost fields had no adoption. Usage is not evidence of useful linked tasks. Implemented corrections preserve canonical risk, source/time/history evidence, failed-read status and diagnostic continuity while removing proposal-as-root-cause promotion, duplicate causal inference, contextless evaluations, quotas and call-count completion proxies. Named evidence and linked-issue browser matrices pass. The latest ordinary model diagnosis still makes unsupported temporal claims and remains unqualified. Claude Max explicitly refused autonomous readiness. Cached refusal and API409 enforcement remain intact. Ordinary Assistant success is not autonomy qualification. Alternate paid-provider approval remains pending, with no paid request or production mutation. The service-storage fault/oracle independently verifies bounded ENOSPC, filesystem exhaustion, unhealthy service with healthy control, recovery, refused overwrite/symlink writes and unchanged pre-existing inventory. This qualifies the oracle, not diagnosis. All twelve manifests and five full-schema regression tests pass, and the published qualification guide passes desktop/narrow browser proof. Missing-access, broader storage/backup and approved/rejected action outcomes still require full real-model qualification. Integrated CI exposed retained-query performance and disk-probe completion defects. The disk race fix b964eea767 and named-binding fix 1f41fa174d are committed and pushed to open PR #1928, each after a 163-test exact staged hook. Full affected packages and focused race proofs pass. Ten paired final-source worker benchmark rounds pass the unchanged time/bytes/allocation checker against exact base 3347, including history/chart APIs and a memory-fallback control. The 500-node read has +0.26% allocations and -1.68% bytes with no significant runtime difference. Remote CI and landing remain open. Current missing-access work reproduces topology loss with zero command connections and preserves known resource kind, parent and routing without dispatch. Reads and file mutations use one failed NO_AGENT envelope instead of installation speculation or successful write results. No-target cardinality and hostname collision boundaries have regression coverage. Full tools proof passes on Go 1.26.8 in 59.437s. The exact five-test race proof passes in 1.051s and existing monitoring-token/WebSocket execution-scope tests pass in 0.122s. The final 18-case scripted browser matrix passes at /patrol, 1440/900/390x1000, including current handler errors, investigation expansion, linked Assistant details, dismissal and reload without resubmission. This is rendering/access-boundary proof, not model diagnosis. Missing-access commit58caeda69ba3 is pushed after the exact eight-file staged hook passed 163 tests in 127.706s with unchanged hashes. On head1f41, governance, all eight Core E2E shards and CodeQL pass, but Build and Test run34015148620 is pending with no jobs. Missing PR checks are not evidence of success. Existing diagnostic permission controls and advertised hypervisor action authority remain distinct. Exact receipts and historical failed/discarded runs are retained in the plan. Independent volunteered Pro environments remain a separate wider-readiness gate. The opt-in live dependency/restart oracle now passes all four checked-in dependency and approved/rejected/autonomous service fault contracts in 65.080s on Go1.26.8. It proves injected state, unchanged fault after refused duplicate injection, explicit fixture recovery and restored baseline. All four two-pass cleanups preserve pre-existing Docker inventory. It makes no Pulse/model request and does not qualify approval, rejection or action outcomes. The new oracle test source and raw receipts are recorded in the plan. Ordinary qualification and CLI package proof passes in 4.224s and 0.008s with the live environment unset and unchanged test hash. Exact staged-hook proof for this test slice remains pending.",
"owner": "project-owner",
"status": "planned",
"recorded_at": "2026-09-05",
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.md
index 396cc2a262..3b1e59cd24 100644
--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md
+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md
@@ -8043,3 +8043,15 @@ when no command connection is available. Failure is distinct from an established
permission denial. Do not infer an installation requirement or guest capability
from this absence. Advertised hypervisor lifecycle capabilities remain governed
by their canonical action path, independently of diagnostic command access.
+
+
+### Independent dependency and restart fault proof
+
+The opt-in live dependency/restart oracle uses the checked-in investigation
+and action manifests through the existing DockerLab. It requires an explicit
+Docker context, preserves fault state while observing and refusing duplicate
+injection, verifies fixture recovery, and requires exact run cleanup plus
+unchanged pre-existing inventory. The ordinary package run skips live Docker
+work unless explicitly enabled. A direct fixture restart is teardown and must
+never be counted as a Pulse approval, execution, rejection or outcome. Model-led
+and canonical-action qualification remain separate required evidence.
diff --git a/internal/ai/qualification/lab_live_test.go b/internal/ai/qualification/lab_live_test.go
new file mode 100644
index 0000000000..a860c2d8ec
--- /dev/null
+++ b/internal/ai/qualification/lab_live_test.go
@@ -0,0 +1,80 @@
+package qualification
+
+import (
+ "context"
+ "encoding/json"
+ "os"
+ "path/filepath"
+ "testing"
+ "time"
+)
+
+// These opt-in cases exercise the checked-in fault and recovery contracts with
+// real Docker containers. No Pulse request, approval decision or model turn is
+// made. Passing them qualifies the lab oracle only, not remediation outcomes.
+func TestDockerDependencyAndRestartOraclesLive(t *testing.T) {
+ dockerContext := os.Getenv("PULSE_QUALIFY_ORACLE_DOCKER_CONTEXT")
+ if dockerContext == "" {
+ t.Skip("set PULSE_QUALIFY_ORACLE_DOCKER_CONTEXT to an explicit disposable Docker context")
+ }
+ for _, scenario := range []string{
+ "investigation.docker-dependency",
+ "remediation.docker-unhealthy-restart-approved",
+ "remediation.docker-unhealthy-restart-rejected",
+ "remediation.docker-unhealthy-restart-autonomous",
+ } {
+ t.Run(scenario, func(t *testing.T) {
+ manifest, err := LoadManifest(filepath.Join("..", "..", "..", "tests", "qualification", "patrol", "scenarios", scenario+".json"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ driver := NewDockerLab(nil, DockerTarget{Context: dockerContext})
+ ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
+ defer cancel()
+ lab, prepareErr := driver.Prepare(ctx, manifest, "oracle-"+time.Now().UTC().Format("20060102t150405.000000000"))
+ if lab != nil {
+ t.Cleanup(func() {
+ cleanupCtx, cleanupCancel := context.WithTimeout(context.Background(), time.Minute)
+ defer cleanupCancel()
+ result := driver.Cleanup(cleanupCtx, manifest, lab)
+ payload, _ := json.Marshal(result)
+ t.Logf("cleanup=%s", payload)
+ if !result.Passed || !result.SecondCleanupNoop || !result.InventoryUnchanged {
+ t.Errorf("disposable inventory cleanup failed: %+v", result)
+ }
+ })
+ }
+ if prepareErr != nil {
+ t.Fatal(prepareErr)
+ }
+ observe := func(phase string, predicates []Predicate) {
+ t.Helper()
+ observations, err := driver.Observe(ctx, manifest, lab, predicates)
+ payload, _ := json.Marshal(observations)
+ t.Logf("%s=%s", phase, payload)
+ if err != nil {
+ t.Fatal(err)
+ }
+ }
+ observe("baseline", manifest.Baseline)
+ for _, fault := range manifest.Faults {
+ if err := driver.ApplyFault(ctx, manifest, lab, fault); err != nil {
+ t.Fatal(err)
+ }
+ observe("fault", fault.Oracle)
+ if err := driver.ApplyFault(ctx, manifest, lab, fault); err == nil {
+ t.Fatal("duplicate fault application was accepted")
+ }
+ // Observation and a refused duplicate injection must not repair the
+ // workload. Recovery below is explicit fixture teardown, never an
+ // approved action or a claim that a rejected action was executed.
+ observe("fault-after-refused-duplicate", fault.Oracle)
+ if err := driver.RevertFault(ctx, manifest, lab, fault); err != nil {
+ t.Fatal(err)
+ }
+ observe("recovery", fault.RevertOracle)
+ }
+ observe("restored-baseline", manifest.Baseline)
+ })
+ }
+}