Release Redview 2.5.0: host worker budgets and GPU preference #19

Merged
nimmo merged 6 commits from release/2.5.0 into main 2026-10-07 16:31:02 +01:00
Owner

Release 2.5.0 adds host-wide CPU/GPU and per-kind job limits, worker kind eligibility, and preferred GPU hosts with live-capacity fallback. Tagging and vectorization share a default cap of one GPU job per host. Embedding can overlap compatible rip/tag/purge/discovery work; scans, moves and destructive deduplication retain exclusion. Capacity checks and claims are atomic across local and remote workers, and indexed lookups avoid scanning job history.

The user explicitly accepted MR18 and authorised completing this stable release. Cut from merged dev through validated 2.5.0-rc.1; scope and retained limits are in acceptance/release-2.5.0.md. Both candidate and final stable CPU/NVIDIA package builds and install checks passed, with all 206 Node tests and 60 Python tests. Both NixOS module evaluations and candidate CI passed. Required final release checks/review must pass before merging.

Publication does not activate hosts or configure Nova/Lyra policy. Upgrade all workers before relying on caps and restart a host's workers together for policy changes. Resident encoder memory needs separate sizing; sustained throughput and post-reboot deployment acceptance remain operator-owned. The ongoing nixos-config flake update is untouched; a later Redview input refresh is the user's choice.

Release 2.5.0 adds host-wide CPU/GPU and per-kind job limits, worker kind eligibility, and preferred GPU hosts with live-capacity fallback. Tagging and vectorization share a default cap of one GPU job per host. Embedding can overlap compatible rip/tag/purge/discovery work; scans, moves and destructive deduplication retain exclusion. Capacity checks and claims are atomic across local and remote workers, and indexed lookups avoid scanning job history. The user explicitly accepted MR18 and authorised completing this stable release. Cut from merged dev through validated 2.5.0-rc.1; scope and retained limits are in acceptance/release-2.5.0.md. Both candidate and final stable CPU/NVIDIA package builds and install checks passed, with all 206 Node tests and 60 Python tests. Both NixOS module evaluations and candidate CI passed. Required final release checks/review must pass before merging. Publication does not activate hosts or configure Nova/Lyra policy. Upgrade all workers before relying on caps and restart a host's workers together for policy changes. Resident encoder memory needs separate sizing; sustained throughput and post-reboot deployment acceptance remain operator-owned. The ongoing nixos-config flake update is untouched; a later Redview input refresh is the user's choice.
Add host-wide worker budgets and GPU preference with fallback
All checks were successful
AI pull-request review / review (pull_request) Successful in 2m48s
Build and Push Attic Cache / build (pull_request) Successful in 18s
Branch and package checks / check (pull_request) Successful in 12s
7915cb6503
Index scheduler capacity reads and address MR review evidence
All checks were successful
Build and Push Attic Cache / build (pull_request) Successful in 12s
Branch and package checks / check (pull_request) Successful in 7s
AI pull-request review / review (pull_request) Successful in 3m0s
f14503d9ba
Prepare 2.5.0-rc.1 with accepted worker policy scope
All checks were successful
Branch and package checks / check (push) Successful in 46s
b3e54641a8
Release Redview 2.5.0
All checks were successful
Branch and package checks / check (push) Successful in 43s
AI pull-request review / review (pull_request) Successful in 1m47s
Build and Push Attic Cache / build (pull_request) Successful in 15s
Branch and package checks / check (pull_request) Successful in 5s
5b97e40ac9
Author
Owner

Automated code review

Reviewed commit: 5b97e40ac92b7fd967d4b1140226fd044ae34c79

Verdict: Ready to merge

No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.

Overall assessment

This release introduces host-wide CPU/GPU job budgets, per-kind limits, and GPU preference with fallback. The implementation adds a worker_presence table for live capacity tracking, enforces atomic claim transactions to prevent budget overruns across local/remote workers, and indexes the running-job lookup to avoid scanning historical data. Documentation and NixOS modules are updated to expose these policies.

Blocking findings

None.

Important findings

None.

Suggestions

  • Hardcoded GPU default in policy parsing (src/worker-policy.ts:45; high confidence)
    The parseWorkerPolicy function defaults maxGpuJobs to 1 if not provided: Object.fromEntries(Object.entries({ maxGpuJobs: 1, ...policy })...). This is a significant operational default that should be clearly documented in the NixOS module description and environment variable help.
    Impact: Operators may inadvertently restrict GPU workloads to one job per host if they do not explicitly configure maxGpuJobs, potentially impacting throughput on multi-GPU systems.
    Suggested fix: Add explicit documentation in worker-policy-options.nix and REMOTE-WORKERS.md highlighting the default of 1, and consider making it configurable via a separate environment variable or Nix option if flexibility is needed.

  • Presence TTL configuration (src/worker-policy.ts:7; medium confidence)
    PRESENCE_TTL_MS is hardcoded to 30_000. This value determines how quickly a host is considered dead if it stops sending heartbeats.
    Impact: A fixed TTL may not suit all network environments. High-latency networks might cause false positives, while low-latency networks might tolerate faster detection.
    Suggested fix: Consider making PRESENCE_TTL_MS configurable via an environment variable or Nix option to allow tuning based on deployment characteristics.

  • Remote worker policy validation (src/remote-worker-thread.ts:23; medium confidence)
    The remote worker thread parses the policy from REVIEW_V2_WORKER_POLICY but does not validate it against the server's schema or version before starting. If a remote worker has an older version of the code, it might send a policy format that the server does not understand.
    Impact: Potential for silent failures or unexpected behavior if policy formats diverge between client and server versions.
    Suggested fix: Add a handshake or validation step where the server rejects connections from workers with incompatible policy schemas.

Tests and validation

  • package-checks: success

Questions

  • How does the system handle the case where a worker's policy is changed while it is already running? The documentation states to stop workers before changing policy, but what happens if this rule is violated?
  • Is there a mechanism to automatically migrate existing worker_presence rows from previous deployments if the schema changes again in the future?

Review limitations

  • The review is based on provided diffs and documentation; live deployment testing was not performed.
  • Performance impact of the new worker_presence table under high concurrency was not measured.
  • Security implications of the REVIEW_V2_WORKER_POLICY environment variable (e.g., injection risks) were not analyzed in depth.

Diff coverage

  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REMOTE-WORKERS.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • REQUIREMENTS.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • acceptance/release-2.5.0.md: reviewed — included in a context-limited batch
  • nix/redview-v2.nix: reviewed — included in a context-limited batch
  • nix/remote-worker.nix: reviewed — included in a context-limited batch
  • nix/tests/remote-worker-module.nix: reviewed — included in a context-limited batch
  • nix/tests/v2-module.nix: reviewed — included in a context-limited batch
  • nix/worker-policy-options.nix: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • schema.sql: reviewed — included in a context-limited batch
  • src/remote-worker-thread.ts: reviewed — included in a context-limited batch
  • src/schema-upgrade.ts: reviewed — included in a context-limited batch
  • src/worker-policy.ts: reviewed — included in a context-limited batch
  • src/worker.ts: reviewed — included in a context-limited batch
  • tests/host-worker-policy.test.mjs: reviewed — included in a context-limited batch
  • tests/remote-worker.test.mjs: reviewed — included in a context-limited batch
  • tests/schema-guard.test.mjs: reviewed — included in a context-limited batch
  • tests/visual-job-concurrency.test.mjs: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: qwen3.6:35b-a3b-q8_0
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 6
  • Previous automated review: none found
  • Findings: 3
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `5b97e40ac92b7fd967d4b1140226fd044ae34c79` ## Verdict: Ready to merge No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory. ### Overall assessment This release introduces host-wide CPU/GPU job budgets, per-kind limits, and GPU preference with fallback. The implementation adds a `worker_presence` table for live capacity tracking, enforces atomic claim transactions to prevent budget overruns across local/remote workers, and indexes the running-job lookup to avoid scanning historical data. Documentation and NixOS modules are updated to expose these policies. ### Blocking findings None. ### Important findings None. ### Suggestions - **Hardcoded GPU default in policy parsing** (src/worker-policy.ts:45; high confidence) The `parseWorkerPolicy` function defaults `maxGpuJobs` to `1` if not provided: `Object.fromEntries(Object.entries({ maxGpuJobs: 1, ...policy })...)`. This is a significant operational default that should be clearly documented in the NixOS module description and environment variable help. Impact: Operators may inadvertently restrict GPU workloads to one job per host if they do not explicitly configure `maxGpuJobs`, potentially impacting throughput on multi-GPU systems. Suggested fix: Add explicit documentation in `worker-policy-options.nix` and `REMOTE-WORKERS.md` highlighting the default of 1, and consider making it configurable via a separate environment variable or Nix option if flexibility is needed. - **Presence TTL configuration** (src/worker-policy.ts:7; medium confidence) `PRESENCE_TTL_MS` is hardcoded to `30_000`. This value determines how quickly a host is considered dead if it stops sending heartbeats. Impact: A fixed TTL may not suit all network environments. High-latency networks might cause false positives, while low-latency networks might tolerate faster detection. Suggested fix: Consider making `PRESENCE_TTL_MS` configurable via an environment variable or Nix option to allow tuning based on deployment characteristics. - **Remote worker policy validation** (src/remote-worker-thread.ts:23; medium confidence) The remote worker thread parses the policy from `REVIEW_V2_WORKER_POLICY` but does not validate it against the server's schema or version before starting. If a remote worker has an older version of the code, it might send a policy format that the server does not understand. Impact: Potential for silent failures or unexpected behavior if policy formats diverge between client and server versions. Suggested fix: Add a handshake or validation step where the server rejects connections from workers with incompatible policy schemas. ### Tests and validation - package-checks: **success** ### Questions - How does the system handle the case where a worker's policy is changed while it is already running? The documentation states to stop workers before changing policy, but what happens if this rule is violated? - Is there a mechanism to automatically migrate existing `worker_presence` rows from previous deployments if the schema changes again in the future? ### Review limitations - The review is based on provided diffs and documentation; live deployment testing was not performed. - Performance impact of the new `worker_presence` table under high concurrency was not measured. - Security implications of the `REVIEW_V2_WORKER_POLICY` environment variable (e.g., injection risks) were not analyzed in depth. ### Diff coverage - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REMOTE-WORKERS.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `acceptance/release-2.5.0.md`: **reviewed** — included in a context-limited batch - `nix/redview-v2.nix`: **reviewed** — included in a context-limited batch - `nix/remote-worker.nix`: **reviewed** — included in a context-limited batch - `nix/tests/remote-worker-module.nix`: **reviewed** — included in a context-limited batch - `nix/tests/v2-module.nix`: **reviewed** — included in a context-limited batch - `nix/worker-policy-options.nix`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `schema.sql`: **reviewed** — included in a context-limited batch - `src/remote-worker-thread.ts`: **reviewed** — included in a context-limited batch - `src/schema-upgrade.ts`: **reviewed** — included in a context-limited batch - `src/worker-policy.ts`: **reviewed** — included in a context-limited batch - `src/worker.ts`: **reviewed** — included in a context-limited batch - `tests/host-worker-policy.test.mjs`: **reviewed** — included in a context-limited batch - `tests/remote-worker.test.mjs`: **reviewed** — included in a context-limited batch - `tests/schema-guard.test.mjs`: **reviewed** — included in a context-limited batch - `tests/visual-job-concurrency.test.mjs`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: qwen3.6:35b-a3b-q8_0 - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 6 - Previous automated review: none found - Findings: 3 </details>
nimmo merged commit 6a7913e810 into main 2026-10-07 16:31:02 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/redview!19
No description provided.