docs: add a review agenda and config compatibility rules
Reviewing the project used to mean re-stating what to look at every time. docs/REVIEW.md now holds that agenda once — nine areas, each anchored to this codebase — and both entry points point at it rather than copying it: the /review-project command in .claude/commands, and a section in CLAUDE.md so a plain-language review request lands in the same place. STANDARDS.md gains a "Config file compatibility" section. The project has applied the same rule three times (Theme, JobListView, TimeoutSeconds) without ever writing it down: a new Config field is omitempty and its zero value means the previous behavior, a meaningful zero is never backfilled on load, and an unrecognised enum value reads as the default through one shared helper. With no migration step and hand-editable files, that is what keeps older configs working. Also removes docs/PLAN-compact-job-list.md, implemented in edabc57 — everything but the version bump, which now waits for the release along with the rest of the Unreleased section. .claude/settings.local.json is ignored so the shared command can be tracked without per-developer permissions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+21
-1
@@ -1,7 +1,8 @@
|
||||
# GoSentry — Standards
|
||||
|
||||
Quality rules and intentional behavior for contributors. Package contracts live
|
||||
in [ARCHITECTURE.md](ARCHITECTURE.md); test conventions in [TESTS.md](TESTS.md).
|
||||
in [ARCHITECTURE.md](ARCHITECTURE.md); test conventions in [TESTS.md](TESTS.md);
|
||||
what a whole-project review looks at, in [REVIEW.md](REVIEW.md).
|
||||
|
||||
## Code quality
|
||||
|
||||
@@ -12,6 +13,25 @@ in [ARCHITECTURE.md](ARCHITECTURE.md); test conventions in [TESTS.md](TESTS.md).
|
||||
- Documented intentional behavior → section below, not a backlog bug.
|
||||
- UI view constructors accept `*app.Service`; call `app.Open()` only from `run.go`.
|
||||
|
||||
## Config file compatibility
|
||||
|
||||
There is no migration step: `gosentry.json` and `jobs.json` are read as-is, are
|
||||
meant to be hand-editable, and may have been written by an older version. A
|
||||
change to their shape has to stay compatible on its own.
|
||||
|
||||
- A new `Config` field is tagged `omitempty`, and its zero value must mean the
|
||||
behavior that existed before the field was added — a file written without it
|
||||
keeps working unchanged. `DefaultConfig()` still sets the value explicitly.
|
||||
- A zero that carries meaning is not a missing field and must not be backfilled
|
||||
on load. See `DefaultTimeoutSeconds` in `storage.loadOrCreateConfig` and
|
||||
`Job.TimeoutSeconds *int`, where unset and `0` are different answers.
|
||||
- An unrecognised enum value reads as the default rather than an error, through
|
||||
one helper that every consumer shares (`JobListView.IsCompact`, `ui.themeFor`),
|
||||
and is normalized before being written back, so the file never gains a value
|
||||
no reader understands.
|
||||
- Each of the three gets a test: the default in `storage`, the normalization in
|
||||
`domain`, and a round-trip through the real config file in `app`.
|
||||
|
||||
## Intentional behavior (not bugs)
|
||||
|
||||
- `RunNow` is allowed during global pause and for disabled jobs.
|
||||
|
||||
Reference in New Issue
Block a user