Skip to content

writer: make the workspace record-session port structural - #21

Merged
callumalpass merged 100 commits into
mainfrom
next/new-sdk
Oct 22, 2026
Merged

callumalpass merged 100 commits into
mainfrom
next/new-sdk

Conversation

@callumalpass

Copy link
Copy Markdown
Contributor

Scope

Structural application-port preparation for the native SDK migration. No new native backend, browser sign-in, auth shim, copied app session engine or file shim is introduced. The existing Connect and demo paths remain unchanged.

  • Replace the concrete Connect record lease/session classes at the WriterBackend/workspace boundary with explicit structural WriterRecords, RecordLease, RecordSession and snapshot interfaces.
  • Preserve current body/frontmatter, dirty/save/conflict/recovery/error/deletion and release semantics; current backends satisfy the port without runtime adapters.
  • Document remaining shared SDK prerequisites in docs/new-sdk.md.

The views workstream owns the shared native record-session/lease helper. This draft will be extended against that public API and a release-qualified packed SDK, not the historical proposed route/grant/session implementation in #16. No new-SDK browser mode or launch-readiness claim yet.

Validation

  • Frozen-lockfile install; typecheck; production build: pass (existing Vite large-chunk warning).
  • Core: 66 unit tests; writer: 193 unit tests plus 15 script tests: pass.
  • Isolated cold-cache headless Chromium, owned strict-port Vite on 48533: 53 baseline + reliability scenarios pass. Tests use isolated in-memory demo collections, not LAB/native parser/sign-in evidence.
  • git diff --check: pass.
  • Feedback-specific browser suite not run locally; CI includes it.

Integration prerequisites

Shared SDK record leases/session helper (views), native web collection/setup composition (tnapp), sign-in/join ledger (signin), qualified native file producer (keygrant), and any shared people-directory gaps. No deployment; production-repository merge remains coordinator-controlled.

@callumalpass

Copy link
Copy Markdown
Contributor Author

ACK aa1ea34

One-pass source review of all three paths: structural application lease/session ports and workspace type substitutions only. Existing Connect/demo runtime, draft/conflict/recovery behavior, and lease ownership/release calls stay unchanged. No SDK engine, auth, setup, or package/pin changes.

Independent owned-checkout checks: Node 22.23.3 frozen install, both workspace project typechecks, targeted workspace/drafts/Connect tests 63 PASS / 3 files, diff check, clean worktree.

This ACK is limited to the structural foundation. It does not qualify a new SDK adapter, native/browser behavior, runtime artifacts, or launch/deployment.

@callumalpass

Copy link
Copy Markdown
Contributor Author

Qualified corrected SDK561 + thin public SDK records lease adapter pushed at d7793aa over structural-port source-ACK aa1ea34. Archive SHA256/SHA512 verified. NextWriterRecords delegates client.records.open({path})/session methods, display JSON/Result only; native SDK owns autosave/peers/CAS/receipts/recovery. Genuine native snapshot retains original MID/record/receipt/write, owner signal fences open/flush delivery; no engine/factory/protocol/backend/UI enablement. Whole actual types/tests (core66/app203+15 scripts,2 existing skips), production build/frozen PASS; 10 focused including pending original MID/shared peer/late abort/atomic invalid patch. No configured Writer lint script or new browser/native matrix. Request clients 7-path delta per coordinator; integration next/new-sdk, main PR review only.

@callumalpass

Copy link
Copy Markdown
Contributor Author

ACK d7793aa

Single-pass requested SDK561 delta: Delta only from aa1ea: qualified561 pin and thin public records.open lease/session value/Result adapter. The SDK still owns capture/autosave/leases/CAS/receipt/conflict/recovery; original signal fences open/flush delivery and a late lease is released without closing the borrowed client. Explicit patch values are converted before the native patch call; genuine native snapshot retains original MID/record/receipt/write recovery evidence. Independent Node22 frozen install, 10 adapter tests, both project type checks and diff PASS. Owner full check/build attributed; existing backend/UI/runtime is not enabled by this new module.

Independent exact committed archive SHA256/SHA512, package/lock/provenance consistency and diff check PASS (638609 bytes, source561501d0). Evidence: .coord/scratch/clients-apps-sdk561-pin-check.json and the corresponding clients-*-sdk561-delta.diff.

Source/package ACK only. No SDK814 intake, native-runtime/default-backend switch, main cutover, browser/LAB/custody or operation acceptance. No autonomous merge/deploy.

@callumalpass
callumalpass marked this pull request as ready for review October 10, 2026 17:16
@callumalpass

Copy link
Copy Markdown
Contributor Author

Coordinator1742 authorised qualified SDK814 successor pin-only intake. Clean/pushed exacta2eb73a0f1d543ce3af0dd6d1a91f440c28fc4cb over ACKd7793aa; 6 package/lock/archive/metadata/docs paths only, records/session implementation/tests untouched. Archive8cbc82fb SHA256/SHA512 independently verified. Whole actualtypes/tests core66+app203+15scripts(2existingSKIP), production build/frozen PASS. Request one clients pin-only pass, no re-review unchanged code. Public SDK records delegation unchanged; ordinary readMany is not native atomic snapshot/People qualification. No runtime/serving/ops change; main PR review-only.

@callumalpass

Copy link
Copy Markdown
Contributor Author

ACK a2eb73a

Single-pass requested SDK814 successor pin-only delta from prior ACKed SDK561 head. Exactly six package/lock/provenance/docs/archive add-delete paths; no app implementation/tests/session/lease/read/write/backend/UI change or helper-alias rewrite. Independent exact committed archive SHA256/SHA512, qualified8cbc source, package/lock/provenance coherence and diff PASS. Owner full checks/build/frozen installs attributed; no unchanged source re-review, SDK repack or new matrix.

Existing source ACKs stand. Source/package only: not a native snapshot, People/native Files producer compatibility, per-app trust/origin/custody/operations, session/runtime/backend enablement or main cutover. Editor697 unchanged/no extra PR. Evidence .coord/scratch/clients-apps-sdk814-pin-check.json and clients-*-sdk814-pin.diff.

@callumalpass

Copy link
Copy Markdown
Contributor Author

Co1807 authorised batched qualified SDK816 pin-only update: exact5d0c0d743abd83ba0da491a92244b9a3369d4ff3 over SDK814 ACKa2eb73a. Six pkg/lock/archive/metadata/docs paths only; app source/tests untouched. Qualified9ab SHA256ab4d…+SHA512 verified. Whole actualtypes/tests/core66+app203+15scripts(2existingSKIP)/build/frozen PASS. Request one clients pin-only pass, no unchanged-code re-review. SDK records delegate unchanged; no runtime/factory/People/cutover/deploy claim.

@callumalpass

Copy link
Copy Markdown
Contributor Author

ACK 5d0c0d7

Single requested six-path SDK816 pin delta from the prior SDK814 ACK. Package/lock/docs/provenance and delete8cbc/add9ab archive only; no app source/tests/adapter/session/backend/UI/People/default-runtime change. Independently verified committed660679B archive SHA256/SHA512, exact source9ab provenance, package-lock paths and diff. Owner frozen/wholechecks/actualtypes/build evidence attributed, not repeated. Prior unchanged-code ACK stands; no new SDK/native/browser matrix, factory/People/nativeFiles producer qualification, runtime/main cutover or deployment authorization.

Set up Writer now opens a review instead of calling configure(). It
shows the SDK plan's summary and its plain per-change messages, and
only Confirm applies that exact plan. Cancel leaves the collection
untouched. If the collection changed during the review, setup_changed
plans it again for a fresh review. When every conflict can be resolved
with Writer's version, the review offers that choice.
… shows refusals

Only setup_changed proves nothing was written. An unconfirmed outcome
re-assesses and shows the fresh state; other errors use describeError copy.
A plan with nothing to review keeps the plain configure() path. The plan's
refusal message is shown.
- Home lists records with no type under "Notes without a type", with a calm
  "No type" label, and opens them. They are no longer dropped from view.
- An error-level issue on one of Writer's own type definitions makes only that
  type unavailable. Home names it in plain copy and everything else keeps
  working. A record with an invalid projection stays listed instead of
  blocking the collection.
- A stale, failed or closed change watch is recreated in the background, after
  0.5 s doubling to 30 s, resetting once active. It reloads after
  reconnecting. There is one watch and one timer at most, and both are
  cleared on dispose.
Vendor the dev SDK at e00c1ff839d7f2db8c88cccc5e946d4714f77762 (sha256 5e61b34d6c66070487f29e8328669eca83daa5b897819ee35face31b58eeef39),
replacing 1629d11e. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at af29edc960775e3a49899a1c27129116abc83589 (sha256 368d0f5758992dc611026690cb702ba40d781a4daa89e768236b6ed927aed7b1),
replacing e00c1ff8. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at 12c28ef1ee0d0d3a9e02b663de7eae9eed4321cf (sha256 d027a42c644b1518201e3a1b176ae6581ad212a0e329eb056a37acf572b5c235),
replacing af29edc9. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at 23a10ee45149a0c84a786a3e0cab882be3b655b8 (sha256 ca83734ce0c3a1836f3fa5c07dad2ee493b306e50d0bdee997087a0f92adcb09),
replacing 12c28ef1. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at ca8f0682cdda81fc8530c501137784ee5d122267 (sha256 93c193c23441a5efff7347b48b7afb2ba9345ab0112311d8f56b085da0d2e44a),
replacing 23a10ee4. Native runtime b52b152b320b (was 3b3ca2eb4108); bundled protocol unchanged.
Vendor the dev SDK at abc08f3e9e78a87a7fe7c418a183fe8128988657 (sha256 4e76945db7f77c0c092e666cffdc028cad2dec775e7087fef228af77e8a9affe),
replacing ca8f0682. Native runtime 8d18760c3a09 (was b52b152b320b); bundled protocol unchanged.
Vendor the dev SDK at e4450c267c8ab68f7b64faa34e8ed8ee098dbd5c (sha256 57d81d95201004d70c5cc9e65f05f1f33accaf78e15d86bdda15533d1f214ae2),
replacing abc08f3e. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at 3491a619ed8ecb5d27b71af8f725771b1eafa5cb (sha256 513f40611711107487b0002633110829a4f05a71c3a41b96721686a08d5469c7),
replacing e4450c26. Native runtime 965963fc2944 (was 8d18760c3a09); bundled protocol unchanged.
Vendor the dev SDK at 6f2b1e5141c3e93b8526c8207cdfc821d98ecdfd (sha256 4b45c3392a017781404e81ba3e8216e02c76c87fc1c21b0c7ac770a81252da53),
replacing 3491a619. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at 4c10b9a50322f96d79bcac99bb790816541292a3 (sha256 a95ff466a60636be5e72d71901ebc39e4f3aeb15cabb588ca294a85c9525de10),
replacing 6f2b1e51. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at 5c7b9592cc59b49f304f6bc63e5bf25c71701376 (sha256 369a7e15298c8fe90a1be817cf6f1cf15f023fa069755fd58c588019d4f0a30e),
replacing 4c10b9a5. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at 6f14ebe1f361d0f72d34b80fbe9746e50ac89737 (sha256 91f009ceb334d01427b8a9529393676bec2ee719dc1ca9e69f3d6a14c89708e1),
replacing 5c7b9592. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at 0f5724efe20d66420cc78a412e8db62fc0c9b292 (sha256 59853f6b10c09c53a5c303a83311c293852c4730f3fbd4438ce6a3dec158a1eb),
replacing 6f14ebe1. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at 106d36ffc6ae0c59a509229d5eaed00515b603bd (sha256 338ea5fc2ada5df3e5bbaad9cb3609a8d042776e5b6cd45ab93825303da40582),
replacing 0f5724ef. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at f1aa67e3bba5d7a5223541fd8f843792e2eb72e2 (sha256 451acc80a17d1a4a9294e1a843d2f18aeeb13d47b8111a7684947511ea459ef0),
replacing 106d36ff. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at bef3fe454ca3214b940b3549efcbe37c2765bc70 (sha256 9b995c83b8143bec71a3cbd0d1cb2669393e2278236a272722890a9504d19b7b),
replacing f1aa67e3. Native runtime and bundled protocol unchanged.
Vendor the dev SDK at 3f417b6d941a42444f17568d7489071d23fcb141 (sha256 0c5f04c6adad67d747055ebe12963403e374aefde0999861d759f35e4e118ba6),
replacing bef3fe45. Native runtime and bundled protocol unchanged.
@callumalpass
callumalpass merged commit ff6dc64 into main Oct 22, 2026
1 check failed
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