Skip to content

fix: migrate module paths to dappco.re#3

Merged
Snider merged 260 commits intomainfrom
dev
Apr 4, 2026
Merged

fix: migrate module paths to dappco.re#3
Snider merged 260 commits intomainfrom
dev

Conversation

@Snider
Copy link
Copy Markdown
Contributor

@Snider Snider commented Apr 4, 2026

Module path migration from forge.lthn.ai to dappco.re

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for local connection execution (connection: local)
    • Expanded module coverage to 50+ modules including rpm, ping, reboot, pause, wait_for_connection, and community modules
    • Enhanced when conditions with inline boolean expressions using and, or, and parentheses
    • Improved --extra-vars parsing for files, JSON/YAML structures, and key=value pairs
    • Added diff output for file-based tasks
    • Implemented host pattern operators (:& intersection, :! exclusion)
    • Extended playbook support with import_playbook, force_handlers, and vars_files
  • Documentation

    • Updated and expanded architecture and API documentation
  • Dependencies

    • Upgraded dappco.re/go/core to v0.8.0-alpha.1

Virgil added 30 commits March 27, 2026 03:00
Co-authored-by: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-authored-by: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-authored-by: Virgil <virgil@lethean.io>
Co-authored-by: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Virgil and others added 27 commits April 3, 2026 14:19
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Virgil <virgil@lethean.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 4, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This pull request significantly extends Ansible playbook execution capabilities. It adds playbook import support with circular-import detection, increases module handler coverage to 50+, introduces a local client for controller-host execution, implements structured extra-vars parsing via CLI, and expands both core types (Play, RoleRef, Task, Inventory) and test coverage substantially across executors and all module categories.

Changes

Cohort / File(s) Summary
Documentation Updates
CLAUDE.md, docs/index.md, docs/development.md, docs/api-contract.md, docs/architecture.md, kb/Executor.md
Updated module handler counts (41→50), added API contract documentation, expanded when condition docs for inline boolean expressions, added convention drift report.
CLI Command Handling
cmd/ansible/cmd.go, cmd/ansible/ansible.go, cmd/ansible/ansible_test.go, cmd/ansible/core_primitives.go
Renamed package to ansiblecmd, rewrote command pipeline with runPlaybookCommand and runSSHTestCommand, added option parsing helpers, implemented structured extra-vars handling, added comprehensive test coverage.
Core Types and Data Structures
types.go, types_test.go
Expanded Play (added ImportPlaybook, ForceHandlers, AnyErrorsFatal, VarsFiles, ModuleDefaults), enriched RoleRef and Task with new directive fields, introduced TaskApply, extended Inventory unmarshalling, added ModuleAliases export, increased KnownModules to 96+ entries.
Playbook Parsing and Path Resolution
parser.go, parser_test.go
Added playbook import expansion with circular-import detection, implemented path resolution helpers, enhanced role loading with loadRoleData, extended task unmarshal for loop/role directives, implemented host-pattern selection with colon operators (union/intersection/subtraction).
Core Utilities
core_primitives.go, test_primitives_test.go
Added stringBuffer interface and path/string manipulation wrappers around dappco.re/go/core, introduced absPath, joinPath, cleanPath, and common string operations without direct fmt/filepath usage.
SSH and Local Client
ssh.go, ssh_test.go, local_client.go, local_client_test.go
Added BecomeState() to SSHClient, updated Upload signature to use fs.FileMode, added SetBecome state-clearing behaviour, implemented new localClient for controller-host execution with become support and file operations.
Executor Tests – Become and Extra Features
executor_become_test.go, executor_extra_test.go
Added test doubles for become state tracking, expanded coverage for meta actions (clear_facts, reset_connection, end_host, end_batch), block execution semantics, task orchestration, lookups, includes, roles, and additional filters.
Executor Core Tests
executor_test.go
Added tracking mock client for become call instrumentation, introduced 2500+ lines of new test cases for inventory selection, client caching, tagging, roles, handlers, play control flow, templating, filters, loops, and retry semantics.
Mock SSH Client and Module Dispatch
mock_ssh_test.go
Updated MockSSHClient.Upload to use fs.FileMode, added BecomeState(), expanded module dispatch (yum/dnf/rpm, docker_compose variants), enhanced file-edit modules with diff/backup, extended package management and URI modules with richer behaviours.
Module Tests – Advanced, Command, File, Infrastructure, Service
modules_adv_test.go, modules_cmd_test.go, modules_file_test.go, modules_infra_test.go, modules_svc_test.go
Renamed test functions to cohesive naming schemes (TestModulesAdv_*, etc.), added diffFileClient test double, introduced coverage for advanced module features (privilege escalation, cron, authorized_key, git, URI timeouts/proxies, ufw logging), setup/wait/pause/reboot modules, and multi-package handling for apt/pip.
Dependency Update
go.mod
Updated dappco.re/go/core from v0.5.0 to v0.8.0-alpha.1.
Convention Drift Report
CONVENTION_DRIFT_REPORT.md
Added new documentation listing stdlib→core drift findings, test coverage gaps, and missing SPDX headers across the repository.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant CLI as CLI Handler
    participant Parser
    participant Executor
    participant Client
    
    User->>CLI: ansible-playbook play.yml
    CLI->>Parser: ParsePlaybook(play.yml)
    
    rect rgba(100, 150, 200, 0.5)
    Note over Parser: Import Resolution Loop
    Parser->>Parser: Check for import_playbook
    alt import_playbook found
        Parser->>Parser: Resolve import path<br/>(relative to playbook_dir)
        Parser->>Parser: Check circular imports<br/>(normalise & track seen)
        Parser->>Parser: Recursively ParsePlaybook<br/>(imported path)
        Parser->>Parser: Expand plays<br/>(add imported plays)
    end
    end
    
    Parser-->>CLI: []Play (expanded)
    
    rect rgba(150, 200, 150, 0.5)
    Note over CLI,Executor: Execution Pipeline
    CLI->>CLI: buildPlaybookCommandSettings<br/>(parse extra-vars,<br/>inventory, limit, tags)
    CLI->>Executor: Execute plays
    Executor->>Executor: For each play:<br/>GetHosts(pattern)
    Executor->>Executor: For each host:<br/>runTaskOnHosts
    Executor->>Client: Connect & Execute<br/>(SSH or local)
    Client-->>Executor: Task result
    Executor->>Executor: Store facts<br/>(if delegate_facts)
    end
    
    Executor-->>CLI: Execution summary
    CLI-->>User: Output (diff/changed/failed)
Loading
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 13.80% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: migrate module paths to dappco.re' is directly related to the primary changeset, which updates import paths and references from forge.lthn.ai to dappco.re across multiple files including go.mod and documentation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@Snider Snider merged commit 14863ba into main Apr 4, 2026
6 of 7 checks passed
Snider pushed a commit that referenced this pull request Apr 4, 2026
…E.md. Report ALL findings...' (#4) from agent/full-audit-per-issue--3--read-claude-md into dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant