Skip to content
This repository was archived by the owner on Jul 14, 2026. It is now read-only.

Harden fbrain transport and working-tree sync - #46

Closed
AustinKelsay wants to merge 11 commits into
stagingfrom
feature/fbrain-transport-working-tree-sync
Closed

AustinKelsay wants to merge 11 commits into
stagingfrom
feature/fbrain-transport-working-tree-sync

Conversation

@AustinKelsay

Copy link
Copy Markdown
Contributor

Summary

Implements the rollout-critical fbrain path for issues #44 and #45 from PRD #43:

  • resolves fbrain server URLs via explicit --server, saved working-tree URL, FINITE_BRAIN_SERVER_URL, then legacy FINITE_BRAIN_PUBLIC_BASE_URL
  • supports HTTPS transport while restricting plaintext http:// to localhost/loopback and disabling redirects
  • opens encrypted Folder Key Grants, materializes readable Vault Working Trees, and pushes local markdown create/update/move/delete changes through signed encrypted object routes
  • stores fbrain-created page path metadata inside the encrypted Folder Object plaintext envelope so other machines can materialize the same paths without leaking paths to the server
  • records local conflicts instead of pushing with stale or missing current Folder Keys
  • restores Product Client asset parity required by the branch's existing asset assertions

Issues

Verification

  • cargo fmt --check && cargo check --workspace && cargo test --workspace && cargo clippy --workspace --all-targets -- -D warnings && cargo build && git diff --check
  • cargo test -p finite-brain-cli
  • cargo test -p finite-brain-server product_client_serves_spine_assets_and_config
  • node crates/finite-brain-server/src/product-client.test.js
  • node scripts/verify-obsidian-product-client.mjs
  • Live fbrain smoke on http://127.0.0.1:4019 with temp DB /tmp/fbrain-sync-smoke-final.LlHQ5M/finite-brain.sqlite3: auth login, vault create personal-final, open, create/update/delete home/final.md through sync now, final latestSequence=3, conflicts=[]

Review

  • Local CodeRabbit completed 3 rounds through the free CLI allowance.
  • Valid findings were addressed; one nostr::JsonUtil import finding was recorded as a false positive because clean workspace check/test/clippy pass without it.
  • Evidence: docs/feature-dev/2026-06-27-local-coderabbit-fbrain-transport-working-tree-sync.md

Notes

  • Resident daemon/file-watch sync remains future hardening; command-driven open, daemon start, daemon tick, and sync now use the real sync path.
  • No production deploy, production migration, or live data operation is included.

@AustinKelsay

Copy link
Copy Markdown
Contributor Author

@CodeRabbit full review

@AustinKelsay

Copy link
Copy Markdown
Contributor Author

PR CodeRabbit fallback recorded: @coderabbit full review was posted at 2026-06-27T15:09:29Z and stayed silent through 2026-06-27T15:30:43Z. Local CodeRabbit completed 3 rounds before push; all valid findings were fixed, one false positive was recorded, final clean full verification and live smoke passed, and current PR CI is green. Evidence: docs/feature-dev/2026-06-27-pr-coderabbit-fbrain-transport-working-tree-sync.md.

@AustinKelsay

Copy link
Copy Markdown
Contributor Author

Hard-cut completed directly to main in 7473dc9, so this staging PR is now obsolete.

@AustinKelsay
AustinKelsay deleted the feature/fbrain-transport-working-tree-sync branch July 5, 2026 20:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant