Skip to content

feat(spec): add §10.5 local/CI toolchain parity and validator rule#34

Merged
niclaslindstedt merged 1 commit intomainfrom
claude/add-env-sync-specs-6sUWx
Apr 18, 2026
Merged

feat(spec): add §10.5 local/CI toolchain parity and validator rule#34
niclaslindstedt merged 1 commit intomainfrom
claude/add-env-sync-specs-6sUWx

Conversation

@niclaslindstedt
Copy link
Copy Markdown
Owner

Summary

Closes the gap where cargo clippy (or ruff, or eslint, or go vet)
passes on a contributor's machine with a newer toolchain than CI uses,
then fails on CI because a new diagnostic fired. The spec now mandates
a single source of truth for each language's toolchain version, read by
both the local developer and the CI workflow.

  • New spec section §10.5 "Local/CI environment parity" with a
    per-language table of pin files and concrete examples: Rust
    rust-toolchain.toml, Python .python-version, Node .nvmrc,
    Go go.mod's toolchain directive, and .tool-versions for
    polyglot projects. Rationale kept to three bullets; no fluff.
  • New validator rule. oss-spec validate detects each project's
    languages from their root manifest and emits a §10.5 violation if
    the matching pin file is missing, holds a floating channel
    (stable, latest, …), or disagrees with ci.yml. Generic
    projects with no language manifest skip the check.
  • Template updates. Generated Rust/Python/Node/Go projects now
    ship with the pin file, and the CI workflow template reads from
    it via python-version-file, node-version-file,
    go-version-file instead of duplicating the version in YAML.
  • Dogfooding. Added rust-toolchain.toml at the repo root so the
    self-conformance test keeps passing.
  • Spec version bump 2.0.2 → 2.1.0 (new mandate, backward-compatible).

Test plan

  • cargo clean && cargo build — include_dir! picks up the new
    template files
  • cargo fmt --all -- --check — clean
  • cargo clippy --all-targets -- -D warnings — clean
  • cargo test — 63 passed (18 new §10.5 tests + the existing 45)
  • cargo test --test self_conformance_test — repo still conforms
  • oss-spec validate --no-ai --path . — "repo conforms to OSS_SPEC.md"
  • Negative test: moving rust-toolchain.toml aside produces
    exactly one §10.5 violation, no cascade; restoring clears it
  • Bootstrap smoke test across all languages (run after merge or
    locally with oss-spec init --no-ai ... --lang <lang>) to confirm
    each generated project ships the pin file and passes validate
    without manual fix-up

https://claude.ai/code/session_01PGUEDocqzUDJ1G6Yt9Jwj1

Pins every generated project's language toolchain in a single
repository-root file that both the developer's toolchain manager and
the CI workflow read — stopping the classic "clippy green locally,
red on CI" drift. Adds one pin file per supported language (Rust,
Python, Node, Go, + a .tool-versions note for polyglot), switches
the CI templates to *-version-file inputs where supported, and
teaches `oss-spec validate` to enforce presence, non-floating
channel, and pin/CI version parity. Spec bumped 2.0.2 → 2.1.0.

https://claude.ai/code/session_01PGUEDocqzUDJ1G6Yt9Jwj1
@niclaslindstedt niclaslindstedt marked this pull request as ready for review April 18, 2026 13:22
@niclaslindstedt niclaslindstedt merged commit 0c02d7d into main Apr 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants