Repository navigation
feat(release): v0.2.14 - #86
Conversation
…d homelab references
…on engine (#82) * feat(ai): add dynamic package introspection and multi-source docs ingestion engine * fix(ai): enforce fully-qualified symbol index and dedicated error codes for library ingestion * fix(ai): filter built-in descriptors from class method extraction
#83) * feat(rag): dedicated library vector tier, valkey symbol cache, and routine observability audit * docs(roadmap): define v0.2.16 and v0.2.17 milestones for sandbox application lifecycle * feat(gh): integrate github pages, issues, projects, and views with fastmcp and agent instructions * docs(roadmap): enrich task context, technical specifications, and reprioritize milestones * docs: compact v0.1 release documentation and codify automated compaction policy * fix(rag): address code review feedback on library store and CLI client wiring
…s, and issue reconciliation
…ools - Filter out private submodules and __main__ in package introspection to eliminate CLI execution hazard (Fixes #84). - Expose FastMCP library intelligence tools (ai_ingest_library, ai_query_library, ai_inspect_symbol) and resource://libraries/indexed dynamic resource (Closes #80). - Implement import-driven AST prompt grounding and API contract injection in review pipeline (Closes #78). - Add comprehensive contract, regression, and injection unit tests and sync roadmap.
…rift auditor Implement polyglot concrete syntax tree parsing, S-expression AST query execution, and cross-file code graph synthesis for Python, TypeScript, Go, Rust, Java, and HCL with zero-crash fallback parsers. Expose CLI commands `devops ai ast parse` and `devops ai ast graph`, add `--multilingual` support to `devops ai repomap`, and register FastMCP tools `ai_ast_parse` and `ai_ast_graph`. Implement workspace library API drift and deprecation usage auditor `devops ai audit-library-usage` comparing AST call sites against indexed library contracts to detect removed methods, unknown attributes, unrecognized kwargs, and deprecated calls. Flatten nesting depth to satisfy architectural invariant gates. Closes #74 Closes #79
…esizer Implement `ContextPacker` in `src/devops_cli/ai/context_packer.py` to rank imported symbols, strip unreferenced private methods/docstrings, and skeletonize function/class bodies with ellipsis while preserving public interfaces, parameters, defaults, and type annotations. Expose CLI command `devops ai pack-context` and FastMCP tool `ai_pack_context`, and integrate context packing into `_collect_linked_snippets` in the review pipeline. Enforce strict cyclomatic complexity <= 10 and nesting depth <= 2. Closes #85
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved moderate and critical findings remain across core functionality and security-sensitive integrations.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Release v0.2.14 adds multilingual AST intelligence, library contract and drift tooling, context packing, RAG drift synchronization, and expanded GitHub/MCP integrations.
Changes:
- Adds AST parsing, graphing, context packing, and library auditing.
- Adds RAG synchronization, contract grounding, and documentation ingestion.
- Expands GitHub integrations, security validation, documentation, and release metadata.
Review remains blocked by unresolved moderate and critical findings across core parsing, ingestion, storage, validation, and GitHub behavior.
File summaries
| File | Reviewed change |
|---|---|
uv.lock |
Locks release dependency updates. |
tests/test_validation.py |
Tests URL and SSRF validation. |
tests/test_tflint.py |
Tests TFLint integration. |
tests/test_rag_drift.py |
Tests RAG drift detection. |
tests/test_pydantic_ai_ollama.py |
Updates Ollama fixtures. |
tests/test_pr_cmd.py |
Tests pull-request commands. |
tests/test_mcp.py |
Tests MCP behavior. |
tests/test_library_ingest.py |
Tests library ingestion. |
tests/test_library_drift_auditor.py |
Tests API drift auditing. |
tests/test_k8s.py |
Updates Kubernetes coverage. |
tests/test_github_projects.py |
Tests GitHub Projects integration. |
tests/test_github_projects_reconcile.py |
Tests project reconciliation. |
tests/test_github_pr_threads.py |
Tests review-thread operations. |
tests/test_github_pages.py |
Tests Pages integration. |
tests/test_github_issues.py |
Tests issue management. |
tests/test_embedding_config_retention.py |
Tests embedding configuration retention. |
tests/test_embedding_benchmark.py |
Updates embedding benchmarks. |
tests/test_docs_ingester.py |
Tests documentation ingestion. |
tests/test_consolidation_security_sanitizer.py |
Tests security sanitization. |
tests/test_consolidation_core_paths.py |
Tests path security helpers. |
tests/test_config_env_overrides.py |
Updates configuration tests. |
tests/test_architectural_invariants.py |
Tests architectural invariants. |
tests/test_ai_cmd.py |
Tests AI commands. |
tests/test_ai_client_security.py |
Tests AI endpoint security. |
src/devops_cli/server/routes/telemetry.py |
Applies telemetry sanitization. |
src/devops_cli/security/vault_broker.py |
Centralizes Vault traversal checks. |
src/devops_cli/security/tflint.py |
Uses centralized subprocess execution. |
src/devops_cli/security/sanitizer.py |
Adds command and prompt sanitization. |
src/devops_cli/security/__init__.py |
Exports security helpers. |
src/devops_cli/output/console.py |
Routes output through sanitization. |
src/devops_cli/models/library.py |
Defines library contract models. |
src/devops_cli/lang/en/help.py |
Adds command help text. |
src/devops_cli/github/pr_threads.py |
Implements review-thread operations. |
src/devops_cli/github/pages.py |
Implements Pages status and verification. |
src/devops_cli/github/client.py |
Adds GitHub client methods. |
src/devops_cli/github/__init__.py |
Updates GitHub exports. |
src/devops_cli/exceptions/ai.py |
Adds ingestion exceptions. |
src/devops_cli/exceptions/__init__.py |
Exports exceptions. |
src/devops_cli/core/validation.py |
Adds host and egress validation. |
src/devops_cli/core/paths.py |
Adds path validation. |
src/devops_cli/config/env.py |
Updates environment configuration. |
src/devops_cli/config/defaults.py |
Adds library and RAG defaults. |
src/devops_cli/config/constants.py |
Adds library error constants. |
src/devops_cli/commands/workspace.py |
Centralizes system-path checks. |
src/devops_cli/commands/vault.py |
Updates Vault handling. |
src/devops_cli/commands/rag.py |
Adds RAG drift commands. |
src/devops_cli/commands/pr.py |
Adds review-thread commands. |
src/devops_cli/commands/k8s/diagnostics.py |
Updates Kubernetes diagnostics. |
src/devops_cli/commands/k8s/cluster_context.py |
Adds URL and path validation. |
src/devops_cli/commands/install_tools.py |
Hardens archive extraction. |
src/devops_cli/commands/ai_ast.py |
Adds AST CLI commands. |
src/devops_cli/ai/tasks/benchmark_embedding_eval_pairs.md |
Adds embedding evaluation data. |
src/devops_cli/ai/review/sanitization.py |
Updates review sanitization. |
src/devops_cli/ai/review/runner.py |
Updates review execution. |
src/devops_cli/ai/review/pipeline.py |
Integrates packing and grounding. |
src/devops_cli/ai/review/contract_grounding.py |
Adds library contract grounding. |
src/devops_cli/ai/review/auto_fix.py |
Updates review auto-fixes. |
src/devops_cli/ai/review/ast_imports.py |
Extracts review imports. |
src/devops_cli/ai/review/__init__.py |
Updates review exports. |
src/devops_cli/ai/repomap.py |
Adds multilingual repository mapping. |
src/devops_cli/ai/rag/__init__.py |
Exposes RAG components. |
src/devops_cli/ai/model_bundler.py |
Updates model bundling. |
src/devops_cli/ai/mcp/__init__.py |
Updates MCP exports. |
src/devops_cli/ai/library/__init__.py |
Exposes library intelligence components. |
src/devops_cli/ai/knowledge_base/it_domains/tools/ollama.md |
Updates Ollama guidance. |
src/devops_cli/ai/knowledge_base/devops_cli/configuration_and_settings.md |
Updates configuration guidance. |
src/devops_cli/ai/ext_langchain.py |
Updates LangChain integration. |
src/devops_cli/ai/common_tools.py |
Updates shared AI tools. |
src/devops_cli/ai/ast/models.py |
Defines AST and graph models. |
src/devops_cli/ai/ast/graph.py |
Builds code graphs. |
src/devops_cli/ai/ast/engine.py |
Adds multilingual AST parsing. |
src/devops_cli/ai/ast/__init__.py |
Exposes AST components. |
src/devops_cli/ai/agents/prompt.py |
Updates prompt construction. |
src/devops_cli/ai/agents/context.py |
Updates agent context handling. |
src/devops_cli/ai/__init__.py |
Updates AI package exports. |
src/devops_cli/__init__.py |
Bumps the package version. |
RELEASE_CYCLE.md |
Updates release references. |
README.md |
Updates command listings. |
pyproject.toml |
Updates metadata and dependencies. |
k8s/llm/ollama-daemonset.yaml |
Updates Ollama deployment configuration. |
docs/PENDING_FEATURES.md |
Updates feature tracking. |
docs/ERRORS.md |
Updates error documentation. |
docs/ENV_VARS.md |
Updates environment documentation. |
docs/commands/tls.md |
Updates TLS command documentation. |
docs/commands/pr.md |
Updates PR command documentation. |
CHANGELOG.md |
Documents the v0.2.14 release. |
.github/dependabot.yml |
Updates release branch targets. |
_config.yaml |
Aligns Jekyll configuration and versioning. |
Review details
Suppressed comments (23)
docs/CLI_REFERENCE.md:2416
- The generated reference hides the actual default (
1500) as<masked>.--max-tokensis a numeric budget, not a credential, so this makes the new command's documented behavior inaccurate; narrow the documentation sanitizer to exact sensitive flags rather than matching the substringtoken/tokens.
| `--max-tokens` | `integer` | `<masked>` | Maximum token budget for packed context output. |
docs/commands/ai.md:281
- This generated command reference also reports the numeric default for
--max-tokensas<masked>instead of the implementation's1500. Correct the shared sensitive-option matching and regenerate this file so users can rely on the documented default.
| `--referenced`, `-r` | `string` | - | Comma-separated list of symbols referenced by caller to prioritize during pruning. |
| `--max-tokens` | `integer` | `<masked>` | Maximum token budget for packed context output. |
src/devops_cli/ai/context_packer.py:330
- This allocates the same budget to every snippet rather than distributing
total_budgetproportionally to snippet size/usage as the context-packing contract requires. A tiny file can consume half the budget while a much larger file is truncated to the same limit, wasting available context and degrading multi-file packing.
src/devops_cli/ai/library/drift_auditor.py:110 - The
allowed_paramstruthiness guard skips validation when a function has zero declared parameters. A call such asno_args(unexpected=1)therefore produces noUNRECOGNIZED_KWARGfinding; remove theand allowed_paramscondition while retaining the**kwargsexemption.
src/devops_cli/ai/library/drift_auditor.py:159 - Deprecation detection only searches the docstring text and ignores the structured
FunctionSignature.is_deprecatedanddeprecation_messagefields. Contracts that mark an API deprecated through those fields will pass silently, so use the structured flag/message as the authoritative signal and retain the docstring check only as a fallback.
src/devops_cli/ai/library/drift_auditor.py:24 UNKNOWN_ATTRIBUTEis declared as a supported finding type but is never emitted: the auditor visits onlyast.Callnodes, and missing symbols are always classified asREMOVED_METHOD. Attribute usages promised by the auditor/release summary therefore cannot be reported; add attribute traversal and emit this type, or remove the unsupported category from the public contract.
src/devops_cli/ai/mcp/server.py:683- Unlike the existing
ai_architecturetool, this MCP wrapper does not validatemax_filesbefore passing it to the CLI. A negative value defeats the graph collector's limit check (len(files) >= max_files) and can silently select an unintended file count; reject values below one with_validate_mcp_int_bound.
src/devops_cli/ai/mcp/server.py:453 auto_sync=Truecan invoke a full workspace reindex, but this tool always uses the short MCP timeout. Larger workspaces will be terminated/reported as timed out even though drift detection without synchronization is fast; select the normal/long timeout when auto-sync is requested.
src/devops_cli/ai/mcp/server.py:1155- This MCP tool defaults
dry_run=Falseeven though it adds project items and edits five remote fields. The neighboring label, milestone, and project sync tools default to dry-run, so an agent invokinggh_project_reconcile()with no arguments mutates GitHub state unexpectedly; make the safe defaultTrueand require an explicit opt-in for writes.
src/devops_cli/ai/rag/drift.py:82 - The indexed commit marker is a single
cache_dir/rag_indexed_commit.txtfor every workspace/project. After indexing repository B, drift checks for repository A compare against B's commit and report false git drift even when A's file hashes are synchronized; scope the marker by project/root or store it alongside project-specific cache metadata.
src/devops_cli/ai/rag/drift.py:264 - After
index_workspace()returns, this code clears every drift classification and sets the report clean without checking whether indexing actually covered the affected files. The indexer explicitly returnsindexed_files: 0andskipped_fileswhen it cannot produce chunks, so--fail-on-driftcan report success while the next detection still finds the same stale/new files; only clear findings after successful reconciliation of the affected set.
src/devops_cli/ai/rag/drift.py:83 - The commit marker is only written from
detect_and_sync(auto_sync=True); normalrag index/WorkspaceIndexer.index_workspace()never records the HEAD it indexed. As a result, a freshly indexed workspace haslast_indexed_commit=Noneand subsequent commits cannot setgit_commit_drift, so the advertised commit-based drift detection is disabled unless auto-sync was previously used. Record the indexed HEAD on every successful index operation or derive it from the index cache.
src/devops_cli/ai/review/contract_grounding.py:35 - Library docstrings are interpolated into the review prompt as instructions/data without the prompt-injection sanitization used for other untrusted context. An installed package can therefore place instruction-like text in a docstring and influence the reviewer; sanitize the contract text and delimit it as untrusted data before adding it to the prompt.
src/devops_cli/ai/review/contract_grounding.py:66 - For
from package.module import symbol, this first queries only the short name and accepts the first match. If multiple modules in the package export the same symbol, the wrong contract can be injected and the qualified fallback is never attempted; resolvemod.symbolfirst, then use the short name only when unambiguous.
src/devops_cli/ai/review/contract_grounding.py:93 - This function introduces a multi-line LLM guardrail directly in Python. The repository requires all system/task/guardrail prompts to live in Markdown and be loaded with
load_task_prompt()(AGENTS.md:188); move this block to a task prompt file so prompt content remains centrally auditable and synchronized.
src/devops_cli/commands/ai.py:1404 - A missing or unreadable
target_pathreachespack_file()without validation and raises a raw filesystem exception, sodevops ai pack-context missing.pyfails with a traceback instead of the CLI's normal error/exit handling. Validate the path before packing and emit a user-facing error.
src/devops_cli/commands/ai.py:1294 - The documented auditor form uses a positional
<package_name>, but this command exposespackageonly as--package/-p. Callingdevops ai audit-library-usage typertherefore fails before auditing; either make the package atyper.Argumentor update the release-facing syntax consistently.
src/devops_cli/commands/ai_ast.py:76 - The graph target is exposed only as an option (
--dir/-d), so the documenteddevops ai ast graph <path>form is rejected as an unexpected positional argument. Make the path atyper.Argumentor update the release-facing command documentation/help to match the actual interface.
src/devops_cli/core/validation.py:107 - These new validation errors echo the raw hostname/URL, including private IPs or embedded credentials, directly in the exception that the CLI displays. Keep the user-facing message generic and retain the raw destination only in structured debug details, consistent with the repository's information-leakage policy.
src/devops_cli/github/pages.py:63 - This defaults a missing
https_enforcedfield toTrue, so an incomplete/older GitHub Pages response is reported as HTTPS-protected even when enforcement was not verified. The status command should fail closed (or model an unknown state) rather than claim a security property from absent data.
src/devops_cli/github/projects.py:860 audit_remote_project_views()relies onget_remote_project_views(), which returns the first repository-linked project rather than the template-matched board. With multiple linked Projects v2, this audit can report the wrong project's views (and sync can modify the wrong board); select the intended project by template identity before auditing or synchronizing.
src/devops_cli/github/projects.py:383- Project item discovery always calls the user-owned endpoint
users/{owner}/projectsV2/.... Whenowneris an organization, GitHub's Projects v2 API requires theorgs/{org}/projectsV2/...route, so this returns an empty set and every sync/reconcile run treats existing items as missing, causing duplicate-add attempts and inaccurate field audits. Select the endpoint based on owner type or fall back to the organization route.
src/devops_cli/github/projects.py:593 - The return value from every
item-editoperation is discarded, yet the function returnsTrueand the caller counts the item as reconciled even if GitHub rejects one or all field updates. Aggregate the edit results and report success only when the required field mutations succeed.
- Files reviewed: 117/118 changed files
- Comments generated: 20
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…instructions - Harden security sanitizer with -p= and --token= sensitive argument prefixes - Implement non-mutating thread-safe DNS resolution with fail-closed non-public IP validation - Scope docs ingester chunk slugs to file relative paths, mask credentials in errors, and support multi-page crawling - Fully qualify introspected function and class symbol signatures and filter private submodules - Namespace Valkey cache keys and Qdrant vector point IDs with package qualification - Integrate Tree-Sitter native CST parsing fallback and S-expression query filtering - Disambiguate AST call graph edges against symbol bodies to prevent parameter shadowing - Enforce valid Python AST pruning under context budgets without arbitrary string truncation - Support module-level imports and alias attribute lookups in library drift auditor - Forward multi-label filters in GitHub client and paginate review threads via GraphQL - Align project custom field inference with declarative taxonomy label mappings - Enhance agent instructions, routine tasks, and knowledge base for proactive project bootstrap and card tracking
Release Summary: v0.2.14
This release delivers the complete implementation of Milestone v0.2.14, featuring Tree-Sitter polyglot concrete syntax tree (CST) code intelligence, proactive library API drift and deprecation usage auditing, AI prompt context packing with AST skeletonization, autonomous RAG index drift detection with auto-reindexing, ground-truth library contract injection, and 10 new FastMCP tools for GitHub and library intelligence.
Key Highlights & Deliverables
devops ai ast,devops ai repomap --multilingual) (feat(ai): integrate tree-sitter multilingual ast graph and code intelligence engine #74, PR fix(ai): skip private submodules and __main__ during package introspection #84):devops ai ast parse <file> [--query <s-expr>]anddevops ai ast graph <path> [--format json|dot]generating class hierarchies and call-graph dependencies.ai_ast_parseandai_ast_graphwith dynamic AST schema exports.astwhen optional tree-sitter grammars are uninstalled.devops ai audit-library-usage) (feat(ai): library api drift and deprecation usage auditor #79, PR fix(ai): skip private submodules and __main__ during package introspection #84):.data/libraries/.REMOVED_METHOD,UNKNOWN_ATTRIBUTE,UNRECOGNIZED_KWARG, andDEPRECATED_CALL..data/analysis/api_drift_report.json) with--fail-on-breaking.devops ai pack-context) (feat(ai): context packing and symbol-pruned prompt synthesizer #85):_helper), skeletonizes function bodies with ellipsis (...), and compresses docstrings.pack_snippets) distributing limits proportionally across files.Stage1PreAnalysisreplacing naive character slicing.devops ai pack-context <path> [--referenced <syms>] [--max-tokens <int>]and FastMCP toolai_pack_context.devops ai rag drift) (feat(rag): autonomous rag index drift detection and auto-reindexing scheduler #81):WorkspaceIndexer._load_cache()).stale_modified_files,new_unindexed_files,deleted_files, and computes normalized drift score (rag.drift_detection) and Prometheus metrics (devops_cli_rag_drift_detected_total,devops_cli_rag_drift_score).--auto-syncand exit code gating with--fail-on-drift.rag_drift(path, auto_sync).Stage1PreAnalysisandStage3PersonaReview), reducing third-party API hallucination rates to <1%.ai_ingest_library,ai_query_library,ai_inspect_symbol) and dynamic system resourceresource://libraries/indexed.devops ai ingest) (PR feat(ai): dynamic package introspection and multi-source docs ingestion engine #82, PR feat(rag): dedicated library vector tier and valkey symbol cache store #83):.data/libraries/<pkg>-contract.json).devops_librariesin Qdrant with Valkey symbol caching.resource://gh/*)._config.ymlto_config.yamlmatching project-wide.yamlconvention (config.yaml,config.example.yaml,.pre-commit-config.yaml) with backward-compatible resolution indevops gh pages verify.Verification
devops ci(version consistency, pytest 2,236+ tests, coverage >= 90.0%, ruff check, ruff format, mypy strict, uv audit, bandit SAST, actionlint, docs sync).devops release statusverified 100% clean and consistent.v0.2.14achieved 100% completion with all 12 tracked issues closed.