Skip to main content

Diagnose storage failures and restore AuthCrunch

Start with the operation that failed and the component that owns its state. An access policy, a portal session, a backend record and a mail delivery can fail independently. This guide applies to the v1.8.1 distribution and companion releases.

Locate the failing boundary​

ObservationWhat to check first
adapt rejects a driver, option or nameCheck the executable's module list, the backend grammar and the exact interface selector.
adapt succeeds, startup failsCheck the configured storage and dependencies. Adaptation can serialize a declaration with an absent file, unavailable service, wrong bindings or unsupported state.
A request reports a denialVerify the realm, current account and required policy. Missing or expired state may look like invalid credentials. Check service evidence before classifying a denial as a bad password.
A request reports a capacity limitCheck the relevant entry and byte bounds, expired versus retained history, and whether all sharing runtimes agree on limits.
A read times outRecover access to the source of truth. Retry a documented safe read within a bounded policy. Treat refresh-family inspection, which can reject and revoke a spent credential, separately.
A write times out or confirmation disappearsTreat the result as potentially committed. Withhold new credentials or success UI until the operation is confirmed. Reconcile with trusted state before another write.

The API responses differ. Profile, Capabilities and Documents use storage_unavailable or commit_uncertain with HTTP 503 for the typed failures they expose. Some Server API mutations use HTTP 200 with a failure object. The browser refresh API returns a generic 503 for both unavailable and uncertain results. Check the operation's response contract and correlate the request ID with private logs. A transport error or missing success body is insufficient to establish rollback.

Respect each backend's retry boundary​

BackendSafe assumptions
SQLiteThe shared engine can wait for a busy transaction start within its timeout. Mutations run once. A commit error or post-commit cancellation can leave an uncertain result. A handle may reject further work until it is reopened. A deadline before a transaction starts is different from a lost commit result.
ConsulThe document backends retry proven CAS conflicts within one timeout, with up to eight attempts. Transport/transaction results that cannot be verified return an unavailable error and do not authorize an automatic replay of the mutation. Pending OAuth uses separate conditional records and an index.
DynamoDBWrites use conditional transactions. The Go connector preserves uncertainty across SDK attempts. A later rejection alone does not prove that an earlier attempted write rolled back. An idempotency token used inside one transaction call does not make a new application call a replay of that transaction.

A SQLite callback can commit an operation in a second database while the outer identity check still holds a transaction. Rolling back the outer check cannot reverse that separate write. When this occurs, the consumer withholds success and reports uncertainty.

SQLite transaction code, Consul conditional updates and DynamoDB transaction classification.

Reconcile the specific operation​

Interrupted operationRecovery action
Create or change an accountThrough a trusted management path, resolve the original account by its configured selectors and immutable ID. Verify its current status or use a fresh login to check a password change. Preserve enrollment history.
Issue or revoke an API keyKeep the delivery destination private. Check whether issuance produced the original private file or a known key. Read the command's outcome and confirm revocation for the known credential before issuing another one. Provisioning outcomes
Start or redeem a ticket or upstream OAuth loginKeep old credentials private and start a fresh browser interaction. A code exchange can succeed upstream even while durable callback completion fails. OAuth transaction lifecycle
Rotate or revoke a refresh familyPreserve pending or blocked client state after uncertain rotation. Avoid reusing the previous refresh credential. Verify logout acknowledgement or require fresh authentication. Refresh diagnostics
Send signup mailSeparate persisted signup, durable enqueue, mail relay acceptance and queue acknowledgement. A delayed or duplicate email can carry an expired or spent code. Delivery diagnosis
Update a File VaultRead authenticated vault or file state before allocating again, adding a grant or changing a key. Retry a known chunk with its original ciphertext. Retain the recovery key and immutable account binding. Documents responses
Replace a secret recordVerify the stored revision through authorized provisioning, then check that the intended configuration successfully loaded the new snapshot. Updating the store and adopting the snapshot are separate steps. Secrets

Keep explicit mutation endpoints, administrative tools and background workers within the scope of the incident. For example, if DynamoDB account lock recovery is required, stop and fence every previous writer for the affected store and reconcile the previous write before using security-dynamodb identity recover-lock --fenced for the exact account.

Rehearse a coherent restore​

  1. Inventory the executable and module versions, normalized configuration, service identities, deployment selectors and required backing state. Record locators and backup identifiers privately. Keep signing keys, storage encryption keys and user recovery material protected.
  2. Drain producers and owners, including notification workers and every writer for the records being backed up. Take consistent backups of the related state. For example, copy a stopped SQLite database with any associated journal files and its related databases. Keep the matching root directory, backend records and keys together.
  3. Restore into a private staging deployment. Preserve selectors and compatibility settings, or explicitly treat the restored namespace as a new authority. For Consul, preserve the corresponding KV subtree and key bytes. For DynamoDB, restore complete records and capacity/index state. For File Vault on AWS, verify the corresponding S3 objects, version state and retirement markers before enabling traffic.
  4. Test representative accounts, denied operations, key revocation, renewal, encrypted-file recovery and queued work. A restore can revive a previously valid credential or a queued message that was already delivered. Reconcile those effects before sending production traffic or mail.

When rehearsing an upgrade, preserve an untouched restorable copy before the new executable opens a database. A supported forward schema migration does not establish that the old executable can read the updated file. Return to a coherent pre-upgrade copy if rollback requires the old format, and reconcile any state created after that backup.

Root state recovery, Consul snapshots and DynamoDB point-in-time recovery.

Agentic Prompts​

Classify a timeout
Read the upstream root AGENTS.md files first:
https://github.com/greenpau/caddy-security/blob/v1.8.1/AGENTS.md
https://github.com/greenpau/go-authcrunch/blob/v1.7.1/AGENTS.md
Read applicable scoped AGENTS.md files and then the relevant skills and their
implementation and test references:
https://github.com/greenpau/caddy-security/tree/v1.8.1/.codex/skills
https://github.com/greenpau/go-authcrunch/tree/v1.7.1/.codex/skills
Check the selected backend's corresponding release and rules. Compare main
with deployed versions. Resolve disagreements from implementation and tests.
If sources are inaccessible, ask me to paste them. Use redacted or synthetic
examples and state what has not been verified.
Secondary context: https://docs.authcrunch.com/docs/operations/storage-recovery

Given a synthetic storage timeout, trace the failure to the operation and backend. Explain what would establish pre-dispatch refusal, a known conflict, a confirmed commit, or uncertainty.
Reconcile a lost credential response
Read the upstream root AGENTS.md files first:
https://github.com/greenpau/caddy-security/blob/v1.8.1/AGENTS.md
https://github.com/greenpau/go-authcrunch/blob/v1.7.1/AGENTS.md
Read applicable scoped AGENTS.md files and then the relevant skills and their
implementation and test references:
https://github.com/greenpau/caddy-security/tree/v1.8.1/.codex/skills
https://github.com/greenpau/go-authcrunch/tree/v1.7.1/.codex/skills
Check the selected backend's corresponding release and rules. Compare main
with deployed versions. Resolve disagreements from implementation and tests.
If sources are inaccessible, ask me to paste them. Use redacted or synthetic
examples and state what has not been verified.
Secondary context: https://docs.authcrunch.com/docs/operations/storage-recovery

Compare API-key issuance, ticket redemption and refresh rotation after a lost response. Identify the safe evidence and recovery action for each.
Build a coherent backup checklist
Read the upstream root AGENTS.md files first:
https://github.com/greenpau/caddy-security/blob/v1.8.1/AGENTS.md
https://github.com/greenpau/go-authcrunch/blob/v1.7.1/AGENTS.md
Read applicable scoped AGENTS.md files and then the relevant skills and their
implementation and test references:
https://github.com/greenpau/caddy-security/tree/v1.8.1/.codex/skills
https://github.com/greenpau/go-authcrunch/tree/v1.7.1/.codex/skills
Check the selected backend's corresponding release and rules. Compare main
with deployed versions. Resolve disagreements from implementation and tests.
If sources are inaccessible, ask me to paste them. Use redacted or synthetic
examples and state what has not been verified.
Secondary context: https://docs.authcrunch.com/docs/operations/storage-recovery

List which files, records, generation state and protected keys belong to one recoverable deployment for each backend. Include an independent File Vault check.
Separate mail acceptance from delivery
Read the upstream root AGENTS.md files first:
https://github.com/greenpau/caddy-security/blob/v1.8.1/AGENTS.md
https://github.com/greenpau/go-authcrunch/blob/v1.7.1/AGENTS.md
Read applicable scoped AGENTS.md files and then the relevant skills and their
implementation and test references:
https://github.com/greenpau/caddy-security/tree/v1.8.1/.codex/skills
https://github.com/greenpau/go-authcrunch/tree/v1.7.1/.codex/skills
Check the selected backend's corresponding release and rules. Compare main
with deployed versions. Resolve disagreements from implementation and tests.
If sources are inaccessible, ask me to paste them. Use redacted or synthetic
examples and state what has not been verified.
Secondary context: https://docs.authcrunch.com/docs/operations/storage-recovery

Trace a signup message through the durable queue, SMTP DATA acceptance and acknowledgement. Explain how to test recovery and duplicate behavior without contacting production.
Plan an upgrade and rollback
Read the upstream root AGENTS.md files first:
https://github.com/greenpau/caddy-security/blob/v1.8.1/AGENTS.md
https://github.com/greenpau/go-authcrunch/blob/v1.7.1/AGENTS.md
Read applicable scoped AGENTS.md files and then the relevant skills and their
implementation and test references:
https://github.com/greenpau/caddy-security/tree/v1.8.1/.codex/skills
https://github.com/greenpau/go-authcrunch/tree/v1.7.1/.codex/skills
Check the selected backend's corresponding release and rules. Compare main
with deployed versions. Resolve disagreements from implementation and tests.
If sources are inaccessible, ask me to paste them. Use redacted or synthetic
examples and state what has not been verified.
Secondary context: https://docs.authcrunch.com/docs/operations/storage-recovery

Using my deployed tags, trace the backend declarations and supported schema migration. Explain how to check recovery on a private copy and what would require fresh login.

Source Code References​