v0.6.410: offline commands refuse without -config when they find no state, and name where they read and write #1182

Merged
Cordy merged 7 commits from fx15-s3dry into main 2026-11-18 18:38:29 +00:00
Owner

Found by the post-release dogfood dry run.

  • The bug: cairnd migrate --to nats --dry-run ran without -config on the S3 dogfood. It read the built-in defaults (/data/.cairn), found 0 documents and still printed "Result: every item can be copied." holds-confirm-empty and restored had the same blind spot: on an S3 instance they wrote to the local /data/.cairn instead of the bucket and reported success.
  • Fix (dry run): the migrate dry run refuses (exit 2) when it finds no single-instance state.
  • Fix (holds-confirm-empty, restored): they refuse without -config unless the defaults' state directory already holds state.
  • Where it read or wrote: all three now print Single-instance state: <where>, and audit-verify names the missing -config.
  • Not affected (checked in code and tests): the real migrate, the member start path, and running instances all read the bucket correctly, and there is no data loss.
  • Docs: R2 dry-run example, -config in every offline example, and a troubleshooting row. CHANGELOG v0.6.410, chart appVersion v0.6.410.

Severity: Medium (misleading output, and a local write on S3 instances; no data touched in the bucket).

Found by the post-release dogfood dry run. - **The bug:** `cairnd migrate --to nats --dry-run` ran without `-config` on the S3 dogfood. It read the built-in defaults (`/data/.cairn`), found 0 documents and still printed "Result: every item can be copied." `holds-confirm-empty` and `restored` had the same blind spot: on an S3 instance they wrote to the local `/data/.cairn` instead of the bucket and reported success. - **Fix (dry run):** the migrate dry run refuses (exit 2) when it finds no single-instance state. - **Fix (`holds-confirm-empty`, `restored`):** they refuse without `-config` unless the defaults' state directory already holds state. - **Where it read or wrote:** all three now print `Single-instance state: <where>`, and `audit-verify` names the missing `-config`. - **Not affected (checked in code and tests):** the real `migrate`, the member start path, and running instances all read the bucket correctly, and there is no data loss. - **Docs:** R2 dry-run example, `-config` in every offline example, and a troubleshooting row. CHANGELOG v0.6.410, chart appVersion v0.6.410. Severity: Medium (misleading output, and a local write on S3 instances; no data touched in the bucket).
On the S3 dogfood the dry run ran without -config, read the built-in
defaults (posix /data/.cairn) instead of the bucket, listed 0 state
documents and said every item can be copied. The S3 reading itself is
right; now the dry run prints 'Single-instance state: <where>' and, with
no state document there, refuses with exit 2 naming -config. v0.6.410.
The blind spot of fx15 in the offline commands that write single-instance
state. Run without -config on an S3 instance, holds-confirm-empty wrote {}
to the local /data/.cairn (the built-in defaults) instead of the bucket and
reported success; restored declared into the same directory. Both now print
'Single-instance state: <where>' and, without -config, refuse with exit 2
when no state document is where the defaults point ("(no -config: the
built-in defaults were read)", as the migrate dry run). A configuration-less
POSIX instance whose state is at the defaults is not refused. audit-verify
without -config names the missing -config instead of the posix month files.
Cordy merged commit 2e3719f732 into main 2026-11-18 18:38:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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: Cordy/Cairn#1182
No description provided.