Skip to content

feat: freeze the public interface from v0.0.1 on, joined errors exit with the highest code - #57

Merged
min0625 merged 1 commit into
mainfrom
feat/v0.0.1-stability-freeze
Jul 12, 2026
Merged

min0625 merged 1 commit into
mainfrom
feat/v0.0.1-stability-freeze

Conversation

@min0625

@min0625 min0625 commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Why

The project moves from "breaking changes permitted during 0.x" to a compatibility promise: from v0.0.1 on, breaking changes are avoided. That closes the decision window on every pending format question, so they are all settled here, before the tag.

What

Policy (docs)

  • Spec §9 (both languages) gains a release-cadence & compatibility-promise paragraph: graft.toml/graft.lock formats (lock_version = 1), the content-hash algorithm (§3.2), the exit-code table + highest-code-wins rule (§4.6), and env-var names (§4.8) are stable from v0.0.1; the cache's internal layout and the status table layout are explicitly excluded.
  • README (both languages) gains a short public Stability note; CLAUDE.md status paragraph updated.
  • §4.5 (both languages): the status table is declared human-only, not a stable interface — machine-readable output (e.g. --format json) will arrive additively.

Settled decisions (records in design.local §10.19)

  • Hash algorithm stays the spec'd sha256: set-Merkle — dirhash rejected (was §11.5).
  • Lockfile time stays TOML native datetime (was §11.4).
  • Joined-error exit code: highest code wins (was §11.6 / review P3-1).

Behavior change + ratchet

  • clierr.ExitCode now walks the whole error tree (including errors.Join from a parallel reconcile) and exits with the highest code, so an integrity failure (4) is never masked by a network error (3) and the result no longer depends on dep ordering. Spec §4.6 (both languages) + new REQ-EXIT-MAXCODE row + covering test; testing manual note updated.

Tests

  • go test -race ./internal/clierr/ ./cmd/... green locally; golangci-lint run ./internal/clierr/ 0 issues.
  • New TestExitCode_joinedErrorsHighestCodeWins (// spec: REQ-EXIT-MAXCODE) covers order independence, plain-error mixes, and wrapped joins.

🤖 Generated with Claude Code

…with the highest code

The project moves from "breaking changes permitted during 0.x" to a
compatibility promise: from v0.0.1 on, the graft.toml/graft.lock formats
(lock_version = 1), the content-hash algorithm, the exit-code semantics,
and the environment variable names only change additively. The cache's
internal layout and the status table layout are explicitly excluded
(spec §9, §4.5; README stability note in both languages).

Settled before the freeze closes the window:

- Multiple collected errors (parallel apply) now exit with the highest
  code among them instead of the first in dep order, so an integrity
  failure (4) is never masked by a network error (3) — matching status's
  higher-code-wins rule. Spec §4.6 + REQ-EXIT-MAXCODE + clierr.ExitCode
  walking the joined-error tree.
- The hash algorithm stays the spec'd sha256 set-Merkle (dirhash
  rejected) and the lockfile time field stays TOML datetime; decision
  records live in design.local §10.19.
- The status table is declared human-only, not a stable interface;
  machine-readable output arrives additively later (§4.5).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/clierr/clierr.go 89.47% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@min0625
min0625 merged commit f0aa207 into main Jul 12, 2026
9 checks passed
@min0625
min0625 deleted the feat/v0.0.1-stability-freeze branch July 12, 2026 10:46
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.

1 participant