chore: add .gitattributes to enforce LF line endings repo-wide#354
Merged
Conversation
…lidation, wire) Add new TypeSpec model files for types specified in spec.md but not yet modeled: - F1: Error types (InvokerError, ValidationError, FileNotFoundError) in core/errors.tsp - F2: Tracing types (TraceValue, TraceTime, TraceSpan, TraceFile) in tracing/tracer.tsp - F3: Streaming types (StreamOptions) in streaming/stream.tsp - F4: Validation types (ValidationResult) in core/validation.tsp - F5: Anthropic wire format types (content blocks, messages, request/response) in wire/anthropic-types.tsp All types include @doc annotations and @sample examples matching the spec. Generated code emitted to all runtimes (Python, TypeScript, Go, Rust, C#). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… paths - Add FileNotFoundError, InvokerError, ValidationError, ValidationResult to model/core/__init__.py and model/__init__.py (generated files missing exports) - Fix 73 generated TS test files: ../../src/model/index -> ../../../src/model/index (wrong depth for tests in tests/model/<group>/ subdirectories, pre-existing from E1) - Fix 5 hand-written TS tests: ../src/model/prompty.js / ../src/model/tool.js -> ../src/model/index.js (E1 moved files to subdirs, breaking direct imports) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Auto-fixed 21 import-block ordering errors (I001) flagged by ruff check: - 17 test files: yaml import must follow stdlib imports with blank line separator - _StreamOptions.py: removed unused 'field' import - model/tracing/__init__.py, model/wire/__init__.py: alphabetized imports Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep consolidated index.js import (F branch has the correct fix). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply ruff format to new files (core, tracing, streaming, wire model files) and corresponding test files. Resolves ruff format --check CI failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…issing TS model group exports - Rename hand-written exception class InvokerError -> InvokerNotFoundException in InvokerRegistry.cs to avoid collision with generated TypeSpec DTO InvokerError (partial class) - Rename Key property to InvokerKey and update 4 throw sites - Update PipelineTests.cs: Assert.Throws<InvokerNotFoundException> and ex.InvokerKey - Add missing wire/streaming/tracing group exports to TypeScript model/index.ts - Add missing core group members (FileNotFoundError, InvokerError, ValidationError, ValidationResult) to model/core/index.ts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… fix docs and C# examples - Add AnthropicWireMessage and all wire types to Python model/__init__.py - Add StreamOptions to Python model/__init__.py - Add TraceFile, TraceSpan, TraceTime to Python model/__init__.py - Fix docs reference/index.md slug: 'reference/index' -> 'reference' to fix broken /reference/ links - Fix C# docs examples: Pipeline.ParseAsync now requires context parameter (pass null) - Fix C# docs examples: Message.Role is now Role enum, not string; use Role.System/Role.User Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
xUnit runs test classes in parallel by default. PromptyLoadsTests and ChatTests both mutate OPENAI_API_KEY, causing ChatBasic_InvokeAsync_With MockedExecutor to race and see a null env var. Adding [Collection] serializes the two classes without changing logic. Also commit the ruff isort fix for model/__init__.py (I001). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Without .gitattributes, git's core.autocrlf=true on Windows converts stored LF to CRLF on checkout. This caused generated files to appear modified after every 'npm run generate', requiring an ambiguous 'git checkout -- unintended CRLF drift' cleanup step that was easy to apply too broadly and accidentally revert real content changes. With this file: - All text files are stored and checked out as LF on all platforms - 'npm run generate' produces LF, git sees no diff → zero noise - The post-generate CRLF cleanup step is no longer needed Re-normalized all existing tracked files as part of this commit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dotnet format on Windows defaults to CRLF line endings. After .gitattributes normalizes all files to LF, dotnet format --verify-no-changes fails on the Windows CI runner because it wants \r\n. Adding a repo-root .editorconfig with end_of_line = lf makes dotnet format consistent with the .gitattributes LF policy on all platforms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Problem
Without a .gitattributes, \git config core.autocrlf=true\ (the default on Windows) converts stored LF to CRLF on checkout. This caused every
pm run generate\ to produce spurious diffs (LF vs CRLF) on all generated runtime files.
The workaround was an ambiguous \git checkout -- \ cleanup step after every generate. This was fragile — applied too broadly, it would silently revert real content changes (e.g., new group exports from \model/init.py).
Fix
Add a .gitattributes\ that enforces \�ol=lf\ for all text file types repo-wide:
All existing tracked files have been re-normalized to LF as part of this commit.
Effect
pm run generate\ produces LF → \git status\ shows zero noise after generate
After merging
Everyone with an existing clone should run:
\
git rm --cached -r .
git reset --hard HEAD
\
to re-normalize their working tree.