Repository navigation
pkg/templates as a nested module with RenderServer, validation and golden tests (WP-CLI1) - #5
Merged
Merged
Conversation
…gerprint and golden tests Rename the root module to github.com/teknoir/cli and make pkg/templates its own dependency-free module (github.com/teknoir/cli/pkg/templates) so other programs can import the bootstrap templates without the CLI's dependencies. Template files are unchanged; tnctl bootstrap still calls Execute directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 11, 2026
…3s CA/install libraries Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tekn0ir
marked this pull request as ready for review
October 12, 2026 11:08
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.
What
WP-CLI1 of the virtual-device Phase 1 plan (
~/teknoir-local-migration/docs/virtual-device-phase1-plan.md, section 4.1, decision P1-D7).teknoir/cli->github.com/teknoir/cli; all imports rewritten.pkg/templatesis now a nested, dependency-free modulegithub.com/teknoir/cli/pkg/templates(go 1.22, no requires). The rootgo.modrequires it with a localreplace, sogo build .(goreleasermain: .) andscripts/install.share unaffected.pkg/templates:ValidateTemplateData,RenderServer,TemplatesSHA256. No template file is changed;tnctl bootstrapstill callsExecutedirectly, so its output is unchanged.testdata/{server,agent,docker_server}.golden.shrendered from themain@7bb1beatemplates with fixed non-PEM placeholder data.device-controller (WP-DC1) pins the head commit of this branch as a pseudo-version; re-pin to the merged commit (or a
pkg/templates/v0.1.0tag) after merge. No tags are pushed from this PR.Tests run
go build ./... && go vet ./... && go test ./...in the repo root and inpkg/templates: passRenderServerequals the server golden", backtick,$,\, newline) x every field; newline allowed only in RSAPrivate/RSAPublic; no error string contains the inputTemplatesSHA256deterministic; changing one byte of any (in-test copy) template changes the hashgo get github.com/teknoir/cli/pkg/templates@<head>succeeds and a program callingRenderServerbuilds and runsgitleaks detect --log-opts=origin/main..HEAD: no leaks (pre-existing findings in older history are unrelated)🤖 Generated with Claude Code