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.

fix(patrol): align qualification schema with action scenarios

rcourtmanab9e0e4d3d48
diff --git a/docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md b/docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md
index 2fc67229e3..906c6c9736 100644
--- a/docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md
+++ b/docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md
@@ -888,3 +888,25 @@ including nested failed-read evidence and the linked Assistant. This qualifies
the integrated presentation and context contract only. Exact staged hook and
remote landing are subsequent delivery checks. Real diagnosis and autonomous
action outcomes remain unqualified, and the provider refusal remains enforced.
+
+## Qualification catalogue contract, 2026-09-06
+
+The published JSON schema omitted `health_process_stop`, although the runtime
+implements it and all three approved, rejected and autonomous restart scenarios
+use it. A regression against the checked-in catalogue reproduced all three
+rejections. The schema now accepts that implemented injector. The regression
+reads the published enum and checks actual catalogue faults rather than keeping
+a second injector list. This is a fault-type compatibility check, not a full
+JSON Schema validator or a live-model result.
+
+At source base `f779bf064ab4`, the corrected catalogue validates all eleven
+scenarios and both qualification packages pass on pulse-dev (4.232s and 0.005s).
+The private worker log is `/opt/pulse-release-worker/patrol-schema-f779.log`.
+No provider request, fault injection or infrastructure mutation was performed.
+
+The existing live runner covers Docker health, process exit/restart and network
+dependency faults. It has no missing-access or storage/backup scenario or
+corresponding independent lab probe. The ordinary homelab file-read failure
+proof remains useful but does not close that autonomous qualification gap.
+Those cases require suitable independent ground truth through the existing
+qualification framework before the overall goal can complete.
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.json
index 39b42486cd..6583f6d250 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 maintainer requested a whole-design assessment and an explicit completion goal for Patrol and Assistant. The ordered plan and source-bound evidence are in docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md. The contract separates observations, model conclusions, proposals, execution and independently verified outcomes. Assistant continues the same issue and governed action records. The explicit explanation handoff is an implemented frontend foundation, not outcome qualification. The recorded 2026-09-05 latest-report, monitoring-active, multi-ping review excluded development and deployment proof and contained 127 paid installs, 71 with Patrol enabled and 23 with Assistant calls. Fourteen reported verified resolutions came from one install. Paid includes all non-free tiers. Activity cooccurrence does not establish a successful linked task, and schema 17 outcome/provider/cost fields had no adoption in that review. Real read-only homelab testing with Claude Opus 5 exposed missing canonical evidence, history target/tier gaps, premature context loss, unsupported causal claims and multi-minute responses. Prior history and handoff changes are recorded in the plan. The current working slice removes proposal rationale promotion into Root Cause and duplicate causal inference, preserves disk SMART/risk/source freshness and explicit remaining life, supports canonical disk get/health, and corrects collector cadence and status recovery. Targeted regressions and the live disk data path pass. Affected full worker package suites pass. The single-metric downsample regression and an adjacent bounded chart regression are corrected. Compiled presence statements are reused within a bounded set, but every query reads current data in one snapshot. The chart comparison shows no significant slowdown. Final metrics/database suites, focused concurrency race checks and the existing benchmark guard pass. Single-metric downsampling remains close to the performance threshold. PR #1920 CI subsequently failed nine benchmark comparisons against the actual base 4f9de86e, including small retained reads. The prior worker comparison used local source 5288b64d and does not establish final CI performance. The exact-base correction removes unnecessary plain-read presence probes, transaction wrappers and metric sorting while retaining canonical reconciliation and current snapshots. Full metrics/database and focused race suites pass. Ten alternating worker samples cover the previously failed CI comparisons without a significant greater-than-10% regression. Final CI landing qualification remains pending. One earlier SQLite native binding fault has no established root cause, although subsequent final full and focused race proofs pass. The latest live answers still infer collector startup from timestamp coincidence, claim continuous coverage from retained spacing and infer backup recovery from an online datastore. They fail diagnostic qualification. A serialized routing-envelope leak prompted a subscription transport correction with targeted regression proof, verified without routing prose in a completed real Assistant answer. A narrow answer-table overflow defect is corrected in the shared sanitized renderer with desktop, intermediate and mobile browser proof. The selected subscription provider explicitly refused autonomous Patrol readiness. The runtime and API preserve that refusal and prevent execution. Ordinary Assistant success is not autonomous proof. Required healthy/unhealthy, dependency, missing-access, backup/capacity and approved/rejected action qualification remains incomplete. Independent volunteered Pro environments are required before claiming repeatable customer value or wider readiness. The next diagnostic slice removes successful-read completion floors, evidence checkpoint instructions and generic call-count/silent-turn wrap-up policy. Full worker chat and AI suites pass. Browser qualification exposed and corrected mirrored-alert finding selection in the shared review lookup. Ordinary/mirrored records and linked uncertainty/failed-read context pass Playwright at 1440/900/390 widths. The detection slice removes contextless evaluation and assessment sessions, the flag-count turn ladder, signal-count report quotas and post-finding prompt replacement. The original conversation retains evidence tools and accepted records alongside errors. Full chat and AI packages, focused Patrol API tests and conversation race regressions pass. Source-bound scripted browser proof against the rebuilt runtime preserves linked uncertainty and failed reads at 1440/900/390 widths. Integration with current main and final landing verification remain pending. The latest ordinary Assistant recheck ended with context cancellation before a final answer, with eleven tool results retained. Its cancellation source and exact running binary correspondence are unresolved. The subsequent unchanged-runtime ordinary Assistant check completed in about 173 seconds, correctly distinguished utilisation from pressure, but still made unsupported temporal claims. It also exposed a failed file read marked successful. The shared file-read correction now preserves error status for absent agents and nonzero exits, with a final real ordinary file-read check returning success=false and showing the failed badge, preserved explanation and honest collection limit through reload. The linked-issue browser matrix passes again on the final rebuilt runtime. The full tools package and focused file-read race proof pass. Final integrated landing proof remains pending. Real-model/action outcome qualification remains open. Integrated main 3f74c0c27304 passes focused API proof and final frontend lint, type checking and three affected test files. Permanent browser fixtures pass 18 delivery-ordering and 12 light/dark Overview cases at 1440/900/390 widths after repairing shared card wrapping and heading readability. The final linked Patrol/Assistant browser matrix also passes. Exact staged hook and remote landing remain pending. These checks do not close the real-model/action outcome gap.",
+ "summary": "The maintainer requested a whole-design assessment and an explicit completion goal for Patrol and Assistant. The ordered plan and source-bound evidence are in docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md. The contract separates observations, model conclusions, proposals, execution and independently verified outcomes. Assistant continues the same issue and governed action records. The explicit explanation handoff is an implemented frontend foundation, not outcome qualification. The recorded 2026-09-05 latest-report, monitoring-active, multi-ping review excluded development and deployment proof and contained 127 paid installs, 71 with Patrol enabled and 23 with Assistant calls. Fourteen reported verified resolutions came from one install. Paid includes all non-free tiers. Activity cooccurrence does not establish a successful linked task, and schema 17 outcome/provider/cost fields had no adoption in that review. Real read-only homelab testing with Claude Opus 5 exposed missing canonical evidence, history target/tier gaps, premature context loss, unsupported causal claims and multi-minute responses. Prior history and handoff changes are recorded in the plan. The current working slice removes proposal rationale promotion into Root Cause and duplicate causal inference, preserves disk SMART/risk/source freshness and explicit remaining life, supports canonical disk get/health, and corrects collector cadence and status recovery. Targeted regressions and the live disk data path pass. Affected full worker package suites pass. The single-metric downsample regression and an adjacent bounded chart regression are corrected. Compiled presence statements are reused within a bounded set, but every query reads current data in one snapshot. The chart comparison shows no significant slowdown. Final metrics/database suites, focused concurrency race checks and the existing benchmark guard pass. Single-metric downsampling remains close to the performance threshold. PR #1920 CI subsequently failed nine benchmark comparisons against the actual base 4f9de86e, including small retained reads. The prior worker comparison used local source 5288b64d and does not establish final CI performance. The exact-base correction removes unnecessary plain-read presence probes, transaction wrappers and metric sorting while retaining canonical reconciliation and current snapshots. Full metrics/database and focused race suites pass. Ten alternating worker samples cover the previously failed CI comparisons without a significant greater-than-10% regression. Final CI landing qualification remains pending. One earlier SQLite native binding fault has no established root cause, although subsequent final full and focused race proofs pass. The latest live answers still infer collector startup from timestamp coincidence, claim continuous coverage from retained spacing and infer backup recovery from an online datastore. They fail diagnostic qualification. A serialized routing-envelope leak prompted a subscription transport correction with targeted regression proof, verified without routing prose in a completed real Assistant answer. A narrow answer-table overflow defect is corrected in the shared sanitized renderer with desktop, intermediate and mobile browser proof. The selected subscription provider explicitly refused autonomous Patrol readiness. The runtime and API preserve that refusal and prevent execution. Ordinary Assistant success is not autonomous proof. Required healthy/unhealthy, dependency, missing-access, backup/capacity and approved/rejected action qualification remains incomplete. Independent volunteered Pro environments are required before claiming repeatable customer value or wider readiness. The next diagnostic slice removes successful-read completion floors, evidence checkpoint instructions and generic call-count/silent-turn wrap-up policy. Full worker chat and AI suites pass. Browser qualification exposed and corrected mirrored-alert finding selection in the shared review lookup. Ordinary/mirrored records and linked uncertainty/failed-read context pass Playwright at 1440/900/390 widths. The detection slice removes contextless evaluation and assessment sessions, the flag-count turn ladder, signal-count report quotas and post-finding prompt replacement. The original conversation retains evidence tools and accepted records alongside errors. Full chat and AI packages, focused Patrol API tests and conversation race regressions pass. Source-bound scripted browser proof against the rebuilt runtime preserves linked uncertainty and failed reads at 1440/900/390 widths. Integration with current main and final landing verification remain pending. The latest ordinary Assistant recheck ended with context cancellation before a final answer, with eleven tool results retained. Its cancellation source and exact running binary correspondence are unresolved. The subsequent unchanged-runtime ordinary Assistant check completed in about 173 seconds, correctly distinguished utilisation from pressure, but still made unsupported temporal claims. It also exposed a failed file read marked successful. The shared file-read correction now preserves error status for absent agents and nonzero exits, with a final real ordinary file-read check returning success=false and showing the failed badge, preserved explanation and honest collection limit through reload. The linked-issue browser matrix passes again on the final rebuilt runtime. The full tools package and focused file-read race proof pass. Final integrated landing proof remains pending. Real-model/action outcome qualification remains open. Integrated main 3f74c0c27304 passes focused API proof and final frontend lint, type checking and three affected test files. Permanent browser fixtures pass 18 delivery-ordering and 12 light/dark Overview cases at 1440/900/390 widths after repairing shared card wrapping and heading readability. The final linked Patrol/Assistant browser matrix also passes. Exact staged hook and remote landing remain pending. These checks do not close the real-model/action outcome gap. The qualification schema now accepts the implemented health_process_stop injector used by all three action scenarios. A new catalogue/schema compatibility regression reproduced the old rejection. All eleven manifests validate and both qualification packages pass on pulse-dev. The existing live lab has no missing-access or storage/backup scenario or independent probe, so those required autonomous cases remain open. No live provider or infrastructure action was used for this schema proof.",
"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 80fb516a40..4e84aedbd2 100644
--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md
+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md
@@ -25,6 +25,12 @@ that same result. Successful reads retain their content and execution provenance
## Purpose
+The published Patrol qualification schema must accept the fault injectors used
+by the executable catalogue. `TestCatalogFaultInjectorsMatchPublishedSchema`
+checks the actual scenario faults against the schema enum, including the
+health-process fault shared by approved, rejected and autonomous restart cases.
+This compatibility proof does not establish live diagnosis or action outcomes.
+
Physical-disk reads in `pulse_metrics` and `pulse_query` list/get/health
share `physicalDiskSummaryFromResource`. The projection preserves canonical
resource status, per-source freshness, physical-disk risk reasons and optional SMART counters alongside
diff --git a/internal/ai/qualification/manifest_test.go b/internal/ai/qualification/manifest_test.go
index e19f9ee1c8..1f7d590573 100644
--- a/internal/ai/qualification/manifest_test.go
+++ b/internal/ai/qualification/manifest_test.go
@@ -23,6 +23,46 @@ func TestLoadCatalogValidatesCheckedInScenarios(t *testing.T) {
}
}
+func TestCatalogFaultInjectorsMatchPublishedSchema(t *testing.T) {
+ root := filepath.Join("..", "..", "..", "tests", "qualification", "patrol")
+ payload, err := os.ReadFile(filepath.Join(root, "patrol.qual.schema.json"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ // Follow the published schema to the fault injector enum. This checks the
+ // external authoring contract against the executable catalogue, without
+ // maintaining a second list of supported injectors in the test.
+ for _, key := range []string{"$defs", "fault", "properties", "injector", "properties", "kind", "enum"} {
+ var object map[string]json.RawMessage
+ if err := json.Unmarshal(payload, &object); err != nil {
+ t.Fatalf("schema path %s: %v", key, err)
+ }
+ payload = object[key]
+ if len(payload) == 0 {
+ t.Fatalf("schema path missing %s", key)
+ }
+ }
+ var allowed []string
+ if err := json.Unmarshal(payload, &allowed); err != nil {
+ t.Fatal(err)
+ }
+ catalog, err := LoadCatalog(filepath.Join(root, "scenarios"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, manifest := range catalog.Manifests {
+ for _, fault := range manifest.Faults {
+ found := false
+ for _, kind := range allowed {
+ found = found || fault.Injector.Kind == kind
+ }
+ if !found {
+ t.Errorf("%s fault %s uses injector %q rejected by the published schema", manifest.ID, fault.ID, fault.Injector.Kind)
+ }
+ }
+ }
+}
+
func TestManifestSchemaQualificationMinimumMatchesStatisticalFloor(t *testing.T) {
payload, err := os.ReadFile(filepath.Join("..", "..", "..", "tests", "qualification", "patrol", "patrol.qual.schema.json"))
if err != nil {
diff --git a/tests/qualification/patrol/patrol.qual.schema.json b/tests/qualification/patrol/patrol.qual.schema.json
index 829a921a8a..632527ed1b 100644
--- a/tests/qualification/patrol/patrol.qual.schema.json
+++ b/tests/qualification/patrol/patrol.qual.schema.json
@@ -52,7 +52,7 @@
"required": ["id", "causal_group", "target", "injector", "oracle", "expected_finding", "required"],
"properties": {
"id": {"type": "string"}, "causal_group": {"type": "string"}, "target": {"type": "string"}, "required": {"type": "boolean"}, "detect_within": {"type": "string"},
- "injector": {"type": "object", "additionalProperties": false, "required": ["kind", "resource"], "properties": {"kind": {"enum": ["marker_enable", "stop", "disconnect_network", "kill"]}, "resource": {"type": "string"}, "value": {"type": "string"}}},
+ "injector": {"type": "object", "additionalProperties": false, "required": ["kind", "resource"], "properties": {"kind": {"enum": ["marker_enable", "health_process_stop", "stop", "disconnect_network", "kill"]}, "resource": {"type": "string"}, "value": {"type": "string"}}},
"oracle": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/predicate"}},
"revert_oracle": {"type": "array", "items": {"$ref": "#/$defs/predicate"}},
"related_resources": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},