Skip to content

Use permanent job IDs, explicit settings and compatible SSH with fewer idle writes (#486, #495, #496, #497) - #494

Draft
borg-codex-bot wants to merge 18 commits into
mainfrom
codex/issue-486-job-ids
Draft

Use permanent job IDs, explicit settings and compatible SSH with fewer idle writes (#486, #495, #496, #497)#494
borg-codex-bot wants to merge 18 commits into
mainfrom
codex/issue-486-job-ids

Conversation

@borg-codex-bot

@borg-codex-bot borg-codex-bot commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Jobs currently use mutable type/location values for ownership. This PR assigns each job a permanent UUID so renaming the job or its full archive prefix keeps schedules, history and restore results attached to that job. It also stores explicit job settings and rejects unsupported old configuration exports (#495). Background notification checks and routine navigation stop causing the unnecessary writes documented in #497. The shared SSH command also accepts older OpenSSH clients while retaining warning suppression on newer ones, allowing the minimum Unraid version to return to 6.12.5 (#496).

The maintainer explicitly requested #495, #496 and #497 on the existing #486 branch and PR. These fixes retain their own issue-linked commits and release-note fragments. #498 is not implemented in this candidate.

Behavior

  • Store the UUID in job_id and the existing job_key field. Use it throughout the existing Dashboard, Jobs, History, Reports, Restore and scheduler workflows; sort jobs by name within the existing groups.
  • Register job_ids_v1 and job_settings_v1. Snapshot affected data, preserve explicit settings and unknown fields, save effective compression/retention and automatic appearance, and resume interrupted writes with audit details and startup-log progress. Preserve cache/check references. The final job schema is 5.
  • Allow editable full archive prefixes with an optional -backup ending. Preserve previous prefixes for Browse & Restore and reject overlaps between jobs in the same repository. Preserve Main's native current-prefix Borg prune and its verbose output.
  • Show the permanent ID in Edit Job and expanded History details, and allocate/check an unused ID when New Job opens. Recover from collisions without losing form input or overwriting another job. Keep the 100-character name limit, consistent Wizard height and grouped previous archive patterns.
  • Name new logs and status files using the readable job name, location and full UUID. Keep old files readable and preserve date formatting for file-list runs and parity/USB skip reasons.
  • Use the neutral archive icon for new jobs without an explicit selection. Preserve existing automatic and explicit icons/colors through migration. Display actual archive filters and compact retention choices in Repository Maintenance.
  • Accept job bundle v3, encrypted job bundle v3 and profile export v2. Reject old job AND profile formats before preview/import writes; the authenticated encryption envelope is unchanged. Supported import modes continue to work. Users must create fresh configuration exports after migration; existing Borg archives remain usable.
  • Retain orphan historical files without synthesizing identities, guessing ownership or deleting them. Exclude records without a matching current UUID from current job calculations.
  • Remove the restore-test type rule instead of adding a per-job chunk option. Use the configured archive-size threshold (500 GB by default); count regular files for sampling and coverage. The default 5% target is capped at 1,000 files, excluding directories. Report achieved file coverage and keep the independent level 3 sample size.

Dashboard layout, support-bundle content and restore-test scheduling remain within their existing workflows. Issue #447 stays frozen; scheduler work remains in #493. This PR contains no stable manifest, stable package or release-only application version bump.

Validation

  • Final preflight for ef52219c74eb72b702aef0d4e5b07fb3579c234a: 928 tests passed, none skipped (36.83 seconds), plus Python syntax checks. Real Borg 1.4.5, Node and OpenSSH 9.6p1 were available. The full suite ran once for this final pushed commit.
  • Handle optional SSH warnings compatibly and lower minimum Unraid to 6.12.5 #496 focused validation: 49 tests passed, covering SSH option order, existing command normalization, custom ignore lists, identity replacement, unrelated unsupported options, minimum-version metadata and both user manuals. The actual OpenSSH 9.6p1 parser rejected the old options with exit 255 and accepted the fixed command with exit 0 and no stderr. These ssh -G checks made no network connection. Newer clients still receive WarnWeakCrypto=no; actual SSH-profile backups on older/current Unraid, with recorded Unraid/OpenSSH versions, remain pending.
  • Focused follow-up validation: 75 tests passed, including all five restore GET handlers, unchanged directory metadata, missing/unmounted/unwritable storage, retained probe failures before actual actions, real launcher/child-process cache inheritance, cache reuse and unavailable-cache behavior. The earlier queue/lock tests remain in the passing full suite. No real external notifications were sent.
  • Local HTTP check: the application page and assets returned HTTP 200. After first-use initialization, 125 restore GETs, 25 setup-status GETs, 25 idle queue checks and 25 inventory-lock acquisitions produced no file or directory changes (inode, size, mtime or ctime) in synthetic configuration/data trees. Borg responses were stubbed and no real repositories were accessed. This is a local application check, not an Unraid USB measurement.
  • Existing migration/settings/import/ownership tests continue to pass, including preservation/resume/idempotence, supported and rejected export formats, retained orphan data, UUID relationships and prefix rules.
  • Existing restore-probe tests cover many directories, large file counts, the 500 GB boundary, sample caps and achieved regular-file coverage. The former type rule remains removed.
  • Earlier local browser checks covered the Dashboard, Jobs, Wizard, restored appearance, grouped archive patterns and German/English settings. The maintainer reported the earlier Job-ID candidate checks successful on their own installation; migration validation on additional installations remains pending.

Test candidate

Already migrated #486 installations can update directly. Main installations run the existing job migrations; old job/profile exports remain unsupported and must be recreated after successful migration.

The maintainer's follow-up captures on 2026.09.09.0916 (2026-09-09, 09:23-09:28 idle and 09:30-09:40 UI, CEST) recorded zero queue replacements, inventory chmod events, restore probes or USB Python bytecode writes. UI navigation produced only reads and writable lock-handle closes. Idle contained one repository-info scheduler state save, consistent with startup planning; file events alone do not prove its payload changes. Both captures monitored 180 directories with no reported gaps. The maintainer measured approximately 13 MiB for the RAM cache.

The detailed report records counts, evidence hashes and limitations. The unchanged diagnostic script attachment and its idle/UI/optional-RAM commands make the procedure reproducible. Documentation commit 98210d69f2294dcafe75d001a94f0c2d76836911 changed no deployable source files and matched the previous 2026.09.09.0916 package. The current candidate adds the independently tracked #496 fix. Service-restart reuse, cache reconstruction after an Unraid reboot and real notification delivery remain separate manual checks.

Keep this draft PR unmerged until accepted. Stable promotion requires separate explicit approval and a separate release PR. The German/English #495 publication notice remains in docs/maintainer/issue-495-publication-notice.md.

Closes #486
Closes #495
Closes #496
Closes #497

@borg-codex-bot borg-codex-bot changed the title Use permanent job IDs with editable names and archive prefixes (#486) Use permanent job IDs and explicit settings (#486, #495) Sep 7, 2026
@borg-codex-bot borg-codex-bot changed the title Use permanent job IDs and explicit settings (#486, #495) Use permanent job IDs, explicit settings and fewer idle writes (#486, #495, #497) Sep 8, 2026
@borg-codex-bot borg-codex-bot changed the title Use permanent job IDs, explicit settings and fewer idle writes (#486, #495, #497) Use permanent job IDs, explicit settings and compatible SSH with fewer idle writes (#486, #495, #496, #497) Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant