Repository navigation
Apply the oss-init conventions and catch stale generated code in CI - #26
Merged
Merged
Conversation
CI checked each server with its own fmt/lint/test/build steps, and nothing checked the Markdown, JSON and YAML formatting or the Nix files, so echo-http/docs/api.md had drifted from dprint. Each server now has a `ci` recipe (lint, fmt-check, test, build) whose fmt-check fails when the formatter itself fails, and the root `ci` runs them all plus `fmt-check`, which runs dprint and nixfmt across the repository. The drifted file is formatted. The flake lists its systems with nixpkgs.lib.genAttrs instead of flake-utils and is formatted with nixfmt, which the dev shell now provides. The repository ignores its own .envrc and worktrees, and .gitattributes keeps checkouts LF on every OS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3xvJ1TaozjYSE6eoyo9mq
protoc writes imports in one block, while the committed files are formatted with goimports, so every build rewrote the committed .pb.go and .connect.go files and left the tree dirty. The generate recipes now run goimports on their output. Nothing noticed when the committed generated code went stale, either. In CI, each generating server's `ci` ends with `generated-check`, which fails when the build changed or added generated files; locally a regenerated diff is work in progress, so the check stays quiet there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3xvJ1TaozjYSE6eoyo9mq
A CLAUDE.md makes Claude Code ignore AGENTS.md, and other agents read only AGENTS.md, so the guide lived where only one tool looked. Its content moves to AGENTS.md with the layer table, the quality gate, the layout and the commit convention in use. Facts that had gone stale are corrected on the way (the Go version, how code generation runs, the CI setup), and the STRICT RULES section is dropped: it repeated the quality gate and the language rule already stated above, and the agent-behaviour rules belong to the agent's own configuration, not to this repository. The ADR and spec procedures and the rules that make them get read land now, so records written from here on follow them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3xvJ1TaozjYSE6eoyo9mq
The build workflows ran check, test and build as separate jobs, each wrapping its commands in `nix develop -c`. Each now has one build job that loads the dev shell with nicknovitski/nix-develop and runs the server's `ci` recipe, and a new Format workflow runs `just fmt-check` on every change, since formatting is not tied to one server. Workflows read the repository by default and widen permissions per job (build.echo-graphql.yml no longer requests id-token for nothing), checkouts no longer keep credentials, pull request runs cancel superseded ones while main and publish runs finish, and the actions are on their latest majors. The image tags and when images are pushed stay as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3xvJ1TaozjYSE6eoyo9mq
golangci-lint grouped imports under github.com/jsr-probitas, the organization's former name, so the servers' own packages (github.com/probitas-test/...) were not recognized as local. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3xvJ1TaozjYSE6eoyo9mq
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
cirecipe (lint, fmt-check, test, build) and the rootjust ciruns them all plusjust fmt-check(dprint and nixfmt across the repository). echo-http/docs/api.md, which had drifted from dprint, is formatted. The flake drops flake-utils and is nixfmt-formatted;.gitignoregains/.envrc,.gitattributeskeeps LF..pb.go/.connect.gofiles; in CI,generated-checkfails when a build changes or adds generated files.CLAUDE.md→AGENTS.md, correcting stale facts (Go version, code generation, CI setup) and dropping the STRICT RULES section, which repeated the gate and language rules and agent-behaviour rules that belong to the agent's configuration. ADR/spec procedures and rules added.buildjob (nix-develop +just <server>::ci); a new Format workflow runsjust fmt-checkon every change. Top-levelcontents: read,persist-credentials: false, PR runs cancel / main runs finish, docker actions on their latest majors (release notes read; no input changes). Image tags and push triggers unchanged; build.echo-graphql.yml no longer requestsid-token.github.com/probitas-test) instead ofgithub.com/jsr-probitas.Why
Brings the repository in line with the oss-init conventions used across the org, and makes CI catch what it missed: repository-wide formatting, stale generated code, and formatter failures.
The
mainruleset now requiresbuildonly (updated to match the single job), so this PR should merge before others opened from the oldmain.Test Plan
CI=true nix develop -c just ci; the tree stays clean afterwardsgenerated-checkfails with stale or untracked generated files;fmt-checkfails when gofmt is missingnix flake check --no-build --all-systems,actionlint🤖 Generated with Claude Code
https://claude.ai/code/session_01N3xvJ1TaozjYSE6eoyo9mq