docs: add STYLE.md documenting unwritten coding conventions - #1334
Closed
TimothyJones wants to merge 3 commits into
Closed
docs: add STYLE.md documenting unwritten coding conventions#1334TimothyJones wants to merge 3 commits into
TimothyJones wants to merge 3 commits into
Conversation
This document complements CodingStandards.md by capturing the style conventions that live between the lint rules — the choices that survive only through review and through documentation. The guide covers: - Function/closure/class role split and DI patterns - `.then()` chains over async/await, with rationale - The two-error blame taxonomy (CaseConfigurationError vs CaseCoreError) - Wire-format namespaced keys and type-tag constants - Context threading and location trails for error messages - Plugin executor shapes and registry patterns - Documentation as a build artifact with release tags - Testing patterns (no mocking library, test-data factories) - Cross-language mirroring rules for Java and other bindings - Known deviations (things to migrate opportunistically) The guide also includes the motivation and trade-offs for each convention, so future maintainers understand not just the rules but why they exist. Distilled from reading ~700 lines of TS source and 25+ files across all packages. Co-Authored-By: Timothy Jones <timothy.l.jones@gmail.com>
… function plugin - Swap last two arguments (userFacingStackTrace and contractCaseErrorCode) in ConnectorFailure constructor signature to match TypeScript BoundaryFailure (userFacingStackTrace, then contractCaseErrorCode). Update all 17 call sites across 6 Java files. - Fix copyright banner in case-core-plugin-function/src/index.ts which incorrectly said "HTTP Plugin" instead of "Function Plugin". These were identified as bugs during style guide analysis. The swapped args were a latent cross-language interface hazard (type-checker-invisible since both are strings). Co-Authored-By: Timothy Jones <timothy.l.jones@gmail.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
Adds a new
STYLE.mdguide that documents the coding conventions in ContractCase that are not enforced by lint or covered by the existingCodingStandards.md. This captures the unwritten rules that survive through review — the trade-off reasoning behind key architectural choices — so that future maintainers (and LLMs) understand not just the rules but why they exist.The guide covers:
.then()chains overasync/awaitThis is the companion to
CodingStandards.md— one is the machine-checked rules, the other is the hand-maintained conventions.Test plan