Repository navigation
refactor(core): eliminate obsolete shims, aliases, proxy wrappers, and backwards compatibility remnants - #95
Merged
dan-petty merged 5 commits intoSep 10, 2026
Conversation
…d backwards compatibility remnants - Strip unicode icons and emojis from README bullets and markdown files - Remove numeric counts, timestamps, and arbitrary identifiers from test names, variables, and documentation - Remove legacy __getattr__ proxies, wrapper functions, and private aliases across commands and AI modules - Replace private re-exports with canonical functions in security.sanitizer - Extract clean GhCliClient and eliminate inner class shims in GitHub commands - Clean up stopwatch timers and semantic schema variable identifiers - Update all impacted tests and verify complete 10-gate CI suite Closes #94
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved GitHub CLI pagination defects and requested test coverage and call-path corrections remain.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This refactor removes obsolete compatibility layers and standardizes callers on canonical implementations, including a new GitHub CLI adapter.
Changes:
- Removed proxies, aliases, pass-through wrappers, and legacy shims.
- Replaced private sanitizer and validator exports with canonical APIs.
- Added
GhCliClientand updated GitHub synchronization paths. - Normalized identifiers and timers across tests, code, and documentation.
File summaries
| File | Reviewed change | Findings |
|---|---|---|
tests/test_tf.py |
Uses canonical directory validation. | — |
tests/test_runtime_security_and_ssrf_hardening.py |
Uses canonical secret masking. | — |
tests/test_review.py |
Updates review patch targets. | — |
tests/test_review_verification.py |
Imports verification helpers directly. | — |
tests/test_review_security_tools.py |
Normalizes test naming. | — |
tests/test_review_runner.py |
Updates canonical Git helper usage. | Moderate (2 votes; line 113): Patch devops_cli.ai.review.runner.is_ignored_by_git and exercise _collect_files so the test verifies the canonical call path. |
tests/test_review_repos.py |
Imports repository helpers directly. | — |
tests/test_review_prompt_guardrails.py |
Uses canonical sanitizers. | — |
tests/test_review_path.py |
Removes proxy-module access. | — |
tests/test_review_defenses_and_verification.py |
Uses canonical masking. | — |
tests/test_pydantic_ai_profiles_and_providers.py |
Removes numeric naming and alias usage. | — |
tests/test_pydantic_agent.py |
Uses run_stream. |
— |
tests/test_library_vector_tier.py |
Imports the canonical AI app. | — |
tests/test_library_ingest.py |
Imports the canonical AI app. | — |
tests/test_docs_ingester.py |
Imports the canonical AI app. | — |
tests/test_common_hallucinations.py |
Removes arbitrary identifiers. | — |
src/devops_cli/main.py |
Renames timing variables. | — |
src/devops_cli/k8s/diff.py |
Uses canonical masking. | — |
src/devops_cli/github/labels.py |
Removes the finding alias. | — |
src/devops_cli/github/client.py |
Adds the GhCliClient adapter. |
Moderate (3 votes; line 315): Add focused adapter tests for command construction, JSON parsing, and label/milestone mutations. Moderate (1 vote; line 315): Fetch all label pages to avoid treating omitted labels as absent. Critical (2 votes; line 365): Parse and flatten all gh api --paginate milestone pages before diffing. |
src/devops_cli/github/__init__.py |
Updates public GitHub exports. | — |
src/devops_cli/dry_run/__init__.py |
Replaces dynamic export behavior. | — |
src/devops_cli/core/process.py |
Uses canonical masking and semantic timers. | — |
src/devops_cli/core/cli.py |
Uses canonical masking and semantic timers. | — |
src/devops_cli/commands/tf.py |
Removes the validation wrapper. | — |
src/devops_cli/commands/telemetry.py |
Renames timing variables. | — |
src/devops_cli/commands/ssh.py |
Uses canonical masking. | — |
src/devops_cli/commands/review.py |
Removes proxies and pass-through wrappers. | — |
src/devops_cli/commands/kustomize.py |
Removes the validation wrapper. | — |
src/devops_cli/commands/install_tools.py |
Uses canonical version validation. | — |
src/devops_cli/commands/gh.py |
Uses GhCliClient instead of inner shims. |
— |
src/devops_cli/commands/devcontainer.py |
Uses canonical Python-version lookup. | — |
src/devops_cli/commands/config.py |
Uses canonical masking. | — |
src/devops_cli/commands/ci.py |
Renames timing variables. | — |
src/devops_cli/commands/ai.py |
Uses canonical prompt sanitization and removes ai_app. |
— |
src/devops_cli/ai/thinking_stream.py |
Removes process_token. |
— |
src/devops_cli/ai/review/verification.py |
Uses canonical sanitizers. | — |
src/devops_cli/ai/review/sanitization.py |
Removes sanitizer aliases. | — |
src/devops_cli/ai/review/runner.py |
Uses canonical helpers and sanitizer APIs. | — |
src/devops_cli/ai/review/pipeline.py |
Uses canonical sanitizers. | — |
src/devops_cli/ai/review/chunker.py |
Removes filename and function aliases. | — |
src/devops_cli/ai/review_schema.py |
Renames duplicate-finding variables. | — |
src/devops_cli/ai/rag/investigator.py |
Renames timing variables. | — |
src/devops_cli/ai/knowledge_base/devops_cli/tasks/ai_code_review.md |
Updates sanitizer documentation. | — |
src/devops_cli/ai/diff/difftastic.py |
Uses canonical masking. | — |
src/devops_cli/ai/client/openai.py |
Renames timing variables. | — |
src/devops_cli/ai/client/ollama.py |
Renames timing variables. | — |
src/devops_cli/ai/client/claude.py |
Renames timing variables. | — |
src/devops_cli/ai/benchmark/runner.py |
Renames timing variables. | — |
src/devops_cli/ai/benchmark/embedding_runner.py |
Renames timing variables. | — |
src/devops_cli/ai/analyze/outlines.py |
Uses canonical masking. | — |
src/devops_cli/ai/agents/runner.py |
Uses canonical masking. | — |
src/devops_cli/ai/agents/memory.py |
Uses canonical sanitizers. | — |
src/devops_cli/ai/agents/agent.py |
Removes compatibility aliases. | — |
README.md |
Removes decorative icons and arbitrary counts. | — |
docs/ROADMAP.md |
Normalizes milestone descriptions. | — |
docs/PENDING_FEATURES.md |
Removes obsolete phase labels. | — |
docs/agent/task.md |
Records completed cleanup work. | — |
Review details
Suppressed comments (1)
src/devops_cli/github/client.py:319
gh label listhas a bounded default page size, so this adapter does not necessarily read the complete remote label set. If a repository has more labels than that limit, omitted desired labels are treated as absent and sync attempts duplicate creations. Fetch all label pages (or otherwise request the complete set) and share that logic with_get_repo_labels.
- Files reviewed: 58/58 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…s, and git boundary - Add parse_paginated_json to handle concatenated multi-page JSON arrays from gh api --paginate in GhCliClient and gh commands - Implement edit_milestone method on GhCliClient for full synchronizer compatibility - Author focused unit tests for GhCliClient and parse_paginated_json in test_github_client.py - Exercise real git repository boundary and gitignore filtering in test_review_runner.py
…ses-backwards-compat
…ear-text false positives
dan-petty
deleted the
refactor/eliminate-shims-aliases-backwards-compat
branch
September 10, 2026 14:55
4 tasks
dan-petty
added a commit
that referenced
this pull request
Sep 10, 2026
* fix(review): remediate security findings and enhance review feedback loop - Remediate all 11 verified findings across security, sandbox isolation, and resource bounds: - CodeMode: Remove reflection primitives (getattr, hasattr, type) and sys module from safe_builtins to prevent sandbox escape - K8s: Remove hardcoded default password for Open-WebUI admin account, generating a cryptographically secure random token when omitted - SSH: Mask secrets in key rotation error messages and provide actionable connectivity guidance - Harness Memory: Enforce bounded LIMIT clause and cursor iteration on SQLite search queries - Pydantic AI Tools: Enforce unconditional path traversal validation across all tool parameters regardless of schema presence - Harness Compaction: Enforce bounded capacity and FIFO eviction for overflow fallback memory using OrderedDict - Pipeline Protocol: Sanitize stage exception messages using mask_secrets in StageExecutionRecord - Ollama Models: Add URL scheme validation and block link-local cloud metadata (169.254.169.254) in base_url - Ollama Client: Sanitize HTTP status and streaming error messages using mask_secrets - Valkey: Centralize and sanitize error messages across all Valkey CLI commands using mask_secrets - Update DevSecOps review prompts, verification falsification rules, and task manuals for the closed-loop feedback loop - Export verified findings into the continuous learning feedback dataset - Bump version to 0.2.15 in pyproject.toml and package init - Synchronize CLI documentation and README Closes #87 * fix(review): address copilot feedback on sandbox isolation, credential masking, and query bounds * feat(security): complete security scanner migration to BaseSecurityScanner and ScannerRegistry (#93) * feat(security): complete security scanner migration to BaseSecurityScanner and ScannerRegistry * fix(security): address review feedback on security scanner base migration * refactor(core): eliminate obsolete shims, aliases, proxy wrappers, and backwards compatibility remnants (#95) * refactor(core): eliminate obsolete shims, aliases, proxy wrappers, and backwards compatibility remnants - Strip unicode icons and emojis from README bullets and markdown files - Remove numeric counts, timestamps, and arbitrary identifiers from test names, variables, and documentation - Remove legacy __getattr__ proxies, wrapper functions, and private aliases across commands and AI modules - Replace private re-exports with canonical functions in security.sanitizer - Extract clean GhCliClient and eliminate inner class shims in GitHub commands - Clean up stopwatch timers and semantic schema variable identifiers - Update all impacted tests and verify complete 10-gate CI suite Closes #94 * fix(review): address copilot feedback on paginated json, adapter tests, and git boundary - Add parse_paginated_json to handle concatenated multi-page JSON arrays from gh api --paginate in GhCliClient and gh commands - Implement edit_milestone method on GhCliClient for full synchronizer compatibility - Author focused unit tests for GhCliClient and parse_paginated_json in test_github_client.py - Exercise real git repository boundary and gitignore filtering in test_review_runner.py * refactor(pages,review): eliminate legacy config paths and harden secret redaction * fix(review,security): decouple secret redaction and resolve CodeQL clear-text false positives * feat(k8s): centralized kubernetes logging stack and LogQL integration (#96) * feat(k8s): centralized kubernetes logging stack and LogQL integration - Add declarative Loki and Fluent Bit manifests under k8s/logging with PSA labels and network isolation - Register logging stack in deploy-stack and teardown-stack lifecycle - Implement native LogQL query parser, line filter evaluator, and stream engine in k8s.logql - Add OpenTelemetry trace_id extraction and trace correlation in LogQL entries and Grafana Loki datasource - Support live follow and transparent fallback to kubectl logs in devops k8s logs - Register FastMCP tools k8s_logs_query and k8s_logs_tail - Author unit tests and verify 10-gate CI suite Closes #89 * fix(k8s): remediate code review findings on centralized logging stack and logql integration * feat(k8s): configure qdrant service with nodePort 31744 for direct host RAG access * fix(k8s): resolve code review feedback on centralized logging stack and logql integration * fix(k8s): confine rich markup escaping to output submodule and restore qdrant clusterip security perimeter * feat(tf): infracost finops cloud cost estimation and reporting (#97) * feat(tf): infracost finops cloud cost estimation and reporting * fix(tf): address code review feedback on Infracost FinOps cost engine - Enforce DependencyError when Infracost binary is missing in non-mock execution - Raise typed SubprocessError on non-zero Infracost breakdown/diff subprocess exit - Add ToolExecutionError error boundaries around breakdown and diff JSON deserialization - Add --compare-to baseline option to run_infracost_diff and CLI command - Validate budget thresholds before rendering and serializing JSON output - Register dynamic MCP resource resource://tf/cost/latest - Add comprehensive unit tests covering parsing, baseline diffs, and budget serialization * feat(argo): multi-cluster argocd fleet synchronization and rollouts (#98) * feat(argo): multi-cluster argocd fleet synchronization and rollouts - Implement multi-cluster fleet coordination engine with bounded concurrency under devops argo fleet sync - Add progressive delivery rollout controls (promote, abort, restart) wrapping kubectl argo rollouts - Introduce automated metric-driven rollback gates evaluating Prometheus/LogQL error rates with auto-abort capability - Add format_argo_fleet_sync_table and format_argo_rollout_analysis_table formatters - Register argo_fleet_sync, argo_rollout_analyze FastMCP tools and resource://argo/fleet/status resource - Add comprehensive test suite with 98%+ code coverage adhering to strict architectural invariants * fix(argo): address review feedback on fleet sync and rollouts * perf(ci): optimize caching configuration across all github workflows (#100) * perf(ci): optimize caching configuration across all github workflows * fix(ci): bound tooling cache key and enforce exact devcontainer cacheFrom assertion * refactor(agent): modularize task tracking to eliminate merge conflicts - Decompose monolithic docs/agent/task.md into isolated per-task tracking files under docs/agent/tasks/ (task-<issue>-<slug>.md) - Update GitHub Projects v2 parser (src/devops_cli/github/projects.py) to recursively scan and parse docs/agent/tasks/ by default while excluding archives and READMEs - Decompose parser functions to enforce cyclomatic complexity <= 10 and nesting depth <= 5 - Archive historical phases 1-50 in docs/agent/archive/historical-phases-1-to-50.md - Replace docs/agent/task.md with a lean index table pointing to modular task files - Update AGENTS.md, ROUTINE_TASKS.md, and Knowledge Base Task Manual 13 with the modular task architecture and commit context mandate - Author comprehensive unit tests in tests/test_github_projects.py Closes #101 * feat(ai): strengthen target-agnostic review prompts and feedback dataset synchronization * feat(ai): generalize devops ai review for target-agnostic evaluation and multi-convention discovery * fix(telemetry): optimize jaeger memory sizing, exception span hygiene, and embedding fast failover - Update k8s/otel/jaeger.yaml to configure MEMORY_MAX_TRACES to 10000 and scale memory limits to 1024Mi to eliminate OOMKills - Refactor telemetry tracer span exception handling to avoid attaching stack traces to handled CLI exits (typer.Exit) - Add DEFAULT_RAG_EMBEDDING_TIMEOUT (15.0s) and rapid 2.0s connect timeouts for fast Ollama multi-node failover - Author comprehensive unit tests in tests/test_telemetry.py and tests/test_rag_embeddings.py - Ground and deliver GitHub task 104 in docs/agent/tasks/task-104-telemetry-trace-optimizations.md (Closes #104)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
README.mdbullets and operational task references.t0renamed tostart_time), and roadmap documentation.__getattr__dynamic proxy and 15 pass-through wrapper functions fromdevops_cli.commands.review._mask_secrets_in_contentand_sanitize_prompt_boundary_tagswith canonical imports fromdevops_cli.security.sanitizer.GhCliClientand eliminated inner class shims (_GhCliLabelShim,_GhCliMilestoneShim) and legacyLabelAuditFindingalias._validate_dir,_validate_path,_project_python_version,_validate_version_str, and_is_git_ignoredwith canonical core functions.uv run devops ci), 100% typecheck passing, zero invariant violations (complexityCloses #94