xrefkit 0.7.10__tar.gz → 0.7.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xrefkit-0.7.10/xrefkit.egg-info → xrefkit-0.7.12}/PKG-INFO +1 -1
- {xrefkit-0.7.10 → xrefkit-0.7.12}/pyproject.toml +1 -1
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_ci_workflow_invariants.py +3 -1
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_embedded_startup_pack.py +6 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_gateway_mcp.py +9 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_packaged_native_governance.py +5 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_project_management_materialization.py +18 -6
- xrefkit-0.7.12/tests/test_quality_issue_dashboard.py +189 -0
- xrefkit-0.7.12/tests/test_quality_issues.py +354 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_repository_startup_pack.py +24 -1
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/__init__.py +1 -1
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/dashboard.py +432 -6
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/contribution_returns.py +15 -3
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/server.py +65 -1
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/startup_contract_pack.py +62 -23
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/operations_cli.py +1 -1
- xrefkit-0.7.12/xrefkit/quality_issues.py +314 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/startup_sources/000_agent_entry.md +5 -6
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/startup_sources/011_startup_xref_routing.md +8 -7
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/startup_sources/015_shared_memory_operations.md +0 -2
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/startup_sources/016_uncertainty_protocol.md +0 -2
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/startup_sources/017_base_and_xref_layering.md +5 -5
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/startup_sources/053_context_direction_security_guard.md +0 -2
- {xrefkit-0.7.10 → xrefkit-0.7.12/xrefkit.egg-info}/PKG-INFO +1 -1
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit.egg-info/SOURCES.txt +3 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/LICENSE +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/README.md +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/setup.cfg +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_artifact_selected_family.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_attention_pet.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_attention_pet_client_protocol.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_attention_pet_codex_session.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_attention_pet_fit.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_azure_connection.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_azure_import.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_azure_recovery.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_azure_update_candidate.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_azure_writer.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_boundary_analysis.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_brownfield_csharp_structure_definitions.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_brownfield_file_editing_protocol.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_business_intake_conversation_definitions.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_business_intake_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_calibration_lint.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_catalog_preparation_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_check_skill_knowledge_xids.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_cli.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_code_constraint_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_collect_analyzer_sarif.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_compact_skill_logs.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_constraint_derivation_family_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_constraint_derivation_selected_family.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_contribution_adoption_bytes.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_contribution_returns.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_convert_to_xrefkit_skill.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_cs_scope_probe.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_csharp_commonality.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_csharp_naming_profile.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_ctx.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_cutover_readiness.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_dashboard.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_database_batch_definition_migration.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_decision_trace.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_design_business_intake_selected_family.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_design_planning_definition_migration.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_dotnet_definition_candidate.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_editorial_family_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_editorial_intake_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_editorial_selected_family.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_error_policy_audit.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_error_policy_locator.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_execution_binding.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_existing_skill_definition_batch.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_final_skilldefinition_batch.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_flow_selected_family.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_fm_multiroot.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_gate.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_gateway.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_gateway_skill_adapter.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_gateway_work_items.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_goal_desired_state.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_governance_entry.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_governance_host.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_host_precheck.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_human_evaluation.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_implementation_flow_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_implementation_review_selected_family.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_inbound_uploads.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_instruction_workflow.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_knowledge_relations_validator.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_language_review_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_legacy_guidance.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_legacy_migration.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_legacy_resources.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_mcp_package_routing.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_mcp_setup.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_mcp_subagent_startup.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_mcp_subagent_startup_integration.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_ontology_assessment_validator.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_os_family_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_os_knowledge_family_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_os_selected_family.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_ownership.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_package_knowledge_resolution.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_package_skill_run.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_packmeta.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_plan_markdown.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_plan_observation.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_project_quality_baseline.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_qa_report_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_reporting_profiles.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_reporting_quality.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_repository_skill_adoption.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_resource_provider.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_runtime_contracts.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_sarif_to_locator.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_security_definition_migration.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_site_release_metadata.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_skill_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_skill_definition_governance.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_skill_definition_mcp.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_skill_definition_runtime.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_skill_edits.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_skill_maturity_return.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_skill_release_compatibility.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_skill_runtime_audit.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_skillmeta.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_skills_sync.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_source_analysis_fragments.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_structure_catalog.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_subagent_startup.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_subagent_startup_boundaries.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_wbs.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_work_management.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_work_packages.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_workflow_family_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_xref.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_xrefkit_instance.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_xrefkit_tools.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_xrefkit_v2_discovery.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_xrefkit_v2_models.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/tests/test_xrefkit_v2_pipeline.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/__main__.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/__init__.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/__main__.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/client.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/client_protocol.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/codex_session.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/evaluator.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/model.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/presentation.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/profiles.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/scenarios.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/server.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/attention_pet/store.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/azure_connection.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/azure_import.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/azure_recovery.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/azure_update_candidate.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/azure_writer.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/boundary_analysis.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/catalog_cli.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/cli.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/contracts.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/ctx.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/decision_trace.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/discovery.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/execution_binding.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/execution_binding_cli.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/gate.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/gateway.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/goalstate.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/governance_entry.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/governance_entry_cli.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/governance_host.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/hashing.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/host_precheck.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/import_skill.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/instance.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/loaders.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/__init__.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/audit.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/bootstrap.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/catalog.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/cli.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/client_cache.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/client_flow.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/context_registry.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/context_token.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/contracts.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/contribution_adoption.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/dist.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/gateway.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/governed_overlays.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/inbound_uploads.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/knowledge_edits.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/legacy_guidance.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/legacy_migration.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/legacy_resources.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/ownership.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/repository.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/schemas.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/setup.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/skill_edits.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/skill_maturity.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/subagent_startup.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp/update_gate_intake.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/mcp_tools.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/models/__init__.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/models/common.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/models/effective_bundle.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/models/human_evaluation.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/models/local_manifest.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/models/package_manifest.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/models/run_log.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/models/server_config.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/models/skill_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/ownership.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/packmeta.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/plan_markdown.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/plan_observation.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/registry.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/reporting.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/reporting_profiles.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/repository_skills.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resolver.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resource_provider.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/attention_pet/client-state.schema.json +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/attention_pet/pet.css +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/attention_pet/pet.html +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/attention_pet/pet.js +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/contracts.json +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/current.json +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/generations/7a682a5272907354/contracts.json +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/generations/7a682a5272907354/model_body.md +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/generations/9929294385ccb7b0/contracts.json +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/generations/9929294385ccb7b0/model_body.md +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/model_body.md +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/base/startup_sources/yomiyasu_LICENSE.txt +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/migration/docs/guides/062_legacy_flow_skill_migration_guide.md +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/migration/knowledge/operations/130_legacy_flow_skill_migration_rules.md +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/migration/knowledge/organization/160_context_direction_guard_rules.md +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/migration/skills/os/legacy_flow_skill_migration/SKILL.v1.md +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/migration/skills/os/legacy_flow_skill_migration/references/legacy_flow_skill_migration_template.md +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/migration/skills/repository_adoption.json +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/resources/migration/tools/migrate_legacy_flow_skill.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/runlog.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/skill_definition.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/skill_definition_catalog.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/skill_definition_governance.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/skillmeta.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/skillrun.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/skills_sync.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/structure_catalog.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/subagent_startup.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/tools/__init__.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/tools/__main__.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/v2_cli.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/wbs.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/work_management.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/work_management_view.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/workspace.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit/xref.py +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit.egg-info/dependency_links.txt +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit.egg-info/entry_points.txt +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit.egg-info/requires.txt +0 -0
- {xrefkit-0.7.10 → xrefkit-0.7.12}/xrefkit.egg-info/top_level.txt +0 -0
|
@@ -11,7 +11,9 @@ WORKFLOWS = Path(__file__).resolve().parents[1] / ".github/workflows"
|
|
|
11
11
|
PACKAGES = {
|
|
12
12
|
"python-package.yml": ("Core", "v*.*.*", {"sdist-install-smoke", "skill-compatibility"}),
|
|
13
13
|
"python-skill-brownfield-package.yml": (
|
|
14
|
-
"Brownfield", "xrefkit-skills-brownfield-v*.*.*", {"sdist-install-smoke"}),
|
|
14
|
+
"Brownfield", "xrefkit-skills-brownfield-v*.*.*", {"sdist-install-smoke", "cross-package-integration"}),
|
|
15
|
+
"python-skill-project-management-package.yml": (
|
|
16
|
+
"Project Management", "xrefkit-skills-project-management-v*.*.*", {"sdist-install-smoke", "cross-package-integration"}),
|
|
15
17
|
"python-skill-csharp-package.yml": ("CSharp", "xrefkit-skills-csharp-v*.*.*", set()),
|
|
16
18
|
"python-skill-batch-regression-package.yml": (
|
|
17
19
|
"Batch regression", "xrefkit-skills-batch-regression-v*.*.*", {"sdist-install-smoke"}),
|
|
@@ -23,6 +23,12 @@ class EmbeddedStartupPackTests(unittest.TestCase):
|
|
|
23
23
|
self.assertEqual(pack["stale_sources"], [])
|
|
24
24
|
self.assertEqual(pack["based_on_hashes"], pack["source_hashes"])
|
|
25
25
|
self.assertTrue(pack["body"])
|
|
26
|
+
self.assertIn("--definition <path-to-SKILL.v1.md>", pack["body"])
|
|
27
|
+
self.assertIn(
|
|
28
|
+
"local-trial adoption binds approved trial governance and sealed evidence",
|
|
29
|
+
pack["body"],
|
|
30
|
+
)
|
|
31
|
+
self.assertIn("shared governance kickoff", pack["body"])
|
|
26
32
|
self.assertIn("## Japanese response writing rules", pack["body"])
|
|
27
33
|
self.assertIn("progress updates, questions, explanations, reports, and final answers", pack["body"])
|
|
28
34
|
self.assertIn("no named invocation is required", pack["body"])
|
|
@@ -231,6 +231,15 @@ def test_gateway_over_real_mcp_stdio_before_run_binding(request_and_policy, tmp_
|
|
|
231
231
|
"route_ref": "route-1", "reason": "initial"}]}})
|
|
232
232
|
assert not feedback.isError
|
|
233
233
|
assert feedback.structuredContent["first_acceptance_rate"] is None
|
|
234
|
+
feedback = await session.call_tool("evaluate_instruction_feedback", {"feedback": {
|
|
235
|
+
"version": 1, "cost_unit": "unknown", "attempts": [
|
|
236
|
+
{"id": "a", "goal_id": "g", "scope_revision": 0, "model": "capable",
|
|
237
|
+
"route_ref": "route-1", "reason": "initial"},
|
|
238
|
+
{"id": "b", "goal_id": "g", "scope_revision": 0, "model": "capable",
|
|
239
|
+
"route_ref": "route-1", "reason": "instruction_miss", "retry_of": "a",
|
|
240
|
+
"reason_evidence": "Synthetic missing heading correction"}]}})
|
|
241
|
+
assert feedback.structuredContent["quality_retries"] == 1
|
|
242
|
+
assert "quality_issue_follow_up" not in feedback.structuredContent
|
|
234
243
|
|
|
235
244
|
with tempfile.TemporaryFile(mode="w+", encoding="utf-8") as errlog:
|
|
236
245
|
anyio.run(scenario, errlog)
|
|
@@ -17,6 +17,11 @@ def fixture(tmp_path):
|
|
|
17
17
|
(tmp_path/'skill.md').write_bytes(source.read_bytes())
|
|
18
18
|
gov=json.loads((root/'governance/skills/progress_rules_setup.json').read_text())
|
|
19
19
|
gov['definition_content_hash']=hashlib.sha256(source.read_bytes()).hexdigest()
|
|
20
|
+
# This fixture tests draft refusal independently of the source's current
|
|
21
|
+
# maturity; the installed-package suite checks the real trial release.
|
|
22
|
+
gov.update(maturity='draft', observation_refs=[], governance_refs=[],
|
|
23
|
+
promotion={'decision':'not_requested','target_maturity':None,
|
|
24
|
+
'authority':None,'decided_at':None,'basis_refs':[]})
|
|
20
25
|
(tmp_path/'governance.json').write_text(json.dumps(gov))
|
|
21
26
|
manifest={'package_id':'test.native','package_type':'skill_package','version':'0.1.0',
|
|
22
27
|
'requires':{'xrefkit_core':'>=2.0.0 <3.0.0'},'contract':{},
|
|
@@ -9,15 +9,27 @@ from tools.materialize_project_management_package import generate, main, PACKAGE
|
|
|
9
9
|
|
|
10
10
|
def test_approved_bytes_cannot_be_rebound_after_link_transform(tmp_path):
|
|
11
11
|
root=Path(__file__).resolve().parents[1]
|
|
12
|
-
for rel in ['skills','governance','docs']:
|
|
12
|
+
for rel in ['skills','governance','docs','observations']:
|
|
13
13
|
# Source links resolve against the actual tree; copy only governed inputs,
|
|
14
14
|
# then use the real remaining targets through a full temporary fixture.
|
|
15
15
|
shutil.copytree(root/rel,tmp_path/rel)
|
|
16
|
-
gp=tmp_path/'governance/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
gp=tmp_path/'governance/packages/project-management/requirements_discovery_coordination.json'
|
|
17
|
+
gp.unlink()
|
|
18
|
+
with pytest.raises(ValueError,match='separate package governance'):
|
|
19
|
+
generate(tmp_path)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@pytest.mark.parametrize('damage',['hash','approval','identity'])
|
|
23
|
+
def test_transformed_trial_requires_exact_separate_approval(tmp_path,damage):
|
|
24
|
+
root=Path(__file__).resolve().parents[1]
|
|
25
|
+
for rel in ['skills','governance','docs','observations']:
|
|
26
|
+
shutil.copytree(root/rel,tmp_path/rel)
|
|
27
|
+
gp=tmp_path/'governance/packages/project-management/requirements_discovery_coordination.json'
|
|
28
|
+
record=json.loads(gp.read_text(encoding='utf-8'))
|
|
29
|
+
if damage=='hash':record['definition_content_hash']='0'*64
|
|
30
|
+
elif damage=='approval':record['promotion']['authority']='human:someone-else'
|
|
31
|
+
else:record['skill_id']='another_skill'
|
|
32
|
+
gp.write_text(json.dumps(record),encoding='utf-8')
|
|
21
33
|
with pytest.raises(ValueError,match='separate package governance'):
|
|
22
34
|
generate(tmp_path)
|
|
23
35
|
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"""Local HTTP tests with synthetic corrections and a test-only trusted issuer."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import http.client
|
|
5
|
+
import json
|
|
6
|
+
import threading
|
|
7
|
+
import uuid
|
|
8
|
+
from contextlib import contextmanager
|
|
9
|
+
|
|
10
|
+
import pytest
|
|
11
|
+
|
|
12
|
+
from xrefkit.dashboard import DashboardHandler, DashboardServer, _html_page, build_payload
|
|
13
|
+
from xrefkit.mcp.contribution_adoption import HmacHumanApprovalVerifier, issue_hmac_approval_assertion
|
|
14
|
+
from test_quality_issues import SECRET, save, fixture_args
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@contextmanager
|
|
18
|
+
def server(root, *, trusted=True):
|
|
19
|
+
instance = DashboardServer(("127.0.0.1", 0), DashboardHandler, root=root,
|
|
20
|
+
sessions_dir=root / "work/sessions", mcp_audit_log=root / "work/mcp/audit.jsonl",
|
|
21
|
+
approval_verifier=HmacHumanApprovalVerifier(SECRET) if trusted else None)
|
|
22
|
+
thread = threading.Thread(target=instance.serve_forever, daemon=True)
|
|
23
|
+
thread.start()
|
|
24
|
+
try:
|
|
25
|
+
yield instance
|
|
26
|
+
finally:
|
|
27
|
+
instance.shutdown()
|
|
28
|
+
instance.server_close()
|
|
29
|
+
thread.join(timeout=5)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def request(instance, path, body=None, headers=None):
|
|
33
|
+
conn = http.client.HTTPConnection("127.0.0.1", instance.server_port, timeout=10)
|
|
34
|
+
try:
|
|
35
|
+
base = {"Content-Type": "application/json", "X-XRefKit-CSRF": instance.csrf_token}
|
|
36
|
+
base.update(headers or {})
|
|
37
|
+
conn.request("GET" if body is None else "POST", path, json.dumps(body) if body is not None else None, base)
|
|
38
|
+
response = conn.getresponse()
|
|
39
|
+
data = response.read().decode("utf-8")
|
|
40
|
+
return response.status, dict(response.getheaders()), data
|
|
41
|
+
finally:
|
|
42
|
+
conn.close()
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def test_console_keeps_all_runtime_panels_and_backward_payload(tmp_path):
|
|
46
|
+
payload = build_payload(tmp_path, tmp_path / "work/sessions")
|
|
47
|
+
page = _html_page(payload)
|
|
48
|
+
for label in ("Quality Issues", "Governance", "Runtime Diagnostics", "Quality Evaluation"):
|
|
49
|
+
assert label in page
|
|
50
|
+
for panel in ("plans", "overview", "flows", "recovery", "attention", "closure", "evidence", "handoff", "xids", "analysis", "missing-information", "decision-trace"):
|
|
51
|
+
assert f'data-panel="{panel}"' in page
|
|
52
|
+
assert f'id="{panel}"' in page
|
|
53
|
+
with server(tmp_path) as instance:
|
|
54
|
+
status, _, body = request(instance, "/api/runs")
|
|
55
|
+
assert status == 200
|
|
56
|
+
assert json.loads(body)["runs"] == payload["runs"]
|
|
57
|
+
status, headers, body = request(instance, "/?panel=closure&run_id=synthetic")
|
|
58
|
+
assert 'data-console-area="runtime"' in body
|
|
59
|
+
assert headers["Cache-Control"] == "no-store"
|
|
60
|
+
assert headers["X-Frame-Options"] == "DENY"
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def test_list_filter_detail_and_governance(tmp_path):
|
|
64
|
+
saved, _ = save(tmp_path)
|
|
65
|
+
issue_id = saved["contribution_id"]
|
|
66
|
+
with server(tmp_path) as instance:
|
|
67
|
+
status, _, body = request(instance, "/api/quality-issues?status=reported&skill_id=sample")
|
|
68
|
+
assert status == 200
|
|
69
|
+
assert json.loads(body)["issues"][0]["issue_id"] == issue_id
|
|
70
|
+
assert json.loads(request(instance, "/api/quality-issues?status=closed")[2])["issues"] == []
|
|
71
|
+
detail = json.loads(request(instance, f"/api/quality-issues/{issue_id}")[2])
|
|
72
|
+
assert detail["report"]["unknowns"]
|
|
73
|
+
assert detail["binding"]["run_id"]
|
|
74
|
+
assert request(instance, f"/api/quality-issues/{issue_id}/source?xid=UNRELATED")[0] == 400
|
|
75
|
+
assert request(instance, f"/api/quality-issues/{uuid.uuid4()}")[0] == 404
|
|
76
|
+
assert json.loads(request(instance, "/api/contributions")[2])["contributions"][0]["contribution_id"] == issue_id
|
|
77
|
+
assert request(instance, f"/api/contributions/{issue_id}")[0] == 200
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def test_human_decision_assertion_history_replay_and_stale_revision(tmp_path):
|
|
81
|
+
saved, _ = save(tmp_path)
|
|
82
|
+
issue_id = saved["contribution_id"]
|
|
83
|
+
fields = {"issue_id": issue_id, "decision_id": str(uuid.uuid4()), "status": "triaged",
|
|
84
|
+
"reviewer": "human:test", "decision_evidence": "Reviewed synthetic correction", "expected_revision": 0}
|
|
85
|
+
with server(tmp_path) as instance:
|
|
86
|
+
status, _, body = request(instance, "/api/quality-issues/decision-claims", fields)
|
|
87
|
+
assert status == 200
|
|
88
|
+
claims = json.loads(body)
|
|
89
|
+
fields["approval_assertion"] = issue_hmac_approval_assertion(SECRET, {**claims, "assertion_id": str(uuid.uuid4())})
|
|
90
|
+
assert request(instance, "/api/quality-issues/decisions", fields)[0] == 200
|
|
91
|
+
assert json.loads(request(instance, "/api/quality-issues/decisions", fields)[2])["idempotent_replay"]
|
|
92
|
+
detail = json.loads(request(instance, f"/api/quality-issues/{issue_id}")[2])
|
|
93
|
+
assert detail["status"] == "triaged"
|
|
94
|
+
assert len(detail["history"]) == 1
|
|
95
|
+
stale = {**fields, "decision_id": str(uuid.uuid4())}
|
|
96
|
+
stale.pop("approval_assertion")
|
|
97
|
+
claims = json.loads(request(instance, "/api/quality-issues/decision-claims", stale)[2])
|
|
98
|
+
stale["approval_assertion"] = issue_hmac_approval_assertion(SECRET, {**claims, "assertion_id": str(uuid.uuid4())})
|
|
99
|
+
status, _, body = request(instance, "/api/quality-issues/decisions", stale)
|
|
100
|
+
assert status == 400 and "stale" in body
|
|
101
|
+
assert not (tmp_path / "knowledge").exists()
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
@pytest.mark.parametrize("headers", [{"X-XRefKit-CSRF": "wrong"}, {"Origin": "https://foreign.invalid"}, {"Host": "foreign.invalid"}])
|
|
105
|
+
def test_browser_cross_origin_or_missing_token_cannot_decide(tmp_path, headers):
|
|
106
|
+
with server(tmp_path) as instance:
|
|
107
|
+
assert request(instance, "/api/quality-issues/decisions", {}, headers)[0] == 403
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def test_assertion_not_reviewer_name_and_readonly_default(tmp_path):
|
|
111
|
+
saved, _ = save(tmp_path)
|
|
112
|
+
body = {"issue_id": saved["contribution_id"], "decision_id": str(uuid.uuid4()), "status": "triaged",
|
|
113
|
+
"reviewer": "human:test", "decision_evidence": "explicit synthetic choice", "expected_revision": 0,
|
|
114
|
+
"approval_assertion": "self-declared"}
|
|
115
|
+
with server(tmp_path) as instance:
|
|
116
|
+
assert request(instance, "/api/quality-issues/decisions", body)[0] == 400
|
|
117
|
+
assert request(instance, "/", headers={"Host": "foreign.invalid"})[0] == 403
|
|
118
|
+
with server(tmp_path, trusted=False) as instance:
|
|
119
|
+
assert request(instance, "/api/quality-issues/decisions", body)[0] == 403
|
|
120
|
+
assert "Read-only: a trusted human approval verifier is not configured" in request(instance, "/")[2]
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def test_untrusted_report_is_only_rendered_as_text(tmp_path):
|
|
124
|
+
args = fixture_args()
|
|
125
|
+
args["title"] = '<img src=x onerror="alert(1)">'
|
|
126
|
+
save(tmp_path, args)
|
|
127
|
+
with server(tmp_path) as instance:
|
|
128
|
+
page = request(instance, "/")[2]
|
|
129
|
+
assert args["title"] not in page
|
|
130
|
+
assert "e.textContent = value" in page
|
|
131
|
+
assert "detail.replaceChildren" in page
|
|
132
|
+
assert "innerHTML" not in page[page.index('document.addEventListener("DOMContentLoaded"'):page.index("<div id=\"console-runtime\"")]
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def test_bad_request_is_bounded_and_unknown_fields_refused(tmp_path):
|
|
136
|
+
with server(tmp_path) as instance:
|
|
137
|
+
assert request(instance, "/api/quality-issues/decision-claims", {"unexpected": "field"})[0] == 400
|
|
138
|
+
assert request(instance, "/api/quality-issues/decisions", {}, {"Content-Type": "text/plain"})[0] == 400
|
|
139
|
+
assert request(instance, "/api/quality-issues?status=not-a-state")[0] == 400
|
|
140
|
+
missing = {"issue_id": str(uuid.uuid4()), "decision_id": str(uuid.uuid4()), "status": "triaged", "reviewer": "human:test", "decision_evidence": "synthetic", "expected_revision": 0}
|
|
141
|
+
assert request(instance, "/api/quality-issues/decision-claims", missing)[0] == 404
|
|
142
|
+
assert request(instance, "/api/quality-issues/decisions", {**missing, "approval_assertion": "synthetic"})[0] == 404
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
@pytest.mark.parametrize("value", [False, 0, {}, [123]])
|
|
146
|
+
def test_decision_evidence_types_are_not_coerced(tmp_path, value):
|
|
147
|
+
saved, _ = save(tmp_path)
|
|
148
|
+
fields = {"issue_id": saved["contribution_id"], "decision_id": str(uuid.uuid4()), "status": "triaged",
|
|
149
|
+
"reviewer": "human:test", "decision_evidence": "synthetic", "expected_revision": 0,
|
|
150
|
+
"verification_evidence": value}
|
|
151
|
+
with server(tmp_path) as instance:
|
|
152
|
+
assert request(instance, "/api/quality-issues/decision-claims", fields)[0] == 400
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def test_governance_reuses_review_and_separate_adoption(tmp_path):
|
|
156
|
+
(tmp_path / "ownership.yaml").write_text("""zones:
|
|
157
|
+
- id: records
|
|
158
|
+
owner: operational
|
|
159
|
+
paths:
|
|
160
|
+
- observations/
|
|
161
|
+
catalog: false
|
|
162
|
+
distribution: false
|
|
163
|
+
base_sync: false
|
|
164
|
+
shadowing: false
|
|
165
|
+
""", encoding="utf-8")
|
|
166
|
+
saved, _ = save(tmp_path)
|
|
167
|
+
fields = {"contribution_id": saved["contribution_id"], "decision_id": str(uuid.uuid4()),
|
|
168
|
+
"decision": "accepted", "reviewer": "human:test", "decision_evidence": "Reviewed inert observation",
|
|
169
|
+
"approved_target_path": "observations/synthetic-quality.md"}
|
|
170
|
+
target = tmp_path / fields["approved_target_path"]
|
|
171
|
+
with server(tmp_path) as instance:
|
|
172
|
+
status, _, body = request(instance, "/api/contributions/review-claims", fields)
|
|
173
|
+
assert status == 200, body
|
|
174
|
+
claims = json.loads(body)
|
|
175
|
+
assert not target.exists()
|
|
176
|
+
assert request(instance, "/api/contributions/review", {**fields, "approval_assertion": "self-declared"})[0] == 400
|
|
177
|
+
assertion = issue_hmac_approval_assertion(SECRET, {**claims, "assertion_id": str(uuid.uuid4())})
|
|
178
|
+
status, _, body = request(instance, "/api/contributions/review", {**fields, "approval_assertion": assertion})
|
|
179
|
+
assert status == 200, body
|
|
180
|
+
assert not target.exists()
|
|
181
|
+
adoption = {"contribution_id": fields["contribution_id"], "adoption_id": str(uuid.uuid4()),
|
|
182
|
+
"reviewer": "human:test", "decision_evidence": "Publish accepted observation",
|
|
183
|
+
"approval_token": json.loads(body)["approval_token"]}
|
|
184
|
+
assert request(instance, "/api/contributions/adopt", {**adoption, "approval_token": "wrong"})[0] == 400
|
|
185
|
+
status, _, body = request(instance, "/api/contributions/adopt", adoption)
|
|
186
|
+
assert status == 200, body
|
|
187
|
+
assert target.is_file()
|
|
188
|
+
assert json.loads(request(instance, f'/api/quality-issues/{fields["contribution_id"]}')[2])["status"] == "reported"
|
|
189
|
+
assert not (tmp_path / "knowledge").exists()
|