feat(mobile): epic charter and Now-inbox ranking/snapshot schema seam (refs OpenCoven/psyche-build#208) - #294
Closed
CompleteDotTech wants to merge 2 commits into
Conversation
…#208) - docs/mobile/COCKPIT-EPIC-CHARTER.md: epic charter for psyche-i7c (objective, architecture invariants, constraints, success-criteria phase mapping, canonical outcome gh-200) - src/mobile/nowInboxRanking.ts: v1 pure ranking/schema contract — projectNowInboxEntries, nowInboxBucketOf, rankNowInbox (deterministic, bounded), validateWorkspaceSnapshot (strict, fail-closed, bounded) - __tests__/nowInboxRanking.test.ts: 25 tests over ordering, determinism, bounds, and validator rejections Refs #208
|
@CompleteDotTech is attempting to deploy a commit to the 0xBuns Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
|
Closing because this epic charter plus parallel TypeScript ranking model cannot complete #208 and duplicates current Swift product state. Keep the roadmap issue authoritative and deliver focused native slices. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
Epic charter + Now-inbox ranking/snapshot schema seam for Bead
psyche-i7c(OpenCoven/psyche-build#208, "[psyche-i7c] Mobile multiproject and multipane cockpit", P1 epic,in_progress):docs/mobile/COCKPIT-EPIC-CHARTER.md— the epic charter: objective (universal iPhone/iPad cockpit opening into a cross-project Now inbox, adaptive one/two-pane terminal workspaces, complete pane lifecycle via the paired host), four architecture invariants (protocol-v3 typed control envelopes over the paired TLS/Bonjour bridge; one canonical multiproject workspace snapshot to the SwiftWorkspaceStore; only one or two attached terminal streams; reuse existing host file/action/lifecycle logic), constraints (protocol-v2 compatibility, self-signed certificate pinning, published-workspace-resource scope, visibly stale offline state, iPhone + iPad validation), success-criteria mapping to the epic's phases, and canonical outcome Deliver the Psyche Build iOS internal beta and continuity loop #200.src/mobile/nowInboxRanking.ts(model v1) — pure, deterministic TS contract seam for the canonical workspace snapshot that the paired host publishes (mobile.workspace.snapshot.result→ SwiftWorkspaceStore): typed projectionprojectNowInboxEntries(),nowInboxBucketOf(),rankNowInbox()(Needs You → Running → Recent per the epic's acceptance criteria, recency then code-unit tie-breakers, bounded result with pre-truncation bucket counts), andvalidateWorkspaceSnapshot()(strict, fail-closed: unknown fields rejected, canonical enums/timestamps enforced, bounded sizes checked before enumeration).__tests__/nowInboxRanking.test.ts— 25 tests covering bucket assignment, ordering, determinism (including input-order permutation), result bounds/limit clamping/malformed-limit rejection, and validator accept/reject cases (including the canonicalWORKSPACE_SNAPSHOT_FIXTURE).Upstream PR/issue writes are token-denied for this pipeline's credentials (verified: push/PR-create/comment 403 on OpenCoven), so this PR runs on the fork
CompleteDotTech/psyche-buildwith real CI. The branch is ready for a maintainer one-click PR to upstream.Scope and boundaries
Additive only: three new files (
docs/mobile/COCKPIT-EPIC-CHARTER.md,src/mobile/nowInboxRanking.ts,__tests__/nowInboxRanking.test.ts) plus this working record. No existing file modified — no runtime, protocol, security, or behavior change.Not done (owned by their phase children): Now-inbox UI; pairing/Bonjour wiring (#216); terminal-stream attach/detach; pane lifecycle actions (#217, #218–#221); workspace cache (#210); stale/live reconciliation (#211); accessibility (#212); performance/acceptance matrix (#213); product/architecture docs (#214); final review/handoff (#215). Phase 10's plan and gate module live on the #209 branch (
src/mobile/phase10Gate.ts,docs/mobile/PHASE-10-RECOVERY-PLAN.md) — no file collision with this slice.Seam decisions: the module imports canonical snapshot types from
src/workspace/snapshot.tsviaimport type(erased at runtime; the module is I/O-free) instead of duplicating the snapshot shape;NOW_INBOX_RUNNING_STATUSESmirrors the host's privateisRunning()list with a provenance comment. The validator checks shape/types/bounds only — it does not police identity semantics (duplicates), which the canonical snapshot builder owns.Risk class
Validation and evidence
All commands run from the worktree on branch
psyche/issue-208-mobile-cockpit-contract(baseorigin/main@a4546f4; deliverable commit17980247aaa753bb7df0c14e785fa2e66678336e; working record added in the follow-up commit):npx pnpm install --frozen-lockfile→Done in 470ms using pnpm v10.34.5(exit 0)npx pnpm exec vitest --run __tests__/nowInboxRanking.test.ts→Tests 25 passed (25)npx pnpm exec vitest --run __tests__/nowInboxRanking.test.ts __tests__/bridge/mobileControlGateway.test.ts __tests__/bridge/mobileControlProtocol.test.ts→Test Files 3 passed (3),Tests 77 passed (77)(adjacent suites unaffected)npx pnpm exec tsc --noEmit→ exit 0npx pnpm exec tsc -p tsconfig.test.json --noEmit→ exit 0git diff --check→ cleanExplicit gaps: no iOS/Swift/simulator evidence on this host (no Xcode tooling) — Swift-side equivalence of the snapshot contract is a design claim from the shared canonical shape, not runtime-verified here; no tmux/Rust/paired-host evidence (not applicable to this pure-TS slice); full
scripts/agent-checkgate not run on this host (requires tmux) — CI supplies Linux runner evidence; the ranking is not yet consumed by any UI or bridge code (wiring belongs to phase children). Per the epic's implementation notes, the full Vitest suite has three pre-existing unrelated environment failures (pnpm version drift, BSD-stat checks); not reproduced/fixed here.Working record
docs/working-records/issue-208-mobile-cockpit-contract.md — outcome, scope/boundaries, risk class, exact commands + observed results, test counts, proof gaps, rollback notes.
Generated outputs
None. No generated artifact (
src/utils/generated-agents-doc.ts, Tauri bundles, Xcode project,dist/**) was created or modified.Security and privacy
/repo,%3,coven:review).Review focus
rankNowInboxordering contract (bucket → recency → project id → worktree path → pane id) matches the epic acceptance criterion "Now inbox ranks Needs You, Running, and Recent across projects" — including Needs-You-wins-over-Running and unknown-timestamps-last.validateWorkspaceSnapshotstrictness: unknown-field rejection (even whenundefined, matching the canonical fixture encoding), canonical Z-form ISO timestamps, and bounds-before-enumeration behavior on hostile input.NOW_INBOX_ENTRY_LIMIT256; projects 64; worktrees 64; panes/container 128; total panes 4096; string limits) — documented constants, easy to tune before any consumer lands.Release and support impact
None: no shipped behavior, protocol, dependency, or support-matrix change. This is a contract/charter slice that phase children (#209/#217/#216 and children) will build on; availability claims stay with gh-200 and the support matrix.
Refs #208