controlled-execution-system 0.1.2__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.
- controlled_execution_system-0.1.2/.codex +0 -0
- controlled_execution_system-0.1.2/.dockerignore +16 -0
- controlled_execution_system-0.1.2/.env.example +28 -0
- controlled_execution_system-0.1.2/.github/CODEOWNERS +1 -0
- controlled_execution_system-0.1.2/.github/ISSUE_TEMPLATE/bug_report.md +22 -0
- controlled_execution_system-0.1.2/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- controlled_execution_system-0.1.2/.github/pull_request_template.md +16 -0
- controlled_execution_system-0.1.2/.github/workflows/ci.yml +76 -0
- controlled_execution_system-0.1.2/.github/workflows/publish.yml +53 -0
- controlled_execution_system-0.1.2/.gitignore +51 -0
- controlled_execution_system-0.1.2/.mcp.json +11 -0
- controlled_execution_system-0.1.2/.pre-commit-config.yaml +16 -0
- controlled_execution_system-0.1.2/CHANGELOG.md +202 -0
- controlled_execution_system-0.1.2/CLAUDE.md +219 -0
- controlled_execution_system-0.1.2/CODE_OF_CONDUCT.md +47 -0
- controlled_execution_system-0.1.2/CONTRIBUTING.md +142 -0
- controlled_execution_system-0.1.2/Dockerfile +33 -0
- controlled_execution_system-0.1.2/LICENSE +21 -0
- controlled_execution_system-0.1.2/PKG-INFO +479 -0
- controlled_execution_system-0.1.2/README.md +427 -0
- controlled_execution_system-0.1.2/SECURITY.md +28 -0
- controlled_execution_system-0.1.2/alembic/env.py +84 -0
- controlled_execution_system-0.1.2/alembic/script.py.mako +26 -0
- controlled_execution_system-0.1.2/alembic/versions/.gitkeep +0 -0
- controlled_execution_system-0.1.2/alembic/versions/001_initial_schema.py +243 -0
- controlled_execution_system-0.1.2/alembic/versions/005_knowledge_tables.py +202 -0
- controlled_execution_system-0.1.2/alembic/versions/006_missing_control_harness_tables.py +103 -0
- controlled_execution_system-0.1.2/alembic/versions/007_add_project_id.py +98 -0
- controlled_execution_system-0.1.2/alembic/versions/008_project_members.py +48 -0
- controlled_execution_system-0.1.2/alembic/versions/009_observability_schema.py +250 -0
- controlled_execution_system-0.1.2/alembic/versions/010_alert_states.py +65 -0
- controlled_execution_system-0.1.2/alembic/versions/011_event_bus_schema.py +81 -0
- controlled_execution_system-0.1.2/alembic/versions/012_federated_bindings.py +75 -0
- controlled_execution_system-0.1.2/alembic/versions/013_registry_and_release_slices.py +83 -0
- controlled_execution_system-0.1.2/alembic/versions/014_alert_calibrations.py +45 -0
- controlled_execution_system-0.1.2/alembic/versions/015_webhook_delivery_transport.py +78 -0
- controlled_execution_system-0.1.2/alembic/versions/016_prune_legacy_server_state.py +38 -0
- controlled_execution_system-0.1.2/alembic.ini +38 -0
- controlled_execution_system-0.1.2/docker-compose.yml +38 -0
- controlled_execution_system-0.1.2/docs/Brownfield_Guide.md +145 -0
- controlled_execution_system-0.1.2/docs/Database_Operations.md +69 -0
- controlled_execution_system-0.1.2/docs/FreshCart_Worked_Example.md +857 -0
- controlled_execution_system-0.1.2/docs/GNHF_Trial_Guide.md +128 -0
- controlled_execution_system-0.1.2/docs/Getting_Started.md +241 -0
- controlled_execution_system-0.1.2/docs/Implementation_Guide.md +1606 -0
- controlled_execution_system-0.1.2/docs/Operations_Runbook.md +88 -0
- controlled_execution_system-0.1.2/docs/Operator_Playbook.md +110 -0
- controlled_execution_system-0.1.2/docs/PRD.md +5648 -0
- controlled_execution_system-0.1.2/docs/Production_Deployment_Guide.md +57 -0
- controlled_execution_system-0.1.2/docs/Quick_Reference_Card.md +338 -0
- controlled_execution_system-0.1.2/docs/Quickstart.md +73 -0
- controlled_execution_system-0.1.2/docs/ROADMAP_v1.1_and_beyond.md +198 -0
- controlled_execution_system-0.1.2/docs/Secrets_Management.md +71 -0
- controlled_execution_system-0.1.2/docs/Security_Audit.md +118 -0
- controlled_execution_system-0.1.2/docs/Troubleshooting.md +138 -0
- controlled_execution_system-0.1.2/docs/designs/2026-04-21-ces-spec-authoring.md +439 -0
- controlled_execution_system-0.1.2/docs/plans/2026-04-21-ces-spec-authoring.md +4019 -0
- controlled_execution_system-0.1.2/examples/__init__.py +0 -0
- controlled_execution_system-0.1.2/examples/freshcart/__init__.py +0 -0
- controlled_execution_system-0.1.2/examples/freshcart/run_e2e.py +317 -0
- controlled_execution_system-0.1.2/examples/freshcart/run_local_e2e.py +168 -0
- controlled_execution_system-0.1.2/examples/freshcart/sample_data.py +42 -0
- controlled_execution_system-0.1.2/examples/freshcart/seed_data.py +157 -0
- controlled_execution_system-0.1.2/examples/grafana-alert-trends.json +44 -0
- controlled_execution_system-0.1.2/examples/grafana-governance-health.json +44 -0
- controlled_execution_system-0.1.2/examples/grafana-polyrepo-delivery.json +44 -0
- controlled_execution_system-0.1.2/pyproject.toml +240 -0
- controlled_execution_system-0.1.2/scripts/gnhf_trial.sh +131 -0
- controlled_execution_system-0.1.2/src/ces/__init__.py +3 -0
- controlled_execution_system-0.1.2/src/ces/brownfield/__init__.py +11 -0
- controlled_execution_system-0.1.2/src/ces/brownfield/protocols.py +38 -0
- controlled_execution_system-0.1.2/src/ces/brownfield/services/__init__.py +0 -0
- controlled_execution_system-0.1.2/src/ces/brownfield/services/disposition_workflow.py +44 -0
- controlled_execution_system-0.1.2/src/ces/brownfield/services/legacy_register.py +417 -0
- controlled_execution_system-0.1.2/src/ces/cli/__init__.py +114 -0
- controlled_execution_system-0.1.2/src/ces/cli/_async.py +44 -0
- controlled_execution_system-0.1.2/src/ces/cli/_builder_flow.py +526 -0
- controlled_execution_system-0.1.2/src/ces/cli/_builder_handoff.py +49 -0
- controlled_execution_system-0.1.2/src/ces/cli/_builder_report.py +255 -0
- controlled_execution_system-0.1.2/src/ces/cli/_context.py +81 -0
- controlled_execution_system-0.1.2/src/ces/cli/_errors.py +96 -0
- controlled_execution_system-0.1.2/src/ces/cli/_factory.py +293 -0
- controlled_execution_system-0.1.2/src/ces/cli/_output.py +90 -0
- controlled_execution_system-0.1.2/src/ces/cli/approve_cmd.py +502 -0
- controlled_execution_system-0.1.2/src/ces/cli/audit_cmd.py +156 -0
- controlled_execution_system-0.1.2/src/ces/cli/baseline_cmd.py +98 -0
- controlled_execution_system-0.1.2/src/ces/cli/brownfield_cmd.py +440 -0
- controlled_execution_system-0.1.2/src/ces/cli/calibrate_cmd.py +144 -0
- controlled_execution_system-0.1.2/src/ces/cli/classify_cmd.py +121 -0
- controlled_execution_system-0.1.2/src/ces/cli/doctor_cmd.py +181 -0
- controlled_execution_system-0.1.2/src/ces/cli/dogfood_cmd.py +454 -0
- controlled_execution_system-0.1.2/src/ces/cli/emergency_cmd.py +151 -0
- controlled_execution_system-0.1.2/src/ces/cli/execute_cmd.py +213 -0
- controlled_execution_system-0.1.2/src/ces/cli/gate_cmd.py +176 -0
- controlled_execution_system-0.1.2/src/ces/cli/init_cmd.py +196 -0
- controlled_execution_system-0.1.2/src/ces/cli/intake_cmd.py +121 -0
- controlled_execution_system-0.1.2/src/ces/cli/manifest_cmd.py +198 -0
- controlled_execution_system-0.1.2/src/ces/cli/report_cmd.py +79 -0
- controlled_execution_system-0.1.2/src/ces/cli/review_cmd.py +409 -0
- controlled_execution_system-0.1.2/src/ces/cli/run_cmd.py +1579 -0
- controlled_execution_system-0.1.2/src/ces/cli/scan_cmd.py +204 -0
- controlled_execution_system-0.1.2/src/ces/cli/setup_ci_cmd.py +86 -0
- controlled_execution_system-0.1.2/src/ces/cli/spec_cmd.py +512 -0
- controlled_execution_system-0.1.2/src/ces/cli/status_cmd.py +597 -0
- controlled_execution_system-0.1.2/src/ces/cli/templates/__init__.py +1 -0
- controlled_execution_system-0.1.2/src/ces/cli/templates/ci/__init__.py +1 -0
- controlled_execution_system-0.1.2/src/ces/cli/templates/ci/github.yml +49 -0
- controlled_execution_system-0.1.2/src/ces/cli/templates/ci/gitlab-ci.yml +37 -0
- controlled_execution_system-0.1.2/src/ces/cli/templates/manifests/__init__.py +1 -0
- controlled_execution_system-0.1.2/src/ces/cli/templates/manifests/python-library.yaml +38 -0
- controlled_execution_system-0.1.2/src/ces/cli/templates/manifests/python-service.yaml +41 -0
- controlled_execution_system-0.1.2/src/ces/cli/triage_cmd.py +158 -0
- controlled_execution_system-0.1.2/src/ces/cli/vault_cmd.py +250 -0
- controlled_execution_system-0.1.2/src/ces/control/__init__.py +1 -0
- controlled_execution_system-0.1.2/src/ces/control/db/__init__.py +38 -0
- controlled_execution_system-0.1.2/src/ces/control/db/base.py +77 -0
- controlled_execution_system-0.1.2/src/ces/control/db/repository.py +497 -0
- controlled_execution_system-0.1.2/src/ces/control/db/tables.py +365 -0
- controlled_execution_system-0.1.2/src/ces/control/models/__init__.py +158 -0
- controlled_execution_system-0.1.2/src/ces/control/models/architecture_blueprint.py +99 -0
- controlled_execution_system-0.1.2/src/ces/control/models/audit_entry.py +70 -0
- controlled_execution_system-0.1.2/src/ces/control/models/cascade_result.py +34 -0
- controlled_execution_system-0.1.2/src/ces/control/models/debt_entry.py +51 -0
- controlled_execution_system-0.1.2/src/ces/control/models/evidence_packet.py +136 -0
- controlled_execution_system-0.1.2/src/ces/control/models/gate_evidence_packet.py +83 -0
- controlled_execution_system-0.1.2/src/ces/control/models/gate_result.py +156 -0
- controlled_execution_system-0.1.2/src/ces/control/models/intake.py +84 -0
- controlled_execution_system-0.1.2/src/ces/control/models/interface_contract.py +36 -0
- controlled_execution_system-0.1.2/src/ces/control/models/kill_switch_state.py +61 -0
- controlled_execution_system-0.1.2/src/ces/control/models/knowledge_vault.py +55 -0
- controlled_execution_system-0.1.2/src/ces/control/models/manifest.py +145 -0
- controlled_execution_system-0.1.2/src/ces/control/models/merge_decision.py +44 -0
- controlled_execution_system-0.1.2/src/ces/control/models/migration_control_pack.py +121 -0
- controlled_execution_system-0.1.2/src/ces/control/models/oracle_result.py +36 -0
- controlled_execution_system-0.1.2/src/ces/control/models/prl_item.py +49 -0
- controlled_execution_system-0.1.2/src/ces/control/models/spec.py +62 -0
- controlled_execution_system-0.1.2/src/ces/control/models/vision_anchor.py +51 -0
- controlled_execution_system-0.1.2/src/ces/control/services/__init__.py +49 -0
- controlled_execution_system-0.1.2/src/ces/control/services/audit_ledger.py +491 -0
- controlled_execution_system-0.1.2/src/ces/control/services/cascade_invalidation.py +262 -0
- controlled_execution_system-0.1.2/src/ces/control/services/classification.py +370 -0
- controlled_execution_system-0.1.2/src/ces/control/services/classification_oracle.py +203 -0
- controlled_execution_system-0.1.2/src/ces/control/services/gate_evaluator.py +242 -0
- controlled_execution_system-0.1.2/src/ces/control/services/invalidation.py +131 -0
- controlled_execution_system-0.1.2/src/ces/control/services/kill_switch.py +351 -0
- controlled_execution_system-0.1.2/src/ces/control/services/manifest_manager.py +702 -0
- controlled_execution_system-0.1.2/src/ces/control/services/merge_controller.py +296 -0
- controlled_execution_system-0.1.2/src/ces/control/services/policy_engine.py +215 -0
- controlled_execution_system-0.1.2/src/ces/control/services/workflow_engine.py +381 -0
- controlled_execution_system-0.1.2/src/ces/control/spec/__init__.py +1 -0
- controlled_execution_system-0.1.2/src/ces/control/spec/decomposer.py +125 -0
- controlled_execution_system-0.1.2/src/ces/control/spec/parser.py +155 -0
- controlled_execution_system-0.1.2/src/ces/control/spec/reconciler.py +32 -0
- controlled_execution_system-0.1.2/src/ces/control/spec/template_loader.py +59 -0
- controlled_execution_system-0.1.2/src/ces/control/spec/templates/__init__.py +1 -0
- controlled_execution_system-0.1.2/src/ces/control/spec/templates/default.md +44 -0
- controlled_execution_system-0.1.2/src/ces/control/spec/templates/default.yaml +26 -0
- controlled_execution_system-0.1.2/src/ces/control/spec/tree.py +78 -0
- controlled_execution_system-0.1.2/src/ces/control/spec/validator.py +57 -0
- controlled_execution_system-0.1.2/src/ces/emergency/__init__.py +13 -0
- controlled_execution_system-0.1.2/src/ces/emergency/protocols.py +39 -0
- controlled_execution_system-0.1.2/src/ces/emergency/services/__init__.py +0 -0
- controlled_execution_system-0.1.2/src/ces/emergency/services/emergency_service.py +214 -0
- controlled_execution_system-0.1.2/src/ces/emergency/services/manifest_factory.py +104 -0
- controlled_execution_system-0.1.2/src/ces/emergency/services/sla_timer.py +69 -0
- controlled_execution_system-0.1.2/src/ces/execution/__init__.py +101 -0
- controlled_execution_system-0.1.2/src/ces/execution/_subprocess_env.py +85 -0
- controlled_execution_system-0.1.2/src/ces/execution/agent_runner.py +238 -0
- controlled_execution_system-0.1.2/src/ces/execution/output_capture.py +110 -0
- controlled_execution_system-0.1.2/src/ces/execution/providers/__init__.py +29 -0
- controlled_execution_system-0.1.2/src/ces/execution/providers/bootstrap.py +114 -0
- controlled_execution_system-0.1.2/src/ces/execution/providers/cli_provider.py +225 -0
- controlled_execution_system-0.1.2/src/ces/execution/providers/demo_provider.py +193 -0
- controlled_execution_system-0.1.2/src/ces/execution/providers/multi_model.py +108 -0
- controlled_execution_system-0.1.2/src/ces/execution/providers/protocol.py +164 -0
- controlled_execution_system-0.1.2/src/ces/execution/providers/registry.py +92 -0
- controlled_execution_system-0.1.2/src/ces/execution/runtimes/__init__.py +13 -0
- controlled_execution_system-0.1.2/src/ces/execution/runtimes/adapters.py +274 -0
- controlled_execution_system-0.1.2/src/ces/execution/runtimes/protocol.py +64 -0
- controlled_execution_system-0.1.2/src/ces/execution/runtimes/registry.py +62 -0
- controlled_execution_system-0.1.2/src/ces/execution/sandbox.py +190 -0
- controlled_execution_system-0.1.2/src/ces/harness/__init__.py +1 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/__init__.py +53 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/disclosure_set.py +33 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/guide_pack.py +73 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/harness_profile.py +78 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/hidden_check.py +53 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/observed_legacy.py +72 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/review_assignment.py +50 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/review_finding.py +81 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/self_correction_state.py +60 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/sensor_result.py +82 -0
- controlled_execution_system-0.1.2/src/ces/harness/models/triage_result.py +96 -0
- controlled_execution_system-0.1.2/src/ces/harness/prompts/__init__.py +1 -0
- controlled_execution_system-0.1.2/src/ces/harness/prompts/review_prompts.py +142 -0
- controlled_execution_system-0.1.2/src/ces/harness/protocols.py +95 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/__init__.py +53 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/_file_reader.py +53 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/accessibility.py +55 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/base.py +112 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/dependency.py +169 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/infrastructure.py +115 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/migration.py +154 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/performance.py +167 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/resilience.py +123 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/security.py +147 -0
- controlled_execution_system-0.1.2/src/ces/harness/sensors/test_coverage.py +129 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/__init__.py +44 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/diff_extractor.py +326 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/evidence_synthesizer.py +606 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/findings_aggregator.py +178 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/guide_pack_builder.py +296 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/hidden_check_engine.py +225 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/review_executor.py +311 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/review_router.py +557 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/self_correction_manager.py +272 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/sensor_orchestrator.py +234 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/spec_authoring.py +209 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/spec_importer.py +66 -0
- controlled_execution_system-0.1.2/src/ces/harness/services/trust_manager.py +340 -0
- controlled_execution_system-0.1.2/src/ces/intake/__init__.py +15 -0
- controlled_execution_system-0.1.2/src/ces/intake/protocols.py +71 -0
- controlled_execution_system-0.1.2/src/ces/intake/questions/phase_questions.yaml +123 -0
- controlled_execution_system-0.1.2/src/ces/intake/services/__init__.py +0 -0
- controlled_execution_system-0.1.2/src/ces/intake/services/assumption_registry.py +254 -0
- controlled_execution_system-0.1.2/src/ces/intake/services/interview_engine.py +386 -0
- controlled_execution_system-0.1.2/src/ces/knowledge/__init__.py +16 -0
- controlled_execution_system-0.1.2/src/ces/knowledge/protocols.py +44 -0
- controlled_execution_system-0.1.2/src/ces/knowledge/services/__init__.py +0 -0
- controlled_execution_system-0.1.2/src/ces/knowledge/services/note_ranker.py +101 -0
- controlled_execution_system-0.1.2/src/ces/knowledge/services/trust_decay.py +129 -0
- controlled_execution_system-0.1.2/src/ces/knowledge/services/vault_query_filter.py +92 -0
- controlled_execution_system-0.1.2/src/ces/knowledge/services/vault_service.py +416 -0
- controlled_execution_system-0.1.2/src/ces/local_store.py +1456 -0
- controlled_execution_system-0.1.2/src/ces/observability/__init__.py +6 -0
- controlled_execution_system-0.1.2/src/ces/observability/conventions.py +57 -0
- controlled_execution_system-0.1.2/src/ces/observability/counters.py +85 -0
- controlled_execution_system-0.1.2/src/ces/observability/metrics_bridge.py +220 -0
- controlled_execution_system-0.1.2/src/ces/observability/otel.py +131 -0
- controlled_execution_system-0.1.2/src/ces/observability/services/__init__.py +0 -0
- controlled_execution_system-0.1.2/src/ces/observability/services/collector.py +116 -0
- controlled_execution_system-0.1.2/src/ces/shared/__init__.py +1 -0
- controlled_execution_system-0.1.2/src/ces/shared/base.py +49 -0
- controlled_execution_system-0.1.2/src/ces/shared/config.py +38 -0
- controlled_execution_system-0.1.2/src/ces/shared/crypto.py +279 -0
- controlled_execution_system-0.1.2/src/ces/shared/enums.py +457 -0
- controlled_execution_system-0.1.2/src/ces/shared/logging.py +76 -0
- controlled_execution_system-0.1.2/tests/__init__.py +1 -0
- controlled_execution_system-0.1.2/tests/conftest.py +90 -0
- controlled_execution_system-0.1.2/tests/fixtures/builder_scenarios/brownfield-billing/README.md +3 -0
- controlled_execution_system-0.1.2/tests/fixtures/builder_scenarios/brownfield-billing/billing_export.py +3 -0
- controlled_execution_system-0.1.2/tests/fixtures/builder_scenarios/brownfield-billing/export_samples.csv +3 -0
- controlled_execution_system-0.1.2/tests/fixtures/specs/complex-hierarchy.md +66 -0
- controlled_execution_system-0.1.2/tests/fixtures/specs/cyclic-deps.md +51 -0
- controlled_execution_system-0.1.2/tests/fixtures/specs/minimal-valid.md +45 -0
- controlled_execution_system-0.1.2/tests/fixtures/specs/missing-non-goals.md +39 -0
- controlled_execution_system-0.1.2/tests/fixtures/specs/notion-export.md +23 -0
- controlled_execution_system-0.1.2/tests/integration/__init__.py +6 -0
- controlled_execution_system-0.1.2/tests/integration/conftest.py +160 -0
- controlled_execution_system-0.1.2/tests/integration/test_audit_chain.py +237 -0
- controlled_execution_system-0.1.2/tests/integration/test_db.py +289 -0
- controlled_execution_system-0.1.2/tests/integration/test_docker_sandbox.py +130 -0
- controlled_execution_system-0.1.2/tests/integration/test_freshcart_e2e.py +479 -0
- controlled_execution_system-0.1.2/tests/integration/test_manifest_lifecycle.py +259 -0
- controlled_execution_system-0.1.2/tests/integration/test_phase02_cross_service.py +432 -0
- controlled_execution_system-0.1.2/tests/integration/test_phase03_pipeline.py +477 -0
- controlled_execution_system-0.1.2/tests/integration/test_phase04_pipeline.py +510 -0
- controlled_execution_system-0.1.2/tests/integration/test_phase05_cross_service.py +549 -0
- controlled_execution_system-0.1.2/tests/integration/test_pipeline_e2e.py +162 -0
- controlled_execution_system-0.1.2/tests/integration/test_spec_end_to_end.py +181 -0
- controlled_execution_system-0.1.2/tests/integration/test_workflow.py +245 -0
- controlled_execution_system-0.1.2/tests/property/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/property/test_spec_roundtrip.py +96 -0
- controlled_execution_system-0.1.2/tests/support/__init__.py +1 -0
- controlled_execution_system-0.1.2/tests/support/builder_scenarios.py +386 -0
- controlled_execution_system-0.1.2/tests/support/builder_validation.py +112 -0
- controlled_execution_system-0.1.2/tests/unit/__init__.py +1 -0
- controlled_execution_system-0.1.2/tests/unit/conftest.py +104 -0
- controlled_execution_system-0.1.2/tests/unit/test_base_model.py +169 -0
- controlled_execution_system-0.1.2/tests/unit/test_brownfield/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_brownfield/test_disposition_workflow.py +74 -0
- controlled_execution_system-0.1.2/tests/unit/test_brownfield/test_legacy_register.py +698 -0
- controlled_execution_system-0.1.2/tests/unit/test_builder_flow.py +265 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/conftest.py +29 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_approve_cmd.py +609 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_audit_cmd.py +148 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_baseline_cmd.py +79 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_brownfield_cmd.py +526 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_brownfield_from_scan.py +118 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_builder_expert_handoff.py +290 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_builder_first_dogfooding.py +68 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_builder_report_cmd.py +79 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_builder_scenario_harness.py +70 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_builder_validation_artifacts.py +64 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_calibrate_cmd.py +185 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_classify_cmd.py +268 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_context.py +58 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_demo_mode_hints.py +47 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_doctor_cmd.py +142 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_dogfood_cmd.py +342 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_dogfood_e2e.py +112 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_emergency_cmd.py +169 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_errors.py +78 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_execute_cmd.py +199 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_factory.py +227 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_factory_signing.py +89 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_gate_cmd.py +149 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_init_cmd.py +239 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_init_template.py +74 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_intake_cmd.py +139 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_manifest_cmd.py +447 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_output.py +85 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_review_cmd.py +512 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_run_cmd.py +1789 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_run_cmd_from_spec.py +114 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_scan_cmd.py +120 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_setup_ci_cmd.py +80 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_spec_cmd.py +720 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_status_cmd.py +285 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_status_metrics.py +216 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_triage_cmd.py +220 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_vault_cmd.py +315 -0
- controlled_execution_system-0.1.2/tests/unit/test_cli/test_wizard.py +523 -0
- controlled_execution_system-0.1.2/tests/unit/test_config.py +68 -0
- controlled_execution_system-0.1.2/tests/unit/test_crypto.py +336 -0
- controlled_execution_system-0.1.2/tests/unit/test_db_base_coverage.py +126 -0
- controlled_execution_system-0.1.2/tests/unit/test_db_knowledge_tables.py +783 -0
- controlled_execution_system-0.1.2/tests/unit/test_db_repository_coverage.py +815 -0
- controlled_execution_system-0.1.2/tests/unit/test_db_structure.py +426 -0
- controlled_execution_system-0.1.2/tests/unit/test_db_tables_coverage.py +370 -0
- controlled_execution_system-0.1.2/tests/unit/test_docs/test_brownfield_guide_docs.py +63 -0
- controlled_execution_system-0.1.2/tests/unit/test_docs/test_ci_workflow.py +39 -0
- controlled_execution_system-0.1.2/tests/unit/test_docs/test_gnhf_trial_guide.py +72 -0
- controlled_execution_system-0.1.2/tests/unit/test_docs/test_operations_runbook_docs.py +32 -0
- controlled_execution_system-0.1.2/tests/unit/test_docs/test_operator_playbook_docs.py +88 -0
- controlled_execution_system-0.1.2/tests/unit/test_docs/test_public_repo_contract.py +52 -0
- controlled_execution_system-0.1.2/tests/unit/test_docs/test_quick_reference_card_docs.py +56 -0
- controlled_execution_system-0.1.2/tests/unit/test_docs/test_release_packaging.py +150 -0
- controlled_execution_system-0.1.2/tests/unit/test_emergency/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_emergency/test_emergency_service.py +416 -0
- controlled_execution_system-0.1.2/tests/unit/test_emergency/test_manifest_factory.py +101 -0
- controlled_execution_system-0.1.2/tests/unit/test_emergency/test_sla_timer.py +67 -0
- controlled_execution_system-0.1.2/tests/unit/test_enums.py +304 -0
- controlled_execution_system-0.1.2/tests/unit/test_examples/__init__.py +1 -0
- controlled_execution_system-0.1.2/tests/unit/test_examples/test_freshcart_seed_data.py +27 -0
- controlled_execution_system-0.1.2/tests/unit/test_execution/__init__.py +1 -0
- controlled_execution_system-0.1.2/tests/unit/test_execution/test_agent_runner.py +475 -0
- controlled_execution_system-0.1.2/tests/unit/test_execution/test_claude_adapter_hardening.py +168 -0
- controlled_execution_system-0.1.2/tests/unit/test_execution/test_output_capture.py +164 -0
- controlled_execution_system-0.1.2/tests/unit/test_execution/test_public_exports.py +26 -0
- controlled_execution_system-0.1.2/tests/unit/test_execution/test_runtime_adapters.py +169 -0
- controlled_execution_system-0.1.2/tests/unit/test_execution/test_runtime_registry.py +71 -0
- controlled_execution_system-0.1.2/tests/unit/test_execution/test_sandbox.py +217 -0
- controlled_execution_system-0.1.2/tests/unit/test_execution/test_secret_stripping.py +123 -0
- controlled_execution_system-0.1.2/tests/unit/test_harness/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_harness/test_review_prompts.py +139 -0
- controlled_execution_system-0.1.2/tests/unit/test_intake/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_intake/test_assumption_registry.py +201 -0
- controlled_execution_system-0.1.2/tests/unit/test_intake/test_interview_engine.py +456 -0
- controlled_execution_system-0.1.2/tests/unit/test_intake/test_vault_precheck_integration.py +252 -0
- controlled_execution_system-0.1.2/tests/unit/test_knowledge/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_knowledge/test_note_ranker.py +210 -0
- controlled_execution_system-0.1.2/tests/unit/test_knowledge/test_trust_decay.py +151 -0
- controlled_execution_system-0.1.2/tests/unit/test_knowledge/test_vault_invalidation.py +191 -0
- controlled_execution_system-0.1.2/tests/unit/test_knowledge/test_vault_query_filter.py +213 -0
- controlled_execution_system-0.1.2/tests/unit/test_knowledge/test_vault_service.py +522 -0
- controlled_execution_system-0.1.2/tests/unit/test_local_store.py +658 -0
- controlled_execution_system-0.1.2/tests/unit/test_logging.py +116 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_architecture_blueprint.py +179 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_audit_entry.py +175 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_debt_entry.py +111 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_disclosure_set.py +73 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_evidence_packet.py +214 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_gate_evidence_packet.py +167 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_guide_pack.py +130 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_harness_profile.py +232 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_intake.py +254 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_interface_contract.py +97 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_knowledge_vault.py +128 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_manifest.py +291 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_migration_control_pack.py +202 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_observed_legacy.py +185 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_prl_item.py +116 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_review_assignment.py +73 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_review_finding.py +175 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_self_correction_state.py +99 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_sensor_result.py +140 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_triage_result.py +111 -0
- controlled_execution_system-0.1.2/tests/unit/test_models/test_vision_anchor.py +131 -0
- controlled_execution_system-0.1.2/tests/unit/test_no_llm_imports.py +112 -0
- controlled_execution_system-0.1.2/tests/unit/test_observability/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_observability/conftest.py +76 -0
- controlled_execution_system-0.1.2/tests/unit/test_observability/test_collector.py +230 -0
- controlled_execution_system-0.1.2/tests/unit/test_observability/test_conventions.py +156 -0
- controlled_execution_system-0.1.2/tests/unit/test_observability/test_counters.py +94 -0
- controlled_execution_system-0.1.2/tests/unit/test_observability/test_metrics_bridge.py +200 -0
- controlled_execution_system-0.1.2/tests/unit/test_observability/test_otel.py +138 -0
- controlled_execution_system-0.1.2/tests/unit/test_providers/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_providers/test_bootstrap.py +66 -0
- controlled_execution_system-0.1.2/tests/unit/test_providers/test_chain_of_custody.py +82 -0
- controlled_execution_system-0.1.2/tests/unit/test_providers/test_cli_provider.py +241 -0
- controlled_execution_system-0.1.2/tests/unit/test_providers/test_demo_provider.py +166 -0
- controlled_execution_system-0.1.2/tests/unit/test_providers/test_multi_model.py +114 -0
- controlled_execution_system-0.1.2/tests/unit/test_providers/test_protocol.py +142 -0
- controlled_execution_system-0.1.2/tests/unit/test_providers/test_registry.py +184 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_accessibility_sensor.py +42 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_dependency_sensor.py +138 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_dogfood_sensors.py +269 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_file_reader.py +58 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_infrastructure_sensor.py +140 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_migration_sensor.py +117 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_performance_sensor.py +129 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_resilience_sensor.py +120 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_security_sensor.py +145 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_sensor_packs.py +179 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_sensor_protocol.py +151 -0
- controlled_execution_system-0.1.2/tests/unit/test_sensors/test_test_coverage_sensor_module.py +10 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/__init__.py +0 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_audit_ledger.py +946 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_cascade_invalidation.py +544 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_classification.py +343 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_classification_oracle.py +273 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_classification_oracle_hints.py +84 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_diff_extractor.py +297 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_dogfood_integration.py +225 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_evidence_synthesizer.py +923 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_findings_aggregator.py +347 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_gate_evaluator.py +523 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_guide_pack_builder.py +326 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_hidden_check_engine.py +391 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_invalidation.py +231 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_kill_switch.py +446 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_manifest_manager.py +1039 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_merge_controller.py +370 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_policy_engine.py +317 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_review_executor.py +345 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_review_router.py +785 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_self_correction_manager.py +386 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_sensor_orchestrator.py +279 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_spec_authoring.py +105 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_spec_decomposer.py +76 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_spec_importer.py +67 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_spec_models.py +109 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_spec_parser.py +79 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_spec_reconciler.py +64 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_spec_template_loader.py +42 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_spec_tree.py +87 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_spec_validator.py +41 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_trust_manager.py +579 -0
- controlled_execution_system-0.1.2/tests/unit/test_services/test_workflow_engine.py +535 -0
- controlled_execution_system-0.1.2/uv.lock +2122 -0
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# CES Environment Configuration
|
|
2
|
+
#
|
|
3
|
+
# CES is a local builder-first CLI. Most users do not need to set anything
|
|
4
|
+
# here -- `ces init` generates the per-project audit-ledger HMAC secret and
|
|
5
|
+
# Ed25519 signing keypair under `.ces/keys/` automatically.
|
|
6
|
+
#
|
|
7
|
+
# Copy to `.env` and override only if you need non-default behaviour.
|
|
8
|
+
# NEVER commit `.env` to version control.
|
|
9
|
+
#
|
|
10
|
+
# See docs/Quickstart.md for the getting-started path.
|
|
11
|
+
|
|
12
|
+
# Logging
|
|
13
|
+
CES_LOG_LEVEL=INFO
|
|
14
|
+
CES_LOG_FORMAT=json
|
|
15
|
+
|
|
16
|
+
# Default local agent runtime when multiple CLIs are installed (codex | claude)
|
|
17
|
+
CES_DEFAULT_RUNTIME=codex
|
|
18
|
+
|
|
19
|
+
# Demo mode: serve canned helper responses when no CLI-backed provider is
|
|
20
|
+
# available. Useful for evaluating the CLI flow without authenticating to
|
|
21
|
+
# Anthropic or OpenAI. Defaults to 0 (off).
|
|
22
|
+
CES_DEMO_MODE=0
|
|
23
|
+
|
|
24
|
+
# Audit-ledger HMAC secret. Optional: `ces init` writes a random 32-byte
|
|
25
|
+
# secret to `.ces/keys/audit.hmac` (mode 0600). Set this only to override
|
|
26
|
+
# the file-based secret in CI or managed environments. Do not use the
|
|
27
|
+
# hardcoded development default; the factory will refuse to start.
|
|
28
|
+
# CES_AUDIT_HMAC_SECRET=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @chrisduvillard
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Report a defect in CES behavior, docs, or packaging
|
|
4
|
+
title: "[Bug] "
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Summary
|
|
10
|
+
|
|
11
|
+
Describe the problem clearly.
|
|
12
|
+
|
|
13
|
+
## Reproduction
|
|
14
|
+
|
|
15
|
+
1. Environment:
|
|
16
|
+
2. Command or workflow:
|
|
17
|
+
3. Actual result:
|
|
18
|
+
4. Expected result:
|
|
19
|
+
|
|
20
|
+
## Evidence
|
|
21
|
+
|
|
22
|
+
Include logs, stack traces, screenshots, or failing commands when relevant.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest a new CES capability or public workflow improvement
|
|
4
|
+
title: "[Feature] "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
|
|
11
|
+
What is missing or hard to do today?
|
|
12
|
+
|
|
13
|
+
## Proposed change
|
|
14
|
+
|
|
15
|
+
Describe the behavior or workflow you want.
|
|
16
|
+
|
|
17
|
+
## Context
|
|
18
|
+
|
|
19
|
+
Explain who benefits, constraints, and any alternatives already considered.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
Describe the user-facing or operational change in 2-4 sentences.
|
|
4
|
+
|
|
5
|
+
## Verification
|
|
6
|
+
|
|
7
|
+
- [ ] `uv run ruff check src/ tests/`
|
|
8
|
+
- [ ] `uv run ruff format --check src/ tests/`
|
|
9
|
+
- [ ] `uv run mypy src/ces/ --ignore-missing-imports`
|
|
10
|
+
- [ ] `uv run pytest tests/unit/ -q -W error`
|
|
11
|
+
|
|
12
|
+
## Deployment Notes
|
|
13
|
+
|
|
14
|
+
- [ ] No special deployment changes
|
|
15
|
+
- [ ] Docs updated if the public contract changed
|
|
16
|
+
- [ ] Follow-up work tracked if anything was intentionally deferred
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: astral-sh/setup-uv@v4
|
|
15
|
+
with:
|
|
16
|
+
version: ">=0.11.3"
|
|
17
|
+
- run: uv sync --frozen
|
|
18
|
+
- run: uv run ruff check src/ tests/
|
|
19
|
+
- run: uv run ruff format --check src/ tests/
|
|
20
|
+
|
|
21
|
+
typecheck:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: astral-sh/setup-uv@v4
|
|
26
|
+
with:
|
|
27
|
+
version: ">=0.11.3"
|
|
28
|
+
- run: uv sync --frozen
|
|
29
|
+
- run: uv run mypy src/ces/ --ignore-missing-imports
|
|
30
|
+
|
|
31
|
+
test:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
services:
|
|
34
|
+
postgres:
|
|
35
|
+
image: postgres:17
|
|
36
|
+
env:
|
|
37
|
+
POSTGRES_USER: ces
|
|
38
|
+
POSTGRES_PASSWORD: ces_dev
|
|
39
|
+
POSTGRES_DB: ces_dev
|
|
40
|
+
ports:
|
|
41
|
+
- 5432:5432
|
|
42
|
+
options: >-
|
|
43
|
+
--health-cmd "pg_isready -U ces"
|
|
44
|
+
--health-interval 10s
|
|
45
|
+
--health-timeout 5s
|
|
46
|
+
--health-retries 5
|
|
47
|
+
redis:
|
|
48
|
+
image: redis:7.4-alpine
|
|
49
|
+
ports:
|
|
50
|
+
- 6379:6379
|
|
51
|
+
options: >-
|
|
52
|
+
--health-cmd "redis-cli ping"
|
|
53
|
+
--health-interval 10s
|
|
54
|
+
--health-timeout 5s
|
|
55
|
+
--health-retries 5
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
- uses: astral-sh/setup-uv@v4
|
|
59
|
+
with:
|
|
60
|
+
version: ">=0.11.3"
|
|
61
|
+
- run: uv sync --frozen
|
|
62
|
+
- name: Run Alembic migrations
|
|
63
|
+
env:
|
|
64
|
+
CES_DATABASE_URL: postgresql+asyncpg://ces:ces_dev@localhost:5432/ces_dev
|
|
65
|
+
CES_DATABASE_SYNC_URL: postgresql+psycopg://ces:ces_dev@localhost:5432/ces_dev
|
|
66
|
+
run: uv run alembic upgrade head
|
|
67
|
+
- name: Run tests with coverage
|
|
68
|
+
env:
|
|
69
|
+
CES_DATABASE_URL: postgresql+asyncpg://ces:ces_dev@localhost:5432/ces_dev
|
|
70
|
+
CES_DATABASE_SYNC_URL: postgresql+psycopg://ces:ces_dev@localhost:5432/ces_dev
|
|
71
|
+
CES_REDIS_URL: redis://localhost:6379/0
|
|
72
|
+
run: uv run pytest tests/ --cov=ces --cov-fail-under=88 -q -W error
|
|
73
|
+
- name: Build distributions
|
|
74
|
+
run: uv build
|
|
75
|
+
- name: Check distribution metadata
|
|
76
|
+
run: uvx twine check dist/*
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: pypi
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write # Required for trusted publishing
|
|
14
|
+
contents: read # Required for actions/checkout (the permissions block replaces defaults, not merges)
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: astral-sh/setup-uv@v4
|
|
18
|
+
with:
|
|
19
|
+
version: ">=0.11.3"
|
|
20
|
+
- run: uv sync --frozen
|
|
21
|
+
|
|
22
|
+
- name: Run tests before publishing
|
|
23
|
+
env:
|
|
24
|
+
CES_DATABASE_URL: "sqlite+aiosqlite:///test.db"
|
|
25
|
+
CES_DATABASE_SYNC_URL: "sqlite:///test.db"
|
|
26
|
+
run: uv run pytest tests/unit/ -q -W error
|
|
27
|
+
|
|
28
|
+
- name: Run builder-first smoke tests
|
|
29
|
+
run: uv run pytest tests/integration/test_freshcart_e2e.py -q
|
|
30
|
+
|
|
31
|
+
- name: Build distributions
|
|
32
|
+
run: uv build
|
|
33
|
+
|
|
34
|
+
- name: Check distribution metadata
|
|
35
|
+
run: uvx twine check dist/*
|
|
36
|
+
|
|
37
|
+
- name: Smoke test installed CLI
|
|
38
|
+
shell: bash
|
|
39
|
+
run: |
|
|
40
|
+
wheel_path="$(python - <<'PY'
|
|
41
|
+
from pathlib import Path
|
|
42
|
+
|
|
43
|
+
wheels = sorted(Path("dist").glob("controlled_execution_system-*.whl"))
|
|
44
|
+
if len(wheels) != 1:
|
|
45
|
+
raise SystemExit(f"Expected exactly one wheel, found {len(wheels)}: {wheels}")
|
|
46
|
+
print(wheels[0])
|
|
47
|
+
PY
|
|
48
|
+
)"
|
|
49
|
+
uv tool run --from "$wheel_path" ces --help
|
|
50
|
+
uv tool run --from "$wheel_path" ces init --help
|
|
51
|
+
|
|
52
|
+
- name: Publish to PyPI
|
|
53
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
.venv/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
*.egg-info/
|
|
9
|
+
|
|
10
|
+
# Environment
|
|
11
|
+
.env
|
|
12
|
+
!.env.example
|
|
13
|
+
|
|
14
|
+
# IDE
|
|
15
|
+
.idea/
|
|
16
|
+
.vscode/
|
|
17
|
+
*.swp
|
|
18
|
+
.claude/worktrees/
|
|
19
|
+
.claude/settings.local.json
|
|
20
|
+
.worktrees/
|
|
21
|
+
|
|
22
|
+
# Reviewer-agent scratch artifacts (codex / claude CLI sub-agents create
|
|
23
|
+
# these inside the working tree when exploring stateful code paths)
|
|
24
|
+
scratch_*/
|
|
25
|
+
tmp_test.cmd
|
|
26
|
+
|
|
27
|
+
# Testing
|
|
28
|
+
.coverage
|
|
29
|
+
htmlcov/
|
|
30
|
+
.pytest_cache/
|
|
31
|
+
.ruff_cache/
|
|
32
|
+
.mypy_cache/
|
|
33
|
+
|
|
34
|
+
# CES project-level secrets
|
|
35
|
+
*.private_key
|
|
36
|
+
.controlled-execution/keys/
|
|
37
|
+
|
|
38
|
+
# OS
|
|
39
|
+
.DS_Store
|
|
40
|
+
Thumbs.db
|
|
41
|
+
|
|
42
|
+
# UV
|
|
43
|
+
.python-version
|
|
44
|
+
|
|
45
|
+
# Local CES project state (created by ces init / ces build)
|
|
46
|
+
.ces/
|
|
47
|
+
|
|
48
|
+
# Internal development artifacts
|
|
49
|
+
.planning/
|
|
50
|
+
tasks/
|
|
51
|
+
docs/superpowers/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.15.9
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: local
|
|
10
|
+
hooks:
|
|
11
|
+
- id: mypy
|
|
12
|
+
name: mypy (strict, via uv)
|
|
13
|
+
entry: uv run mypy src/ces/ --ignore-missing-imports
|
|
14
|
+
language: system
|
|
15
|
+
pass_filenames: false
|
|
16
|
+
types: [python]
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.2] - 2026-04-23
|
|
11
|
+
|
|
12
|
+
Security + release-readiness hardening. Three critical release blockers
|
|
13
|
+
identified in the 2026-04-23 release-readiness audit are resolved; no
|
|
14
|
+
product-shape changes. Full remediation plan archived at
|
|
15
|
+
`.planning/release-0.1.2-plan.md`.
|
|
16
|
+
|
|
17
|
+
### Security
|
|
18
|
+
- **Manifest signing is now actually enforced end-to-end.** The Ed25519
|
|
19
|
+
keypair used by `ManifestManager` is generated and persisted to
|
|
20
|
+
`.ces/keys/` (mode `0600`) on `ces init` and loaded by
|
|
21
|
+
`_factory.get_services()` on every CLI invocation. Before 0.1.2 the
|
|
22
|
+
keypair was regenerated per-process, so signatures produced in one
|
|
23
|
+
CLI command could not be verified in the next one — D-13 manifest
|
|
24
|
+
integrity was silently defeated. A new cross-invocation regression
|
|
25
|
+
test in `tests/unit/test_cli/test_factory_signing.py` locks in the
|
|
26
|
+
fixed behaviour.
|
|
27
|
+
- **Audit-ledger HMAC secret is now project-scoped by default.**
|
|
28
|
+
`ces init` generates a random 32-byte secret and writes it to
|
|
29
|
+
`.ces/keys/audit.hmac` (mode `0600`). `load_audit_hmac_secret`
|
|
30
|
+
rejects the hardcoded development-default marker string so users
|
|
31
|
+
who forget to override `CES_AUDIT_HMAC_SECRET` no longer silently
|
|
32
|
+
ship with a publicly-known audit secret. `CES_AUDIT_HMAC_SECRET`
|
|
33
|
+
is still honoured as an explicit override for CI/ops.
|
|
34
|
+
- **Claude builder runtime no longer runs with `acceptEdits`.**
|
|
35
|
+
`ClaudeRuntimeAdapter.run_task` now uses `--permission-mode default`
|
|
36
|
+
plus a `--allowedTools` allowlist. The default allowlist is
|
|
37
|
+
`Read Grep Glob Edit Write`; `Bash` and `WebFetch` require explicit
|
|
38
|
+
opt-in via `TaskManifest.allowed_tools`. A prompt-injected repo
|
|
39
|
+
(hostile README, issue body, code comment) can no longer steer the
|
|
40
|
+
model into executing arbitrary host commands via auto-approved tool
|
|
41
|
+
calls. Regression test: `tests/unit/test_execution/test_claude_adapter_hardening.py`.
|
|
42
|
+
- **Subprocess stdout/stderr are secret-scrubbed** before being persisted
|
|
43
|
+
to `.ces/state.db` and included in evidence packets. An agent that
|
|
44
|
+
reads `.env`/`~/.aws/credentials` and echoes it no longer causes
|
|
45
|
+
that material to land in CES persistence. Scrubber extracted as
|
|
46
|
+
`scrub_secrets_from_text` in `src/ces/execution/sandbox.py`.
|
|
47
|
+
- **`.ces/state.db` is created mode `0600`, parent dir `0700`.**
|
|
48
|
+
Matches the pattern already used for runtime transcripts.
|
|
49
|
+
- **CLI provider subprocess env is now allowlist-filtered** (new
|
|
50
|
+
`src/ces/execution/_subprocess_env.py` shared between the runtime
|
|
51
|
+
adapters and the inline CLI provider). Previously the inline CLI
|
|
52
|
+
provider inherited the full process env, leaking `AWS_*`,
|
|
53
|
+
`DATABASE_URL`, `GITHUB_TOKEN`, etc. into every LLM subprocess.
|
|
54
|
+
- **Kill-switch guards added to two `spec_cmd.py` LLM paths**
|
|
55
|
+
(`_polish_spec_document` and `_llm_section_mapping`) that previously
|
|
56
|
+
bypassed the `is_halted()` check that CLAUDE.md promises for every
|
|
57
|
+
LLM-dispatching service.
|
|
58
|
+
- **`git diff {base_ref}` in the dogfood pipeline now `--`-delimits
|
|
59
|
+
the ref** so a user-supplied `--base` argument cannot be parsed as
|
|
60
|
+
git option flags.
|
|
61
|
+
|
|
62
|
+
### Changed
|
|
63
|
+
- **Server-era bytecode directories (`src/ces/api/`,
|
|
64
|
+
`src/ces/tasks/`, `src/ces/polyrepo/`)** have been fully removed.
|
|
65
|
+
The corresponding `.py` source was deleted in 0.1.1; this release
|
|
66
|
+
removes the stale `__pycache__` shells. Nothing in `src/` or
|
|
67
|
+
`tests/` imports from these paths.
|
|
68
|
+
- **`docker-compose.yml` narrowed to `postgres` + `redis`.** The
|
|
69
|
+
`api` and `celery-worker` services (whose backing code was removed
|
|
70
|
+
in 0.1.1) have been deleted; running `docker compose up` no longer
|
|
71
|
+
fails with `ModuleNotFoundError` or a dead health-probe URL. The
|
|
72
|
+
file retains its purpose as integration-test infrastructure.
|
|
73
|
+
- **`.env.example` trimmed** to variables actually consumed by
|
|
74
|
+
`CESSettings` (`CES_LOG_LEVEL`, `CES_LOG_FORMAT`,
|
|
75
|
+
`CES_DEFAULT_RUNTIME`, `CES_DEMO_MODE`, and an optional
|
|
76
|
+
`CES_AUDIT_HMAC_SECRET` override), resolving the contradiction
|
|
77
|
+
with the no-Postgres Quickstart.
|
|
78
|
+
- **`AggregatedReview.degraded_model_diversity: bool`** new field.
|
|
79
|
+
Set to `True` when the dispatched triad resolves to fewer distinct
|
|
80
|
+
underlying models than assignments (e.g. only one CLI provider
|
|
81
|
+
installed against a Tier A triad). Surfaces an intentional signal
|
|
82
|
+
in evidence packets instead of the silent aliasing in `bootstrap.py`.
|
|
83
|
+
- **Dependencies now pinned with upper bounds** (`<N`) to constrain
|
|
84
|
+
supply-chain blast radius.
|
|
85
|
+
- **README Tech Stack** qualifies the mypy "strict mode" claim with
|
|
86
|
+
"targeted relaxations"; see `[tool.mypy]` in `pyproject.toml` for
|
|
87
|
+
the actual error codes disabled.
|
|
88
|
+
- **CLAUDE.md** Constraints section clarifies that PostgreSQL is only
|
|
89
|
+
for the integration-test compatibility suite, not shipped product.
|
|
90
|
+
- CES now ships as a local builder-first CLI only. The supported public
|
|
91
|
+
workflow is local `.ces/` state plus local `codex` / `claude` runtimes;
|
|
92
|
+
server/API/worker/control-plane deployment surfaces are no longer part of
|
|
93
|
+
the published product contract.
|
|
94
|
+
- The public CLI surface is narrowed to the local workflow and governance
|
|
95
|
+
commands. Removed server-era command groups are no longer registered or
|
|
96
|
+
documented.
|
|
97
|
+
- Fresh database migrations now prune obsolete server-era schemas and tables
|
|
98
|
+
(`observability`, `polyrepo`, `control.api_keys`, and
|
|
99
|
+
`control.project_members`) so a new PostgreSQL compatibility database
|
|
100
|
+
matches the current local-first product shape.
|
|
101
|
+
- Sample builder prompts and spec fixtures now use framework-neutral HTTP
|
|
102
|
+
wording instead of `FastAPI`-specific examples, keeping the public repo
|
|
103
|
+
contract implementation-agnostic.
|
|
104
|
+
|
|
105
|
+
### Deprecated
|
|
106
|
+
- `TestCoverageSensor` is deprecated; use `CoverageSensor` instead. The
|
|
107
|
+
legacy name remains importable from `ces.harness.sensors` and continues to
|
|
108
|
+
function as a subclass of `CoverageSensor`, but instantiating it now emits
|
|
109
|
+
`DeprecationWarning`. The alias will be removed in 0.2.x. The rename
|
|
110
|
+
removes the `Test` prefix that previously collided with pytest's class
|
|
111
|
+
collection (the `__test__ = False` workaround now lives only on the
|
|
112
|
+
deprecated alias).
|
|
113
|
+
|
|
114
|
+
### Fixed
|
|
115
|
+
- Alembic migration bootstrap no longer imports deleted observability ORM
|
|
116
|
+
modules, so the retained PostgreSQL compatibility tests run again.
|
|
117
|
+
- Audit-ledger hash continuation and integrity verification are now correctly
|
|
118
|
+
project-scoped across both PostgreSQL and local SQLite repositories.
|
|
119
|
+
- PostgreSQL compatibility fixtures now wait for the containerized database to
|
|
120
|
+
accept connections before running Alembic, removing a startup timing race in
|
|
121
|
+
the Docker-backed integration suite.
|
|
122
|
+
- `LocalProjectStore`: `review_findings` now uses a synthetic primary key
|
|
123
|
+
scoped to `(manifest_id, finding_id)` so findings from different manifests
|
|
124
|
+
no longer collide, and `.ces/state.db` startup recovers cleanly from an
|
|
125
|
+
interrupted migration left by a previous aborted process.
|
|
126
|
+
- `ces status` no longer attempts telemetry/Postgres access for local-mode
|
|
127
|
+
builder-first projects, so the documented no-Docker/no-Postgres quickstart
|
|
128
|
+
path stays responsive.
|
|
129
|
+
- Publishing now runs a maintained builder-first smoke test before PyPI
|
|
130
|
+
release, replacing the stale xfailed end-to-end coverage path with an
|
|
131
|
+
exercised local workflow gate.
|
|
132
|
+
|
|
133
|
+
### Known follow-ups
|
|
134
|
+
- Coverage gate remains at 88 % pending the `test_freshcart_e2e_pipeline`
|
|
135
|
+
fixture rewrite; target is to restore to 90 % in a subsequent 0.1.x
|
|
136
|
+
release.
|
|
137
|
+
- `CoverageSensor` own-coverage is 47 % (the sensor that powers CES's
|
|
138
|
+
dogfooding is ironically under-tested); follow-up in 0.1.3.
|
|
139
|
+
- Prompt-injection in reviewer prompts is not structurally mitigated
|
|
140
|
+
(inherent LLM limitation); `SECURITY.md` will be expanded with the
|
|
141
|
+
model-diversity mitigation path in a follow-up.
|
|
142
|
+
- Consider a `ces doctor --security` subcommand that checks: HMAC
|
|
143
|
+
secret non-default, signing keys exist and are `0600`, state DB is
|
|
144
|
+
`0600`.
|
|
145
|
+
|
|
146
|
+
## [0.1.1] - 2026-04-17
|
|
147
|
+
|
|
148
|
+
Release-readiness hardening. No functional changes; hygiene, tooling, and
|
|
149
|
+
OSS-release artifacts only.
|
|
150
|
+
|
|
151
|
+
### Added
|
|
152
|
+
- `CODE_OF_CONDUCT.md` adopting Contributor Covenant v2.1.
|
|
153
|
+
- Pre-commit `mypy` hook so type errors are caught locally before CI.
|
|
154
|
+
|
|
155
|
+
### Changed
|
|
156
|
+
- Dockerfile runtime image now runs as an unprivileged user (`ces`, UID 1000).
|
|
157
|
+
- Ruff configuration consolidated into `pyproject.toml` (removed `ruff.toml`).
|
|
158
|
+
- README coverage badge set to `88%+` to match the enforced CI gate (temporary
|
|
159
|
+
relaxation from the PRD-mandated 90%; see known follow-ups for restore plan).
|
|
160
|
+
- `CONTRIBUTING.md` links to `CODE_OF_CONDUCT.md` and `SECURITY.md`.
|
|
161
|
+
- CHANGELOG test-count figure corrected (2,800+ → 3,000+).
|
|
162
|
+
|
|
163
|
+
### Fixed
|
|
164
|
+
- Auto-fixed 30 ruff lint issues and reformatted 6 files under `alembic/`
|
|
165
|
+
and `examples/` so `ruff check .` and `ruff format --check .` pass on a
|
|
166
|
+
fresh clone.
|
|
167
|
+
- Silenced pytest collection warning on `TestCoverageSensor` via
|
|
168
|
+
`__test__ = False`.
|
|
169
|
+
- `.gitignore` now includes `.ruff_cache/` and `.mypy_cache/`.
|
|
170
|
+
- CI checkout on the publish workflow (missing `contents: read` permission).
|
|
171
|
+
- Integration-test fixtures constructing `TaskManifest`, `DisclosureSet`, and
|
|
172
|
+
`VaultNote` with lists are now tuples, matching `frozen=True` strict typing.
|
|
173
|
+
- `test_generate_formats_assistant_role`: silenced an AsyncMock/asyncio
|
|
174
|
+
interaction warning under `pytest -W error` on CPython 3.12.
|
|
175
|
+
|
|
176
|
+
### Known follow-ups
|
|
177
|
+
- Coverage gate temporarily lowered from 90% to 88% while
|
|
178
|
+
`test_freshcart_e2e_pipeline` is xfailed pending a fixture rewrite to match
|
|
179
|
+
the current `review_cmd.py` service graph. Target: restore to 90% in 0.1.x.
|
|
180
|
+
|
|
181
|
+
## [0.1.0] - 2026-04-12
|
|
182
|
+
|
|
183
|
+
Initial alpha release of the Controlled Execution System.
|
|
184
|
+
|
|
185
|
+
### Added
|
|
186
|
+
|
|
187
|
+
- **Control Plane**: Manifest manager, audit ledger (HMAC-SHA256 chain), classification engine (deterministic TF-IDF), kill switch, policy engine, workflow state machine, gate evaluator, merge controller
|
|
188
|
+
- **Harness Plane**: Evidence synthesizer, review router (3-tier), sensor orchestrator (7 sensors), trust manager (4-state transitions), guide pack builder, hidden check engine
|
|
189
|
+
- **Execution Plane**: Agent runner with sandbox, runtime registry (Codex CLI, Claude Code), LLM provider abstraction (Anthropic, OpenAI), chain-of-custody tracker, secret stripping
|
|
190
|
+
- **CLI**: 25+ command groups including `ces build`, `ces init`, `ces continue`, `ces explain`, `ces status`, `ces manifest`, `ces classify`, `ces review`, `ces approve`, `ces audit`, and command groups for vault, emergency, brownfield, alerts, events, registry, release, admin, and project management
|
|
191
|
+
- **Builder-first workflow**: `ces build` as default entrypoint with auto-bootstrap (creates `.ces/` on first run), interactive brief collection, local-mode SQLite persistence
|
|
192
|
+
- **Demo mode**: `CES_DEMO_MODE=1` enables dry-run without LLM API keys
|
|
193
|
+
- **Local-first architecture**: Full governance pipeline works with SQLite (`.ces/state.db`), no Postgres/Redis required for single-user local mode
|
|
194
|
+
- **REST API**: FastAPI control plane with auth, SSE streaming, endpoints for manifests, reviews, evidence, audit, trust, agents, telemetry, alerts, events, dependencies, registry, and releases
|
|
195
|
+
- **Database**: PostgreSQL 17 with 15 Alembic migrations for server-mode deployment
|
|
196
|
+
- **Observability**: OpenTelemetry integration, Prometheus metrics, structured logging (structlog), alert rules, health dashboard TUI
|
|
197
|
+
- **Cross-repo federation**: Polyrepo event bus, webhook delivery, federated bindings, dependency graph analysis
|
|
198
|
+
- **Brownfield support**: Legacy behavior detection, registration, grouped review, disposition-to-PRL workflow
|
|
199
|
+
- **Knowledge vault**: Zettelkasten-style notes with trust decay and ranking
|
|
200
|
+
- **Security**: Ed25519 manifest signing, HMAC-SHA256 audit chain, no secrets in task packages, sandboxed agent commands
|
|
201
|
+
- **Testing**: 3,000+ tests (3,066 unit + 21 integration), 90%+ branch coverage gate, CI with GitHub Actions (lint, typecheck, test, build)
|
|
202
|
+
- **Documentation**: README, Getting Started guide, Operator Playbook, FreshCart worked example, Implementation Guide, Operations Runbook, Production Deployment Guide, Security doc, Quick Reference Card
|