Skip to main content

Audit Log

Crewship maintains an append-only audit log that records every mutation in the system. The audit log provides a complete trail for security review, compliance, and debugging.

What Is Audited

The audit_logs table currently captures these mutations. Other entities (crews, missions, credentials) emit journal events but do not yet have WriteAuditLog calls wired into their handlers: Keeper security decisions are tracked separately in the keeper_requests table (see below), not in audit_logs.

Access changes are chained and atomic

A change to who or what may access something appends a hash-chained journal entry in the same transaction as the change: if the audit cannot be written, the change is rolled back and the request fails. The entry carries the previous and current values, never secrets. Where the Settings Audit view reads audit_logs, the same transaction also writes that row. This covers workspace and crew settings (including crew runtime privileges: privileged, added capabilities, init and mounts), member roles and capabilities, invitations, Page grants, crew links and their shared-file access (crew_link.create|update|delete|file_access), the artifact creation policy (workspace.artifact_creation_policy.update), credential folder policy (credential_folder.update), routine origin binding clears (routine.origin_binding.clear) and refused waitpoint decisions (waitpoint.decision_refused; the journal entry names the run and step, not the callback token). Agent privileges are access changes too. A PATCH of an agent that changes its tool_profile, mcp_config_json, crew_id or agent_role (including the previous lead a promotion demotes, listed as demoted_leads) records the agent’s previous and current privileges in the update entry; temporary hires are chained as agent.hired, agent.rehired, agent.released and, when a hire’s required approval could not be staged and it is removed again, agent.hire_reverted. Every agent update is written this way, not only those that touch privileges. Creating an agent (create, and agent.created when an agent creates one through the internal API) records its current privileges, and deleting one (delete) records the privileges it held. An internal create whose required review hold cannot be written is removed again and chained as agent.create_reverted. These removals finish even if the client disconnects. Paths that run on behalf of an agent, such as the internal hire and create, have no user: their records name a system actor. agent.created also records what the caller’s credentials prove: the workspace and crew its internal token is bound to (caller_token_workspace_id, caller_token_crew_id) and, when it presents a valid run token, caller_run_id and caller_agent_id. An invalid run token is flagged (caller_run_token_invalid); no token is stored. Agent delete re-decides its authorization inside the delete transaction. MCP configurations commonly carry API keys. The audit never stores an MCP configuration verbatim: it records, per server, the name, transport, the executable’s base name (leading NAME=value assignments are skipped, and nothing is recorded unless that token is a plain program name) and the names of its environment variables and headers. Arguments, URLs and every env/header value are left out. Before this change the agent update entry copied the request body, so audit_logs metadata and journal payloads written by earlier versions may contain MCP configuration values; chained entries are not rewritten (that would break the chain), so treat any credential that was set through an agent’s MCP configuration on an earlier version as exposed to readers of the audit log and rotate it. A source-scanning test (internal/api/audit_logs_writer_guard_test.go) checks every audit call site, not every file: each audit_logs insert must sit in a function that appends the chain, and a best-effort writer fails when its action names an access concept or when it records a privilege-bearing field of an AGENT or CREDENTIAL_FOLDER (or passes metadata it cannot read). It also fails a function that sends a membership, invitation or Page grant journal entry with the buffered Emit rather than appending it on the change’s transaction. The few legacy-only sites it allows are listed there, one per call site, with their reasons, along with what the scan cannot see.

Keeper Decision Auditing

Keeper security decisions are stored in the keeper_requests table with detailed fields:

The decision history is append-only

keeper_requests holds the current state of a request. It is written PENDING and then updated in place once the gatekeeper decides — so on its own it cannot tell you that a request was ever pending, how long it sat there, or whether a decision was later rewritten. Every state transition is therefore also appended to keeper_request_events: The agent, crew, credential, intent and command are copied onto every transition rather than joined, so the record stays readable and self-describing if the operational keeper_requests row is ever pruned.
keeper_request_events is append-only at the database level: a BEFORE UPDATE trigger aborts any attempt to rewrite a recorded transition. A decision cannot be edited, only superseded by a further transition — which appears as an extra row rather than a silently changed value. Immutability that depended on every future caller remembering to insert instead of update would not be immutability.DELETE is deliberately not blocked: workspace_id carries ON DELETE CASCADE so workspace teardown and backup --replace still work. Deletion is covered by the other half of the model — every keeper decision is also mirrored into the hash-chained journal, where a removal shows up as a sequence gap that only a signed checkpoint can legitimately bridge.
Read the history with:
Or GET /api/v1/admin/keeper/requests/{requestId}/events (ADMIN+). A request belonging to another workspace returns an empty list rather than a 404, so the endpoint cannot be used to probe which request ids exist.
Requests raised before the ledger migration have their current state backfilled (a PENDING at created_at plus the decision at decided_at) but no intermediate history — earlier rewrites, if any happened, are unrecoverable. That loss is exactly what the ledger stops from here on.

Audit Log Table Structure

The audit log is append-only. There is no API or mechanism to delete or modify audit log entries. This ensures an immutable record for security review.

Querying the Audit Log

GET /api/v1/audit

Required role: OWNER or ADMIN (manage permission)

Query Parameters

Response

The response includes user_email and user_name joined from the users table, and entity_name — the display name of whatever the row touched, resolved per entity_type because entity_id is polymorphic. It is null when the target has no name to give (a backup path, a hard-deleted row), in which case the id is all there is. entity_name is deliberately not filtered on deleted_at: “who deleted Riley” is a question asked after Riley is gone, and that is the one place the log has to keep speaking.

Sources

A workspace keeps four audit trails, in four tables, on purpose — the keeper ledger is append-only and merging it into a general log would cost exactly the guarantee it exists for. Only the reading is unified: each source is projected onto the response shape above. action, entity_type, entity_id, user_id and search apply to the workspace source only — the other trails index by their own shape, and a filter the server would silently ignore is worse than one that is not offered. page, limit and the date range mean the same thing everywhere. From the CLI:

Pagination

The audit log uses offset-based pagination:
  • Default limit: 50 entries per page
  • Maximum limit: 100 entries per page
  • Minimum limit: 1 entry per page
  • Pages are 1-based (page 1 is the first page)

Example Queries

How Audit Entries Are Written

Audit entries are written synchronously during mutation handlers using the WriteAuditLog function (defined at internal/api/internal_handler.go:62):
Typical call site:
The function generates a random hex ID, writes the row in the same request context, and — when j is non-nil — dual-emits a typed audit.entity_* entry into the unified Crew Journal. If the write fails, a warning is logged but the original operation is not rolled back — the audit log is best-effort to avoid blocking user operations.

Tamper-Evidence: the Journal Hash-Chain

Crewship deliberately chooses accountability ex-post over real-time control, which makes the journal the load-bearing safety mechanism. To keep that record trustworthy, every journal_entries row is linked into a per-workspace hash-chain:
  • seq — a per-workspace monotonic sequence number (1-based). It gives a deterministic order independent of the random id primary key and the wall-clock ts (which can collide), and a deleted middle row shows up as a gap. A UNIQUE(workspace_id, seq) index enforces that no two rows share a slot.
  • prev_hash — the entry_hash of the immediately preceding entry in the same workspace. The first entry (genesis) uses the empty string.
  • entry_hash — a keyed HMAC-SHA256 over the entry’s committed content plus prev_hash.

The chain is keyed — that’s the point

The threat model is an attacker (or compromised operator) with write access to the database. A bare hash would give them no trouble: they could edit a row, recompute its entry_hash, and recompute prev_hash/entry_hash for every following row, producing a perfectly self-consistent forged chain. New journal and instance audit rows carry chain_key_id and chain_mac_version = 2. Their MAC binds the key ID, version, purpose and row content. The active signing key and retained verification keys live in a private keyring outside the database. Normal server boot creates a random active key once in <data-dir>/audit-keyring.json with mode 0600; it never overwrites an existing or invalid file. That app-owned keyring is sealed at rest: AES-256-GCM under a key derived with HKDF-SHA256 (purpose label crewship audit keyring at rest v1) from the current master key (ENCRYPTION_KEY, or ENCRYPTION_KEY_V<N> for CREWSHIP_ENCRYPTION_KEY_VERSION=v<N>). The file records which master-key version sealed it. At boot a plaintext keyring written by an older build, or one sealed under an older master-key version, is re-wrapped in place with the same keys. A keyring that does not open with the configured master key stops the boot and is left untouched — restore the master key rather than deleting the file. What sealing does and does not protect: on a default install the master key is in <data-dir>/secrets.env, right next to the keyring, so anyone who can read the whole data directory can still open it. Sealing protects copies that leave out secrets.env — file-level backups, snapshots or support bundles that take the keyring but not the secrets — and installs whose master key is injected from outside (systemd EnvironmentFile, a secret manager) rather than kept in the data directory. Treat the data directory as a whole as secret. Rollback across this change. Builds before sealing cannot read a sealed keyring and refuse to start. Before rolling back (including crew rollback) stop the server and run crewship audit export-keyring --plaintext to write the keys unsealed, put that file in place of audit-keyring.json, then start the older build; a newer build seals it again at its next start. Rolling back without that step is unsupported. Rotate the active signing key with crewship audit rotate-key instead of editing the file: it adds a random active key, keeps every earlier key for verification only, and records an audit.signing_key_rotated entry. The running server signs with its boot snapshot until it restarts. Legacy rows with both key columns NULL retain their original byte layout and verification derivation:
The retained legacy-v1 key is verification-only. Vault-key rotation does not change an existing audit keyring or rewrite historical MACs. An attacker with database write access cannot recompute a valid MAC without its signing key. Operators may configure an external private keyring through CREWSHIP_AUDIT_KEYRING_PATH or YAML audit.keyring_path. Crewship reads it (plaintext or sealed) but never rewrites or rotates it. It contains an active_key_id and a keys array of {id, key_b64} records, with unique IDs and 32-byte keys. Rotate by choosing a new active ID and retaining every key needed to verify old rows. The process snapshots the keyring at boot; changes require a restart. These HMAC verification keys are secrets, not public keys. A missing historical key is reported as unverified, rather than proven tampering. Audit append admission checks only the chain tail inside the writer transaction, after native insert triggers: the previous tail’s MAC under its own key from the keyring, its link to its predecessor, and every row the append wrote. Its cost does not grow with history (one bounded index read per affected workspace in a journal batch, one per instance audit row). A missing verification key for the tail, or a tail that does not authenticate, refuses the append: a row chained onto it would make the tampered row look endorsed. Defects further back — a modified or unverifiable middle row, a priority mismatch, unsigned pre-chain rows — are historical. They never block new appends. Whole-history verification (crewship journal verify, the instance audit verifier and the backup drill) still reports them: ok stays false, the breaks are listed, and once an authentic row follows them historical_status says which kind they are, with continuation_verified describing the segment after the last defect:
  • historical_invalid (proven mismatch) or historical_unverified (missing key or unresolved priority): the defect is in a row written before the keyring upgrade (a legacy v1 MAC) or before the last OWNER reseal — inherited history.
  • post_upgrade_invalid: the defect is in a keyring-signed row, or after the last reseal — damage since the upgrade. It does not block appends either, but it is not history and should be investigated as an incident.
The tail check also refuses when the tail’s predecessor row is missing and no signed compaction checkpoint accounts for it. Full verification never runs inside a writer transaction on a hot path: run it on demand with crewship journal verify (workspace) and crewship admin instance audit verify (instance), or through the backup drill. Background journal entries (agent activity, run lifecycle) that a broken workspace tail refuses are held, not dropped: the writer keeps them in order, retries each affected workspace every 30 seconds with one tail-only admission, and keeps committing every other workspace meanwhile. At most 10,000 entries are held; past that the oldest are dropped with an ERROR naming the count, and entries still held at shutdown are logged as lost. Flush() can return while broken-chain entries remain held; it is not proof of their durability. Fresh background entries for that workspace wait behind its backlog, including after repair but before the retry tick.

Alerts on chain breaks and reseals

A detected break — an append refused by a workspace or instance chain tail, an instance audit row failing its check while the audit log is listed, or a defect reported by crewship journal verify or crewship admin instance audit verify (including post_upgrade_invalid, whose verdict class leads the recorded reason) — and every OWNER reseal reach the instance admins:
  • Instance audit event. A break records audit.chain_break_detected (entity audit_chain, one event per incident: scope, workspace, seq), chained normally or as an unchained fallback when the instance chain tail is itself broken. A reseal records audit.resealed (instance chain) or audit.workspace_resealed (workspace chain) in the reseal’s own transaction.
  • Inbox notification. Each instance admin gets one item in their primary workspace inbox, targeted at them alone (the same routing as backup incidents), titled Audit chain needs attention or Audit chain resealed, with category security, so it also reaches their external channels per their notification preferences. Repeats of the same incident do not add items.
The alert is written by a background task after detection, never inside the writer transaction that detected it. Missing per-admin inbox notices are retried on later detection and by the periodic sweep from persisted incident/reseal events, including after restart. A delivery receipt (instance_audit_notice_deliveries) commits atomically with each recipient’s inbox projection. Receipts contain only the incident key, user ID and delivery time, survive inbox purge/retention, and are removed on physical user deletion. A handled notice is never resurrected or externally resent by a sweep after its inbox row is removed. Existing inbox projections are adopted without another external send. External fan-out follows commit and retains the notification subsystem’s delivery limits. The server also verifies the full instance chain and every retained workspace journal at startup and hourly, using read snapshots outside writer transactions. Each sweep has a five-minute deadline; verification errors are logged and retried on the next sweep. post_upgrade_invalid raises the same deduplicated incident. Any unchained_fallback > 0 raises a separate, stable seq-zero incident, even when the chained segment is healthy; the alert itself cannot generate an endless series of fallback incidents. Deleted workspaces with retained journal rows are included. No verification request or refused append is needed to detect these verifier-reported defects. Whole-database rollback, tail truncation and rows indistinguishable from pre-chain legacy history remain outside that guarantee. There is no new quarantine state; with a broken tail, audit-producing writes on that chain fail while reads and unrelated chains retain their own authority checks (security-reducing instance actions are the exception below). Database contention and cancellation do not establish tampering. Investigate before the current OWNER records an explicit audit reseal checkpoint with the reviewed old tail and a reason. It starts a separately authenticated segment without changing old rows. continuation_verified does not change a historical historical_unverified or historical_invalid verdict into a clean history.

What the chain detects

  • Mutation — editing any committed field of a written row (the recomputed keyed hash no longer matches the stored one).
  • Reorder — swapping entries in place (the prev_hash linkage no longer matches).
  • Mid-chain deletion — removing a row leaves a seq gap with no signed checkpoint covering it.
  • Forged rewrite by a DB-write attacker — recomputing the hash columns without the key does not validate (this is the property a bare hash lacked).
  • Unrecorded priority change — the one committed field that is legitimately mutable is reconciled against its append-only change ledger, so flipping it directly in the DB is caught (see below).
Keeper decisions are inside this chain. /keeper/request and /keeper/execute both emit a keeper.decision entry, and keeper.decision is not in the compactor’s allowlist, so those entries are never rolled up and stay verifiable for their whole retention. The execute entry carries the command and its exit code, so it remains meaningful even if the keeper_requests row is later pruned.

Legitimate deletion vs. tampering: signed checkpoints

Some deletions are legitimate: the daily compaction worker rolls up high-volume low-signal entries and deletes the originals, and the pipeline-resurrect purge removes a defunct routine’s journal rows. These delete rows from the middle of the chain, which would otherwise read as tampering. To distinguish the two, every such delete writes a signed checkpoint into journal_chain_checkpoints in the same transaction as the delete. The checkpoint commits — under the same HMAC key — to the exact (seq, entry_hash) of every row it removed. Verification bridges a seq gap when a valid checkpoint covers it, and continues linking prev_hash pointers across the gap. An attacker cannot abuse this: forging a checkpoint requires the key, and a mid-chain delete with no checkpoint (or a checkpoint with a bad MAC) still fails verification.

Legitimate mutation vs. tampering: entry priority

One committed field is meant to change after write. An OWNER/ADMIN can mark an entry high, pin or permanent (POST /api/v1/journal/{id}/priority) — a load-bearing marker, since permanent entries are never compacted and pins land in the curated pins.md. Hashing that mutable column would make every authorised pin a permanent false “tampered” verdict, which is worse than no verification at all: it trains operators to ignore the result. So the chain commits to priority_at_emit, written once at emit and never updated, while the live priority column stays where every reader looks. The mutable column is not left unguarded. Each edit appends to journal_entry_priorities — also append-only by trigger — in the same transaction as the column update, and verification reconciles the two: the live value must be reachable from priority_at_emit by following the recorded chain of changes. That makes two distinct attacks visible:
  • a silent column flip (a raw DB write) leaves no ledger row at all; and
  • a fabricated ledger row whose previous_priority does not chain back to the emit-time value.
Why it matters that this is checked: downgrading a permanent entry to normal would let the next compaction pass remove it legitimately, complete with a valid signed checkpoint — laundering a deletion through a mechanism designed to authorise one.
This check bounds forgery rather than eliminating it. An attacker with DB write can append a fully self-consistent chain of fake edits. Three things stand in the way: the honest path is now verifiable (no false positives to hide behind); every real edit also emits a memory.priority_changed entry into the keyed chain, so a forged ledger with no corresponding chained entry is detectable by comparing the two; and — since #1572 — a forged un-pin no longer achieves anything, because compaction refuses to delete an entry that was permanent at emit regardless of what the ledger claims. The forgery can still mislead a reader of the priority column; it can no longer get the record destroyed.
Entries pinned before the upgrade keep working: priority_at_emit is seeded from their current priority and the edit ledger is deliberately left empty for them, so reconciliation holds with zero recorded changes. The pre-upgrade edit history is unrecoverable, and inventing a change nobody can be attributed to would be a fabricated audit record. The guarantee starts at the upgrade and runs forward.

Recovered is not resolved

An entry pinned before the upgrade is a partial exception to the note above. The backfill seeded priority_at_emit from the value at migration time, which for an already-edited row is not the value its stored hash was computed over — so the hash does not reproduce. Verification tries the four possible priorities against the stored HMAC and, when one reproduces it, reports the row as repairable: the content is proven authentic and the emit-time priority is recovered exactly. Producing content that hashes correctly under any candidate requires the key, so this removes a false positive without weakening the oracle. What it does not establish is where the live priority came from. A pre-v166 pin and an attacker’s write to both priority and priority_at_emit leave byte-identical rows. Recovery used to resolve that ambiguity silently in favour of “benign” and skip the live-priority check for such rows — which laundered a permanent → normal downgrade past the one check guarding compaction’s exemption (issue #1572). So a repairable row is now reported, not absolved:
  • it appears in repairable with the recovered emit-time value and as a priority break, so ok is false;
  • crewship journal verify prints it in its own block and exits non-zero;
  • compaction refuses to delete it (below).
The cost is that a genuine pre-upgrade pin reads red until an operator looks at it — a row which, before the chain moved off the mutable column, was a hard break anyway. Reporting a real ambiguity is the honest answer; resolving it in the attacker’s favour was not.

Compaction only destroys what it can prove

Detecting the downgrade is necessary but not sufficient: verification is read by an operator occasionally, while compaction runs on a timer and reads nothing. So the refusal also lives at the point of deletion. Before a compaction pass deletes anything it re-derives each candidate’s keyed hash, and it skips any row that:
  • does not reproduce its stored hash (tampered, or repairable);
  • is in the chain (seq > 0) but carries no stored hash;
  • has a live priority not reachable from the emit-time value through the ledger; or
  • was permanent at emit — whatever the live column says today.
The last rule is the one that survives future refactoring. permanent at emit is a keyed, unforgeable fact; the un-pin that moves the live column is a ledger row anyone with database write can append. An unauthenticated claim may move a label, but it does not authorise destroying the record the label protects. Un-pinning still works for curation — it just no longer makes the entry disposable by a timer. Rows that predate the hash-chain (seq = 0) make no tamper-evidence claim and are unaffected.
Residual gaps (no overclaiming). Two attacks are not fully covered: tail truncation — deleting the newest N entries leaves a shorter but internally-consistent chain (anchoring the tip with a signed high-water checkpoint is the tracked follow-up, issue #1486); and legacy plaintext dev history — old NULL-key rows written with an empty encryption seed use a reproducible key. While that known key is retained, a database writer can forge legacy-framed rows, including a downgrade to that framing. A random active key protects v2 MACs but cannot strengthen a known retained key.

A forked restore starts a new chain

crewship backup restore --as-workspace / --as-crew regenerates the identity columns the hash commits to, so the bundle’s signatures no longer describe the rows they cover. The restore re-signs the forked chain under this installation’s key and the fork begins at a new genesis: it verifies clean, but it attests to this instance from the restore onward and carries no cryptographic link back to the source workspace’s history. Verify the source on the source; a plain or --replace restore remaps nothing and keeps the original signatures. The fork records this in its own journal — a backup.chain_resigned entry at the tail of the new chain, naming the source workspace, the bundle digest, and how many entries and compaction checkpoints were re-signed. It is inside the chain it describes, so it cannot be removed without breaking verification. A restore that cannot re-sign the chain fails before writing anything, rather than landing a fork whose journal would read as tampered.

The audit log outlives what it refers to

A journal entry points at the crew, agent and mission it describes. Until schema v167 those pointers were ordinary foreign keys, and they gave the database itself the ability to edit and delete the audit log: mission_id is one of the fields the chain hash commits to, so the last one silently broke verification on rows nobody had touched: the stored entry_hash had been computed over the real id. To the verifier, a foreign key doing its job and an attacker editing rows are the same event — it reported entry was modified after write. The other two were worse in kind, if quieter: they destroyed audit history outright, leaving a seq gap that reads as a malicious mid-chain deletion. All three are now plain TEXT columns. An entry keeps the ids it was written with even after the crew, agent or mission is gone — which is the point of an audit log. workspace_id deliberately keeps ON DELETE CASCADE: the chain is per-workspace, so a workspace’s journal going away with the workspace is coherent (and is what makes workspace teardown and backup --replace work).
Upgrading repairs the damage rather than papering over it. Values the old constraint nulled are recoverable from the entry’s refs JSON, which the constraint could not reach — but the migration does not trust that blindly. Each candidate is re-hashed and written back only when it reproduces the entry_hash already on disk, which (the hash being an HMAC under a key that is not in the database) proves it is the value the row was written with. Rows that cannot be proven are counted and logged, never rehashed: recomputing a hash over content nobody can vouch for would launder real tampering into a clean chain. Restoring a backup taken before the upgrade runs the same repair, so a restore cannot reintroduce the breakage.

Determinism

Hashing never depends on Go map iteration order. payload and refs are hashed as their stored JSON strings (encoding/json emits map keys sorted), and every field is length-framed (an 8-byte length prefix) before hashing, so no value can be confused with a delimiter or spill into its neighbour.

Verifying integrity

Run verification for the current workspace with the CLI (ADMIN or OWNER):
It walks the keyed chain and prints Journal chain OK — N entries verified against the keyed HMAC chain (plus a count of signed compaction checkpoints bridged, if any) or, on a break, the first bad seq/entry and the reason. The command exits non-zero when the chain is broken, so it can gate a cron job or CI check. The --format json variant emits the raw result for machine consumers. The same check is available over HTTP:
checkpoints is the number of valid signed compaction checkpoints applied while walking the chain. On a broken chain the response stays 200 with "ok": false plus broken_seq, broken_id, and a human-readable reason.
Upgrading an existing instance runs a migration that backfills every historical row into a valid chain (ordered by workspace_id, ts, id), so verification passes immediately after upgrade. On shared dev slots a nuke+reseed is still the cleanest path, since any out-of-band edits made before the upgrade are frozen into the chain as genuine.

What’s Next

Admin API

Keeper audit log endpoint and workspace administration.

RBAC

Role-based access control that determines who can view audit logs.

Instance administration and CLI tokens

GET /api/v1/admin/instance/audit and crewship admin instance audit remain instance-admin only. CLI token creation (including pairing and bootstrap) and revocation append an event in the same transaction as the token mutation. Token events contain the actor ID, action and opaque token ID, never the token, its hash, name, scopes, IP address or user agent. Bulk revocation records each changed token; an empty bulk operation records none. Repeating a successful direct revoke retains its existing success/timestamp behavior and records another event. Stream revocation notifications run only after commit. Instance audit rows use a separate HMAC domain derived from the installation’s stable journal key. The reader exposes integrity: entry_verified checks that row’s stored bytes and immediate predecessor link; legacy_unverified means an older unchained row, unchained_fallback a security action recorded while the chain tail was broken (below), and invalid reports a failed check. This bounded check is not verification of the whole history or protection against tail truncation or whole-database rollback. Existing rows are not backfilled with invented proofs; plaintext dev mode retains the journal’s documented keying limitation.

Security actions with a broken instance chain tail

Revoking a CLI token, revoking a person’s sessions (one or all, by an instance admin) and suspending an account only remove access, so they are never held hostage by audit repair. Local crewship admin reset-password recovery on the server host is the operator’s own incident response and is treated the same way. When the instance chain tail does not authenticate, such an action still commits, and its audit row is written in the same transaction as an unchained fallback: no chain_seq, prev_hash or entry_hash, and "audit_chain": "unchained_fallback" added to its metadata. The fallback row neither extends nor endorses the broken tail; the server logs an error for each one, and instance verification counts them (unchained_fallback) and never reports such a chain as OK. Every access-granting action (token creation, pairing, unlock, admin grants and the rest) stays refused until the tail is repaired by an explicit reseal. That includes a password change and the web password reset: whoever sets a password gains access with it, so both fail closed with 503 and the message that the audit trail needs repair, and change nothing. Any other audit failure (for example a database error) still rolls the action back. Password changes and sibling-session revocation still precede the token/audit transaction; their already-completed effects do not roll back if token audit fails. Suspension likewise retains its separate session-store boundary. Four existing operational callbacks append in an audit-only transaction: that does not make their external effects atomic. Workspace bundles exclude this global log and preserve the destination instance’s own trail.