feat(carport): dynamic driver management via main.pkl#7
Merged
Conversation
…stanceConfig proto Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add ctx field to Host struct, store it in Start, and implement RegisterInstance and UnregisterInstance for dynamic driver lifecycle management. Includes TDD tests covering not-started, duplicate ID, stopped-host, and not-found error paths. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…config source Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…erInstanceWithLifecycle
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.
Summary
binaryfield toDriverInstancePkl class andDriverInstanceConfigproto, flowing through the evaluation pipeline so driver executables can be declared inmain.pklRegisterInstance/UnregisterInstanceoncarport.Hostusing the existinglaunchLifecycle/shutdownInstancemachinery; returns an error on duplicate IDscarport.Hostas the realCarportManagerin the daemon, replacing thenopCarportManagerstub; adds a compile-time interface assertiondrivers.tomlloading path entirely —main.pklis now the sole driver config source; updates integration test to seed instances viaRegisterInstanceTest plan
task build— passestask test— all packages greentask test:race— no races (one pre-existing flaky test ininternal/mcp/resourcesalso fails onmain)task test:integration— passes./dist/gohomed --help | grep drivers-toml— no output (flag removed)main.pklwith abinarypath and confirm the daemon spawns it (smoke test from the plan)Known limitations / follow-up
defaultLifecycleConfig()— lifecycle tuning from Pkl is a follow-updrivers.tomlusers must migrate entries tomain.pklbefore upgrading (no migration path provided)driverNameis accepted byRegisterInstancebut not stored onInstance(no field for it yet) — tracked as follow-up debt🤖 Generated with Claude Code