Skip to content

Fix/variant generator fidelity#342

Open
Ne0nd0g wants to merge 2 commits into
dreadnode:mainfrom
Ne0nd0g:fix/variant-generator-fidelity
Open

Fix/variant generator fidelity#342
Ne0nd0g wants to merge 2 commits into
dreadnode:mainfrom
Ne0nd0g:fix/variant-generator-fidelity

Conversation

@Ne0nd0g

@Ne0nd0g Ne0nd0g commented Jul 10, 2026

Copy link
Copy Markdown

Summary

Fixes several variant-generator fidelity issues that could leave generated labs referencing stock GOAD assets, retain original identity names, or omit required empty directories.

Generated variants now handle CamelCase name components, rename identity-based files consistently with their contents, use and rewrite variant-specific inventory templates, and preserve .gitkeep placeholders when copying the lab tree.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would change existing behavior)
  • New lab, lab variant, or extension
  • New / updated provider support
  • Refactor / internal cleanup (no functional change)
  • Documentation
  • CI / build / release tooling
  • Dependency update

Area

  • CLI (cli/)
  • Ansible collection (ansible/)
  • Terraform / Terragrunt (infra/, modules/)
  • Packer / Warpgate (packer/, warpgate-templates/)
  • Lab definitions (ad/)
  • Extensions (extensions/)
  • Variant generator / tools (tools/)
  • Documentation (docs/, README.md, etc.)
  • CI workflows (.github/)

Related issues

N/A

How was this tested?

  • Added table-driven Go tests covering name-component replacement at:

    • CamelCase boundaries, such as StarkWallpaper
    • normal word and punctuation boundaries
    • the end of a string
    • multiple occurrences in the same string
  • Added negative cases confirming that partial identifiers such as Starkey, Stark1, Stark_svc, and aStark are not changed.

  • Verified that generated variant inventories are sourced from the variant tree and that their domain_name values point to the generated variant.

  • Verified that identity-based filenames are transformed using the same mappings as their contents.

  • Verified that .gitkeep files are retained so required empty directories remain present in generated variants.

  • Provider(s) tested:

  • Lab(s) tested:

  • Operator OS: Linux

Screenshots / logs (optional)

N/A

Checklist

  • I have read CONTRIBUTING.md.
  • My changes follow the existing code style of the area I touched.
  • I have added or updated tests where it makes sense (Go tests under cli/, Ansible syntax checks, etc.).
  • I have updated documentation (README, docs/, role README, command help text) where relevant.
  • I have checked that I am not committing real secrets, personal credentials, or internal hostnames. (Intentional lab credentials inside ad/, ansible/, and extensions/ are expected and fine.)
  • If this PR changes user-facing CLI behavior, I have updated the relevant --help text and any docs that reference it.
  • If this PR introduces a breaking change, I have called it out in the Summary above.

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