Skip to content

feat(release): v0.2.1 - #19

Merged
dan-petty merged 12 commits into
mainfrom
release/v0.2.1
Aug 25, 2026
Merged

dan-petty merged 12 commits into
mainfrom
release/v0.2.1

Conversation

@dan-petty

@dan-petty dan-petty commented Aug 25, 2026 •

Copy link
Copy Markdown
Owner

Release Notes: v0.2.1

Overview

Release v0.2.1 introduces essential security pre-filtering, token-aware context budgeting, multi-agent frameworks, modular review pipeline stages, LLM provider abstractions, standardized exception taxonomies, and Prometheus metrics telemetry.


Key Deliverables & Architectural Enhancements

1. Local Context Budgeting & Token Counting Engine (devops ai token-count)

  • Byte-Pair Encoding (BPE) token counting using tiktoken with model-family encoding resolution (o-series, gpt-4o, cl100k_base).
  • Semantic prefix-preserving truncation (truncate_to_token_limit) and hunk-aware git diff budgeting (budget_diff_chunks) preventing context window overflow.
  • CLI subcommand devops ai token-count <target> [--budget INT] [--model STR] [--json] with Rich breakdown tables.
  • Bundled Knowledge Base tool manual: it_domains/tools/tiktoken.md.

2. Gitleaks Sub-Millisecond Secret Pre-Filter (devops scan secrets, devops scan gitleaks)

  • High-speed subprocess scanner with native regex fallback identifying AWS access keys, GitHub PATs, OpenAI API keys, private key blocks, and Stripe tokens.
  • Integrated into code review pipeline to scrub uncommitted secrets before LLM prompt dispatch.
  • Registered scan_gitleaks native persona tool and bundled Knowledge Base manual: it_domains/tools/gitleaks.md.

3. Semgrep Static AST Pattern Matcher (devops scan semgrep, devops scan sast)

  • Polyglot static AST pattern matching runner (p/default) with structured finding normalization (Finding models).
  • Integrated into code review pipeline for multi-language AST vulnerability scanning.
  • Registered scan_semgrep native persona tool and bundled Knowledge Base manual: it_domains/tools/semgrep.md.

4. PydanticAI Standardized Agent Framework (devops_cli.ai.pydantic_ai_bridge)

  • Standardized PydanticAI Agent bridge adapter (create_pydantic_ai_agent, get_persona_pydantic_agent) supporting strongly typed output models, dynamic parameter inspection, and persona workflows (devsecops, architect, qa, pm).
  • Bundled Knowledge Base manual: it_domains/tools/pydantic_ai.md.

5. Modular AI Review Pipeline Stages (devops_cli.ai.review.stages)

  • Decomposed the multi-stage review orchestrator into dedicated single-responsibility stage modules:
    • pre_analysis.py (run_pre_analysis)
    • static_scan.py (run_static_scan)
    • persona_review.py (run_persona_review)
    • verification.py (run_verification)
    • reranking.py (run_reranking)
    • reporting.py (run_reporting)
  • Granular OpenTelemetry distributed trace spans (@trace_span) instrumenting each stage.

6. LLM Provider Abstraction Layer (devops_cli.ai.providers)

  • Protocol-driven provider architecture (BaseLLMProvider) decoupling model backends.
  • Dedicated provider implementations for ollama, openai, claude, copilot, and mock for deterministic test isolation.

7. Standardized Domain Exception Taxonomy (devops_cli.exceptions)

  • Strongly typed domain exception hierarchy inheriting from DevOpsCLIError:
    • SecurityError, SSRFBlockedError, KeyringUnavailableError, SecretExposureError
    • LLMInferenceError, ContextBudgetExceededError, ModelUnavailableError, PersonaExecutionError
  • Explicit POSIX exit codes and canonical machine-readable error identifiers.

8. In-Memory Prometheus Metrics Collector & Context Propagation (devops_cli.telemetry)

  • Thread-safe in-memory metric registry (GLOBAL_METRICS, InMemoryMetricsRegistry) tracking counters, gauges, and histograms with Prometheus text exposition format.
  • W3C distributed traceparent header propagation (inject_traceparent_headers, extract_traceparent).

9. CodeQL Security Hardening & Safe File Descriptors

  • Sanitized OTLP telemetry probe failures to prevent stack trace leaks (py/stack-trace-exposure).
  • Enforced restrictive POSIX file modes (0o644 / 0o600) with upfront os.chmod on atomic temporary files (py/clear-text-storage-sensitive-data).

10. Strategic Roadmap & Architectural Conventions

  • Groomed and extended docs/ROADMAP.md through v0.3.0 with advanced AI research (Multi-Agent Adversarial Debate, Spec-Driven Development, Dynamic Cost/Latency Router, Test Synthesizer, Cross-Encoder Re-Ranking) and open-source DevOps integrations (TFLint, Dive, Kubeconform, Stern, Helm-diff, Difftastic, tfcmt, Falco).
  • Updated AGENTS.md engineering guidelines with modular stage patterns, provider contracts, and telemetry standards.

Verification & Quality Gates

  • Unit Tests: Full test suite passing across all 98 test modules (uv run pytest).
  • Strict Typing: mypy --strict passing across all source files with 0 errors.
  • Linting & Formatting: ruff check and ruff format --check passing with 0 errors.
  • Documentation: Fully synchronized with README and CLI reference via devops docs generate --sync-readme.

@dan-petty dan-petty added the release Pull request or issue associated with a release cut label Aug 25, 2026
Copilot AI lite review requested due to automatic review settings August 25, 2026 18:28

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

* feat(ai): implement tiktoken context budgeting, gitleaks, semgrep, and pydantic-ai

* fix(security): resolve CodeQL stack trace exposure and clear-text storage alerts
@dan-petty dan-petty changed the title feat(release): v0.2.1 v0.2.1 Aug 25, 2026
@dan-petty dan-petty changed the title v0.2.1 feat(release): v0.2.1 Aug 25, 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

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants