Skip to content

feat(release): v0.2.12 - #50

Merged
dan-petty merged 10 commits into
mainfrom
release/v0.2.12
Sep 7, 2026
Merged

dan-petty merged 10 commits into
mainfrom
release/v0.2.12

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary of Release v0.2.12

Release v0.2.12 delivers the Valkey Workstation Management & High-Performance Distributed Caching Tier, runtime duration formatting and UI modernization, cluster-wide default-deny NetworkPolicies, Qdrant API key secret protection, subprocess environment isolation, immutable GitHub Actions commit SHA pinning, and automated devcontainer GHCR cleanup.


🚀 Highlights of v0.2.12

⚡ Valkey Workstation Management & Distributed Caching Tier (devops valkey)

  • Zero C-Dependency RESP Protocol (src/devops_cli/valkey/protocol.py): Pure-Python synchronous RESP2/RESP3 wire protocol encoder (encode_command) and streaming parser (parse_resp) supporting simple strings, errors, integers, bulk strings, arrays, maps, and sets using io.BufferedIOBase.
  • Hardened TCP Socket Client (ValkeyClient in src/devops_cli/valkey/client.py): High-performance socket client with connection pooling, bounded timeouts, password authentication, and zero-trust SSRF destination validation rejecting cloud metadata (169.254.169.254) and unauthorized non-public IPs.
  • Atomic Sliding-Window Rate Limiter (ValkeyTokenBucketRateLimiter in src/devops_cli/valkey/rate_limiter.py): Embedded Lua token-bucket rate limiter supporting both rate_per_minute and rate_limit_per_second with fail-soft burst mitigation for high-concurrency automation tasks.
  • Distributed AI Caching (ValkeyCacheProvider in src/devops_cli/ai/cache/valkey_cache.py): High-performance persistent caching tier for embedding vectors, review findings, and LLM completions with key namespace isolation and fail-soft availability.
  • CLI Subsystem (devops valkey in src/devops_cli/commands/valkey.py): Comprehensive subcommands (ping, info, stats, keys, get, set, flush, backup, cli) integrated with @dry_run_command and human-readable runtime duration formatting.
  • FastMCP Toolset & System Resource (src/devops_cli/ai/mcp/server.py): 6 registered FastMCP tools (valkey_ping, valkey_info, valkey_stats, valkey_get, valkey_set, valkey_flush) and dynamic system resource resource://valkey/status.
  • OS Keyring & Config Integration: Added valkey.host, valkey.port, valkey.db, valkey.timeout, and secure password storage via valkey.password in OS Keyring.

⏱️ Runtime Duration Formatting & UI Modernization

  • Converted elapsed command durations across CLI root, CI runners, benchmark tables, and multi-stage review pipelines into human-readable units (format_duration).
  • Omitted status suffixes from milestone descriptions during automated roadmap extraction.

🛡️ DevSecOps Infrastructure & Credential Protection


🔗 Related Issues & Pull Requests


🧪 Verification & Quality Gates

  • Targeted Unit & Invariant Tests: 63 new Valkey unit tests in tests/test_valkey.py, MCP tests in tests/test_mcp.py, and architectural invariant checks in tests/test_architectural_invariants.py passing 100%.
  • Complexity & Nesting Invariants: Zero cyclomatic complexity violations ($\le 10$) and zero indentation violations ($\le 5$) validated via devops scan complexity.
  • Full CI Suite (uv run devops ci): All 10 gates passed 100% green:
    1. Version Consistency (0.2.12 across pyproject.toml, __init__.py, CHANGELOG.md, RELEASE_NOTES.md)
    2. Test Suite (1,972 unit and integration tests passed)
    3. Code Coverage ($\ge 90%$ project requirement; achieved 95%+)
    4. Ruff Linting (0 errors)
    5. Code Formatting (100% compliant)
    6. Mypy Strict Static Type Checking (0 errors)
    7. uv.lock Dependency Audit (0 known vulnerabilities)
    8. Security Scanning (Bandit, Checkov, Gitleaks clean)
    9. GitHub Actions Workflow Linter (actionlint clean)
    10. CLI Documentation Synchronization (devops docs generate --sync-readme clean)

…HCR (#44)

* feat(devcontainer): automate PR devcontainer cleanup on PR merge in GHCR

- Add GitHub Actions workflow .github/workflows/cleanup-devcontainer.yml triggered on pull_request [closed] and workflow_dispatch
- Scope GHCR image pruning to pr-<number> or wildcard tags while preserving release tags (latest, v*, main)
- Reclaim multi-architecture storage via delete-untagged and delete-ghost-images
- Pin dataaxiom/ghcr-cleanup-action to commit SHA for supply chain security
- Enhance devops_cli.commands.gh token resolution (Keyring github.token and gh auth token) and use REST API for milestones
- Update agent instructions in AGENTS.md, ROUTINE_TASKS.md, docs/agent/README.md to leverage GitHub project integrations and issue tracking
- Sync roadmap milestones and track Phase 47.4 deliverables

Closes #39

* docs(task): update Phase 47.4 tracking with PR 44 and commit 21711bd

* fix(gh): support DEVOPS_CLI_GITHUB_TOKEN and add pagination to milestone api

- Address Copilot review comments on PR #44
- Check DEVOPS_CLI_GITHUB_TOKEN in _get_github_client()
- Pass --paginate and per_page=100 in _get_repo_milestones()
- Add regression tests in tests/test_gh_cmd.py
* feat(ci): pin GitHub Actions to immutable commit SHAs

* docs(task): update Phase 48.1 tracking with PR 45

* docs(roadmap): update action SHA pinning status to completed

* docs(task): record Copilot review resolution on PR 45
… boundary (#46)

* feat(security): isolate subprocess environment and enforce credential boundary

* fix(security): normalize env var key case for cross-platform matching and ensure test determinism

* docs(task): update Phase 48.2 tracking with PR #46 and Copilot review resolution
…gocd namespaces (#47)

* feat(k8s): cluster default-deny NetworkPolicies for monitoring and argocd namespaces

* fix(k8s): address Copilot review on NetworkPolicy ingress comments, API server egress selector, and test assertions

* docs(task): record PR #47 and Copilot review remediation in Phase 48.3 tracking
…clusterip default (#48)

* feat(security): qdrant vector database api key secret protection and clusterip default

* fix(review): address Copilot findings for stdin secret apply, fail-fast lifecycle, and debug logging

* docs(agent): update task tracking for PR #48 and Copilot review resolutions
…and runtime duration formatting (#49)

* refactor(review): address session 164259 findings and harden self-improvement loop

* docs(agent): mark Phase 48.5 task completed and PR 49 verified

* feat(github): remote project sync, automated milestone closure, and submodule test grouping

* feat(devcontainer): enhance mcp lifecycle sync and enforce commit message hygiene

* feat(output): format command elapsed duration in human readable units

Upgrade format_duration to support microsecond, millisecond, second, minute, hour, and day formatting across CLI command completion, CI summaries, AI reviews, and benchmarks.

* refactor(github): omit status from milestone description

Ensure milestone descriptions extracted from roadmap use strictly the feature name without appending status strings in parentheses.
…release preparation

- Implement pure-Python RESP2/RESP3 encoder and stream parser without C dependencies
- Add TCP socket client (ValkeyClient) with connection pooling, timeouts, and zero-trust SSRF validation
- Implement atomic token bucket rate limiter with embedded Lua script
- Implement distributed AI cache provider (ValkeyCacheProvider) for embeddings and review findings
- Implement devops valkey CLI command group (ping, info, stats, keys, get, set, flush, backup, cli)
- Register 6 FastMCP Valkey tools and dynamic system resource resource://valkey/status
- Bump package version to 0.2.12 and synchronize release documentation
- Pass all 10 devops ci quality gates with 95% test coverage
Copilot AI lite review requested due to automatic review settings September 7, 2026 15:03
@dan-petty dan-petty added this to the v0.2.12 milestone Sep 7, 2026
@dan-petty dan-petty added release Pull request or issue associated with a release cut type/feature Type feature: a new function scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault scope/cli Core CLI framework, Typer subcommands, options, and tables scope/github GitHub Projects v2, Views, Milestones, Labels, and PR automation status/in-review Status In Review: the pull request of the item is open labels Sep 7, 2026
@dan-petty dan-petty added status/ready-to-merge and removed status/in-review Status In Review: the pull request of the item is open labels Sep 7, 2026

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

There are a few correctness/security issues in the new code paths (Valkey hostname SSRF bypass, duration rounding edge case, and overly broad error matching/exception catching) that should be fixed before approval.

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

Pull request overview

Cuts release v0.2.12 by introducing a Valkey-backed caching/rate-limiting subsystem, strengthening DevSecOps posture (K8s network policies + secret handling + subprocess env isolation), modernizing runtime duration rendering across the CLI, and expanding GitHub governance automation (Projects v2 + milestone closure + pinned actions).

Changes:

  • Added Valkey protocol/client/rate limiter + distributed AI cache provider, with FastMCP tool exposure and CLI/docs integration.
  • Hardened security boundaries (subprocess environment isolation, config redaction, Qdrant API key secret wiring, default-deny NetworkPolicies) and expanded regression/contract tests.
  • Improved operational UX and governance automation (human-readable duration formatting, GitHub Projects v2 sync + milestone close tooling, immutable GitHub Actions SHA pinning, devcontainer cleanup workflow).
File summaries
File Description
uv.lock Bumps editable package version to 0.2.12.
pyproject.toml Version bump to 0.2.12.
src/devops_cli/init.py Version bump to 0.2.12.
CHANGELOG.md Adds 0.2.12 release entry.
docs/RELEASE_NOTES.md Updates release notes content for v0.2.12.
README.md Extends command matrix with devops valkey commands.
docs/CLI_REFERENCE.md Regenerates CLI reference including new commands/options.
docs/commands/valkey.md Adds Valkey command documentation.
src/devops_cli/valkey/init.py Exposes Valkey client/protocol/rate-limiter symbols.
src/devops_cli/valkey/protocol.py Implements RESP2/RESP3 encoder/parser.
src/devops_cli/valkey/client.py Adds TCP Valkey client with destination validation and basic commands.
src/devops_cli/valkey/rate_limiter.py Adds Valkey-backed token bucket limiter via Lua.
src/devops_cli/ai/cache/init.py Adds cache package export.
src/devops_cli/ai/cache/valkey_cache.py Implements Valkey distributed cache provider for AI.
src/devops_cli/config/constants.py Adds Valkey error code constant.
src/devops_cli/exceptions/valkey.py Adds Valkey domain exception taxonomy.
src/devops_cli/exceptions/init.py Re-exports Valkey exceptions.
docs/ERRORS.md Documents Valkey error codes.
src/devops_cli/config/options.py Adds Qdrant/Valkey options + secret/keyring mappings.
src/devops_cli/config/env.py Adds Qdrant/Valkey env var mappings and specs.
docs/ENV_VARS.md Documents new env vars (Qdrant/Valkey + cache backend).
src/devops_cli/config/settings.py Adds Valkey/Qdrant config models and keyring resolution helpers.
src/devops_cli/config/init.py Exposes get_qdrant_api_key via config package.
docs/CONFIGURATION.md Updates AI cache config rendering to include backend.
src/devops_cli/ai/rag/qdrant.py Resolves Qdrant API key from settings when not provided.
src/devops_cli/commands/rag.py Plumbs Qdrant API key resolution into CLI wiring.
src/devops_cli/ai/tools/builtin_tools.py Plumbs Qdrant API key into RAG tool client creation.
src/devops_cli/ai/rag/investigator.py Ensures Qdrant API key is forwarded for investigations.
src/devops_cli/ai/rag/indexer.py Adds resolve_qdrant_client and makes indexer defaults self-resolving.
src/devops_cli/ai/rag/init.py Exports resolve_qdrant_client.
k8s/llm/values-qdrant.yaml Switches to Secret-based API key injection; defaults service to ClusterIP.
src/devops_cli/k8s/credentials.py Adds Qdrant API key secret fetch + keyring sync.
src/devops_cli/commands/k8s/stack_lifecycle.py Ensures Qdrant secret exists before install; syncs credential afterward.
src/devops_cli/commands/k8s/init.py Re-exports _ensure_qdrant_api_key_secret.
src/devops_cli/server/routes/workspace.py Replaces shallow secret masking with recursive redaction helper.
src/devops_cli/security/sanitizer.py Fixes URI masking edge cases (missing username) and regex fallback behavior.
tests/test_server.py Adds regression test for recursive config redaction helper.
tests/test_consolidation_security_sanitizer.py Adds regression tests for URI masking edge cases.
src/devops_cli/dry_run/decorator.py Restores dry-run state reliably via try/finally.
tests/test_consolidation_dry_run_decorator.py Adds tests ensuring dry-run state restoration (incl. exception paths).
src/devops_cli/core/process.py Adds sanitized subprocess env builder; applies isolation by default.
src/devops_cli/core/init.py Re-exports subprocess env helpers/constants.
tests/test_subprocess_env_boundary.py Adds comprehensive subprocess env boundary tests.
src/devops_cli/output/formatters/scalars.py Upgrades duration formatting to human-readable scaling.
src/devops_cli/output/formatters/tables.py Uses format_duration in benchmark table formatting.
src/devops_cli/main.py Uses format_duration for global elapsed printing; registers valkey command.
src/devops_cli/commands/ci.py Uses format_duration for CI summary + total elapsed output.
src/devops_cli/commands/ai.py Uses format_duration for AI timing output strings.
src/devops_cli/ai/review/runner.py Uses format_duration for review stage timing output.
src/devops_cli/ai/review/pipeline.py Uses format_duration when rendering review/verify elapsed durations.
src/devops_cli/ai/benchmark/runner.py Uses format_duration in benchmark console/markdown output.
src/devops_cli/commands/test_cmd.py Uses format_duration for sandbox completion output.
src/devops_cli/commands/docker.py Uses format_duration for sandbox completion output.
src/devops_cli/lang/en/messages.py Updates message templates to accept preformatted {elapsed} strings.
tests/test_output.py Expands format_duration test coverage across time ranges/precision.
tests/test_otel_command_coverage.py Registers new valkey command in coverage set.
src/devops_cli/ai/mcp/server.py Adds GitHub milestone close + project sync tools; adds Valkey tools/resource; fixes branches tool args.
tests/test_mcp.py Verifies Valkey FastMCP tools and valkey status resource behavior.
docs/MCP_TOOLS.md Documents new MCP tools (Valkey + milestone close + project sync).
src/devops_cli/github/projects.py Adds Projects v2 auth scope verification + template/field sync helpers.
tests/test_github_projects.py Adds tests for auth scope errors, dry-run sync, and link command.
src/devops_cli/github/milestones.py Removes status suffix from description; adds close milestone helper.
src/devops_cli/github/client.py Adds milestone edit + close operations in GitHub client wrapper.
src/devops_cli/github/init.py Exports new project/milestone APIs.
src/devops_cli/commands/release.py Attempts safe milestone closure after tag publish.
tests/test_github_milestones.py Adds tests for milestone description cleanup + close flows + CLI wiring.
tests/test_gh_cmd.py Adds tests for token env override and pagination flags.
src/devops_cli/ai/review/verification.py Adds deterministic invalidation for missing-symbol and missing-header hallucination classes.
src/devops_cli/ai/review/common_hallucinations.py Adds cross-module imported symbol grounding and header/dispatch grounding.
src/devops_cli/ai/review/common_hallucinations.json Expands/introduces hallucination signatures for missing symbols and headers.
tests/test_review_verification.py Adds tests covering new deterministic invalidation behaviors.
src/devops_cli/ai/tasks/verify_finding_system.md Tightens guidance for cross-module symbol/header grounding in verification.
src/devops_cli/ai/tasks/review.md Tightens review prompt guidance for symbol/header grounding.
src/devops_cli/ai/personas/devsecops/prompt.md Updates security focus prompt with header grounding reminder.
src/devops_cli/ai/knowledge_base/devops_cli/tasks/ai_code_review.md Documents new hallucination/grounding capabilities.
src/devops_cli/ai/knowledge_base/devops_cli/tasks/github_project_management.md Documents milestone close + project sync/link governance flows.
k8s/monitoring/networkpolicy.yaml Adds default-deny NetworkPolicy with explicit ingress/egress allowances.
k8s/monitoring/kustomization.yaml Includes network policy in kustomization.
k8s/argocd/networkpolicy.yaml Adds default-deny NetworkPolicy for ArgoCD namespace.
k8s/argocd/kustomization.yaml Includes network policy in kustomization.
tests/test_k8s_network_policies.py Adds schema/contract tests validating NetworkPolicy intent.
.github/workflows/ci.yml Pins third-party actions to immutable SHAs.
.github/workflows/release.yml Pins actions; adds issues:write; closes milestone post-release.
.github/workflows/codeql.yml Pins actions to immutable SHAs.
.github/workflows/cleanup-devcontainer.yml Adds PR devcontainer GHCR cleanup workflow pinned by SHA.
docs/ROUTINE_TASKS.md Updates routine tasks guidance (governance, release flow, milestone closure).
AGENTS.md Expands agent workflow/governance/test-organization guidance.
docs/agent/README.md Reinforces GitHub Projects alignment expectations for agents.
docs/commands/gh.md Documents new gh milestones close and gh project link commands/options.
Review details
  • Files reviewed: 99/100 changed files
  • Comments generated: 5
  • 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/valkey/client.py Resolved
Comment thread src/devops_cli/valkey/rate_limiter.py Resolved
Comment thread src/devops_cli/ai/cache/valkey_cache.py Resolved
Comment thread src/devops_cli/github/projects.py Resolved
@dan-petty dan-petty changed the title feat(release): cut v0.2.12 release with Valkey caching, rate limiting, and DevSecOps hardening feat(release): v0.2.12 Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Pull request or issue associated with a release cut scope/cli Core CLI framework, Typer subcommands, options, and tables scope/github GitHub Projects v2, Views, Milestones, Labels, and PR automation scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault type/feature Type feature: a new function

Projects

No open projects

2 participants