Skip to content

refactor: Err* error naming, test hygiene and build tidy-up - #964

Merged
JosephKav merged 10 commits into
masterfrom
refactor/before-auth
Aug 5, 2026
Merged

refactor: Err* error naming, test hygiene and build tidy-up#964
JosephKav merged 10 commits into
masterfrom
refactor/before-auth

Conversation

@JosephKav

@JosephKav JosephKav commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Pulled out the housekeeping from the Auth PR #938.

Changes

  • refactor - rename error types to the Go-idiomatic Err* form:
    • FieldError -> ErrField
    • KeyFieldError -> ErrKeyField
    • InvalidTypeError -> ErrInvalidType
  • fix(api) - take Config.OrderMu.RLock() around the duplicate ID/Name check in httpServiceEdit, which read Config.Service unguarded while tracking goroutines could be mutating it.
  • chore(makefile) - web-install now uses npm ci instead of npm install.
  • chore(go) - drop test.Ptr in favour of Go 1.26's new(expr).
  • docs - add see-links from overridable vars to their override points.

Tests

  • Save-drain time.Sleeps replaced with a shared config dir, removing the main source of slowness/flake in the api/cmd/config/web suites.
  • DockerTagCheck runs skip rather than fail when the registry rate-limits.
  • Tests:
    • reordered to match source order.
    • failure-message prefixes aligned.
    • expected-error cases return early.

- Write configs to one process-lifetime temp dir (created in TestMain), so
  late debounced saves always find it and the save-drain sleeps can go.
- Sweep stray temp dirs at startup, since a killed/timed-out run can't run
  the end-of-run cleanup.
- Resolve the GitHub token from ${GITHUB_TOKEN} at read time where it's used
  (api, cmd) and use an inert placeholder where it isn't (config, web), so no
  real token is persisted to disk.
@JosephKav JosephKav added the go Pull requests that update Go code label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

✅ Playwright Test Results

Count
✅ Passed 373
❌ Failed 0
🔄 Flaky 0
⏭️ Skipped 4

Duration: 891.7s

View screenshots & full report

@JosephKav
JosephKav marked this pull request as ready for review August 5, 2026 21:31
@JosephKav
JosephKav merged commit d2cbce3 into master Aug 5, 2026
6 checks passed
@JosephKav
JosephKav deleted the refactor/before-auth branch August 5, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants