Skip to content

feat(release): v0.2.9 - #29

Merged
dan-petty merged 25 commits into
mainfrom
release/v0.2.9
Sep 3, 2026
Merged

dan-petty merged 25 commits into
mainfrom
release/v0.2.9

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Release v0.2.9 Summary

🤖 AI Review Prompt Normalization & Deterministic Programmatic Transformation

  • Programmatic Transformations: Replaced ambiguous LLM prompt rules with deterministic programmatic functions:
    • sanitize_finding_text: Strips trailing instructions, leaked verification criteria, and format headers from finding titles and descriptions.
    • canonicalize_finding_location: Standardizes location strings to file:line or file:start-end, strips markdown links, inverted line ranges, and rejects template placeholders.
    • derive_recommendation: Deterministically derives BLOCK, REQUEST CHANGES, or APPROVE based on finding severity.
  • Removed Heuristics Falsely Invalidating Valid Findings:
    • Removed coarse exemption checks (_check_contextual_exemption, _check_kustomization_namespace_exemption, _check_iac_operational_outputs, _check_missing_symbol_hallucination) from src/devops_cli/ai/review/verification.py to prevent suppressing genuine defect findings in test suites, kustomizations, and Terraform outputs.
    • Retained deterministic AST/JSON/YAML/TOML syntax validation (_check_syntax_error_hallucination) and out-of-bounds line checks (_check_line_boundaries) to invalidate genuine syntax hallucinations.
    • Refined httpx2 invalidation rules in adversarial debate stage to require explicit indicators of unverified dependencies or hallucinated CVEs.
  • Removed Logic Falsely Validating Invalid Findings:
    • Fixed _apply_single_finding_verification to default verified to False (instead of True), ensuring unverified or partial LLM responses do not promote invalid findings.
    • Removed blanket negative prompt rules from guardrails_isolation.md and verify_finding_system.md.

🧹 Legacy, Shim & Zombie Code Removal

  • RAG Embeddings: Removed legacy single-prompt embedding fallback _fetch_fallback_single_embeddings in favor of declarative batch embeddings.
  • Config & Settings Cleanup: Removed obsolete v0.1.1 comments, aliases, and deprecated stubs across src/devops_cli/commands/config.py, src/devops_cli/config/options.py, and src/devops_cli/config/settings.py.

⚡ Test Coverage Elevation & 5.8x CI Acceleration

  • Target Subsystem Coverage:
    • src/devops_cli/k8s/port_forward_daemon.py: 100% (up from 89%).
    • src/devops_cli/output/console.py: 99% (up from 67%).
    • src/devops_cli/security/vault_broker.py: 99% (up from 28%).
    • src/devops_cli/security/dependency_remediator.py: 100% (up from 22%).
  • Code Coverage Benchmark: Maintained 90.48% project-wide coverage across 31,929 source lines, exceeding the 90.0% threshold.
  • Test Latency Elimination:
    • Diagnosed and fixed unmocked kubectl get secret and background kubectl port-forward daemons in tests/test_k8s.py and tests/test_k8s_jaeger.py.
    • Full coverage test suite duration reduced from 508s (8.5 min) to 88s (1m 28s) — a 5.8x speedup.
    • Standalone tests reduced from 474s to 51s — a 9.3x speedup.

📚 Documentation Alignment & Reference Synchronization

  • Regenerated all CLI references, subcommands, and README.md via devops docs generate --sync-readme.
  • Updated CHANGELOG.md and docs/LOG.md with complete v0.2.9 release notes.
  • Verified doc integrity with devops docs check.

✅ Quality Gate Verification (devops ci)

  • All 10 checks passing cleanly:
    • python_version: ✓ pass
    • test: ✓ pass (1402 passed, 0 failed)
    • coverage: ✓ pass (90.48% total coverage)
    • lint: ✓ pass
    • format: ✓ pass
    • typecheck: ✓ pass
    • audit: ✓ pass
    • security: ✓ pass
    • actionlint: ✓ pass
    • docs: ✓ pass

Copilot AI lite review requested due to automatic review settings September 3, 2026 17:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new HttpClientBroker exposes allow_private_network but doesn’t actually enforce the per-request override (breaking Vault/local-private calls), and scan_and_plan currently ignores --min-severity and is a no-op unless a package is specified.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR prepares the v0.2.9 release of devops-cli, bundling new security hardening, new CLI capabilities (Vault broker, dependency remediation, sandboxing), and significant AI review pipeline normalization to reduce prompt-related nondeterminism.

Changes:

  • Bumps versioning and refreshes release documentation for v0.2.9 (package metadata, changelog/release notes, command docs).
  • Adds new subsystems and commands: HTTP broker with SSRF validation, dependency remediation (devops scan fix), Docker sandbox execution, Vault secret broker (devops vault), and a generic stage pipeline engine.
  • Refactors AI review prompt/verification behavior to deterministic sanitization/canonicalization and safer Rich output escaping; extends tests accordingly.
File summaries
File Description
uv.lock Lockfile version bump to 0.2.9
tests/test_workload_sandbox.py Tests for Docker sandbox runner + CLI
tests/test_vault_broker.py Tests for VaultSecretBroker + CLI
tests/test_server.py Config sanitization + CORS test
tests/test_review.py Adds watch-mode + sanitization tests
tests/test_review_pipeline.py Rich markup escaping regression test
tests/test_prompt_programmatic_functions.py Tests for new deterministic prompt functions
tests/test_pipeline_engine.py Tests for StagePipeline engine
tests/test_output.py File-writer boundary + console rendering tests
tests/test_otel_command_coverage.py Adds vault command to coverage list
tests/test_k8s.py Mocks port-forward + credential sync
tests/test_k8s_port_forward_daemon.py Port-forward daemon manager tests
tests/test_k8s_jaeger.py Mocks credential sync for jaeger deploy
tests/test_k8s_credentials.py Tests for k8s secret credential sync
tests/test_k8s_chaos_runner.py Tests for chaos runner
tests/test_http_broker.py Tests for HttpClientBroker
tests/test_harness.py Speeds up background command timing tests
tests/test_docs.py Avoids readme sync/check in docs tests
tests/test_devcontainer.py Prevents real daemon spawning in tests
tests/test_dependency_remediator.py Tests for dependency remediator + CLI
tests/test_config_audit_keys.py Updates expected secret keys list
tests/test_ai_agent_step_persistence.py Masks secrets in step persistence + traversal guard test
src/devops_cli/server/routes/workspace.py Sanitizes all secret config options
src/devops_cli/server/app.py Restricts CORS origins/methods; configurable origins
src/devops_cli/security/vault_broker.py New Vault broker w/ keyring fallback
src/devops_cli/security/kubeconform.py Adds path containment checks during validation
src/devops_cli/security/dependency_remediator.py New remediation planner/executor
src/devops_cli/security/aibom.py Adds workspace containment checks
src/devops_cli/pipeline/stage.py PipelineStage + FunctionStage primitives
src/devops_cli/pipeline/pipeline.py StagePipeline orchestration + metrics
src/devops_cli/pipeline/models.py Pipeline execution models/status enums
src/devops_cli/pipeline/init.py Pipeline public API exports
src/devops_cli/output/file_writer.py Adds base_dir boundary enforcement
src/devops_cli/output/console.py Adds panel fallback rendering
src/devops_cli/models/vulnerability.py Adds remediation result/action models
src/devops_cli/main.py Registers vault in CLI module map
src/devops_cli/lang/en/help.py Adds watch/debounce option help
src/devops_cli/k8s/port_forward_daemon.py New port-forward daemon state manager
src/devops_cli/k8s/logs.py Validates namespace/container identifiers
src/devops_cli/k8s/credentials.py New k8s secret extraction + keyring sync
src/devops_cli/k8s/chaos_runner.py New chaos experiment runner
src/devops_cli/http/broker.py New HTTP broker with SSRF validation hooks
src/devops_cli/http/init.py Exports broker symbols
src/devops_cli/docker/sandbox.py New Docker sandbox runner w/ fallback
src/devops_cli/core/validation.py Changes validate_path traversal default
src/devops_cli/config/settings.py Adds keyring get/set helpers + new secret accessors
src/devops_cli/config/options.py Adds grafana/argocd password secret options
src/devops_cli/commands/vault.py New devops vault command group
src/devops_cli/commands/test_cmd.py Adds devops test sandbox
src/devops_cli/commands/scan.py Adds devops scan fix command
src/devops_cli/commands/review.py Adds --watch + Rich escaping improvements
src/devops_cli/commands/k8s/stack_lifecycle.py Adds k8s sync-secrets and deploy secret sync
src/devops_cli/commands/k8s/networking.py Tracks port-forward daemons; adds status/stop
src/devops_cli/commands/k8s/init.py Wires new k8s commands
src/devops_cli/commands/docker.py Adds devops docker sandbox
src/devops_cli/commands/config.py Removes legacy comments in auth-headless
src/devops_cli/ai/tasks/verify_finding_system.md Tightens verification/report separation rules
src/devops_cli/ai/tasks/review.md Adds stricter reporting constraints
src/devops_cli/ai/tasks/review_pipeline_eval.md Adds criteria/reporting integrity rules
src/devops_cli/ai/tasks/review_output_instruction.md Updates schema example + constraints
src/devops_cli/ai/tasks/guardrails_isolation.md Refines contextual evaluation guidance
src/devops_cli/ai/tasks/compose.md Adds “criteria must not leak” rule
src/devops_cli/ai/review/verification.py Fixes verified default; removes json import noise
src/devops_cli/ai/review/stages/pre_analysis.py Blocks target_dir escape from repo root
src/devops_cli/ai/review/stages/adversarial_debate.py Tightens httpx2 invalidation triggers
src/devops_cli/ai/review/pipeline.py Escapes Rich fields in findings table/panels
src/devops_cli/ai/review_schema.py Adds sanitize/canonicalize/derive_recommendation
src/devops_cli/ai/rag/embeddings.py Removes single-embedding fallback; improves embed parsing
src/devops_cli/ai/providers/openai.py Adds SSRF validation for base_url
src/devops_cli/ai/providers/anthropic.py Adds SSRF validation for base_url
src/devops_cli/ai/mcp/server.py Adds MCP tools: scan_fix/docker_sandbox/vault_*
src/devops_cli/ai/knowledge_base/it_domains/topics/cloud_native_kubernetes_and_gitops.md Fixes KB link targets
src/devops_cli/ai/knowledge_base/it_domains/tools/ollama.md Fixes KB link targets
src/devops_cli/ai/knowledge_base/it_domains/tools/minikube.md Fixes KB link targets
src/devops_cli/ai/knowledge_base/it_domains/tools/kubectl.md Fixes KB link targets
src/devops_cli/ai/knowledge_base/it_domains/tools/helm.md Fixes KB link targets
src/devops_cli/ai/knowledge_base/devops_cli/tasks/k8s_stack_deployment.md Fixes KB link targets
src/devops_cli/ai/knowledge_base/devops_cli/tasks/ai_code_review.md Documents criteria/report separation
src/devops_cli/ai/knowledge_base/devops_cli/libraries/tldextract.md Updates integration links
src/devops_cli/ai/knowledge_base/devops_cli/libraries/rich.md Updates integration links
src/devops_cli/ai/knowledge_base/devops_cli/libraries/keyring.md Updates integration links
src/devops_cli/ai/knowledge_base/devops_cli/libraries/httpx2.md Updates integration links
src/devops_cli/ai/knowledge_base/devops_cli/libraries/fastmcp.md Updates integration links
src/devops_cli/ai/kb.py Adds KB path containment checks
src/devops_cli/ai/harness/skills.py Adds skill-dir containment checks
src/devops_cli/ai/common_tools.py Expands private-host detection via DNS resolution
src/devops_cli/ai/agents/prompt.py Sanitizes template variable injection vectors
src/devops_cli/ai/agents/persistence.py Masks secrets in step payloads; blocks db_path traversal
src/devops_cli/init.py Bumps version to 0.2.9
README.md Regenerated command matrix + updated docs
pyproject.toml Bumps project version to 0.2.9
docs/ROADMAP.md Updates roadmap sections for v0.2.9
docs/RELEASE_NOTES.md Adds v0.2.9 release notes
docs/PENDING_FEATURES.md Updates current milestone to v0.2.9
docs/MCP_TOOLS.md Documents new MCP tools
docs/LOG.md Adds v0.2.9 engineering log entries
docs/DEVCONTAINER_USAGE.md Updates devcontainer tag references
docs/commands/vault.md Adds vault command docs
docs/commands/test.md Adds test sandbox docs
docs/commands/scan.md Adds scan fix docs
docs/commands/review.md Adds watch/debounce docs
docs/commands/k8s.md Adds sync-secrets + port-forward status/stop docs
docs/commands/docker.md Adds docker sandbox docs
docs/commands/ai.md Adds watch/debounce docs
CONTRIBUTING.md Updates language catalog path references
CHANGELOG.md Adds 0.2.9 changelog entry
Review details

Suppressed comments (1)

src/devops_cli/http/broker.py:88

  • request() accepts allow_private_network but never applies it, so the caller’s SSRF policy intent is silently ignored. Since _validate_request runs via httpx event_hooks, you need to propagate the allow_private_network override into the Request (e.g., via request.extensions) and send the built request explicitly.
  • Files reviewed: 106/107 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/devops_cli/docker/sandbox.py Resolved
Comment thread src/devops_cli/http/broker.py Resolved
@dan-petty
dan-petty merged commit 1616365 into main Sep 3, 2026
4 checks passed
@dan-petty
dan-petty deleted the release/v0.2.9 branch September 3, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants