Batch 1.5: realign EnvConnector with synthing architecture - #3
Open
mildronize wants to merge 1 commit into
Open
Conversation
…hitecture Batch 1 shipped EnvConnector by copying kubricate's implementation mostly unchanged, but its own task-5 spec (uppercase transform) never matched the shipped code (exact-case matching), and it carried over kubricate mechanisms that don't fit synthing's design: SecretValue (shaped by BaseProvider's Kubernetes-Secret serialization constraint, which synthing has no equivalent of) and tryParseSecretValue() (connector-side JSON-sniffing that collides with the engine's coerceFromString(), since a connector never knows a key's declared type). A grilling session (design-spec.md decisions 94-99) worked through the realignment; this closes it out before Batch 2's resolution engine builds on the coercion boundary. - BaseConnector: abstract class -> interface (structural typing avoids the dual-package hazard for connector plugins); config/logger/ setWorkingDir?/getWorkingDir? join load/get as contract members - EnvConnector: drop SecretValue + tryParseSecretValue, get() returns raw string only; caseInsensitive defaults to true; new maskValues config (default true) masks all logged values indiscriminately, since the connector has no visibility into which keys are secrets - Add .chief/milestone-2/_contract/base-connector-contract.md as the durable record of this service boundary Also fixes three pre-existing scaffolding gaps uncovered along the way: toolkit, plugin-env, and synthing were all missing eslint.config.mjs (lint had never actually run on them), and coerce.ts had an unused catch binding. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Batch 1 shipped
EnvConnectorby copying kubricate's implementation mostly unchanged, but its own task-5 spec (uppercase transform) never matched the shipped code (exact-case matching), and it carried over kubricate mechanisms that don't fit synthing's design:SecretValue— shaped by kubricate'sBaseProviderKubernetes-Secret serialization constraint, which synthing has no equivalent oftryParseSecretValue()— connector-side JSON-sniffing that collides with the engine'scoerceFromString(), since a connector never knows a key's declared typeA grilling session (recorded as decisions 94-99 in
design-spec.md§14, plus the new_contract/base-connector-contract.md) worked through the realignment. This PR closes it out before Batch 2's resolution engine builds on top of the coercion boundary.BaseConnector:abstract class->interface— structural typing avoids the dual-package hazard for connector plugins;config/logger/setWorkingDir?/getWorkingDir?joinload/getas contract membersEnvConnector: dropSecretValue+tryParseSecretValue,get()returns raw string only;caseInsensitivedefaults totrue; newmaskValuesconfig (defaulttrue) masks all logged values indiscriminately, since the connector has no visibility into which keys are secretstoolkit/plugin-env/synthingwere all missingeslint.config.mjs(lint had never actually run on them), andcoerce.tshad an unused catch bindingTest plan
pnpm buildexits 0 (all packages)pnpm check-typesexits 0 (all packages)pnpm testexits 0 (all packages, including 18 EnvConnector tests covering case-insensitivity, raw-value passthrough, and masked/unmasked logging)pnpm lint:checkexits 0 forcore,toolkit,plugin-env🤖 Generated with Claude Code