Skip to content

Add a fail-closed initialization recovery workspace - #12

Closed
callumalpass wants to merge 1 commit into
mainfrom
feat/recovery-workspace
Closed

callumalpass wants to merge 1 commit into
mainfrom
feat/recovery-workspace

Conversation

@callumalpass

Copy link
Copy Markdown
Collaborator

First improvement increment

Keep the plugin usable for recovery when initialization fails, without allowing writes against unknown authority state.

  • Register the workspace, commands, settings tab, and status bar even after startup failure.
  • Show a bounded recovery screen with repair guidance, a redacted diagnostic summary, and a single-flight retry action.
  • Fence plugin/settings/sync write entry points until initialization succeeds; keep local interop disabled while blocked.
  • Read authority settings explicitly through the Vault adapter: Obsidian's loadData() can swallow malformed JSON/read errors and return undefined, which must not be mistaken for first-run defaults.
  • Preserve invalid settings and profiles rather than silently overwriting or discarding them.
  • Add tests of the actual Plugin.onload() orchestration and controller lifecycle.
  • Add an explicit opt-in obsidian CLI recovery acceptance runner with vault identity checks, fixture ownership, private backups, restoration verification, and no hosted requests.
  • Run test files serially so the existing wall-clock benchmark does not compete with other test-file startup work. Its threshold is unchanged.

Validation

  • 102 automated tests pass.
  • Lint, TypeScript/production build, and mobile bundle checks pass.
  • CLI runner syntax checked; unsafe existing test-vault state correctly refuses mutation.

Why this remains a draft

  • Connect LAB preflight is blocked: loopback port 28487 is owned by another process. No infrastructure takeover, browser/credential session, or hosted fixture was attempted.
  • Live Obsidian recovery acceptance is blocked: the registered test vault contains existing role/adoption metadata. The runner refused to modify it. A clean explicitly disposable vault is required.
  • Hosted end-to-end scenarios are documented as the next stage, not claimed implemented/passing by local tests.

See docs/recovery-and-lab-acceptance.md for scope, the runner command, remaining scenarios, and current blockers. No destructive checkpoint reset shortcut is included.

@callumalpass

Copy link
Copy Markdown
Collaborator Author

Superseded by #30.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant