Skip to content

feat: move native app persistence onto surreal#130

Merged
ibourgeois merged 1 commit intomainfrom
codex/feat-120-native-surreal-foundation
Mar 27, 2026
Merged

feat: move native app persistence onto surreal#130
ibourgeois merged 1 commit intomainfrom
codex/feat-120-native-surreal-foundation

Conversation

@ibourgeois
Copy link
Copy Markdown
Contributor

Summary

  • override the NativePHP runtime so packaged desktop auth, sessions, cache, and queue state resolve to SurrealDB
  • add a dedicated native runtime persistence configurator and regression coverage
  • document the packaged desktop persistence model in the README and NativePHP docs

Closes #120

Testing

  • '/Users/ibourgeois/Library/Application Support/Herd/bin/php84' artisan cache:clear --no-interaction
  • '/Users/ibourgeois/Library/Application Support/Herd/bin/php84' vendor/bin/pint --dirty --format agent
  • '/Users/ibourgeois/Library/Application Support/Herd/bin/php84' artisan test --compact tests/Feature/NativeRuntimePersistenceTest.php tests/Feature/FortifyAuthenticationTest.php tests/Feature/SurrealSessionDriverTest.php tests/Feature/DatabaseCacheOnSurrealTest.php tests/Feature/SurrealQueueDriverTest.php

Copilot AI review requested due to automatic review settings March 27, 2026 01:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns the packaged NativePHP desktop runtime with Katra’s Surreal-first persistence strategy by ensuring core Laravel state (auth/users, sessions, cache, queues) uses SurrealDB rather than NativePHP’s internal SQLite defaults.

Changes:

  • Introduces a native-runtime persistence configurator that rewires database/session/cache/queue config to SurrealDB when running under NativePHP.
  • Adds a feature test that boots a local SurrealDB runtime and asserts auth/session/cache state is stored on the Surreal connection.
  • Documents the desktop persistence model in both the NativePHP development docs and the README.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/Feature/NativeRuntimePersistenceTest.php Regression test validating native runtime persistence (DB/session/cache/queue) resolves to SurrealDB.
app/Support/Native/NativeRuntimePersistence.php New configurator that applies the NativePHP desktop persistence overrides.
app/Providers/NativeAppServiceProvider.php Invokes the persistence configurator during native runtime boot.
config/nativephp.php Adds an explicit nativephp.persistence configuration block for desktop persistence defaults.
docs/development/nativephp.md Documents the Surreal-first desktop persistence model and customization entrypoints.
README.md Summarizes the desktop persistence model for contributors/users.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ibourgeois ibourgeois merged commit a6aa876 into main Mar 27, 2026
5 checks passed
@ibourgeois ibourgeois deleted the codex/feat-120-native-surreal-foundation branch March 27, 2026 01:56
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.

feat: move the packaged app auth foundation fully onto SurrealDB

2 participants