Skip to content

fix(variant): preserve generated inventory fidelity - #342

Merged
mkultraWasHere merged 6 commits into
dreadnode:mainfrom
Ne0nd0g:fix/variant-generator-fidelity
Aug 12, 2026
Merged

fix(variant): preserve generated inventory fidelity#342
mkultraWasHere merged 6 commits into
dreadnode:mainfrom
Ne0nd0g:fix/variant-generator-fidelity

Conversation

@Ne0nd0g

@Ne0nd0g Ne0nd0g commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Keeps generated GOAD variants self-contained and deployable while retaining the hardened variant-generator behavior already present on current main.

  • Preserve .gitkeep placeholders so required empty directories survive generation.
  • Rewrite domain_name in generated inventory files to the variant target directory.
  • Resolve provider inventory templates through ResolvedVariantPaths(), including the default ad/GOAD-variant-1 target.
  • Add focused regression tests for all three behaviors.

The branch was merged with current main. Replacement logic, full-path renaming, extensionless-file handling, overlay identity rewriting, SecureString handling, and completion markers all retain the current main implementations.

Type of change

  • Bug fix
  • Breaking change
  • Documentation-only change

Testing

  • go test ./...
  • go vet ./...
  • go build ./...
  • gofmt and goimports checks
  • gocyclo and gocritic checks
  • Focused inventory-path, domain_name, and .gitkeep regression tests
  • End-to-end GOAD variant generation

The end-to-end run confirmed transformed overlay identities, renamed identity files, variant-specific inventory values, retained .gitkeep, and a valid completion marker.

Notes

No provider infrastructure was deployed end to end.

Ne0nd0g and others added 4 commits July 1, 2026 17:51
Retain the hardened generator behavior already on main while preserving empty directories, repointing generated inventories, and resolving default variant template paths.
@mkultraWasHere mkultraWasHere changed the title Fix/variant generator fidelity fix(variant): preserve generated inventory fidelity Aug 12, 2026
@mkultraWasHere
mkultraWasHere requested a balanced review from Copilot August 12, 2026 14:41

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.

Pull request overview

Improves generated variant inventory fidelity and deployability.

Changes:

  • Preserves .gitkeep placeholders.
  • Repoints inventory domain_name values.
  • Resolves provider templates through variant target paths with regression tests.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
cli/internal/variant/generator.go Preserves placeholders and rewrites inventory paths.
cli/internal/variant/generator_test.go Tests inventory rewriting and .gitkeep preservation.
cli/cmd/provision.go Resolves provider inventories from variant targets.
cli/cmd/bootstrap_test.go Tests default variant provider resolution.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cli/internal/variant/generator.go
@dreadnode-renovate-bot dreadnode-renovate-bot Bot added the area/ad-labs Changes made to AD lab definitions label Aug 12, 2026
@mkultraWasHere
mkultraWasHere added this pull request to the merge queue Aug 12, 2026
@mkultraWasHere

Copy link
Copy Markdown
Contributor

TY @Ne0nd0g

Merged via the queue into dreadnode:main with commit 6898fb1 Aug 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ad-labs Changes made to AD lab definitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants