8000 docs: adopt Conventional Commits and split CLAUDE.md via @-imports by norrietaylor · Pull Request #263 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

docs: adopt Conventional Commits and split CLAUDE.md via @-imports - #263

Merged
norrietaylor merged 2 commits into
mainfrom
docs/conventional-commits
May 29, 2026
Merged

norrietaylor merged 2 commits into
mainfrom
docs/conventional-commits

Conversation

@norrietaylor
@norrietaylor norrietaylor commented May 29, 2026 •
Copy link
Copy Markdown
Member

Per Evan's Slack suggestion, adopt Conventional Commits v1.0.0 so agents and contributors write consistent commit messages. Also addresses CLAUDE.md length by splitting it into @-imported docs.

Changes

  • docs/commit-conventions.md — new standard: format, types, scopes, breaking changes, footers, examples, agent rules.
  • docs/architecture.md — extracted Architecture Overview / Implementation Details / Dev Notes from CLAUDE.md.
  • docs/rust-coding-standards.md — extracted Rust Coding Standards from CLAUDE.md.
  • CLAUDE.md — slimmed to Development Commands + Commit Messages, pulls the rest via @docs/... imports.
  • CONTRIBUTING.md — human-facing pointer to the commit standard and coding standards.

@-import linkage

CLAUDE.md now references @docs/commit-conventions.md, @docs/architecture.md, and @docs/rust-coding-standards.md. Claude Code expands @path imports inline, so agent behavior is unchanged while the top-level file stays short. Same pattern as the global @RTK.md import. Adding new domain docs is now a one-line @-reference instead of growing CLAUDE.md.

Notes

  • Content moved verbatim; no standards were altered beyond adding commit conventions.
  • No commit-lint enforcement added — standard is documentation-only for now. Easy follow-up if we want CI gating.

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Documentation
    • Updated contributor guidance with links to standardized documentation
    • Added comprehensive architecture overview detailing system design, caching strategy, and sandbox isolation
    • Documented Conventional Commits message standards and format requirements
    • Added Rust coding standards covering idioms, patterns, error handling, and concurrency practices

Review Change Stack

Add a Conventional Commits v1.0.0 standard for agents and contributors,
and slim CLAUDE.md by extracting architecture and Rust standards into
@-imported docs.

- docs/commit-conventions.md: types, scopes, breaking changes, examples
- docs/architecture.md, docs/rust-coding-standards.md: extracted from CLAUDE.md
- CLAUDE.md: reference the above via @-imports
- CONTRIBUTING.md: human-facing pointer to the standard

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai
coderabbitai Bot commented May 29, 2026 •
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@norrietaylor, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 17 minutes and 49 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 67fb0f53-1b51-4570-85a2-8ec83daf337e

📥 Commits

Reviewing files that changed from the base of the PR and between 63dd30d and 5fbc752.

📒 Files selected for processing (1)
  • docs/architecture.md
📝 Walkthrough

Walkthrough

This P 8000 R consolidates and formalizes repository documentation by extracting foundation standards into dedicated external documents and updating reference pages to link to them. New commit conventions and Rust coding standards documents establish prescriptive guidelines; architecture documentation describes system design and caching strategy; hub pages centralize guidance without reproducing content inline.

Changes

Repository Documentation Standards

Layer / File(s) Summary
Commit and Rust coding standards
docs/commit-conventions.md, docs/rust-coding-standards.md
New Conventional Commits format specification with type/scope/breaking-change rules and examples; new Rust standards covering functional style, error handling, async/concurrency, logging, and repository practices.
Architecture overview
docs/architecture.md
Complete system architecture documenting crates, build/task execution flow, Blake3-based content-addressed cache strategy, Linux namespace sandbox isolation, spec hashing inputs, TMPDIR/output staging, and cache inspection instructions.
Documentation hub and contributor guidelines
CLAUDE.md, CONTRIBUTING.md
CLAUDE.md refactored to link to external commit, architecture, and rust standards docs instead of embedding content; CONTRIBUTING.md added with contributor expectations, pre-PR command checklist for formatting/tests/clippy, and documentation pointers.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • gominimal/minimal#215: Overlaps with Rust Coding Standards changes to CLAUDE.md.
  • gominimal/pkgs#188: Modifies CLAUDE.md guidance documentation alongside updating linked standards.
  • gominimal/min-ctl#7: Updates root CLAUDE.md documentation to redirect architecture and contribution guidance.

Suggested reviewers

  • twitchyliquid64

Poem

🐰 A bunny hops through docs so bright,
With standards laid and architecture right,
Guidelines clear from root to core,
Now contributors know the way for sure! 📚✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main changes: adopting Conventional Commits and refactoring CLAUDE.md by extracting content into separate documentation files with import references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/commit-conventions.md (1)

8-14: ⚡ Quick win

Add language identifiers to fenced code blocks to satisfy markdown linting.

Line 8, Line 40, Line 51, and Line 65 use unlabeled code fences. Please tag them (e.g., text/md) to avoid MD040 warnings and keep docs lint-clean.

Also applies to: 40-43, 51-55, 65-72

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/commit-conventions.md` around lines 8 - 14, The unlabeled fenced code
blocks using triple backticks (```...```) in the commit-conventions examples
need language identifiers to satisfy markdown linting; update each unlabeled
fence (including the example block that shows the commit format and the other
examples) to use a neutral tag like "text" or "md" (e.g., change ``` to ```text)
so all fenced code blocks are labeled and MD040 warnings are resolved.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture.md`:
- Around line 56-57: Update the cache path used in the cache-inspection guidance
so it matches the documented default; replace occurrences of "~/.cache/built"
(appearing around the cache inspection text, lines referencing the inspection
example) with "~/.cache/minimal/built" so the guidance is consistent with the
earlier documented default path; ensure both instances noted (around lines
79-80) are updated.

---

Nitpick comments:
In `@docs/commit-conventions.md`:
- Around line 8-14: The unlabeled fenced code blocks using triple backticks
(```...```) in the commit-conventions examples need language identifiers to
satisfy markdown linting; update each unlabeled fence (including the example
block that shows the commit format and the other examples) to use a neutral tag
like "text" or "md" (e.g., change ``` to ```text) so all fenced code blocks are
labeled and MD040 warnings are resolved.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 37964cff-a973-4dac-808e-5b3199c9f3b0

📥 Commits

Reviewing files that changed from the base of the PR and between 030d011 and 63dd30d.

📒 Files selected for processing (5)
  • CLAUDE.md
  • CONTRIBUTING.md
  • docs/architecture.md
  • docs/commit-conventions.md
  • docs/rust-coding-standards.md

Comment thread docs/architecture.md Resolved
@norrietaylor
norrietaylor enabled auto-merge (squash) May 29, 2026 20:07
@norrietaylor
norrietaylor merged commit c38eec4 into main May 29, 2026
8 checks passed
@norrietaylor
norrietaylor deleted the docs/conventional-commits branch May 29, 2026 20:28
0chroma added a commit that referenced this pull request Jul 14, 2026
After CreateSession succeeds, the client now tar+zstd's the project
directory and streams it to the daemon's WorkspaceFilesTarZst subsystem,
which unpacks it into the session workspace. This is the file-sync-INTO
direction from #263.

The daemon-side receiver already existed (rpc.rs:404); this adds the
client-side sender. The upload happens after session creation and
before the attach prompt.
0chroma added a commit that referenced this pull request Jul 15, 2026
The in-memory tar was trying to allocate 32GB on the KVM CI runner
because it was uploading the entire repo including target/ build
artifacts. Add a minimal default exclude list (.git, target,
node_modules) to avoid OOM. Full .gitignore support is tracked as
a follow-up on #263.
0chroma added a commit that referenced this pull request Jul 15, 2026
* feat(minimal): upload project files to session on activate

After CreateSession succeeds, the client now tar+zstd's the project
directory and streams it to the daemon's WorkspaceFilesTarZst subsystem,
which unpacks it into the session workspace. This is the file-sync-INTO
direction from #263.

The daemon-side receiver already existed (rpc.rs:404); this adds the
client-side sender. The upload happens after session creation and
before the attach prompt.

* test(minimal): verify project files are uploaded on activate

End-to-end test that creates a session with a temp project dir
containing known files, then reads them back over SFTP to confirm
the tar+zstd upload landed in the session workspace.

* fix(minimal): finalize tar builder on error to avoid drop panic

async-tar panics if its Builder is dropped without calling into_inner.
The previous code would panic if add_dir_entries returned an error
mid-walk (e.g. permission denied on a file). Now the builder is
finalized before propagating the error. Also switched back to a
borrowed &mut Builder with Box::pin for the recursive async call.

* fix(minimal): skip non-regular files in tar upload

The tar walker fell through to the regular-file branch for sockets,
FIFOs, and device files, causing an open error on Unix sockets (e.g.
ssh.sock inside the state dir). Now only regular files are archived;
sockets, FIFOs, and device files are silently skipped.

* fix(minimal): skip permission-denied entries in tar upload

The tar walker now gracefully skips directories and files that return
EACCES (Permission denied) instead of failing the entire upload. This
fixes the e2e test failing on Linux KVM where /tmp contains systemd
private directories unreadable by the test user.

* test(minimal): add unit tests for tar upload edge cases

Tests for Unix sockets (skipped), permission-denied directories
(skipped), symlinks (stored as symlinks, not followed), and regular
files/dirs/symlinks (included with correct paths). These cover the
CI failures we hit: socket files in /tmp on macOS and permission-
denied systemd directories on Linux KVM.

* fix(minimal): skip .git, target, and node_modules in tar upload

The in-memory tar was trying to allocate 32GB on the KVM CI runner
because it was uploading the entire repo including target/ build
artifacts. Add a minimal default exclude list (.git, target,
node_modules) to avoid OOM. Full .gitignore support is tracked as
a follow-up on #263.

* fix(ci): create minimal project dir for VM e2e lanes

VM lanes pass E2E_PROJECT_DIR=/tmp because the guest image doesn't have
the host repo. But now that activate uploads the project dir, uploading
all of /tmp (systemd dirs, sockets, large files) causes OOM and timeouts.
Create a minimal project subdir with a minimal.toml under /tmp instead.

* fix(minimal): stream tar+zstd to avoid OOM on large repos

The previous implementation buffered the entire tar archive and
zstd-compressed output in memory before sending, causing OOM on repos
with large target/ or .git/ directories.

Now the tar builder writes into a zstd encoder which writes to a
duplex pipe; a background task produces the tar while the caller
copies from the pipe to the SSH channel. Memory usage is bounded by
the 256KB pipe buffer.

Per @twitchyliquid64's review feedback on #748.

* fix(minimal): stop excluding .git from project upload

.git is project metadata users need (git status/diff/log), not a
rebuildable artifact. Only target/ and node_modules/ are excluded.
gominimal-aw-bot Bot added a commit that referenced this pull request Jul 22, 2026
The upload walker skipped only `target` and `node_modules`, so `.git`
was streamed in full — 718 MB and 56% of a 1.28 GB transfer on a real
checkout. The session daemon unpacks the upload into a fresh worktree
that has no use for VCS history, so this is pure waste and contributes
to the vsock ENOBUFS failure tracked in #869.

Add `.git` to DEFAULT_EXCLUDED_DIRS. The existing is_dir guard means a
normal `.git` directory is excluded while a worktree/submodule `.git`
pointer file is still sent, which is the correct behavior.

Also replace the stale gitignore follow-up reference (#263, a merged
docs PR unrelated to uploads) with a plain TODO, and extend
stream_excludes_default_dirs to assert `.git` is excluded.
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

0