Eve library

Native apps · chapter 1 · evidence · 7 October 2026

Evidence

Revision 3

On this page

Pinned excerpts and command output behind the chapter's slides (guide v1-1-native) and its brief (Eve document 5e23d39a-4a53-4dc1-ab00-a45b88e68855). Every excerpt is the repository at commit b6f1ccf1c111a1b364faa114524aad0181975ed5, copied by the command shown above it. The test run is of the working tree on 7 October 2026. No build ran on a device or a simulator.

Counts and constants read from the code#

Produced by check-data.py in docs/audits/presentation-center-eve-redesign-v1-1-native/2026-10-07/, which reads each value from the pinned source and compares it with the words on the slides. All seventeen comparisons were equal. The values it read:

json
{
 "tabRoutes": [
  "index",
  "explore",
  "activity",
  "library",
  "profile"
 ],
 "queuedActionTypes": [
  "activity.mark_all_seen",
  "activity.toggle_seen",
  "ideation.capture"
 ],
 "activityHandlersReturnWithoutCredential": {
  "activity.mark_all_seen": true,
  "activity.toggle_seen": true
 },
 "captureHandlerChecksCredential": false,
 "retryPolicy": {
  "maxAttempts": 4,
  "initialDelayMs": 1000,
  "maxDelayMs": 30000,
  "multiplier": 2
 },
 "queueStates": "'queued' | 'retrying' | 'needs_retry'",
 "providerPassesStorage": false,
 "providerPassesClassifier": false,
 "controllerDefaultsToMemoryStorage": true,
 "captureSendsIdempotencyKey": false,
 "captureCommentNamesSecondInboxRow": true,
 "captureClientRetries": 0,
 "captureRouteRequiresAuth": true,
 "onlineActivityRollback": true,
 "protocolVersion": 1,
 "messageTypes": [
  "stats_snapshot",
  "preferences",
  "breath_timeline",
  "rail_tile",
  "session_event",
  "session_completed",
  "sync_request"
 ],
 "phoneOriginatedIgnoredInbound": [
  "stats_snapshot",
  "preferences",
  "breath_timeline",
  "rail_tile"
 ],
 "inboundHandled": [
  "session_event",
  "session_completed",
  "sync_request"
 ],
 "otherVersionRefused": true,
 "undecodableDroppedWithoutReply": true,
 "eventForUnknownSessionIgnored": true,
 "transportReportsNotConfigured": true,
 "liveActivitiesDeclared": [
  true
 ],
 "iosNativeTargets": 1,
 "iosProjectNamesWidgetOrActivityKit": false,
 "watchPluginExists": true,
 "breathSourceNamesBatteryAndSkin": true
}

Test run on the working tree#

npx jest src/wearable in apps/oshun/mobile, 7 October 2026:

text
Test Suites: 2 passed, 2 total
Tests:       22 passed, 22 total

The offline queue: what is replayed, and with what#

The three replay handlers. The two Activity handlers return when no credential exists; a return is success to the queue. The capture handler does not check.

git show b6f1ccf1c111:apps/oshun/mobile/src/offline/offline-provider.tsx, lines 89 to 96:

text
   89    // EVE-VIS-221: these replay handlers used to skip on `!devAuthToken`, which
   90    // in any build without the env var meant every queued notification action was
   91    // dropped and reported to the queue as done. Ask whether a credential exists
   92    // at all instead — a signed-in member now has one, and a guest genuinely has
   93    // nothing to replay with.
   94    const hasCredential = useCallback(async (): Promise<boolean> => {
   95      return Boolean((await getAccessToken()) ?? devAuthToken ?? null);
   96    }, [devAuthToken, getAccessToken]);

git show b6f1ccf1c111:apps/oshun/mobile/src/offline/offline-provider.tsx, lines 104 to 154:

