Default the workspace doctor to repair (no container variable needed) #3

Merged
mward4 merged 1 commits from fix/doctor-default-repair into main 2026-09-17 22:26:37 -04:00
Owner

Why

Repairing required DSH_WORKSPACE_DOCTOR=repair, but an existing Unraid container never receives a variable its template gained later — so on a plain update the image default (warn) reported the lost grouping and stopped. Waiting for an update could not fix anything on its own.

Change

  • ENV DSH_WORKSPACE_DOCTOR=repair in the image, and the entrypoint's fallback matches. Repair is now the behaviour with no configuration.
  • Branch order in the entrypoint: warn/check/report report only, off/no/0 are silent, anything else (including typos) repairs rather than silently doing nothing.
  • README: the doctor is documented as the default, the variable as an opt-out; the Unraid note now says an existing container needs no new field.

Verification

Against a pre-repair copy of a real state volume (39 accounted, 4 project directories gone, 8 orphaned chats):

Run Result
no env repaired: 5 chats re-accounted under Sondra, 3 under App Development, registry backup written, 47 accounted
DSH_WORKSPACE_DOCTOR=warn report only, no write, 39 accounted
DSH_WORKSPACE_DOCTOR=off no output, no write, 39 accounted
unrecognised value repairs (47 accounted)

The root branch's block was extracted verbatim and run in each mode; the real entrypoint was also run end to end on its non-root path (which still only reports, by design, since it cannot chown). sh -n clean. The CI smoke assertions are unaffected: a fresh volume has no registry, so --all prints its usual line and exits 0.

## Why Repairing required `DSH_WORKSPACE_DOCTOR=repair`, but an existing Unraid container never receives a variable its template gained later — so on a plain update the image default (`warn`) reported the lost grouping and stopped. Waiting for an update could not fix anything on its own. ## Change - `ENV DSH_WORKSPACE_DOCTOR=repair` in the image, and the entrypoint's fallback matches. Repair is now the behaviour with no configuration. - Branch order in the entrypoint: `warn`/`check`/`report` report only, `off`/`no`/`0` are silent, anything else (including typos) repairs rather than silently doing nothing. - README: the doctor is documented as the default, the variable as an opt-out; the Unraid note now says an existing container needs no new field. ## Verification Against a pre-repair copy of a real state volume (39 accounted, 4 project directories gone, 8 orphaned chats): | Run | Result | |---|---| | no env | `repaired`: 5 chats re-accounted under Sondra, 3 under App Development, registry backup written, 47 accounted | | `DSH_WORKSPACE_DOCTOR=warn` | report only, no write, 39 accounted | | `DSH_WORKSPACE_DOCTOR=off` | no output, no write, 39 accounted | | unrecognised value | repairs (47 accounted) | The root branch's block was extracted verbatim and run in each mode; the real entrypoint was also run end to end on its non-root path (which still only reports, by design, since it cannot chown). `sh -n` clean. The CI smoke assertions are unaffected: a fresh volume has no registry, so `--all` prints its usual line and exits 0.
mward4 added 1 commit 2026-09-17 22:26:30 -04:00
Default the workspace doctor to repair
Sync upstream and build images / sync-and-build (push) Successful in 8m20s
c398febf0f
Nothing repaired on a plain container update: the image defaulted to
`warn`, which reports lost grouping and stops there, so a project
directory an update erased stayed erased unless the operator set
DSH_WORKSPACE_DOCTOR=repair — a field an existing Unraid container never
receives, because Unraid does not add variables a template gained later.

Bake DSH_WORKSPACE_DOCTOR=repair into the image and make that the
entrypoint's fallback, so an update heals itself with no configuration:
missing project directories are recreated and the chats orphaned with
them are re-accounted at startup, with the registry backed up first and
session logs untouched. `warn` reports without repairing, `off` is
silent, and an unrecognised value repairs rather than silently doing
nothing.

README: the doctor is described as the default with the variable as an
opt-out, and the Unraid note now says an existing container needs no new
field.
mward4 merged commit c398febf0f into main 2026-09-17 22:26:37 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mward4/deepseek-harness#3