anbot

d608636 / README.md

View file at this commit

diff --cc README.md
index b037b37,ac90254..b2f28e5
--- a/README.md
+++ b/README.md
@@@ -73,12 -95,36 +95,41 @@@ Posts use the same signed ANProto envel
  as `{"anbot":1,"type":"post","text":"Hello from ANBot"}`. Replies add a `replyTo`
  field with the parent post's canonical Base64 record ID. Text is limited to
  4096 UTF-8 bytes. Signed posts live in `posts/` under the node data directory.
 -The feed reads and verifies those local records on demand. Node-to-node feed
 -replication and following are future work.
 +The feed refreshes in place every three seconds while its browser tab is
 +visible. This also works in author and reply views. The feed remains readable
 +with JavaScript disabled.
 +
- The feed reads and verifies those local records on demand. Node-to-node feed
- replication and following are future work.
++The feed verifies local and synced records on demand. Run `anbot.mjs sync`
++against a peer serving the same repository to pull signed posts, replies,
++and Git push announcements. Repeated pulls deduplicate by record ID.
+ 
+ ## Browser peers
+ 
+ The core modules (`core.mjs`, `store.mjs`, `store-browser.mjs`, `sync.mjs`)
+ run unchanged in the browser: signing and verification over WebCrypto, AndFS
+ chunking and manifest validation, and the `fetch`-based pull client. A
+ browser peer syncs, verifies, and holds records and blocks; it does not
+ materialize Git repositories or serve Git HTTP.
+ 
+ `createBrowserStore` in `store-browser.mjs` stores records, blocks, and the
+ selection in the Origin Private File System first, with IndexedDB as a
+ fallback where OPFS is unavailable. Browser durability has honest limits: no
+ fsync exists in a browser, so a crash may lose the most recent writes; the
+ no-overwrite rule is best-effort across tabs; and the browser may evict the
+ stored data under storage pressure. The verify-then-select rule still holds:
+ the selection advances only after the bundle verifies, and unverified bytes
+ are never stored under a verified ID.
+ 
+ Run the browser harness, which exercises sign/verify, an AndFS round-trip,
+ both store backends, and a pull against a local node in headless Chromium:
+ 
+ ```sh
+ sh test/browser.sh
+ ```
+ 
+ Override the Chromium path with `ANBOT_TEST_CHROME`, and the node and static
+ server ports with `ANBOT_TEST_BROWSER_NODE_PORT` and
+ `ANBOT_TEST_BROWSER_STATIC_PORT` (defaults 18798 and 18799).
  
  ## Authorize an agent to push
  

Git ยท Social feed