Skip to content

feat(pion/client-core): close Wave B6b-1b1 lock handover, moved, admits & crowd parity - #10429

Open
CommaBot wants to merge 9 commits into
mainfrom
feat/core-wave-b6b1b1-handover-admits
Open

CommaBot wants to merge 9 commits into
mainfrom
feat/core-wave-b6b1b1-handover-admits

Conversation

@CommaBot

@CommaBot CommaBot commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Closes Wave B6b-1b1 — Handover / Moved / Admits / Crowd / Model 8-File Test Closure + #10308 R11 Astra P2-1 in pure Pion (pion/client-core), including Round 2 & Round 3 (Astra + Sol v2 Architectural & Review Closure).

  • 8 TypeScript lock handover/moved/admission/crowd/model test suites (134 / 135 full parity + [39] single-account per-peer framing & left.first isolation closed; [39] cross-account sibling pairing honestly scoped below) plus #10308 R11 Astra P2-1 (cc_lock_pair_admission.pion).
  • Explicit multi-account runtime dependency note (lock-admits.test.ts [39]): ClientCore and core_runtime (pair_mesh.pion:102, cloud_wiring.pion:633) currently mount a single active account at a time (effective_sub()). Round 3 removes R2's ad-hoc sibling-account personal-lock bypass (~610 net production lines removed), preserves clean per-approver build_pair_hello_for_peer dial framing (>56 KiB multi-workspace trimming, moved-vs-unmoved personal-log scoping, ordinary-vs-left.first frame isolation, and in-flight first cancellation) under the mounted account, and tracks the cross-6-sibling-account half of lock-admits.test.ts [39] under the dedicated core_runtime multi-account membership/credential/personal-lock wave (zero fake green).
  • Zero CI workflow changes (.github/workflows/pion-ui.yml untouched), zero debug_assert(, zero self-referencing closures, all 603 production .pion files within the 1,500-line ceiling (OVER = 0), and every P1 verified via isolated runtime revert-falsification (回退必败).

Round 3: First-Principles Architectural & Final Review Closure (Astra + Sol v2)

Item Reviewer Ref Production / Test Files Fix & Regression Summary Runtime Revert-Falsification (回退必败)
R3-1 Astra R2 + Sol v2 R2 (Cross-Account Scope) cc_lock_write.pion, cc_lock_state.pion, cc_lock_refusal.pion, cc_lock_pair_targets.pion, cc_lock_pair_admission.pion, cc_lock_pair_new.pion, b6b1b1_r2_review_test.pion Removed ad-hoc sibling-account personal-lock engine (other_person_locks / pair_refresh_other_sub_k / pair_begin_other_sub_k); retained clean single-account per-peer build_pair_hello_for_peer dial wiring (>56 KiB multi-workspace trimming, moved vs unmoved log scoping, ordinary vs left.first isolation, in-flight first cancellation) and documented [39] cross-account runtime wave dependency. 0 compile errors; panics at runtime in b6b1b1 r2 P1-1 [39]
R3-2 Astra P1-2 + Sol P1-2 cc_lock_pair.pion, cc_lock_pair_new.pion, cc_lock_pair_admission.pion, cc_personal_join.pion, cc_lock_adopt.pion, b6b1b1_r2_review_test.pion Allocated monotonic Int64 request generation (pair.begin_seq via pair_claim_begin_seq) before any async pre-read (key_k, personal_refresh_k, personal_make_k, lock_signer_made_k), invalidated on lock.pairCancel, new lock.pair / personalJoin / adoptNewRoot, and account switch; added cancel, out-of-order reopen, and account-switch regressions asserting 0 stale dials. 0 compile errors; panics at runtime in b6b1b1 r3 R3-2
R3-3 Astra P1-4 cc_lock_pending.pion, cc_lock_pair_trusted.pion, b6b1b1_r2_review_test.pion Changed find_waiting_added_pending to return Result[Option[(String, String)], String] via lock_pending_read_pair_checked; failed closed with Err("storage") before signing (0 Cloud POSTs, never degrading invited "admin"/"owner" to "member") on SQLite read/corrupt errors; kept post-commit drop_lock_pending_by_id non-fatal with idempotent pending:<email> cleanup in reconcile_lock_pending_on_hold & deliver_lock_pending_step_k. 0 compile errors; panics at runtime in b6b1b1 r3 R3-3
R3-4a Sol P2-1 cc_lock_pair_trusted.pion, b6b1b1_r2_review_test.pion Traversed both workspaces and fallbackWorkspaces in pair_locks_to_read (1:1 pair.ts:215,422); extended b6b1b1 r2 P1-2 to cover minimal checked hello stale-lock refresh. 0 compile errors; panics at runtime in b6b1b1 r2 P1-2
R3-4b Astra P2-1 cc_lock_read.pion, cc_lock_read_decide.pion, b6b1b1_r2_review_test.pion Checked lockPending items non-empty before computing was.entries hashes on unchanged-head lock reads; added regression proving 0 entry hashes computed when lockPending is absent or empty. 0 compile errors; panics at runtime in b6b1b1 r3 R3-4b

Round 2: Astra + Sol v2 Non-Cross-Account Items Verified Closed (11 / 12)

Item Reviewer Ref Production / Test Files Summary
P1-2 Sol P1-1 + Astra P2-1 cc_lock_pair_trusted.pion, lock_pair_test.pion, b6b1b1_r2_review_test.pion Included need_lock && stale.length() > 0 in pair_served_hello bounded refresh trigger and passed real stale list to pair_refresh_for_hello.
P1-3 Astra P1-2 cc_lock_chain.pion, cc_lock_read_decide.pion, b6b1b1_r2_review_test.pion Invoked reconcile_lock_pending_on_hold on unchanged-head early returns (1:1 views/lock.ts:1877), draining stationless cold-restart waiting -> took via Cloud CAS.
P1-4 Astra P1-3 cc_lock_state.pion, cc_lock_chain.pion, cc_lock_pending.pion, cc_calls_lock.pion, b6b1b1_r2_review_test.pion Atomic lockPending delete inside persist_lock_state_for_workspace swap transaction + Err("storage") propagation in lock.pendingDismiss.
P1-5 Sol P1-3 cc_lock_pair_trusted.pion, cc_lock_pending.pion, b6b1b1_r2_review_test.pion Non-destructive find_waiting_added_pending before lock_append_k preserving invited "admin" role across retryable CAS 409 ReSign.
P2-1..P2-7 Astra P2-2..5 + Sol P2-1..3 cc_lock_pair_moved.pion, cc_lock_write.pion, cc_lock_pending.pion, cc_lock_handover_view.pion, cc_lock_handover.pion, b6b1b1_*_test.pion Independent 5,000ms timeout on second carried-unbound personal refresh; monotonic Int64 deliver_seq token; unified HANDOVER_WAITED_LINES = 6; LOCK_PENDING_FAILED_MOST = 8; State4 m8 parity across 48 seeds; interleaved held S1 off /lock/given + S2 left; cold-restart SQLite + host kv handover recovery.

Round 1: Item-by-Item Coverage Mapping (8 TS Test Suites + #10308 R11 P2-1)

Suite TS Items Pure Pion Test File & Block(s)
Item 0 (#10308 R11 Astra P2-1) Ordinary dual-workspace [A, B] approving only A strips unapproved B vault handover b6b1b1_pair_vault_test.pion
1. lock-handover-model.test.ts (1) [1] planHandover vs lock-roster4-model m8 across 24 seeds × {away: false, away: true} b6b1b1_model_parity_test.pion + b6b1b1_roster_model_test.pion
2. lock-moved-state.test.ts (2) [1] Drawn worlds (V3 × [free, faults] × 3 seeds × 120 steps + shuffled order) vs World4; [2] Scripted worlds (m2, m5Clock, revoked, m6, m7, m8) vs World4 b6b1b1_model_parity_test.pion + b6b1b1_world4_model_test.pion + b6b1b1_world4_state_test.pion
3. lock-moved.test.ts (13) [1]-[8] Core moved invariants; [9]-[13] Fork switch, lacking open fallback, off-log writers, displaced aside, moved lockPending failure & drain lock_moved_test.pion + b6b1b1_lock_moved_test.pion
4. lock-handover-crowd.test.ts (5) [1]-[5] 300-member & 100-member crowd handover, 9274/9275 build gate, heads wait & upgrade.lines, 20-member fast path b6b1b1_handover_crowd_test.pion
5. lock-handover-crowd-reads.test.ts (2) [1] Differential reads at N = 50 & N = 300 + 0 redundant body hashes; [2] Truncated /lock/given non-standing + stillfail-resumed: 1 reread b6b1b1_handover_crowd_test.pion
6. lock-handover.test.ts (42) [1]-[42] Explicit & automatic moved_by_self handover, split-owner meet, 14-day hold, station gates, moved disable/open, confirmSigner, carried unbound piggyback bind & noLog 1-ask begin + bind, cold-restart recovery lock_handover_test.pion + b6b1_lock_work_test.pion + b6b1b1_handover_test.pion
7. lock-adopt-new-root.test.ts (22) [1]-[22] Unmoved & moved lock.adoptNewRoot, rogue person:<sub> rejection, station-newer ownRoot revocation, unadmitted wipe/reload, extra_devices collision, interleaved S1 off + S2 left lock_adopt_test.pion + b6b1b1_adopt_root_test.pion
8. lock-admits.test.ts (47) [1]-[38],[40]-[47] Full parity (lock_pair_moved_test.pion, b6b1_lock_*_test.pion, b6b1b1_lock_admits_test.pion); [39] Single-account per-peer >56 KiB framing, moved vs unmoved log scoping, ordinary vs left.first isolation & in-flight first cancellation in b6b1b1_r2_review_test.pion (cross-6-sibling-account pairing tracked under core_runtime multi-account wave) lock_pair_moved_test.pion + b6b1_lock_admission_test.pion + b6b1_lock_begins_test.pion + b6b1_lock_refusal_test.pion + b6b1b1_lock_admits_test.pion + b6b1b1_r2_review_test.pion

Model(s) used: Gemini 4 Carbon (agy)
Test frameworks run: pionc test (pion/rules, pion/client-core/packages/sync, pion/client-core/packages/views, pion/client-core/packages/core_runtime debug & release), pionc build --target wasm32, node --test (schema-chat-tag.test.mjs, core-perf-gate.test.mjs, live-contract-cloud-station.test.mjs), scripts/agents-paths.ts, pion/client-core/scripts/check-structure.mjs, scripts/gen-pion-i18n.mjs --check, scripts/i18n-words.ts --target pion-core

@CommaBot
CommaBot force-pushed the feat/core-wave-b6b1b1-handover-admits branch from a18bb0a to a7fddf6 Compare December 5, 2026 20:37

This branch has not been deployed

No deployments
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.

2 participants