ai-sdlc-framework 0.2.0__tar.gz → 0.3.0__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.
- ai_sdlc_framework-0.3.0/.gitignore +188 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/CHANGELOG.md +14 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/PKG-INFO +1 -1
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/pyproject.toml +1 -1
- ai_sdlc_framework-0.3.0/requirements-build.in +2 -0
- ai_sdlc_framework-0.3.0/requirements-build.txt +36 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/audit/file_sink.py +3 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/audit/logger.py +87 -2
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/audit/types.py +1 -0
- ai_sdlc_framework-0.3.0/tests/audit/test_conformance.py +130 -0
- ai_sdlc_framework-0.2.0/.gitignore +0 -53
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/README.md +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/scripts/generate_schemas.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/_utils/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/_utils/duration.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/event_bus.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/git_resolver.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/github.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/interfaces.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/linear.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/registry.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/resolve_secret.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/scanner.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/bitbucket.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/code_analysis.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/deployment_target.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/gitlab.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/jira.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/messenger.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/semgrep.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/sonarqube.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/webhook_bridge.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/agents/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/agents/discovery.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/agents/executor.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/agents/memory/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/agents/memory/file_backend.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/agents/memory/in_memory.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/agents/memory/types.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/agents/orchestration.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/agents/runner.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/agents/runner_registry.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/audit/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/audit/memory_sink.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/builders/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/builders/builders.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/builders/distribution.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/compliance/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/compliance/checker.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/compliance/mappings.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/core/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/core/_generated_schemas.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/core/compare.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/core/provenance.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/core/types.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/core/validation.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/metrics/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/metrics/instrumentation.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/metrics/store.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/metrics/types.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/abac.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/admission.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/authentication.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/authorization.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/autonomy.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/cel_evaluator.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/complexity.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/enforcement.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/evaluator.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/expression.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/llm_evaluator.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/mutating_gate.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/policy/rego_evaluator.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/py.typed +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/reconciler/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/reconciler/autonomy_reconciler.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/reconciler/diff.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/reconciler/gate_reconciler.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/reconciler/loop.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/reconciler/pipeline_reconciler.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/reconciler/types.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/security/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/security/approval_tier.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/security/docker_sandbox.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/security/env_secret_store.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/security/github_jit.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/security/github_sandbox.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/security/interfaces.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/security/stubs.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/telemetry/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/telemetry/instrumentation.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/telemetry/logging.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/telemetry/semantic_conventions.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/adapters/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/adapters/test_event_bus.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/adapters/test_git_resolver.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/adapters/test_github_adapter.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/adapters/test_linear_adapter.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/adapters/test_registry.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/adapters/test_resolve_secret.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/adapters/test_scanner.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/adapters/test_stubs.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/adapters/test_webhook_bridge.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/agents/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/agents/memory/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/agents/memory/test_file_backend.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/agents/memory/test_in_memory.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/agents/test_discovery.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/agents/test_executor.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/agents/test_orchestration.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/agents/test_runner.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/agents/test_runner_registry.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/audit/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/audit/test_logger.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/audit/test_memory_sink.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/builders/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/builders/test_builders.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/builders/test_distribution.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/compliance/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/compliance/test_checker.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/core/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/core/test_compare.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/core/test_duration.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/core/test_provenance.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/core/test_types.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/core/test_validation.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/metrics/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/metrics/test_instrumentation.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/metrics/test_store.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_abac.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_admission.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_authentication.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_authorization.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_autonomy.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_cel_evaluator.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_complexity.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_enforcement.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_evaluator.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_expression.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_llm_evaluator.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_mutating_gate.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/policy/test_rego_evaluator.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/reconciler/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/reconciler/test_autonomy_reconciler.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/reconciler/test_diff.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/reconciler/test_gate_reconciler.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/reconciler/test_loop.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/reconciler/test_pipeline_reconciler.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/reconciler/test_types.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/security/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/security/test_approval_tier.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/security/test_docker_sandbox.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/security/test_env_secret_store.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/security/test_github_jit.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/security/test_github_sandbox.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/security/test_stubs.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/telemetry/__init__.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/telemetry/test_logging.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/telemetry/test_semantic_conventions.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/test_conformance.py +0 -0
- {ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/tests/test_smoke.py +0 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# RFC-0042 Phase 1 — reviewer subagent transcripts
|
|
5
|
+
# Per RFC-0042 OQ-1: local-disk default, 90-day retention. Transcripts may
|
|
6
|
+
# contain PR diff content; the Merkle leaf index (.ai-sdlc/transcript-leaves.jsonl)
|
|
7
|
+
# is the durable committed artifact, not the raw transcripts.
|
|
8
|
+
.ai-sdlc/transcripts/
|
|
9
|
+
|
|
10
|
+
# Build output
|
|
11
|
+
dist/
|
|
12
|
+
*.tsbuildinfo
|
|
13
|
+
.next/
|
|
14
|
+
|
|
15
|
+
# AISDLC-75: the ai-sdlc-plugin MCP server is loaded by the plugin manifest at
|
|
16
|
+
# `mcp-server/dist/bin.js`. Marketplace clones do NOT run `pnpm install`, so
|
|
17
|
+
# this bundled artifact MUST ship in the source tree. The bundle is produced
|
|
18
|
+
# by `pnpm --filter @ai-sdlc/plugin-mcp-server build` (esbuild --packages=bundle)
|
|
19
|
+
# and gated by `scripts/verify-bundle.mjs` in CI.
|
|
20
|
+
!ai-sdlc-plugin/mcp-server/dist/
|
|
21
|
+
ai-sdlc-plugin/mcp-server/dist/*
|
|
22
|
+
!ai-sdlc-plugin/mcp-server/dist/bin.js
|
|
23
|
+
|
|
24
|
+
# Coverage
|
|
25
|
+
coverage/
|
|
26
|
+
.nyc_output/
|
|
27
|
+
|
|
28
|
+
# Environment
|
|
29
|
+
.env
|
|
30
|
+
.env.*
|
|
31
|
+
!.env.example
|
|
32
|
+
|
|
33
|
+
# IDE
|
|
34
|
+
.idea/
|
|
35
|
+
.vscode/*
|
|
36
|
+
!.vscode/extensions.json
|
|
37
|
+
!.vscode/settings.json
|
|
38
|
+
*.swp
|
|
39
|
+
*.swo
|
|
40
|
+
*~
|
|
41
|
+
|
|
42
|
+
# OS
|
|
43
|
+
.DS_Store
|
|
44
|
+
Thumbs.db
|
|
45
|
+
|
|
46
|
+
# Logs
|
|
47
|
+
*.log
|
|
48
|
+
npm-debug.log*
|
|
49
|
+
pnpm-debug.log*
|
|
50
|
+
|
|
51
|
+
# AI-SDLC runtime artifacts
|
|
52
|
+
.ai-sdlc/audit.jsonl
|
|
53
|
+
.ai-sdlc/state.db
|
|
54
|
+
.ai-sdlc/state.db-shm
|
|
55
|
+
.ai-sdlc/state.db-wal
|
|
56
|
+
.ai-sdlc/state/
|
|
57
|
+
.ai-sdlc/sweep-landed-cache.json
|
|
58
|
+
.ai-sdlc/memory/
|
|
59
|
+
# AISDLC-320: RFC-0024 Refit Phase 1 — draft captures are operator-local (OQ-1).
|
|
60
|
+
# Explicit submit (`cli-capture submit`) promotes to team-shared backlog/captures/.
|
|
61
|
+
.ai-sdlc/captures-drafts/
|
|
62
|
+
# AISDLC-133: per-task reviewer verdict files written by /ai-sdlc execute
|
|
63
|
+
# Step 10 and consumed by `.husky/pre-push` (scripts/check-attestation-sign.sh)
|
|
64
|
+
# to auto-sign the DSSE attestation. Ephemeral, per-worktree — never
|
|
65
|
+
# committed; the signed envelope at .ai-sdlc/attestations/<sha>.dsse.json is
|
|
66
|
+
# the durable artifact.
|
|
67
|
+
.ai-sdlc/verdicts/
|
|
68
|
+
# AISDLC-725: per-task local review-round state (reviewed commit, findings); never committed.
|
|
69
|
+
.ai-sdlc/review-state/
|
|
70
|
+
# AISDLC-462: per-task session files for execute-parallel coordination.
|
|
71
|
+
# Runtime-only, per-machine — never committed. Gitkeep preserves the
|
|
72
|
+
# sessions/ directory structure so the wrapper can write files immediately.
|
|
73
|
+
# AISDLC-383.1 / RFC-0042 Phase 1: full conversation transcripts captured by
|
|
74
|
+
# reviewer subagents. Gitignored per RFC-0042 §Design Layer 1 — operator
|
|
75
|
+
# retains locally for 90 days by default (OQ-1). Remote storage opt-in via
|
|
76
|
+
# `.ai-sdlc/config.yaml transcript_storage_url` (OQ-5).
|
|
77
|
+
# See docs/operations/transcript-management.md for retention + GC runbook.
|
|
78
|
+
.ai-sdlc/transcripts/
|
|
79
|
+
# AISDLC-568: SubagentStart hook markers used for verdictClass detection
|
|
80
|
+
# (independent vs. self-authored transcript leaves). Ephemeral, per-machine,
|
|
81
|
+
# consumed (deleted) by `cli-attestation emit-leaf` on a match — never
|
|
82
|
+
# committed. See pipeline-cli/src/attestation/verdict-class.ts.
|
|
83
|
+
.ai-sdlc/subagent-sessions/
|
|
84
|
+
# AISDLC-155: per-worktree active-task sentinel (AISDLC-81). The sentinel
|
|
85
|
+
# lives INSIDE each worktree at `<worktree>/.active-task` and is read by the
|
|
86
|
+
# PreToolUse hook to resolve which task's `permittedExternalPaths` apply for
|
|
87
|
+
# cross-repo writes. Ephemeral, per-worktree — never committed. Was tracked
|
|
88
|
+
# by accident in earlier commits and kept causing merge conflicts on every
|
|
89
|
+
# rebase as parallel worktrees each tried to write their own task ID.
|
|
90
|
+
.active-task
|
|
91
|
+
.enterprise.yaml
|
|
92
|
+
|
|
93
|
+
# AISDLC-559: parent-repo lock file for the worktree-aware backlog task ID
|
|
94
|
+
# allocator (`next_task_id` MCP tool + `task_create`'s cross-source collision
|
|
95
|
+
# check). Lives under the PARENT repo's `.ai-sdlc/locks/` — never inside a
|
|
96
|
+
# worktree — so every sibling worktree racing for the same ID sees it. This
|
|
97
|
+
# is the one sanctioned exception to "the parent working tree is read-only";
|
|
98
|
+
# it is ephemeral (created + removed within a single tool call) and must
|
|
99
|
+
# never be committed.
|
|
100
|
+
.ai-sdlc/locks/
|
|
101
|
+
|
|
102
|
+
# AISDLC-122: pipeline-cli writes the DoR calibration log to
|
|
103
|
+
# `artifacts/_dor/calibration.jsonl` by default. The log captures issue
|
|
104
|
+
# titles + body previews + LLM-derived `finding` / `clarificationQuestion`
|
|
105
|
+
# strings that may quote pasted secrets. Combined with the dogfood
|
|
106
|
+
# pipeline's `git add -A` practice (per `feedback_stash_completely_before_pipelines.md`),
|
|
107
|
+
# an unscrubbed paste of an API key in an issue body could be committed
|
|
108
|
+
# to git history through this log. Three layers of defense:
|
|
109
|
+
# 1. Ignore the directory entirely (this rule).
|
|
110
|
+
# 2. Lower BODY_INLINE_LIMIT in pipeline-cli/src/dor/calibration-log.ts
|
|
111
|
+
# (80 chars), so most bodies become a SHA reference.
|
|
112
|
+
# 3. Regex redaction in pipeline-cli/src/dor/secret-redact.ts.
|
|
113
|
+
artifacts/
|
|
114
|
+
|
|
115
|
+
# Package manager
|
|
116
|
+
.pnpm-store/
|
|
117
|
+
|
|
118
|
+
# Python
|
|
119
|
+
__pycache__/
|
|
120
|
+
*.py[cod]
|
|
121
|
+
*.egg-info/
|
|
122
|
+
*.egg
|
|
123
|
+
*.whl
|
|
124
|
+
.venv/
|
|
125
|
+
.mypy_cache/
|
|
126
|
+
.pytest_cache/
|
|
127
|
+
.ruff_cache/
|
|
128
|
+
build/
|
|
129
|
+
*.pyz
|
|
130
|
+
orchestrator/.gitignore
|
|
131
|
+
.worktrees/
|
|
132
|
+
|
|
133
|
+
# AISDLC-681: pre-push coverage gate lock (machine-local runtime state in the main checkout)
|
|
134
|
+
.ai-sdlc/runtime/
|
|
135
|
+
|
|
136
|
+
# AISDLC-811: machine-local runtime state in the parent checkout. Ignored so Step 0.5
|
|
137
|
+
# (non-backlog untracked files) never refuses a fresh execute over the live dispatch
|
|
138
|
+
# board or harness-side config. Nothing under .ai-sdlc/dispatch is tracked.
|
|
139
|
+
# NOT .ai-sdlc/reviews/: those ledgers are committed; doctor --fix deletes untracked copies.
|
|
140
|
+
.ai-sdlc/dispatch/
|
|
141
|
+
.agents/
|
|
142
|
+
.codex/
|
|
143
|
+
# Codex-side copy of CLAUDE.md; no reader in ai-sdlc-plugin/agents or orchestrator (AISDLC-811)
|
|
144
|
+
AGENTS.md
|
|
145
|
+
|
|
146
|
+
# AISDLC-773 / RFC-0053: protected-scope knowledge (client and data-room material)
|
|
147
|
+
# never enters the repository or a PR body.
|
|
148
|
+
.ai-sdlc/knowledge-protected/
|
|
149
|
+
|
|
150
|
+
# AISDLC-877: cached PR list for cli-kpi
|
|
151
|
+
.ai-sdlc/kpi/
|
|
152
|
+
|
|
153
|
+
# AISDLC-1024: pinned pipeline-cli scratch worktrees (hotfix lane)
|
|
154
|
+
.ai-sdlc/pipeline-builds/
|
|
155
|
+
|
|
156
|
+
# AISDLC-869: Claude Code memory dream output (.claude/memory.dream-<ts>.*) is machine-local;
|
|
157
|
+
# untracked, it made Step 0.5 abort every execute on a non-backlog untracked file.
|
|
158
|
+
.claude/memory.dream-*
|
|
159
|
+
|
|
160
|
+
# AISDLC-581: session-start registry-version TTL cache
|
|
161
|
+
ai-sdlc-plugin/.stale-runtime-cache.json
|
|
162
|
+
|
|
163
|
+
# AISDLC-775 / RFC-0053: derived retrieval index and per-session load ledgers
|
|
164
|
+
.ai-sdlc/context-index.db
|
|
165
|
+
.ai-sdlc/context-index.db-wal
|
|
166
|
+
.ai-sdlc/context-index.db-shm
|
|
167
|
+
.ai-sdlc/context/sessions/
|
|
168
|
+
|
|
169
|
+
# AISDLC-1111: sha of the last workspace build in this worktree
|
|
170
|
+
.ai-sdlc/.last-build-sha
|
|
171
|
+
|
|
172
|
+
# SessionEnd hook (.claude/hooks/archive-transcript.sh) copies Claude Code session
|
|
173
|
+
# transcripts here. Plaintext, may hold secrets: machine-local, never committed.
|
|
174
|
+
.claude/transcripts/
|
|
175
|
+
|
|
176
|
+
# DEC-0370: agent memory notes are private; untracked and ignored (daily backup: cli-hierarchy up).
|
|
177
|
+
# Reverses the tracking half of AISDLC-1136.
|
|
178
|
+
.claude/memory/
|
|
179
|
+
# AISDLC-1136: per-machine Claude Code settings
|
|
180
|
+
.claude/settings.local.json
|
|
181
|
+
# AISDLC-1136: project MCP config points at per-machine sibling checkouts; copy .mcp.json.example
|
|
182
|
+
.mcp.json
|
|
183
|
+
|
|
184
|
+
# AISDLC-778 / RFC-0053: evaluator-only quarantine (mined and synthetic questions)
|
|
185
|
+
.ai-sdlc/context/eval-quarantine/
|
|
186
|
+
|
|
187
|
+
# AISDLC-1166: machine-local usage ledgers written by the pipeline must not block Step 0.5
|
|
188
|
+
.ai-sdlc/usage/
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.0](https://github.com/ai-sdlc-framework/ai-sdlc/compare/sdk-python-v0.2.1...sdk-python-v0.3.0) (2026-11-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **conformance:** one audit entry schema with JCS hashing and cross-SDK fixture (AISDLC-1213) ([#2471](https://github.com/ai-sdlc-framework/ai-sdlc/issues/2471)) ([11fd3ca](https://github.com/ai-sdlc-framework/ai-sdlc/commit/11fd3ca4520dbafe850bd6822e7b2a8dcd42e1ad))
|
|
9
|
+
|
|
10
|
+
## [0.2.1](https://github.com/ai-sdlc-framework/ai-sdlc/compare/sdk-python-v0.2.0...sdk-python-v0.2.1) (2026-10-09)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* hash-pin PyPI build deps and drop identity replace (AISDLC-704.4) ([#1266](https://github.com/ai-sdlc-framework/ai-sdlc/issues/1266)) ([92e6e25](https://github.com/ai-sdlc-framework/ai-sdlc/commit/92e6e25b4633d622b1339d960453c7a48163c58e))
|
|
16
|
+
|
|
3
17
|
## [0.2.0](https://github.com/ai-sdlc-framework/ai-sdlc/compare/sdk-python-v0.1.1...sdk-python-v0.2.0) (2026-03-24)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ai-sdlc-framework
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Python SDK for the AI-SDLC Framework
|
|
5
5
|
Project-URL: Homepage, https://github.com/ai-sdlc-framework/ai-sdlc
|
|
6
6
|
Project-URL: Repository, https://github.com/ai-sdlc-framework/ai-sdlc/tree/main/sdk-python
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is autogenerated by pip-compile with Python 3.14
|
|
3
|
+
# by the following command:
|
|
4
|
+
#
|
|
5
|
+
# pip-compile --allow-unsafe --generate-hashes --output-file=sdk-python/requirements-build.txt --strip-extras sdk-python/requirements-build.in
|
|
6
|
+
#
|
|
7
|
+
build==1.2.2.post1 \
|
|
8
|
+
--hash=sha256:1d61c0887fa860c01971625baae8bdd338e517b836a2f70dd1f7aa3a6b2fc5b5 \
|
|
9
|
+
--hash=sha256:b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7
|
|
10
|
+
# via -r sdk-python/requirements-build.in
|
|
11
|
+
hatchling==1.27.0 \
|
|
12
|
+
--hash=sha256:971c296d9819abb3811112fc52c7a9751c8d381898f36533bb16f9791e941fd6 \
|
|
13
|
+
--hash=sha256:d3a2f3567c4f926ea39849cdf924c7e99e6686c9c8e288ae1037c8fa2a5d937b
|
|
14
|
+
# via -r sdk-python/requirements-build.in
|
|
15
|
+
packaging==26.3 \
|
|
16
|
+
--hash=sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79 \
|
|
17
|
+
--hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c
|
|
18
|
+
# via
|
|
19
|
+
# build
|
|
20
|
+
# hatchling
|
|
21
|
+
pathspec==1.1.1 \
|
|
22
|
+
--hash=sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a \
|
|
23
|
+
--hash=sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189
|
|
24
|
+
# via hatchling
|
|
25
|
+
pluggy==1.6.0 \
|
|
26
|
+
--hash=sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3 \
|
|
27
|
+
--hash=sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746
|
|
28
|
+
# via hatchling
|
|
29
|
+
pyproject-hooks==1.3.3 \
|
|
30
|
+
--hash=sha256:5fc53fdac9f7bd63fbcdc868fb5f90b4784d78a53a3d3388cd738b807441a20b \
|
|
31
|
+
--hash=sha256:defda19b854fa0d3bd4f76ea4ddcba8abd7dcfcdd585a6690ade050744fc5f43
|
|
32
|
+
# via build
|
|
33
|
+
trove-classifiers==2026.9.21.13 \
|
|
34
|
+
--hash=sha256:0a9ebc8d4e2f3e8a22848c5258033035bec17a3012ac3fea16dbaa764489eb71 \
|
|
35
|
+
--hash=sha256:8b1ff4f9c191b1040b71c37f1e445ab99732911e3cd91de52838453a854d7a17
|
|
36
|
+
# via hatchling
|
|
@@ -29,6 +29,8 @@ def _entry_to_dict(entry: AuditEntry) -> dict[str, Any]:
|
|
|
29
29
|
d["hash"] = entry.hash
|
|
30
30
|
if entry.previous_hash is not None:
|
|
31
31
|
d["previousHash"] = entry.previous_hash
|
|
32
|
+
if entry.schema_version is not None:
|
|
33
|
+
d["schemaVersion"] = entry.schema_version
|
|
32
34
|
return d
|
|
33
35
|
|
|
34
36
|
|
|
@@ -44,6 +46,7 @@ def _dict_to_entry(d: dict[str, Any]) -> AuditEntry:
|
|
|
44
46
|
details=d.get("details"),
|
|
45
47
|
hash=d.get("hash"),
|
|
46
48
|
previous_hash=d.get("previousHash"),
|
|
49
|
+
schema_version=d.get("schemaVersion"),
|
|
47
50
|
)
|
|
48
51
|
|
|
49
52
|
|
|
@@ -4,15 +4,77 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import hashlib
|
|
6
6
|
import json
|
|
7
|
+
import math
|
|
7
8
|
import time
|
|
8
9
|
from datetime import UTC, datetime
|
|
10
|
+
from decimal import Decimal
|
|
9
11
|
from typing import Any
|
|
10
12
|
|
|
11
13
|
from .types import AuditEntry, AuditFilter, AuditSink, Decision, IntegrityResult
|
|
12
14
|
|
|
15
|
+
AUDIT_SCHEMA_VERSION = "2"
|
|
16
|
+
|
|
13
17
|
_counter = 0
|
|
14
18
|
|
|
15
19
|
|
|
20
|
+
def _format_number(value: int | float) -> str:
|
|
21
|
+
"""Format a number in the ECMAScript shortest form required by RFC 8785."""
|
|
22
|
+
f = float(value)
|
|
23
|
+
if not math.isfinite(f):
|
|
24
|
+
raise ValueError("Cannot canonicalize a non-finite number")
|
|
25
|
+
if f == 0:
|
|
26
|
+
return "0"
|
|
27
|
+
sign = "-" if f < 0 else ""
|
|
28
|
+
_, digit_tuple, exp = Decimal(repr(abs(f))).as_tuple()
|
|
29
|
+
digits = "".join(str(d) for d in digit_tuple).rstrip("0") or "0"
|
|
30
|
+
# position of the decimal point relative to the digit string
|
|
31
|
+
n = len("".join(str(d) for d in digit_tuple)) + int(exp)
|
|
32
|
+
k = len(digits)
|
|
33
|
+
if k <= n <= 21:
|
|
34
|
+
body = digits + "0" * (n - k)
|
|
35
|
+
elif 0 < n <= 21:
|
|
36
|
+
body = digits[:n] + "." + digits[n:]
|
|
37
|
+
elif -6 < n <= 0:
|
|
38
|
+
body = "0." + "0" * (-n) + digits
|
|
39
|
+
else:
|
|
40
|
+
e = n - 1
|
|
41
|
+
esign = "+" if e >= 0 else "-"
|
|
42
|
+
mant = digits if k == 1 else digits[0] + "." + digits[1:]
|
|
43
|
+
body = f"{mant}e{esign}{abs(e)}"
|
|
44
|
+
return sign + body
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def canonicalize(value: Any) -> str:
|
|
48
|
+
"""Serialize a value per RFC 8785 (JSON Canonicalization Scheme)."""
|
|
49
|
+
if value is None:
|
|
50
|
+
return "null"
|
|
51
|
+
if value is True:
|
|
52
|
+
return "true"
|
|
53
|
+
if value is False:
|
|
54
|
+
return "false"
|
|
55
|
+
if isinstance(value, (int, float)):
|
|
56
|
+
return _format_number(value)
|
|
57
|
+
if isinstance(value, str):
|
|
58
|
+
return json.dumps(value, ensure_ascii=False)
|
|
59
|
+
if isinstance(value, (list, tuple)):
|
|
60
|
+
return "[" + ",".join(canonicalize(v) for v in value) + "]"
|
|
61
|
+
if isinstance(value, dict):
|
|
62
|
+
keys = sorted(value, key=lambda k: k.encode("utf-16-be"))
|
|
63
|
+
return (
|
|
64
|
+
"{"
|
|
65
|
+
+ ",".join(
|
|
66
|
+
f"{json.dumps(k, ensure_ascii=False)}:{canonicalize(value[k])}" for k in keys
|
|
67
|
+
)
|
|
68
|
+
+ "}"
|
|
69
|
+
)
|
|
70
|
+
raise TypeError(f"Cannot canonicalize a value of type {type(value).__name__}")
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _format_timestamp(dt: datetime) -> str:
|
|
74
|
+
"""RFC 3339 UTC with millisecond precision, e.g. 2026-01-02T03:04:05.006Z."""
|
|
75
|
+
return dt.astimezone(UTC).strftime("%Y-%m-%dT%H:%M:%S.") + f"{dt.microsecond // 1000:03d}Z"
|
|
76
|
+
|
|
77
|
+
|
|
16
78
|
def _generate_id() -> str:
|
|
17
79
|
global _counter # noqa: PLW0603
|
|
18
80
|
_counter += 1
|
|
@@ -37,7 +99,28 @@ def compute_entry_hash(
|
|
|
37
99
|
entry: AuditEntry,
|
|
38
100
|
previous_hash: str | None = None,
|
|
39
101
|
) -> str:
|
|
40
|
-
"""Compute a SHA-256 hash for an audit entry, chaining to the previous hash.
|
|
102
|
+
"""Compute a SHA-256 hash for an audit entry, chaining to the previous hash.
|
|
103
|
+
|
|
104
|
+
Entries with ``schema_version == "2"`` hash the RFC 8785 canonical form; entries
|
|
105
|
+
without a schema version use the legacy rule so old chains still verify.
|
|
106
|
+
"""
|
|
107
|
+
if entry.schema_version == AUDIT_SCHEMA_VERSION:
|
|
108
|
+
canonical: dict[str, Any] = {
|
|
109
|
+
"schemaVersion": AUDIT_SCHEMA_VERSION,
|
|
110
|
+
"id": entry.id,
|
|
111
|
+
"timestamp": entry.timestamp,
|
|
112
|
+
"actor": entry.actor,
|
|
113
|
+
"action": entry.action,
|
|
114
|
+
"resource": entry.resource,
|
|
115
|
+
"decision": entry.decision,
|
|
116
|
+
}
|
|
117
|
+
if entry.policy is not None:
|
|
118
|
+
canonical["policy"] = entry.policy
|
|
119
|
+
if entry.details is not None:
|
|
120
|
+
canonical["details"] = entry.details
|
|
121
|
+
if previous_hash is not None:
|
|
122
|
+
canonical["previousHash"] = previous_hash
|
|
123
|
+
return hashlib.sha256(canonicalize(canonical).encode("utf-8")).hexdigest()
|
|
41
124
|
payload = json.dumps(
|
|
42
125
|
{
|
|
43
126
|
"id": entry.id,
|
|
@@ -75,7 +158,7 @@ class _AuditLogImpl:
|
|
|
75
158
|
|
|
76
159
|
base = AuditEntry(
|
|
77
160
|
id=_generate_id(),
|
|
78
|
-
timestamp=timestamp or datetime.now(UTC)
|
|
161
|
+
timestamp=timestamp or _format_timestamp(datetime.now(UTC)),
|
|
79
162
|
actor=actor,
|
|
80
163
|
action=action,
|
|
81
164
|
resource=resource,
|
|
@@ -83,6 +166,7 @@ class _AuditLogImpl:
|
|
|
83
166
|
decision=decision,
|
|
84
167
|
details=details,
|
|
85
168
|
previous_hash=prev_hash,
|
|
169
|
+
schema_version=AUDIT_SCHEMA_VERSION,
|
|
86
170
|
)
|
|
87
171
|
|
|
88
172
|
hash_val = compute_entry_hash(base, prev_hash)
|
|
@@ -97,6 +181,7 @@ class _AuditLogImpl:
|
|
|
97
181
|
details=base.details,
|
|
98
182
|
hash=hash_val,
|
|
99
183
|
previous_hash=prev_hash,
|
|
184
|
+
schema_version=AUDIT_SCHEMA_VERSION,
|
|
100
185
|
)
|
|
101
186
|
|
|
102
187
|
self._log.append(entry)
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"""Cross-SDK audit chain conformance (conformance/audit-chain)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
from dataclasses import replace
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
import pytest
|
|
11
|
+
|
|
12
|
+
from ai_sdlc.audit.file_sink import (
|
|
13
|
+
create_file_sink,
|
|
14
|
+
load_entries_from_file,
|
|
15
|
+
verify_file_integrity,
|
|
16
|
+
)
|
|
17
|
+
from ai_sdlc.audit.logger import canonicalize, compute_entry_hash
|
|
18
|
+
from ai_sdlc.audit.types import AuditEntry
|
|
19
|
+
|
|
20
|
+
ROOT = Path(__file__).resolve().parents[3] / "conformance" / "audit-chain"
|
|
21
|
+
FIXTURE = json.loads((ROOT / "fixture.json").read_text())
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _seal() -> list[AuditEntry]:
|
|
25
|
+
out: list[AuditEntry] = []
|
|
26
|
+
for i in FIXTURE["inputs"]:
|
|
27
|
+
prev = out[-1].hash if out else None
|
|
28
|
+
base = AuditEntry(
|
|
29
|
+
id=i["id"],
|
|
30
|
+
timestamp=i["timestamp"],
|
|
31
|
+
actor=i["actor"],
|
|
32
|
+
action=i["action"],
|
|
33
|
+
resource=i["resource"],
|
|
34
|
+
decision=i["decision"],
|
|
35
|
+
policy=i.get("policy"),
|
|
36
|
+
details=i.get("details"),
|
|
37
|
+
previous_hash=prev,
|
|
38
|
+
schema_version=FIXTURE["schemaVersion"],
|
|
39
|
+
)
|
|
40
|
+
out.append(replace(base, hash=compute_entry_hash(base, prev)))
|
|
41
|
+
return out
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_fixture_hashes_match_and_sample_written(tmp_path: Path) -> None:
|
|
45
|
+
entries = _seal()
|
|
46
|
+
if os.environ.get("AUDIT_CONFORMANCE_WRITE"):
|
|
47
|
+
target = ROOT / "samples" / "python.jsonl"
|
|
48
|
+
target.write_text("")
|
|
49
|
+
sink = create_file_sink(str(target))
|
|
50
|
+
for e in entries:
|
|
51
|
+
sink.write(e)
|
|
52
|
+
assert [e.hash for e in entries] == FIXTURE["expectedHashes"]
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@pytest.mark.parametrize("name", ["typescript", "go", "python"])
|
|
56
|
+
def test_verifies_every_sdk_sample(name: str) -> None:
|
|
57
|
+
assert verify_file_integrity(str(ROOT / "samples" / f"{name}.jsonl")).valid
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def test_one_byte_change_fails(tmp_path: Path) -> None:
|
|
61
|
+
text = (ROOT / "samples" / "typescript.jsonl").read_text()
|
|
62
|
+
p = tmp_path / "t.jsonl"
|
|
63
|
+
p.write_text(text.replace("policy/strict", "policy/strict2"))
|
|
64
|
+
result = verify_file_integrity(str(p))
|
|
65
|
+
assert not result.valid
|
|
66
|
+
assert result.broken_at == 1
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def test_downgraded_schema_version_fails(tmp_path: Path) -> None:
|
|
70
|
+
p = tmp_path / "d.jsonl"
|
|
71
|
+
p.write_text(
|
|
72
|
+
"\n".join(
|
|
73
|
+
json.dumps({k: v for k, v in json.loads(line).items() if k != "schemaVersion"})
|
|
74
|
+
for line in (ROOT / "samples" / "go.jsonl").read_text().splitlines()
|
|
75
|
+
)
|
|
76
|
+
+ "\n"
|
|
77
|
+
)
|
|
78
|
+
assert not verify_file_integrity(str(p)).valid
|
|
79
|
+
assert len(load_entries_from_file(str(p))) == 3
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
@pytest.mark.parametrize(
|
|
83
|
+
("value", "expected"),
|
|
84
|
+
[
|
|
85
|
+
(1.0, "1"),
|
|
86
|
+
(-0.0, "0"),
|
|
87
|
+
(2.5, "2.5"),
|
|
88
|
+
(1e21, "1e+21"),
|
|
89
|
+
(1e-7, "1e-7"),
|
|
90
|
+
(123456789012345680000.0, "123456789012345680000"),
|
|
91
|
+
(0.000001, "0.000001"),
|
|
92
|
+
(1.5e-9, "1.5e-9"),
|
|
93
|
+
(True, "true"),
|
|
94
|
+
(None, "null"),
|
|
95
|
+
],
|
|
96
|
+
)
|
|
97
|
+
def test_canonical_numbers(value: object, expected: str) -> None:
|
|
98
|
+
assert canonicalize(value) == expected
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def test_canonical_strings_and_keys() -> None:
|
|
102
|
+
assert canonicalize({"b": "<&>é", "a": [1, 2]}) == '{"a":[1,2],"b":"<&>é"}'
|
|
103
|
+
assert canonicalize(("x",)) == '["x"]'
|
|
104
|
+
with pytest.raises(TypeError):
|
|
105
|
+
canonicalize(object())
|
|
106
|
+
with pytest.raises(ValueError):
|
|
107
|
+
canonicalize(float("nan"))
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def test_legacy_chain_without_schema_version_still_verifies(tmp_path: Path) -> None:
|
|
111
|
+
out: list[AuditEntry] = []
|
|
112
|
+
for i in FIXTURE["inputs"]:
|
|
113
|
+
prev = out[-1].hash if out else None
|
|
114
|
+
base = AuditEntry(
|
|
115
|
+
id=i["id"],
|
|
116
|
+
timestamp=i["timestamp"],
|
|
117
|
+
actor=i["actor"],
|
|
118
|
+
action=i["action"],
|
|
119
|
+
resource=i["resource"],
|
|
120
|
+
decision=i["decision"],
|
|
121
|
+
policy=i.get("policy"),
|
|
122
|
+
details=i.get("details"),
|
|
123
|
+
previous_hash=prev,
|
|
124
|
+
)
|
|
125
|
+
out.append(replace(base, hash=compute_entry_hash(base, prev)))
|
|
126
|
+
p = tmp_path / "legacy.jsonl"
|
|
127
|
+
sink = create_file_sink(str(p))
|
|
128
|
+
for e in out:
|
|
129
|
+
sink.write(e)
|
|
130
|
+
assert verify_file_integrity(str(p)).valid
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Dependencies
|
|
2
|
-
node_modules/
|
|
3
|
-
|
|
4
|
-
# Build output
|
|
5
|
-
dist/
|
|
6
|
-
*.tsbuildinfo
|
|
7
|
-
.next/
|
|
8
|
-
|
|
9
|
-
# Coverage
|
|
10
|
-
coverage/
|
|
11
|
-
.nyc_output/
|
|
12
|
-
|
|
13
|
-
# Environment
|
|
14
|
-
.env
|
|
15
|
-
.env.*
|
|
16
|
-
!.env.example
|
|
17
|
-
|
|
18
|
-
# IDE
|
|
19
|
-
.idea/
|
|
20
|
-
.vscode/
|
|
21
|
-
*.swp
|
|
22
|
-
*.swo
|
|
23
|
-
*~
|
|
24
|
-
|
|
25
|
-
# OS
|
|
26
|
-
.DS_Store
|
|
27
|
-
Thumbs.db
|
|
28
|
-
|
|
29
|
-
# Logs
|
|
30
|
-
*.log
|
|
31
|
-
npm-debug.log*
|
|
32
|
-
pnpm-debug.log*
|
|
33
|
-
|
|
34
|
-
# AI-SDLC runtime artifacts
|
|
35
|
-
.ai-sdlc/audit.jsonl
|
|
36
|
-
.ai-sdlc/state.db
|
|
37
|
-
.ai-sdlc/state/
|
|
38
|
-
|
|
39
|
-
# Package manager
|
|
40
|
-
.pnpm-store/
|
|
41
|
-
|
|
42
|
-
# Python
|
|
43
|
-
__pycache__/
|
|
44
|
-
*.py[cod]
|
|
45
|
-
*.egg-info/
|
|
46
|
-
*.egg
|
|
47
|
-
*.whl
|
|
48
|
-
.venv/
|
|
49
|
-
.mypy_cache/
|
|
50
|
-
.pytest_cache/
|
|
51
|
-
.ruff_cache/
|
|
52
|
-
build/
|
|
53
|
-
*.pyz
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/code_analysis.py
RENAMED
|
File without changes
|
{ai_sdlc_framework-0.2.0 → ai_sdlc_framework-0.3.0}/src/ai_sdlc/adapters/stubs/deployment_target.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|