From 4fed24da153ea022b1270c236902560f02000e52 Mon Sep 17 00:00:00 2001 From: Sinity Date: Fri, 4 Sep 2026 11:48:04 +0200 Subject: [PATCH] fix(agentctl): make Sinex quick verification truthful --- .agentctl/project.toml | 4 +- .../src/events/payloads/mod.rs | 4 +- crate/sinex-primitives/src/lib.rs | 2 +- crate/sinexctl/src/commands/mod.rs | 4 +- crate/sinexctl/tests/validation_test.rs | 12 ++- crate/sinexd/src/api/rpc_registry.rs | 42 +++++----- .../src/automata/document_parser_test.rs | 6 +- ...gration.polylogue.attachment.observed.json | 77 +++++++++++++++++ .../integration.polylogue.block.observed.json | 77 +++++++++++++++++ ...ntegration.polylogue.lineage.observed.json | 77 +++++++++++++++++ ...ntegration.polylogue.message.observed.json | 77 +++++++++++++++++ ...ntegration.polylogue.session.observed.json | 77 +++++++++++++++++ ...tion.polylogue.session_event.observed.json | 77 +++++++++++++++++ ...integration.polylogue.session_indexed.json | 82 ------------------- .../integration.polylogue.usage.observed.json | 77 +++++++++++++++++ .../v1/prediction/prediction.registered.json | 51 ++++++++++++ .../v1/prediction/prediction.resolved.json | 43 ++++++++++ schemas/v1/registry.json | 62 +++++++++++++- xtask/src/command_docs.rs | 9 +- xtask/tests/pre_push_agentctl_lease_test.rs | 7 +- 20 files changed, 747 insertions(+), 120 deletions(-) create mode 100644 schemas/v1/integration.polylogue/integration.polylogue.attachment.observed.json create mode 100644 schemas/v1/integration.polylogue/integration.polylogue.block.observed.json create mode 100644 schemas/v1/integration.polylogue/integration.polylogue.lineage.observed.json create mode 100644 schemas/v1/integration.polylogue/integration.polylogue.message.observed.json create mode 100644 schemas/v1/integration.polylogue/integration.polylogue.session.observed.json create mode 100644 schemas/v1/integration.polylogue/integration.polylogue.session_event.observed.json delete mode 100644 schemas/v1/integration.polylogue/integration.polylogue.session_indexed.json create mode 100644 schemas/v1/integration.polylogue/integration.polylogue.usage.observed.json create mode 100644 schemas/v1/prediction/prediction.registered.json create mode 100644 schemas/v1/prediction/prediction.resolved.json diff --git a/.agentctl/project.toml b/.agentctl/project.toml index b4408ffe98..0f756baa35 100644 --- a/.agentctl/project.toml +++ b/.agentctl/project.toml @@ -45,8 +45,8 @@ result = "exit" cache = "tree+environment" [operations.verify_quick] -description = "Check the Nix flake format without starting development services" -exec = ["nix", "fmt", "--", "--check", "flake.nix"] +description = "Run database-free compile, lint, format, pattern, and Nix checks" +exec = ["xtask", "check", "--full", "--skip-preflight"] pool = "normal" result = "exit" cache = "tree+environment" diff --git a/crate/sinex-primitives/src/events/payloads/mod.rs b/crate/sinex-primitives/src/events/payloads/mod.rs index 7db6d958e2..d400f3e5bf 100644 --- a/crate/sinex-primitives/src/events/payloads/mod.rs +++ b/crate/sinex-primitives/src/events/payloads/mod.rs @@ -43,8 +43,8 @@ pub mod media; pub mod messaging; pub mod metrics; pub mod music; -pub mod process; pub mod prediction; +pub mod process; pub mod semantic; pub mod shell; pub mod social; @@ -82,8 +82,8 @@ pub use media::*; pub use messaging::*; pub use metrics::*; pub use music::*; -pub use process::*; pub use prediction::*; +pub use process::*; pub use semantic::*; pub use shell::*; pub use social::*; diff --git a/crate/sinex-primitives/src/lib.rs b/crate/sinex-primitives/src/lib.rs index 924721bde2..4409d319b4 100644 --- a/crate/sinex-primitives/src/lib.rs +++ b/crate/sinex-primitives/src/lib.rs @@ -33,8 +33,8 @@ pub mod output_kind; pub mod pacing; pub mod parser; pub mod polylogue_protocol; -pub mod primitives; pub mod prediction_domain; +pub mod primitives; pub mod privacy; pub mod public_ref; pub mod query; diff --git a/crate/sinexctl/src/commands/mod.rs b/crate/sinexctl/src/commands/mod.rs index aaade34006..b2fa8d1cf5 100644 --- a/crate/sinexctl/src/commands/mod.rs +++ b/crate/sinexctl/src/commands/mod.rs @@ -18,8 +18,8 @@ pub mod lifecycle; pub mod llm; pub mod metrics; pub mod ops; -pub mod privacy; pub mod predictions; +pub mod privacy; pub mod query; pub mod query_units; pub mod record; @@ -62,8 +62,8 @@ pub use lifecycle::LifecycleCommands; pub use llm::LlmCommand; pub use metrics::MetricsCommands; pub use ops::OpsCommands; -pub use privacy::PrivacyCommand; pub use predictions::PredictionsCommand; +pub use privacy::PrivacyCommand; pub use query::QueryCommand; pub use query_units::QueryUnitsCommand; pub use record::RecordCommand; diff --git a/crate/sinexctl/tests/validation_test.rs b/crate/sinexctl/tests/validation_test.rs index a7f2a403e5..bd1cbe042e 100644 --- a/crate/sinexctl/tests/validation_test.rs +++ b/crate/sinexctl/tests/validation_test.rs @@ -252,8 +252,16 @@ async fn mcp_catalog_backing_methods_are_typed_read_only_rpc() -> TestResult<()> fn mcp_wire_tools_declare_read_only_annotations() -> TestResult<()> { for tool in tools() { let encoded = serde_json::to_value(&tool)?; - assert_eq!(encoded["annotations"]["readOnlyHint"], true, "{}", tool.name); - assert_eq!(encoded["annotations"]["destructiveHint"], false, "{}", tool.name); + assert_eq!( + encoded["annotations"]["readOnlyHint"], true, + "{}", + tool.name + ); + assert_eq!( + encoded["annotations"]["destructiveHint"], false, + "{}", + tool.name + ); } Ok(()) } diff --git a/crate/sinexd/src/api/rpc_registry.rs b/crate/sinexd/src/api/rpc_registry.rs index db18f2e77c..161fc6c5e6 100644 --- a/crate/sinexd/src/api/rpc_registry.rs +++ b/crate/sinexd/src/api/rpc_registry.rs @@ -533,27 +533,27 @@ fn build_registry_impl() -> RpcRegistry { handle_dlq_requeue, handle_documents_get, handle_documents_get_chunks, handle_documents_get_chunks_redacted, handle_documents_search, handle_events_annotate, handle_events_cards, handle_events_lineage, handle_events_query, - handle_events_relation_evidence, handle_events_structural_join, handle_health_effect_record, - handle_health_intake_record, - handle_hyprland_workspace_switch, handle_lifecycle_archive, handle_lifecycle_restore, - handle_lifecycle_status, handle_link_entities, handle_llm_budget_report, - handle_llm_embedding_estimate, handle_llm_prompts_list, handle_llm_route_explain, - handle_ops_cancel, handle_ops_get, handle_ops_list, handle_ops_start, - handle_predictions_register, handle_predictions_report, handle_predictions_resolve, - handle_privacy_policy_backend_add, handle_privacy_policy_dictionary_add, - handle_privacy_policy_field_bind, handle_privacy_policy_field_unbind, - handle_privacy_policy_list, handle_privacy_policy_rule_add, - handle_privacy_policy_rule_remove, handle_privacy_policy_rule_set_enabled, - handle_privacy_policy_scope_bind, handle_privacy_policy_seed_builtin, - handle_privacy_shadow_audit, handle_private_mode_disable_service, - handle_private_mode_enable_service, handle_private_mode_status_service, - handle_replay_approve_operation, handle_replay_cancel_operation, - handle_replay_create_operation, handle_replay_execute_operation, - handle_replay_list_operations, handle_replay_operation_status, - handle_replay_preview_operation, handle_replay_submit_operation, handle_retrieve_blob, - handle_runtime_drain, handle_runtime_health, handle_runtime_list, - handle_runtime_list_active, handle_runtime_resume, handle_runtime_set_horizon, - handle_semantic_epoch_create, handle_semantic_epoch_list, handle_semantic_lane_create, + handle_events_relation_evidence, handle_events_structural_join, + handle_health_effect_record, handle_health_intake_record, handle_hyprland_workspace_switch, + handle_lifecycle_archive, handle_lifecycle_restore, handle_lifecycle_status, + handle_link_entities, handle_llm_budget_report, handle_llm_embedding_estimate, + handle_llm_prompts_list, handle_llm_route_explain, handle_ops_cancel, handle_ops_get, + handle_ops_list, handle_ops_start, handle_predictions_register, handle_predictions_report, + handle_predictions_resolve, handle_privacy_policy_backend_add, + handle_privacy_policy_dictionary_add, handle_privacy_policy_field_bind, + handle_privacy_policy_field_unbind, handle_privacy_policy_list, + handle_privacy_policy_rule_add, handle_privacy_policy_rule_remove, + handle_privacy_policy_rule_set_enabled, handle_privacy_policy_scope_bind, + handle_privacy_policy_seed_builtin, handle_privacy_shadow_audit, + handle_private_mode_disable_service, handle_private_mode_enable_service, + handle_private_mode_status_service, handle_replay_approve_operation, + handle_replay_cancel_operation, handle_replay_create_operation, + handle_replay_execute_operation, handle_replay_list_operations, + handle_replay_operation_status, handle_replay_preview_operation, + handle_replay_submit_operation, handle_retrieve_blob, handle_runtime_drain, + handle_runtime_health, handle_runtime_list, handle_runtime_list_active, + handle_runtime_resume, handle_runtime_set_horizon, handle_semantic_epoch_create, + handle_semantic_epoch_list, handle_semantic_lane_create, handle_semantic_lane_diff_record_entity_relation, handle_semantic_lane_diffs_list, handle_semantic_lane_discard, handle_semantic_lane_outputs_list, handle_semantic_lane_outputs_seed_canonical_graph, diff --git a/crate/sinexd/src/automata/document_parser_test.rs b/crate/sinexd/src/automata/document_parser_test.rs index 57ff2a4e22..3c2a37f3b2 100644 --- a/crate/sinexd/src/automata/document_parser_test.rs +++ b/crate/sinexd/src/automata/document_parser_test.rs @@ -447,7 +447,11 @@ async fn document_parser_terminal_outputs_stamp_equivalence_key_and_semantics_ve .equivalence_key .as_deref() .expect("document.parsed equivalence_key must be set"); - let document_id = parsed.payload.get("document_id").and_then(|value| value.as_str()).expect("document_id"); + let document_id = parsed + .payload + .get("document_id") + .and_then(|value| value.as_str()) + .expect("document_id"); assert_eq!( parsed_key, sinex_primitives::derivation::derived_equivalence_key( diff --git a/schemas/v1/integration.polylogue/integration.polylogue.attachment.observed.json b/schemas/v1/integration.polylogue/integration.polylogue.attachment.observed.json new file mode 100644 index 0000000000..4d1acf49a5 --- /dev/null +++ b/schemas/v1/integration.polylogue/integration.polylogue.attachment.observed.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "An attachment reference observed in a verified revision.", + "properties": { + "line_index": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "manifest_digest": { + "type": "string" + }, + "material_id": { + "type": "string" + }, + "native_id": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "protocol_version": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "record_kind": { + "type": "string" + }, + "record_sha256": { + "type": "string" + }, + "revision_id": { + "type": "string" + }, + "segment_index": { + "format": "int32", + "type": "integer" + }, + "semantics_version": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "seq": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "session_id": { + "type": "string" + } + }, + "required": [ + "protocol_version", + "semantics_version", + "manifest_digest", + "revision_id", + "session_id", + "origin", + "native_id", + "record_id", + "record_kind", + "material_id", + "segment_index", + "line_index", + "seq", + "record_sha256" + ], + "title": "PolylogueAttachmentObservedPayload", + "type": "object", + "x-sinex-event-type": "integration.polylogue.attachment.observed", + "x-sinex-source": "integration.polylogue", + "x-sinex-version": "1.0.0" +} diff --git a/schemas/v1/integration.polylogue/integration.polylogue.block.observed.json b/schemas/v1/integration.polylogue/integration.polylogue.block.observed.json new file mode 100644 index 0000000000..42d01c1fec --- /dev/null +++ b/schemas/v1/integration.polylogue/integration.polylogue.block.observed.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A normalized message-block record observed in a verified revision.", + "properties": { + "line_index": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "manifest_digest": { + "type": "string" + }, + "material_id": { + "type": "string" + }, + "native_id": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "protocol_version": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "record_kind": { + "type": "string" + }, + "record_sha256": { + "type": "string" + }, + "revision_id": { + "type": "string" + }, + "segment_index": { + "format": "int32", + "type": "integer" + }, + "semantics_version": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "seq": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "session_id": { + "type": "string" + } + }, + "required": [ + "protocol_version", + "semantics_version", + "manifest_digest", + "revision_id", + "session_id", + "origin", + "native_id", + "record_id", + "record_kind", + "material_id", + "segment_index", + "line_index", + "seq", + "record_sha256" + ], + "title": "PolylogueBlockObservedPayload", + "type": "object", + "x-sinex-event-type": "integration.polylogue.block.observed", + "x-sinex-source": "integration.polylogue", + "x-sinex-version": "1.0.0" +} diff --git a/schemas/v1/integration.polylogue/integration.polylogue.lineage.observed.json b/schemas/v1/integration.polylogue/integration.polylogue.lineage.observed.json new file mode 100644 index 0000000000..03ab5ecd1f --- /dev/null +++ b/schemas/v1/integration.polylogue/integration.polylogue.lineage.observed.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A typed session-topology relation observed in a verified revision.", + "properties": { + "line_index": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "manifest_digest": { + "type": "string" + }, + "material_id": { + "type": "string" + }, + "native_id": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "protocol_version": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "record_kind": { + "type": "string" + }, + "record_sha256": { + "type": "string" + }, + "revision_id": { + "type": "string" + }, + "segment_index": { + "format": "int32", + "type": "integer" + }, + "semantics_version": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "seq": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "session_id": { + "type": "string" + } + }, + "required": [ + "protocol_version", + "semantics_version", + "manifest_digest", + "revision_id", + "session_id", + "origin", + "native_id", + "record_id", + "record_kind", + "material_id", + "segment_index", + "line_index", + "seq", + "record_sha256" + ], + "title": "PolylogueLineageObservedPayload", + "type": "object", + "x-sinex-event-type": "integration.polylogue.lineage.observed", + "x-sinex-source": "integration.polylogue", + "x-sinex-version": "1.0.0" +} diff --git a/schemas/v1/integration.polylogue/integration.polylogue.message.observed.json b/schemas/v1/integration.polylogue/integration.polylogue.message.observed.json new file mode 100644 index 0000000000..25eeb4821c --- /dev/null +++ b/schemas/v1/integration.polylogue/integration.polylogue.message.observed.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A normalized message record observed in a verified revision.", + "properties": { + "line_index": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "manifest_digest": { + "type": "string" + }, + "material_id": { + "type": "string" + }, + "native_id": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "protocol_version": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "record_kind": { + "type": "string" + }, + "record_sha256": { + "type": "string" + }, + "revision_id": { + "type": "string" + }, + "segment_index": { + "format": "int32", + "type": "integer" + }, + "semantics_version": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "seq": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "session_id": { + "type": "string" + } + }, + "required": [ + "protocol_version", + "semantics_version", + "manifest_digest", + "revision_id", + "session_id", + "origin", + "native_id", + "record_id", + "record_kind", + "material_id", + "segment_index", + "line_index", + "seq", + "record_sha256" + ], + "title": "PolylogueMessageObservedPayload", + "type": "object", + "x-sinex-event-type": "integration.polylogue.message.observed", + "x-sinex-source": "integration.polylogue", + "x-sinex-version": "1.0.0" +} diff --git a/schemas/v1/integration.polylogue/integration.polylogue.session.observed.json b/schemas/v1/integration.polylogue/integration.polylogue.session.observed.json new file mode 100644 index 0000000000..e714a097b9 --- /dev/null +++ b/schemas/v1/integration.polylogue/integration.polylogue.session.observed.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A session summary record observed in a verified Polylogue revision.", + "properties": { + "line_index": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "manifest_digest": { + "type": "string" + }, + "material_id": { + "type": "string" + }, + "native_id": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "protocol_version": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "record_kind": { + "type": "string" + }, + "record_sha256": { + "type": "string" + }, + "revision_id": { + "type": "string" + }, + "segment_index": { + "format": "int32", + "type": "integer" + }, + "semantics_version": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "seq": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "session_id": { + "type": "string" + } + }, + "required": [ + "protocol_version", + "semantics_version", + "manifest_digest", + "revision_id", + "session_id", + "origin", + "native_id", + "record_id", + "record_kind", + "material_id", + "segment_index", + "line_index", + "seq", + "record_sha256" + ], + "title": "PolylogueSessionObservedPayload", + "type": "object", + "x-sinex-event-type": "integration.polylogue.session.observed", + "x-sinex-source": "integration.polylogue", + "x-sinex-version": "1.0.0" +} diff --git a/schemas/v1/integration.polylogue/integration.polylogue.session_event.observed.json b/schemas/v1/integration.polylogue/integration.polylogue.session_event.observed.json new file mode 100644 index 0000000000..b9db517b9f --- /dev/null +++ b/schemas/v1/integration.polylogue/integration.polylogue.session_event.observed.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A session lifecycle event observed in a verified revision.", + "properties": { + "line_index": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "manifest_digest": { + "type": "string" + }, + "material_id": { + "type": "string" + }, + "native_id": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "protocol_version": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "record_kind": { + "type": "string" + }, + "record_sha256": { + "type": "string" + }, + "revision_id": { + "type": "string" + }, + "segment_index": { + "format": "int32", + "type": "integer" + }, + "semantics_version": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "seq": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "session_id": { + "type": "string" + } + }, + "required": [ + "protocol_version", + "semantics_version", + "manifest_digest", + "revision_id", + "session_id", + "origin", + "native_id", + "record_id", + "record_kind", + "material_id", + "segment_index", + "line_index", + "seq", + "record_sha256" + ], + "title": "PolylogueSessionEventObservedPayload", + "type": "object", + "x-sinex-event-type": "integration.polylogue.session_event.observed", + "x-sinex-source": "integration.polylogue", + "x-sinex-version": "1.0.0" +} diff --git a/schemas/v1/integration.polylogue/integration.polylogue.session_indexed.json b/schemas/v1/integration.polylogue/integration.polylogue.session_indexed.json deleted file mode 100644 index c7144efcbd..0000000000 --- a/schemas/v1/integration.polylogue/integration.polylogue.session_indexed.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$defs": { - "DateTime": { - "description": "RFC 3339 formatted date-time string", - "format": "date-time", - "type": "string" - } - }, - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Metadata snapshot emitted by the Polylogue daemon when a session is\nindexed or re-indexed in the archive.\n\nRaw session text is **not** included. Only structural metadata and\nderived signals are present, keeping the payload at privacy tier Sensitive\nrather than Secret.\n\nPublished to:\n`{env}.sinex.events.raw.integration.polylogue.session_indexed`", - "properties": { - "content_hash": { - "description": "SHA-256 hex digest of the canonical session content.\n\nComputed by the Polylogue daemon. Changes when any message is added,\nedited, or deleted. Used as the stable occurrence identity together with\n`session_id`.", - "type": "string" - }, - "cost_usd": { - "description": "Estimated session cost in USD, if the provider exposes it.", - "format": "double", - "type": [ - "number", - "null" - ] - }, - "created_at": { - "$ref": "#/$defs/DateTime", - "description": "When the session was created (from provider metadata)." - }, - "message_count": { - "description": "Total number of messages in the session.", - "format": "uint32", - "minimum": 0, - "type": "integer" - }, - "model_slug": { - "description": "Primary model slug used in the session (e.g. `\"claude-opus-4-5\"`).\n\nAbsent when the provider does not expose model information.", - "type": [ - "string", - "null" - ] - }, - "origin": { - "description": "AI provider origin that hosted the session.\n\nKnown values: `\"claude\"`, `\"chatgpt\"`, `\"codex\"`, `\"gemini\"`.", - "type": "string" - }, - "session_id": { - "description": "Stable polylogue session identifier (opaque string, typically a UUID).", - "type": "string" - }, - "tags": { - "default": [], - "description": "User-applied and auto-inferred tags.", - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "description": "Session title as set by the provider or the user.\n\nAbsent for untitled sessions.", - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "$ref": "#/$defs/DateTime", - "description": "When the session was last updated (from provider metadata)." - } - }, - "required": [ - "session_id", - "origin", - "content_hash", - "created_at", - "updated_at", - "message_count" - ], - "title": "PolylogueSessionIndexedPayload", - "type": "object", - "x-sinex-event-type": "integration.polylogue.session_indexed", - "x-sinex-source": "integration.polylogue", - "x-sinex-version": "1.0.0" -} diff --git a/schemas/v1/integration.polylogue/integration.polylogue.usage.observed.json b/schemas/v1/integration.polylogue/integration.polylogue.usage.observed.json new file mode 100644 index 0000000000..dc228f2632 --- /dev/null +++ b/schemas/v1/integration.polylogue/integration.polylogue.usage.observed.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A provider-usage record observed in a verified revision.", + "properties": { + "line_index": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "manifest_digest": { + "type": "string" + }, + "material_id": { + "type": "string" + }, + "native_id": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "protocol_version": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "record_kind": { + "type": "string" + }, + "record_sha256": { + "type": "string" + }, + "revision_id": { + "type": "string" + }, + "segment_index": { + "format": "int32", + "type": "integer" + }, + "semantics_version": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "seq": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "session_id": { + "type": "string" + } + }, + "required": [ + "protocol_version", + "semantics_version", + "manifest_digest", + "revision_id", + "session_id", + "origin", + "native_id", + "record_id", + "record_kind", + "material_id", + "segment_index", + "line_index", + "seq", + "record_sha256" + ], + "title": "PolylogueUsageObservedPayload", + "type": "object", + "x-sinex-event-type": "integration.polylogue.usage.observed", + "x-sinex-source": "integration.polylogue", + "x-sinex-version": "1.0.0" +} diff --git a/schemas/v1/prediction/prediction.registered.json b/schemas/v1/prediction/prediction.registered.json new file mode 100644 index 0000000000..64337dcb9a --- /dev/null +++ b/schemas/v1/prediction/prediction.registered.json @@ -0,0 +1,51 @@ +{ + "$defs": { + "DateTime": { + "description": "RFC 3339 formatted date-time string", + "format": "date-time", + "type": "string" + } + }, + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "due_at": { + "$ref": "#/$defs/DateTime" + }, + "horizon": { + "type": [ + "string", + "null" + ] + }, + "prediction_id": { + "format": "uuid", + "type": "string" + }, + "predictor": { + "type": "string" + }, + "probability": { + "format": "double", + "type": "number" + }, + "resolution_criteria": { + "type": "string" + }, + "statement": { + "type": "string" + } + }, + "required": [ + "prediction_id", + "statement", + "probability", + "resolution_criteria", + "due_at", + "predictor" + ], + "title": "PredictionRegisteredPayload", + "type": "object", + "x-sinex-event-type": "prediction.registered", + "x-sinex-source": "prediction", + "x-sinex-version": "1.0.0" +} diff --git a/schemas/v1/prediction/prediction.resolved.json b/schemas/v1/prediction/prediction.resolved.json new file mode 100644 index 0000000000..7feb66709b --- /dev/null +++ b/schemas/v1/prediction/prediction.resolved.json @@ -0,0 +1,43 @@ +{ + "$defs": { + "DateTime": { + "description": "RFC 3339 formatted date-time string", + "format": "date-time", + "type": "string" + } + }, + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "evidence_refs": { + "items": { + "type": "string" + }, + "type": "array" + }, + "outcome": { + "type": "boolean" + }, + "prediction_id": { + "format": "uuid", + "type": "string" + }, + "resolved_at": { + "$ref": "#/$defs/DateTime" + }, + "resolver": { + "type": "string" + } + }, + "required": [ + "prediction_id", + "outcome", + "resolved_at", + "resolver", + "evidence_refs" + ], + "title": "PredictionResolvedPayload", + "type": "object", + "x-sinex-event-type": "prediction.resolved", + "x-sinex-source": "prediction", + "x-sinex-version": "1.0.0" +} diff --git a/schemas/v1/registry.json b/schemas/v1/registry.json index a2750ed736..574cbb11c2 100644 --- a/schemas/v1/registry.json +++ b/schemas/v1/registry.json @@ -402,10 +402,52 @@ }, { "source": "integration.polylogue", - "event_type": "integration.polylogue.session_indexed", + "event_type": "integration.polylogue.attachment.observed", "version": "1.0.0", - "path": "integration.polylogue/integration.polylogue.session_indexed.json", - "content_hash": "9395a5ed2beb279231c0181f2b31a0dea3b927c4f1ffca4fc7897cca3f07aec8" + "path": "integration.polylogue/integration.polylogue.attachment.observed.json", + "content_hash": "98546ff8b8cc97aa204b2e736a4c07f7f3ea5c2c578a1b5e0e64571bfe997489" + }, + { + "source": "integration.polylogue", + "event_type": "integration.polylogue.block.observed", + "version": "1.0.0", + "path": "integration.polylogue/integration.polylogue.block.observed.json", + "content_hash": "529257760c4245b7fb0c70e98ec5046e635c529ac733103a30fd47b9cf74d99e" + }, + { + "source": "integration.polylogue", + "event_type": "integration.polylogue.lineage.observed", + "version": "1.0.0", + "path": "integration.polylogue/integration.polylogue.lineage.observed.json", + "content_hash": "2b08ca26b75528a25c8a59e38b2d5034a7c76f0433b3eb0046cd0423f5d2b57c" + }, + { + "source": "integration.polylogue", + "event_type": "integration.polylogue.message.observed", + "version": "1.0.0", + "path": "integration.polylogue/integration.polylogue.message.observed.json", + "content_hash": "b1428dc1ab264ea9656ac3dd13e3ebe30884f5857402a1c8ee2acca25b3e61a4" + }, + { + "source": "integration.polylogue", + "event_type": "integration.polylogue.session.observed", + "version": "1.0.0", + "path": "integration.polylogue/integration.polylogue.session.observed.json", + "content_hash": "d4403d9217a01e667e9c6d2acb775e89880065687e3ce3d7e9fd94a413ddf106" + }, + { + "source": "integration.polylogue", + "event_type": "integration.polylogue.session_event.observed", + "version": "1.0.0", + "path": "integration.polylogue/integration.polylogue.session_event.observed.json", + "content_hash": "25ed57a5e20a0102a626ab205196669e7ad458bd6d08cc94b1180f4e03c3b3b3" + }, + { + "source": "integration.polylogue", + "event_type": "integration.polylogue.usage.observed", + "version": "1.0.0", + "path": "integration.polylogue/integration.polylogue.usage.observed.json", + "content_hash": "50a1d2323ff7ff5ca78f28aac9f679a2eeaa2ab732769d358c6a8f076115e5ef" }, { "source": "irc", @@ -596,6 +638,20 @@ "path": "messenger/message.sent.json", "content_hash": "29d60e858cc1ec1a44bd8365e1361dabfce82c543dfcf929f5c40bd5b2335973" }, + { + "source": "prediction", + "event_type": "prediction.registered", + "version": "1.0.0", + "path": "prediction/prediction.registered.json", + "content_hash": "3f5e6f8e1dbf27d47ed1092d530d69a78a3c316e0941de2bef84c0f479b2cf20" + }, + { + "source": "prediction", + "event_type": "prediction.resolved", + "version": "1.0.0", + "path": "prediction/prediction.resolved.json", + "content_hash": "0146d7d9e2ad0f596e70f99909622bf1d49747651b5311405b3cc61b817c16c0" + }, { "source": "raindrop", "event_type": "bookmark.created", diff --git a/xtask/src/command_docs.rs b/xtask/src/command_docs.rs index d29bafb1eb..e390ba4f1b 100644 --- a/xtask/src/command_docs.rs +++ b/xtask/src/command_docs.rs @@ -200,8 +200,13 @@ const GUIDE_SECTIONS: &[GuideSection] = &[ path: "history context", fallback_summary: "Surface unresolved verification failures", when: "a fresh agent session needs the latest failed test/check nodes and postmortem pointers", - examples: &["xtask history context", "xtask history context --limit 20 --format json"], - notes: &["A later green test/check run clears the corresponding unresolved failures."], + examples: &[ + "xtask history context", + "xtask history context --limit 20 --format json", + ], + notes: &[ + "A later green test/check run clears the corresponding unresolved failures.", + ], }, GuideEntry { path: "history diagnostics", diff --git a/xtask/tests/pre_push_agentctl_lease_test.rs b/xtask/tests/pre_push_agentctl_lease_test.rs index ca03573c33..37b72bd26c 100644 --- a/xtask/tests/pre_push_agentctl_lease_test.rs +++ b/xtask/tests/pre_push_agentctl_lease_test.rs @@ -841,10 +841,13 @@ fn dev_services_cache_identity_excludes_allocated_ports() { assert_eq!(dev_services["cache"].as_str(), Some("tree+environment")); let verify_quick = &descriptor["operations"]["verify_quick"]; assert_eq!( - verify_quick["exec"].as_array().expect("quick exec").iter() + verify_quick["exec"] + .as_array() + .expect("quick exec") + .iter() .map(|value| value.as_str().expect("quick exec argument")) .collect::>(), - vec!["nix", "fmt", "--", "--check", "flake.nix"] + vec!["xtask", "check", "--full", "--skip-preflight"] ); assert_eq!(verify_quick["pool"].as_str(), Some("normal")); assert!(verify_quick.get("dependencies").is_none());