text
  104      async (item): Promise<void> => {
  105        const forcedFailure = consumeOfflineReplayFailure(item.type);
  106        if (forcedFailure) {
  107          throw new Error(forcedFailure);
  108        }
  109  
  110        switch (item.type) {
  111          case 'activity.mark_all_seen': {
  112            const ids = Array.isArray((item.payload.data as { ids?: unknown[] }).ids)
  113              ? ((item.payload.data as { ids: unknown[] }).ids.filter(
  114                  (value) => typeof value === 'string'
  115                ) as string[])
  116              : [];
  117  
  118            if (ids.length === 0 || !(await hasCredential())) {
  119              return;
  120            }
  121  
  122            await client.markNotificationsRead(ids);
  123            return;
  124          }
  125  
  126          case 'activity.toggle_seen': {
  127            const payload = item.payload.data as { id?: unknown; read?: unknown };
  128            if (typeof payload.id !== 'string' || payload.read !== true || !(await hasCredential())) {
  129              return;
  130            }
  131  
  132            await client.markNotificationRead(payload.id);
  133            return;
  134          }
  135  
  136          case 'ideation.capture': {
  137            // A queued idea capture (P16.5). The payload IS the BFF
  138            // capture input, stored verbatim at enqueue time. Failures
  139            // throw so the queue's retry/needs-retry machinery applies —
  140            // swallowing one would silently drop a captured idea.
  141            const payload = item.payload.data as {
  142              title?: unknown;
  143            };
  144            if (typeof payload.title !== 'string' || payload.title.trim().length === 0) {
  145              // A malformed record can never succeed; retrying it forever
  146              // would wedge the queue behind it.
  147              return;
  148            }
  149            await client.captureIdea(item.payload.data as Parameters<typeof client.captureIdea>[0]);
  150            return;
  151          }
  152  
  153          default:
  154            throw new Error(`No offline sync handler registered for ${item.type}.`);

The queue is constructed with a retry policy only: no storage and no failure classifier.

git show b6f1ccf1c111:apps/oshun/mobile/src/offline/offline-provider.tsx, lines 60 to 67:

text
   60    controllerRef.current ??= new OfflineQueueController({
   61      retryPolicy: E2E_AUTOMATION_ENABLED
   62        ? {
   63            ...DEFAULT_RETRY_POLICY,
   64            maxAttempts: 1,
   65          }
   66        : undefined,
   67    });

git show b6f1ccf1c111:apps/oshun/mobile/src/offline/offlineQueueController.ts, lines 143 to 149:

text
  143      this.now = now;
  144      this.queue =
  145        options.queue ??
  146        new OfflineSyncQueue(options.storage ?? new MemoryOfflineStorage(), () => new Date(now()));
  147      this.retryPolicy = options.retryPolicy ?? DEFAULT_RETRY_POLICY;
  148      this.processAction = options.processAction ?? null;
  149      this.classifyFailure = options.classifyFailure;

git show b6f1ccf1c111:libs/oshun/offline/src/retry.ts, lines 3 to 8:

text
    3  export const DEFAULT_RETRY_POLICY: RetryPolicy = {
    4    maxAttempts: 4,
    5    initialDelayMs: 1000,
    6    maxDelayMs: 30_000,
    7    multiplier: 2,
    8  };

The same two early returns are in the working tree on the day of writing:

git show HEAD:apps/oshun/mobile/src/offline/offline-provider.tsx | grep -n 'hasCredential())':

text
118:          if (ids.length === 0 || !(await hasCredential())) {
128:          if (typeof payload.id !== 'string' || payload.read !== true || !(await hasCredential())) {

The capture: no idempotency key, and a route that requires a member#

git show b6f1ccf1c111:apps/oshun/mobile/src/network/oshun-bff-client.ts, lines 614 to 638:

text
  614      /**
  615       * Idea quick-capture (P16.5) — `POST /v1/ideation/capture`, the BFF
  616       * bridge into the hathor ideation inbox. THROWS on failure rather
  617       * than returning null: the caller must distinguish "network gone —
  618       * queue it" from "rejected — show why", and a swallowed error would
  619       * let a capture vanish while looking saved.
  620       */
  621      async captureIdea(input: BffIdeaCaptureInput): Promise<BffIdeaCaptureResponse> {
  622        const authToken = getAuthToken ? await getAuthToken() : null;
  623  
  624        const response = await requestJson<BffIdeaCaptureResponse>(
  625          `${trimBaseUrl(baseUrl)}/v1/ideation/capture`,
  626          {
  627            method: 'POST',
  628            headers: authToken ? { authorization: `Bearer ${authToken}` } : undefined,
  629            body: input,
  630            // No automatic retries on a write: the offline queue owns
  631            // retry, and a duplicate capture is a real cost (a second
  632            // inbox row), unlike a re-read.
  633            retries: 0,
  634            timeoutMs: 8_000,
  635          }
  636        );
  637        return response.data;
  638      },

git show b6f1ccf1c111:apps/oshun/bff/src/routes/ideation-capture.ts, lines 133 to 144:

text
  133    app.post(
  134      '/v1/ideation/capture',
  135      { preHandler: [abuseProtection, authProtection] },
  136      async (request: FastifyRequest, reply: FastifyReply): Promise<void> => {
  137        const authContext = request.authContext;
  138        if (!authContext) {
  139          reply.code(401).send({
  140            message: 'Authentication required',
  141            reason: 'missing_auth_context',
  142          });
  143          return;
  144        }

The watch envelope#

git show b6f1ccf1c111:apps/oshun/mobile/src/wearable/watchBridgeCodec.ts, lines 20 to 39:

text
   20  export const WEARABLE_PROTOCOL_VERSION = 1;
   21  
   22  export type WearableMessageType =
   23    | 'stats_snapshot'
   24    | 'preferences'
   25    | 'breath_timeline'
   26    | 'rail_tile'
   27    | 'session_event'
   28    | 'session_completed'
   29    | 'sync_request';
   30  
   31  const MESSAGE_TYPES: readonly WearableMessageType[] = [
   32    'stats_snapshot',
   33    'preferences',
   34    'breath_timeline',
   35    'rail_tile',
   36    'session_event',
   37    'session_completed',
   38    'sync_request',
   39  ];

git show b6f1ccf1c111:apps/oshun/mobile/src/wearable/watchBridgeCodec.ts, lines 125 to 137:

text
  125  export function decodeWearableMessage(raw: string): WearableBridgeMessage {
  126    let envelope: { v?: unknown; type?: unknown; payload?: unknown };
  127    try {
  128      envelope = JSON.parse(raw) as typeof envelope;
  129    } catch {
  130      throw new WearableCodecError('malformed_envelope', 'not json');
  131    }
  132    if (!envelope || typeof envelope !== 'object') {
  133      throw new WearableCodecError('malformed_envelope', 'not an object');
  134    }
  135    if (envelope.v !== WEARABLE_PROTOCOL_VERSION) {
  136      throw new WearableCodecError('unsupported_version', String(envelope.v));
  137    }

git show b6f1ccf1c111:apps/oshun/mobile/src/wearable/watchCompanionBridge.ts, lines 160 to 206:

text
  160    handleEnvelope(envelope: string): void {
  161      let message: WearableBridgeMessage;
  162      try {
  163        message = decodeWearableMessage(envelope);
  164      } catch {
  165        // An undecodable envelope is dropped: protocol mismatches must not
  166        // crash the shell, and there is nothing safe to do with the bytes.
  167        return;
  168      }
  169  
  170      switch (message.type) {
  171        case 'session_event':
  172          this.applySessionEvent(message.event);
  173          break;
  174        case 'session_completed':
  175          this.applySessionCompleted(message.session);
  176          break;
  177        case 'sync_request':
  178          void this.pushStats();
  179          void this.pushPreferences();
  180          void this.pushRailTile();
  181          break;
  182        case 'stats_snapshot':
  183        case 'preferences':
  184        case 'breath_timeline':
  185        case 'rail_tile':
  186          // Phone-originated types; ignore if echoed back by a peer.
  187          break;
  188      }
  189    }
  190  
  191    private applySessionEvent(event: WatchSessionEvent): void {
  192      const session = this.stores.getSessions().find((entry) => entry.sessionId === event.sessionId);
  193  
  194      if (event.control === 'complete') {
  195        // Completion clears the companion surface, matching the Tara
  196        // session-sync semantics for terminal phases.
  197        this.stores.removeSession(event.sessionId);
  198        return;
  199      }
  200  
  201      if (!session) {
  202        return;
  203      }
  204  
  205      const transitioned = applyActiveCompanionControl(session, event.control);
  206      const progressPercent =

Live Activities: declared, with one native target#

git show b6f1ccf1c111:apps/oshun/mobile/app.json | grep -n NSSupportsLiveActivit:

text
37:        "NSSupportsLiveActivities": true,
38:        "NSSupportsLiveActivitiesFrequentUpdates": true,

git show b6f1ccf1c111:apps/oshun/mobile/ios/OSHUN.xcodeproj/project.pbxproj | grep -c 'isa = PBXNativeTarget':

text
1

git show b6f1ccf1c111:apps/oshun/mobile/ios/OSHUN.xcodeproj/project.pbxproj | grep -ciE 'widgetkit|activitykit|app-extension':

text
0

What was not kept#

No device, simulator or watch was used, so there is no log of one. The draft render's measurements and the axe results are in the record directory named above, not in this document.