xrefkit 0.7.12__tar.gz → 0.7.14__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.12/xrefkit.egg-info → xrefkit-0.7.14}/PKG-INFO +2 -2
- {xrefkit-0.7.12 → xrefkit-0.7.14}/pyproject.toml +2 -2
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_azure_connection.py +8 -7
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_azure_import.py +3 -2
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_azure_recovery.py +5 -4
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_azure_writer.py +4 -3
- xrefkit-0.7.14/tests/test_decision_checklist.py +203 -0
- xrefkit-0.7.14/tests/test_decision_handoff.py +261 -0
- xrefkit-0.7.14/tests/test_engineering_decision.py +278 -0
- xrefkit-0.7.14/tests/test_environment_isolation.py +61 -0
- xrefkit-0.7.14/tests/test_mcp_skills_extension.py +123 -0
- xrefkit-0.7.14/tests/test_mcp_skills_transport.py +113 -0
- xrefkit-0.7.14/tests/test_principle_discovery.py +217 -0
- xrefkit-0.7.14/tests/test_project_management_offline_progress.py +112 -0
- xrefkit-0.7.14/tests/test_unknown_resolution.py +271 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/__init__.py +1 -1
- xrefkit-0.7.14/xrefkit/decision_checklist.py +113 -0
- xrefkit-0.7.14/xrefkit/decision_handoff.py +319 -0
- xrefkit-0.7.14/xrefkit/engineering_decision.py +588 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/execution_binding.py +6 -0
- xrefkit-0.7.14/xrefkit/host_execution.py +83 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/server.py +5 -2
- xrefkit-0.7.14/xrefkit/mcp/skills_extension.py +178 -0
- xrefkit-0.7.14/xrefkit/mcp/skills_transport.py +138 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/operations_cli.py +57 -1
- xrefkit-0.7.14/xrefkit/principle_discovery.py +128 -0
- xrefkit-0.7.14/xrefkit/resources/engineering-decision-checklist.json +52 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/skillrun.py +106 -12
- xrefkit-0.7.14/xrefkit/unknown_resolution.py +199 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14/xrefkit.egg-info}/PKG-INFO +2 -2
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit.egg-info/SOURCES.txt +18 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit.egg-info/requires.txt +1 -1
- {xrefkit-0.7.12 → xrefkit-0.7.14}/LICENSE +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/README.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/setup.cfg +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_artifact_selected_family.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_attention_pet.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_attention_pet_client_protocol.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_attention_pet_codex_session.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_attention_pet_fit.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_azure_update_candidate.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_boundary_analysis.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_brownfield_csharp_structure_definitions.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_brownfield_file_editing_protocol.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_business_intake_conversation_definitions.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_business_intake_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_calibration_lint.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_catalog_preparation_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_check_skill_knowledge_xids.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_ci_workflow_invariants.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_cli.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_code_constraint_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_collect_analyzer_sarif.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_compact_skill_logs.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_constraint_derivation_family_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_constraint_derivation_selected_family.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_contribution_adoption_bytes.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_contribution_returns.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_convert_to_xrefkit_skill.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_cs_scope_probe.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_csharp_commonality.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_csharp_naming_profile.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_ctx.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_cutover_readiness.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_dashboard.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_database_batch_definition_migration.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_decision_trace.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_design_business_intake_selected_family.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_design_planning_definition_migration.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_dotnet_definition_candidate.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_editorial_family_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_editorial_intake_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_editorial_selected_family.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_embedded_startup_pack.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_error_policy_audit.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_error_policy_locator.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_execution_binding.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_existing_skill_definition_batch.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_final_skilldefinition_batch.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_flow_selected_family.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_fm_multiroot.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_gate.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_gateway.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_gateway_mcp.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_gateway_skill_adapter.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_gateway_work_items.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_goal_desired_state.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_governance_entry.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_governance_host.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_host_precheck.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_human_evaluation.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_implementation_flow_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_implementation_review_selected_family.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_inbound_uploads.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_instruction_workflow.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_knowledge_relations_validator.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_language_review_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_legacy_guidance.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_legacy_migration.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_legacy_resources.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_mcp_package_routing.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_mcp_setup.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_mcp_subagent_startup.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_mcp_subagent_startup_integration.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_ontology_assessment_validator.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_os_family_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_os_knowledge_family_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_os_selected_family.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_ownership.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_package_knowledge_resolution.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_package_skill_run.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_packaged_native_governance.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_packmeta.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_plan_markdown.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_plan_observation.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_project_management_materialization.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_project_quality_baseline.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_qa_report_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_quality_issue_dashboard.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_quality_issues.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_reporting_profiles.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_reporting_quality.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_repository_skill_adoption.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_repository_startup_pack.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_resource_provider.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_runtime_contracts.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_sarif_to_locator.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_security_definition_migration.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_site_release_metadata.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_skill_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_skill_definition_governance.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_skill_definition_mcp.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_skill_definition_runtime.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_skill_edits.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_skill_maturity_return.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_skill_release_compatibility.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_skill_runtime_audit.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_skillmeta.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_skills_sync.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_source_analysis_fragments.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_structure_catalog.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_subagent_startup.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_subagent_startup_boundaries.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_wbs.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_work_management.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_work_packages.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_workflow_family_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_xref.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_xrefkit_instance.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_xrefkit_tools.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_xrefkit_v2_discovery.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_xrefkit_v2_models.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/tests/test_xrefkit_v2_pipeline.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/__main__.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/__init__.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/__main__.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/client.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/client_protocol.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/codex_session.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/evaluator.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/model.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/presentation.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/profiles.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/scenarios.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/server.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/attention_pet/store.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/azure_connection.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/azure_import.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/azure_recovery.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/azure_update_candidate.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/azure_writer.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/boundary_analysis.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/catalog_cli.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/cli.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/contracts.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/ctx.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/dashboard.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/decision_trace.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/discovery.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/execution_binding_cli.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/gate.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/gateway.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/goalstate.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/governance_entry.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/governance_entry_cli.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/governance_host.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/hashing.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/host_precheck.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/import_skill.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/instance.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/loaders.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/__init__.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/audit.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/bootstrap.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/catalog.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/cli.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/client_cache.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/client_flow.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/context_registry.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/context_token.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/contracts.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/contribution_adoption.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/contribution_returns.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/dist.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/gateway.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/governed_overlays.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/inbound_uploads.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/knowledge_edits.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/legacy_guidance.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/legacy_migration.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/legacy_resources.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/ownership.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/repository.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/schemas.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/setup.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/skill_edits.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/skill_maturity.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/startup_contract_pack.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/subagent_startup.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp/update_gate_intake.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/mcp_tools.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/models/__init__.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/models/common.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/models/effective_bundle.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/models/human_evaluation.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/models/local_manifest.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/models/package_manifest.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/models/run_log.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/models/server_config.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/models/skill_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/ownership.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/packmeta.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/plan_markdown.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/plan_observation.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/quality_issues.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/registry.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/reporting.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/reporting_profiles.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/repository_skills.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resolver.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resource_provider.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/attention_pet/client-state.schema.json +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/attention_pet/pet.css +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/attention_pet/pet.html +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/attention_pet/pet.js +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/contracts.json +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/current.json +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/generations/7a682a5272907354/contracts.json +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/generations/7a682a5272907354/model_body.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/generations/9929294385ccb7b0/contracts.json +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/generations/9929294385ccb7b0/model_body.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/model_body.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/000_agent_entry.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/011_startup_xref_routing.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/015_shared_memory_operations.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/016_uncertainty_protocol.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/017_base_and_xref_layering.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/053_context_direction_security_guard.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/yomiyasu_LICENSE.txt +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/migration/docs/guides/062_legacy_flow_skill_migration_guide.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/migration/knowledge/operations/130_legacy_flow_skill_migration_rules.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/migration/knowledge/organization/160_context_direction_guard_rules.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/migration/skills/os/legacy_flow_skill_migration/SKILL.v1.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/migration/skills/os/legacy_flow_skill_migration/references/legacy_flow_skill_migration_template.md +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/migration/skills/repository_adoption.json +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/resources/migration/tools/migrate_legacy_flow_skill.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/runlog.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/skill_definition.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/skill_definition_catalog.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/skill_definition_governance.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/skillmeta.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/skills_sync.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/structure_catalog.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/subagent_startup.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/tools/__init__.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/tools/__main__.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/v2_cli.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/wbs.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/work_management.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/work_management_view.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/workspace.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit/xref.py +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit.egg-info/dependency_links.txt +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit.egg-info/entry_points.txt +0 -0
- {xrefkit-0.7.12 → xrefkit-0.7.14}/xrefkit.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xrefkit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.14
|
|
4
4
|
Summary: Portable XID, Skill, Knowledge, workflow, and MCP runtime for XRefKit
|
|
5
5
|
Author: synthaicode
|
|
6
6
|
License: MIT License
|
|
@@ -31,7 +31,7 @@ License-File: LICENSE
|
|
|
31
31
|
Requires-Dist: PyYAML<7,>=6.0.2
|
|
32
32
|
Requires-Dist: pydantic<3,>=2.0
|
|
33
33
|
Provides-Extra: mcp
|
|
34
|
-
Requires-Dist: mcp<2,>=1.
|
|
34
|
+
Requires-Dist: mcp<2,>=1.28.0; extra == "mcp"
|
|
35
35
|
Requires-Dist: uvicorn>=0.30; extra == "mcp"
|
|
36
36
|
Provides-Extra: test
|
|
37
37
|
Requires-Dist: pytest>=8.0.0; extra == "test"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "xrefkit"
|
|
7
|
-
version = "0.7.
|
|
7
|
+
version = "0.7.14"
|
|
8
8
|
description = "Portable XID, Skill, Knowledge, workflow, and MCP runtime for XRefKit"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -16,7 +16,7 @@ dependencies = [
|
|
|
16
16
|
]
|
|
17
17
|
|
|
18
18
|
[project.optional-dependencies]
|
|
19
|
-
mcp = ["mcp>=1.
|
|
19
|
+
mcp = ["mcp>=1.28.0,<2", "uvicorn>=0.30"]
|
|
20
20
|
test = ["pytest>=8.0.0"]
|
|
21
21
|
|
|
22
22
|
[project.scripts]
|
|
@@ -9,6 +9,7 @@ from contextlib import redirect_stdout, redirect_stderr
|
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from urllib.error import HTTPError, URLError
|
|
11
11
|
from unittest.mock import patch
|
|
12
|
+
from environment_helpers import mock_environment
|
|
12
13
|
|
|
13
14
|
from xrefkit.azure_connection import MAX_BYTES, _NoRedirect, load_connection, main, read_check, register_connection, validate_profile
|
|
14
15
|
from xrefkit.work_management import register_workspace
|
|
@@ -117,7 +118,7 @@ class AzureConnectionTests(unittest.TestCase):
|
|
|
117
118
|
|
|
118
119
|
def test_missing_named_credential_has_no_other_env_fallback(self):
|
|
119
120
|
self.register()
|
|
120
|
-
with
|
|
121
|
+
with mock_environment({"AZURE_DEVOPS_PAT": CANARY}, clear=True), patch("xrefkit.azure_connection.build_opener") as network:
|
|
121
122
|
result = self.check()
|
|
122
123
|
self.assertEqual("credential_unavailable", result["diagnostic_code"])
|
|
123
124
|
self.assertFalse(result["network_attempted"])
|
|
@@ -135,7 +136,7 @@ class AzureConnectionTests(unittest.TestCase):
|
|
|
135
136
|
self.assertEqual("Basic " + base64.b64encode((":" + CANARY).encode()).decode(), req.get_header("Authorization"))
|
|
136
137
|
response = Response(req)
|
|
137
138
|
return response
|
|
138
|
-
with
|
|
139
|
+
with mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
139
140
|
builder.return_value.open.side_effect = request
|
|
140
141
|
result = self.check()
|
|
141
142
|
builder.return_value.open.assert_called_once()
|
|
@@ -151,7 +152,7 @@ class AzureConnectionTests(unittest.TestCase):
|
|
|
151
152
|
def test_http_failures_and_redirects_are_sanitized_without_retry(self):
|
|
152
153
|
self.register()
|
|
153
154
|
for status, code in ((401, "authentication_rejected"), (403, "access_forbidden"), (404, "unavailable_or_not_visible"), (302, "redirect_rejected"), (307, "redirect_rejected"), (429, "rate_limited"), (503, "server_failure")):
|
|
154
|
-
with self.subTest(status=status),
|
|
155
|
+
with self.subTest(status=status), mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
155
156
|
builder.return_value.open.side_effect = HTTPError("https://evil.test/" + CANARY, status, CANARY, {}, io.BytesIO(CANARY.encode()))
|
|
156
157
|
result = self.check()
|
|
157
158
|
self.assertEqual(code, result["diagnostic_code"])
|
|
@@ -165,7 +166,7 @@ class AzureConnectionTests(unittest.TestCase):
|
|
|
165
166
|
echo = copy.deepcopy(base)
|
|
166
167
|
echo["fields"]["System.State"] = CANARY
|
|
167
168
|
for body in (b"invalid " + CANARY.encode(), b"x" * (MAX_BYTES + 1), json.dumps({**base, "id": 11}).encode(), json.dumps({**base, "fields": {"System.TeamProject": "other"}}).encode(), json.dumps(echo).encode()):
|
|
168
|
-
with self.subTest(size=len(body)),
|
|
169
|
+
with self.subTest(size=len(body)), mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
169
170
|
builder.return_value.open.side_effect = lambda req, timeout: Response(req, body)
|
|
170
171
|
result = self.check()
|
|
171
172
|
self.assertFalse(result["read_verified"])
|
|
@@ -174,18 +175,18 @@ class AzureConnectionTests(unittest.TestCase):
|
|
|
174
175
|
def test_network_timeout_nonjson_and_unexpected_final_url_are_controlled(self):
|
|
175
176
|
self.register()
|
|
176
177
|
for error in (TimeoutError(CANARY), URLError(CANARY)):
|
|
177
|
-
with
|
|
178
|
+
with mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
178
179
|
builder.return_value.open.side_effect = error
|
|
179
180
|
self.assertEqual("network_request_failed", self.check()["diagnostic_code"])
|
|
180
181
|
for changes, code in (({"content_type": "text/html"}, "response_not_json"), ({"url": "https://evil.test"}, "response_destination_mismatch")):
|
|
181
|
-
with
|
|
182
|
+
with mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
182
183
|
builder.return_value.open.side_effect = lambda req, timeout: Response(req, **changes)
|
|
183
184
|
self.assertEqual(code, self.check()["diagnostic_code"])
|
|
184
185
|
|
|
185
186
|
def test_cli_never_echoes_secret_or_server_error_text(self):
|
|
186
187
|
self.register()
|
|
187
188
|
output = io.StringIO()
|
|
188
|
-
with redirect_stdout(output),
|
|
189
|
+
with redirect_stdout(output), mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
189
190
|
builder.return_value.open.side_effect = HTTPError(CANARY, 401, CANARY, {}, io.BytesIO(CANARY.encode()))
|
|
190
191
|
status = main(["read-check", "--root", str(self.root), "--workspace-id", "local", "--connection-id", "test", "--item-id", "10"])
|
|
191
192
|
self.assertEqual(1, status)
|
|
@@ -4,6 +4,7 @@ import json
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from urllib.error import HTTPError
|
|
6
6
|
from unittest.mock import patch
|
|
7
|
+
from environment_helpers import mock_environment
|
|
7
8
|
|
|
8
9
|
import pytest
|
|
9
10
|
|
|
@@ -55,7 +56,7 @@ def network(values=None, headers=None):
|
|
|
55
56
|
value = values.get(item_id, payload(item_id)) if values is not None else payload(item_id)
|
|
56
57
|
if isinstance(value, BaseException): raise value
|
|
57
58
|
return Response(request, value, **(headers or {}))
|
|
58
|
-
return
|
|
59
|
+
return mock_environment({"IMPORT_TEST_PAT": CANARY}), patch.object(module, "build_opener", return_value=Opener()), calls
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
def acquire(setup, values=None, request=None, headers=None):
|
|
@@ -230,7 +231,7 @@ def test_unexpected_body_continuation_metadata_is_rejected(setup, key):
|
|
|
230
231
|
@pytest.mark.parametrize("mutation", ["attempted", "diagnostic", "failed_not_attempted", "bool_id", "outcome", "unknown_field"])
|
|
231
232
|
def test_resealed_contradictory_receipts_are_not_accepted(setup, mutation):
|
|
232
233
|
root, _, request, _, _, _ = setup
|
|
233
|
-
with
|
|
234
|
+
with mock_environment({}, clear=True):
|
|
234
235
|
result = module.capture(root, "local", request)
|
|
235
236
|
receipt = read_json(Path(result["output"]))
|
|
236
237
|
if mutation == "attempted": receipt["items"][0]["network_attempted"] = True
|
|
@@ -3,6 +3,7 @@ import json
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from urllib.error import HTTPError
|
|
5
5
|
from unittest.mock import patch
|
|
6
|
+
from environment_helpers import mock_environment
|
|
6
7
|
|
|
7
8
|
import pytest
|
|
8
9
|
|
|
@@ -39,7 +40,7 @@ def publish_remote(setup, request=None, lost=False, intent_only=False, before=No
|
|
|
39
40
|
return Response(req, payload(10))
|
|
40
41
|
return Response(req, current)
|
|
41
42
|
root, original, _, _ = setup
|
|
42
|
-
with
|
|
43
|
+
with mock_environment({"IMPORT_TEST_PAT": CANARY}), patch.object(writer, "build_opener", return_value=Opener()):
|
|
43
44
|
if intent_only:
|
|
44
45
|
with pytest.raises(KeyboardInterrupt): writer.publish(root, "local", request or original)
|
|
45
46
|
result = None
|
|
@@ -70,7 +71,7 @@ def reads(current, historical=None, *, fail_phase=None, error=None, mutation=Non
|
|
|
70
71
|
value["url"] += "/revisions/" + str(value["rev"])
|
|
71
72
|
if mutation: value = mutation(phase, value)
|
|
72
73
|
return Response(req, value)
|
|
73
|
-
return
|
|
74
|
+
return mock_environment({"IMPORT_TEST_PAT": CANARY}), patch.object(writer, "build_opener", return_value=Opener()), calls
|
|
74
75
|
|
|
75
76
|
|
|
76
77
|
def reconcile(setup, request=None, current=None, historical=None, **kwargs):
|
|
@@ -185,7 +186,7 @@ def test_expired_auth_partial_failure_and_later_explicit_read(setup, phase, code
|
|
|
185
186
|
|
|
186
187
|
def test_missing_pat_no_network_and_original_unknown_still_blocks(setup):
|
|
187
188
|
writer_setup, request, _ = setup
|
|
188
|
-
with
|
|
189
|
+
with mock_environment({}, clear=True), patch.object(writer, "build_opener") as http:
|
|
189
190
|
result = module.reconcile(writer_setup[0], "local", request)
|
|
190
191
|
assert result["outcome"] == "unresolved" and not result["network_attempted"]
|
|
191
192
|
assert result["phases"] == [{"phase": "root", "outcome": "not_attempted", "diagnostic_code": "credential_unavailable", "network_attempted": False}]
|
|
@@ -286,7 +287,7 @@ def test_intent_only_crash_before_send_never_infers_not_sent(writer_setup):
|
|
|
286
287
|
|
|
287
288
|
def test_known_hold_retained_without_credential_or_remote_read(writer_setup):
|
|
288
289
|
root = writer_setup[0]
|
|
289
|
-
with
|
|
290
|
+
with mock_environment({}, clear=True):
|
|
290
291
|
assert writer.publish(root, "local", writer_setup[1])["outcome"] == "hold"
|
|
291
292
|
req = {"schema_version": 1, "reconciliation_id": "hold", "report_id": "write-1", "connection_id": "import-test", "source_connection_id": "write-test", "binding_id": "binding-1", "expected_observation_revision": 2, "approval_refs": ["recover.md"]}
|
|
292
293
|
with patch.object(writer.os.environ, "get", side_effect=AssertionError("credential read")), patch.object(writer, "build_opener") as http:
|
|
@@ -3,6 +3,7 @@ import json
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from urllib.error import HTTPError
|
|
5
5
|
from unittest.mock import patch
|
|
6
|
+
from environment_helpers import mock_environment
|
|
6
7
|
|
|
7
8
|
import pytest
|
|
8
9
|
|
|
@@ -70,7 +71,7 @@ def network(*, mutation=None, patch_failure=None, readback_failure=None, patch_f
|
|
|
70
71
|
value = mutation(request, copy.deepcopy(value))
|
|
71
72
|
return Response(request, value)
|
|
72
73
|
|
|
73
|
-
return
|
|
74
|
+
return mock_environment({"IMPORT_TEST_PAT": CANARY}), patch.object(module, "build_opener", return_value=Opener()), calls
|
|
74
75
|
|
|
75
76
|
|
|
76
77
|
def deliver(setup, request=None, **kwargs):
|
|
@@ -252,7 +253,7 @@ def test_success_chain_requires_explicit_predecessor_and_new_observation(setup):
|
|
|
252
253
|
after["fields"]["System.History"] = operations[-1]["value"]
|
|
253
254
|
return Response(req, after)
|
|
254
255
|
return Response(req, sequence.pop(0) if sequence else after)
|
|
255
|
-
with
|
|
256
|
+
with mock_environment({"IMPORT_TEST_PAT": CANARY}), patch.object(module, "build_opener", return_value=Opener()):
|
|
256
257
|
result = module.publish(root, "local", second)
|
|
257
258
|
assert result["sent_confirmed"] and result["after"] == {"revision": 4, "state": "Done"}
|
|
258
259
|
with pytest.raises(ValueError): module.publish(root, "local", {**second, "report_id": "fork", "expected_observation_revision": 4})
|
|
@@ -296,7 +297,7 @@ def test_same_id_changed_request_refuses_before_credentials(setup):
|
|
|
296
297
|
|
|
297
298
|
def test_resealed_unknown_without_intent_cannot_bypass_target_guard(setup):
|
|
298
299
|
root, request, _, _ = setup
|
|
299
|
-
with
|
|
300
|
+
with mock_environment({}, clear=True):
|
|
300
301
|
result = module.publish(root, "local", request)
|
|
301
302
|
path = Path(result["output"])
|
|
302
303
|
record = read_json(path)
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from test_engineering_decision import finalize, pinned, project
|
|
6
|
+
from test_principle_discovery import GLOBAL, discovery_context, discovery_project, evaluate, metadata, proposal_with
|
|
7
|
+
from test_subagent_startup import command
|
|
8
|
+
from xrefkit import decision_checklist
|
|
9
|
+
from xrefkit.engineering_decision import record_decision, require_decision
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
OMITTED_DESIGNS = {
|
|
13
|
+
"API-01": "On timeout, retry the payment creation API using the existing request body.",
|
|
14
|
+
"API-04": "After a timeout, POST the order again with a new request identifier until one call returns success.",
|
|
15
|
+
"GDC-03": "Let each worker write final status directly; the status table remains the shared output.",
|
|
16
|
+
"GDC-07": "On HTTP 200, mark the operation complete and publish the result.",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def checklist_proposal(proposal, found, resolved, *, evaluator="designer"):
|
|
21
|
+
draft = proposal_with(proposal, resolved)
|
|
22
|
+
proof = proposal["verification"]["replay"]
|
|
23
|
+
refs = {xid: source["revision"] for xid, source in found["references"].items()}
|
|
24
|
+
items = {}
|
|
25
|
+
for check_id, check in resolved["reference_set"]["checklist"]["checks"].items():
|
|
26
|
+
applies = check["applicability"]["applies"]
|
|
27
|
+
items[check_id] = {
|
|
28
|
+
"revision": check["revision"], "applicability": "applies" if applies else "not_applicable",
|
|
29
|
+
"result": "PASS" if applies else "NOT_APPLICABLE",
|
|
30
|
+
"reason": "The synthetic evidence covers the design question" if applies else "Single serialized writer",
|
|
31
|
+
"references": refs, "evidence": [{key: proof[key] for key in ("path", "sha256")}] if applies else [],
|
|
32
|
+
"unresolved": [], "evaluator": evaluator,
|
|
33
|
+
}
|
|
34
|
+
return {**draft, "checklist": {"decision_id": found["decision_id"], "candidate": draft["candidate"],
|
|
35
|
+
"reference_set_sha256": draft["reference_set_sha256"], "results": items}}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@pytest.fixture
|
|
39
|
+
def checklist_project(discovery_project):
|
|
40
|
+
policy, proposal, prepare, update, authorize = discovery_project
|
|
41
|
+
policy["checklist"] = True
|
|
42
|
+
update()
|
|
43
|
+
return policy, proposal, prepare, update, authorize
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def test_valid_checklist_binds_candidate_and_review(tmp_path, checklist_project):
|
|
47
|
+
_, proposal, prepare, _, authorize = checklist_project
|
|
48
|
+
found = record_decision(tmp_path, prepare)
|
|
49
|
+
resolved = evaluate(tmp_path, found)
|
|
50
|
+
definition = resolved["reference_set"]["checklist"]
|
|
51
|
+
assert set(definition["categories"]) == {"api", "global"}
|
|
52
|
+
assert len(definition["checks"]) == 15
|
|
53
|
+
assert definition["checks"]["API-04"]["related_xids"] == [GLOBAL]
|
|
54
|
+
assert definition["checks"]["GDC-10"]["knowledge_gaps"]
|
|
55
|
+
draft = checklist_proposal(proposal, found, resolved)
|
|
56
|
+
authorize(found, draft)
|
|
57
|
+
assert finalize(tmp_path, draft)["state"] == "DETERMINED"
|
|
58
|
+
receipt = require_decision(tmp_path, "WI-1", "retry", "ED-1")
|
|
59
|
+
assert len(receipt["checklist_sha256"]) == 64
|
|
60
|
+
assert receipt["candidate"] == draft["checklist"]["candidate"]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@pytest.mark.parametrize("omitted", ["API-01", "API-04", "GDC-03", "GDC-07"])
|
|
64
|
+
def test_review_rejects_missing_checks_on_original_draft(tmp_path, checklist_project, omitted):
|
|
65
|
+
_, proposal, prepare, _, _ = checklist_project
|
|
66
|
+
proposal["candidate"] = pinned(tmp_path, "design.md", OMITTED_DESIGNS[omitted])
|
|
67
|
+
found = record_decision(tmp_path, prepare)
|
|
68
|
+
draft = checklist_proposal(proposal, found, evaluate(tmp_path, found))
|
|
69
|
+
del draft["checklist"]["results"][omitted]
|
|
70
|
+
with pytest.raises(ValueError, match=f"{omitted}=MISSING"):
|
|
71
|
+
record_decision(tmp_path, {"action": "review", "decision_id": "ED-1", "proposal": draft})
|
|
72
|
+
with pytest.raises(ValueError, match=f"{omitted}=MISSING"):
|
|
73
|
+
finalize(tmp_path, draft)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@pytest.mark.parametrize("concurrency", ["no", "unknown", "yes"])
|
|
77
|
+
def test_state_attributes_add_checks_and_detect_concurrency_omission(tmp_path, checklist_project, concurrency):
|
|
78
|
+
policy, proposal, prepare, update, _ = checklist_project
|
|
79
|
+
policy["catalog"][GLOBAL]["discovery"] = metadata(
|
|
80
|
+
"responsibility dependencies change_impact consistency invariants transactions contention exclusion visibility")
|
|
81
|
+
update()
|
|
82
|
+
context = discovery_context(category="architecture_change", state_management="yes", concurrency=concurrency)
|
|
83
|
+
proposal["candidate"] = pinned(tmp_path, "design.md",
|
|
84
|
+
"Workers read status, calculate a new status, then overwrite it.")
|
|
85
|
+
found = record_decision(tmp_path, {**prepare, "decision_context": context})
|
|
86
|
+
resolved = evaluate(tmp_path, found)
|
|
87
|
+
selection = resolved["reference_set"]["checklist"]
|
|
88
|
+
assert set(selection["categories"]) == {"architecture", "state", "concurrency", "global"}
|
|
89
|
+
assert selection["checks"]["CON-02"]["applicability"]["applies"] == (concurrency != "no")
|
|
90
|
+
draft = checklist_proposal(proposal, found, resolved)
|
|
91
|
+
del draft["checklist"]["results"]["CON-01"]
|
|
92
|
+
with pytest.raises(ValueError, match="CON-01=MISSING"):
|
|
93
|
+
finalize(tmp_path, draft)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@pytest.mark.parametrize("status", ["UNKNOWN", "FAIL"])
|
|
97
|
+
def test_pending_findings_reject_use_but_survive_blocked(tmp_path, checklist_project, status):
|
|
98
|
+
_, proposal, prepare, _, _ = checklist_project
|
|
99
|
+
found = record_decision(tmp_path, prepare)
|
|
100
|
+
draft = checklist_proposal(proposal, found, evaluate(tmp_path, found))
|
|
101
|
+
draft["checklist"]["results"]["API-01"].update(result=status, unresolved=["Provider result not established"])
|
|
102
|
+
with pytest.raises(ValueError, match=f"API-01={status}"):
|
|
103
|
+
finalize(tmp_path, draft)
|
|
104
|
+
assert finalize(tmp_path, {**draft, "classification": "BLOCKED", "actions": []})["state"] == "BLOCKED"
|
|
105
|
+
code, output = command("workflow", "engineering-decision", "--root", str(tmp_path), "--inspect", "ED-1")
|
|
106
|
+
assert code == 0 and json.loads(output)["checklist_pending"] == {"API-01": status}
|
|
107
|
+
with pytest.raises(ValueError, match="DETERMINED"):
|
|
108
|
+
require_decision(tmp_path, "WI-1", "retry", "ED-1")
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def test_required_api_check_refuses_nonapplicability_even_with_reason(tmp_path, checklist_project):
|
|
112
|
+
_, proposal, prepare, _, _ = checklist_project
|
|
113
|
+
found = record_decision(tmp_path, prepare)
|
|
114
|
+
draft = checklist_proposal(proposal, found, evaluate(tmp_path, found))
|
|
115
|
+
draft["checklist"]["results"]["API-04"].update(result="NOT_APPLICABLE", applicability="not_applicable",
|
|
116
|
+
reason="The producer says it is unnecessary")
|
|
117
|
+
with pytest.raises(ValueError, match="API-04.*applicability"):
|
|
118
|
+
finalize(tmp_path, draft)
|
|
119
|
+
draft["checklist"]["results"]["API-04"]["reason"] = ""
|
|
120
|
+
with pytest.raises(ValueError, match="API-04.*reason"):
|
|
121
|
+
finalize(tmp_path, draft)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def test_checklist_evaluator_cannot_act_as_independent_reviewer(tmp_path, checklist_project):
|
|
125
|
+
_, proposal, prepare, _, authorize = checklist_project
|
|
126
|
+
found = record_decision(tmp_path, prepare)
|
|
127
|
+
draft = checklist_proposal(proposal, found, evaluate(tmp_path, found), evaluator="reviewer")
|
|
128
|
+
authorize(found, draft)
|
|
129
|
+
with pytest.raises(ValueError, match="independent review"):
|
|
130
|
+
finalize(tmp_path, draft)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def test_serial_state_can_record_reasoned_nonapplicability(tmp_path, checklist_project):
|
|
134
|
+
policy, proposal, prepare, update, authorize = checklist_project
|
|
135
|
+
policy["catalog"][GLOBAL]["discovery"] = metadata("consistency invariants transactions")
|
|
136
|
+
update()
|
|
137
|
+
found = record_decision(tmp_path, {**prepare, "decision_context": discovery_context(
|
|
138
|
+
category="state_management", state_management="yes", concurrency="no")})
|
|
139
|
+
draft = checklist_proposal(proposal, found, evaluate(tmp_path, found))
|
|
140
|
+
na = draft["checklist"]["results"]["CON-02"]
|
|
141
|
+
assert na["result"] == "NOT_APPLICABLE"
|
|
142
|
+
na["reason"] = ""
|
|
143
|
+
with pytest.raises(ValueError, match="CON-02.*reason"):
|
|
144
|
+
finalize(tmp_path, draft)
|
|
145
|
+
na["reason"] = "An exclusive single writer is verified by the integration test"
|
|
146
|
+
authorize(found, draft)
|
|
147
|
+
assert finalize(tmp_path, draft)["state"] == "DETERMINED"
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def test_definition_change_requires_new_selection(tmp_path, checklist_project, monkeypatch):
|
|
151
|
+
_, proposal, prepare, _, authorize = checklist_project
|
|
152
|
+
found = record_decision(tmp_path, prepare)
|
|
153
|
+
draft = checklist_proposal(proposal, found, evaluate(tmp_path, found))
|
|
154
|
+
authorize(found, draft)
|
|
155
|
+
finalize(tmp_path, draft)
|
|
156
|
+
definitions = json.loads(decision_checklist.DEFINITIONS.read_bytes())
|
|
157
|
+
definitions["revision"] = "future"
|
|
158
|
+
replacement = tmp_path / "checklist-definition.json"
|
|
159
|
+
replacement.write_text(json.dumps(definitions), encoding="utf-8")
|
|
160
|
+
monkeypatch.setattr(decision_checklist, "DEFINITIONS", replacement)
|
|
161
|
+
with pytest.raises(ValueError, match="checklist definition changed"):
|
|
162
|
+
require_decision(tmp_path, "WI-1", "retry", "ED-1")
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
@pytest.mark.parametrize("change", ["candidate", "decision", "xid", "evidence"])
|
|
166
|
+
def test_stale_checklist_rejected_after_changes(tmp_path, checklist_project, change):
|
|
167
|
+
policy, proposal, prepare, update, authorize = checklist_project
|
|
168
|
+
found = record_decision(tmp_path, prepare)
|
|
169
|
+
draft = checklist_proposal(proposal, found, evaluate(tmp_path, found))
|
|
170
|
+
if change == "evidence":
|
|
171
|
+
proof = pinned(tmp_path, "idempotency.md", "Synthetic checklist evidence")
|
|
172
|
+
draft["checklist"]["results"]["API-04"]["evidence"] = [proof]
|
|
173
|
+
authorize(found, draft)
|
|
174
|
+
finalize(tmp_path, draft)
|
|
175
|
+
if change == "decision":
|
|
176
|
+
found = record_decision(tmp_path, {**prepare, "decision_id": "ED-2", "supersedes": "ED-1",
|
|
177
|
+
"decision_context": discovery_context(target="Changed target")})
|
|
178
|
+
resolved = evaluate(tmp_path, found)
|
|
179
|
+
altered = {**draft, "reference_set_sha256": resolved["reference_set_sha256"]}
|
|
180
|
+
with pytest.raises(ValueError, match="checklist must bind"):
|
|
181
|
+
record_decision(tmp_path, {"action": "review", "decision_id": "ED-2", "proposal": altered})
|
|
182
|
+
elif change == "xid":
|
|
183
|
+
policy["catalog"][GLOBAL]["revision"] = "r2"
|
|
184
|
+
update()
|
|
185
|
+
elif change == "candidate":
|
|
186
|
+
(tmp_path / "design.md").write_text("New candidate", encoding="utf-8")
|
|
187
|
+
else:
|
|
188
|
+
(tmp_path / "idempotency.md").write_text("New evidence", encoding="utf-8")
|
|
189
|
+
with pytest.raises(ValueError, match="superseded|context changed|digest mismatch"):
|
|
190
|
+
require_decision(tmp_path, "WI-1", "retry", "ED-1")
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def test_non_enrolled_gate_retains_proposal_shape(tmp_path, discovery_project):
|
|
194
|
+
policy, proposal, prepare, update, authorize = discovery_project
|
|
195
|
+
found = record_decision(tmp_path, prepare)
|
|
196
|
+
draft = proposal_with(proposal, evaluate(tmp_path, found))
|
|
197
|
+
authorize(found, draft)
|
|
198
|
+
finalize(tmp_path, draft)
|
|
199
|
+
assert "checklist_sha256" not in require_decision(tmp_path, "WI-1", "retry", "ED-1")
|
|
200
|
+
policy["checklist"] = True
|
|
201
|
+
update()
|
|
202
|
+
with pytest.raises(ValueError, match="checklist policy changed"):
|
|
203
|
+
require_decision(tmp_path, "WI-1", "retry", "ED-1")
|