Move secrets/endpoints into buildvana.json (Config Phase 3)#291
Conversation
Wire NuGet push feeds and the GitHub token to the buildvana.json model (whose nuget.feeds/github.tokenEnv/git.identity shapes already shipped in the Phase 1 foundation), and remove the seedling *.FromEnvironment paths. - DotNetSettings now owns NuGet push resolution: the per-command DotNetInvocationSettings move under an Invocations sub-object, and a new ResolvePushTarget(isPrerelease) routes prerelease -> release (prerelease falling back to release when absent), reading the feed source from config and the API key from the env var named by apiKeyEnv at point of use. - GitHubServerAdapter resolves the token env var from github.tokenEnv (default GITHUB_TOKEN) and reads it via EnvVarHelper.Require. - Drop the private feed channel; IsPrivateRepositoryAsync stays callable but no longer selects a feed. - Delete ToolConfiguration and NuGetPushConfiguration; reduce NuGetPushTarget to a plain resolved-value record. Closes Tenacom#270 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@claude please review this PR. |
|
Claude finished @rdeago's task in 2m 28s —— View job PR Review
SummaryThis is a clean, focused PR that delivers exactly what it advertises: moving secrets/endpoints from Observations
|
|
Thanks @claude for your review!
I have added separate tests for missing keys in No other changes. If you'd like to take another look, be my guest. |
|
Claude finished @rdeago's task in 1m 11s —— View job Follow-up Review
The new tests are exactly right. Here's the breakdown:
The tests for the prerelease-no-fallback case are particularly good: both include a valid release feed alongside the broken prerelease one, which explicitly confirms the intent — a present-but-broken prerelease feed does not silently fall back to release, it fails fast with a channel-named error. The full matrix is now covered cleanly across all three routing branches (prerelease, prerelease-fallback, release) and all three failure modes (no feed, no source, no apiKeyEnv, env var absent). LGTM — nothing left to add. |
Closes #270 (Config Phase 3 of #267).
bv's NuGet push feeds and GitHub token now come frombuildvana.jsoninstead of the seedling*.FromEnvironmenttypes. Thenuget.feeds,github.tokenEnv, andgit.identitymodel + schema shapes already shipped in the Phase 1 foundation, so this PR is the wiring plus removal of the seedlings.Changes
DotNetSettingsowns NuGet push resolution (the push is adotnet nuget pushinvocation). The sixDotNetInvocationSettingsmove under a newInvocationssub-object (DotNetInvocationsSettings), andResolvePushTarget(isPrerelease)routesprerelease → release, withprereleasefalling back toreleasewhen absent. The feedsourcecomes from config; the API key is read from the env var named byapiKeyEnvat point of use. Missing feed/source/apiKeyEnvfail with a clear, channel-named message.GitHubServerAdapterresolvesgithub.tokenEnv(defaultGITHUB_TOKEN) and reads it viaEnvVarHelper.Require.privatefeed channel is dropped.IsPrivateRepositoryAsync()still compiles and is callable but no longer selects a feed.ToolConfigurationandNuGetPushConfiguration;NuGetPushTargetis now a plain resolved-value record.git.identity; corrected the now-stale "secrets… unaffected" note.Acceptance criteria
buildvana.json(apiKeyEnv/tokenEnvread at point of use); the*.FromEnvironmentpaths are gone.nuget.feeds.releaseset, prereleases publish to the release feed (covered by a unit test).IsPrivateRepositoryAsync()still compiles and is callable but no longer selects a feed.Verification
dotnet bv pack— clean, artifacts produced.inspectcode --severity=WARNING— 0 results (also cleaned 2 pre-existing redundant-using warnings inDotNetServiceMergeInvocationTests).