Skip to content

moooon

Motir

Vibe your whole project. Bring an idea — Motir's three AI layers plan it, track it, and ship it, end to end. You're looking at Motir, built in Motir.

  • Vibe Project
  • Open Source
  • AI Agent
  • AI Loop
1
requests
0
upvotes
145
planned
1,361
shipped

Motir · Roadmap

MOTIR-4037Done

Story-level vitest — coverage floor, integration seams, and the single-reader/architecture guards (both arms)

Opened by Zhu Yue ·

The story's mandatory coverage + integration + guard gate, run AFTER the feature subtasks merge. Three jobs at run time:

  1. Coverage floor — run coverage over the story's changed surface and, wherever below the ≥90% branch/fn/line floor, write the missing unit/branch tests.
  2. Integration seams — drive the gate's real output through its consumers over real Postgres: a public route with MOTIR_CLOUD unset → 404 and set → 200 (both arms); setAccessLevel rejecting public while accepting open/limited/private.
  3. Architecture / contract guards — the guarantees coverage cannot see: the single-reader rule project-wide (no non-billing caller of isCloudBilling(), MOTIR_CLOUD read only through isCloud()), and no raw process.env['MOTIR_CLOUD'] read outside the named predicate.

Acceptance criteria

  • Coverage ≥90% branch/fn/line on every file the story's subtasks touched; missing tests written to reach it.
  • Integration seams: the gate's real behaviour driven end-to-end with real Postgres, both arms (MOTIR_CLOUD unset and set).
  • Architecture guards: single-reader asserted project-wide; no process.env['MOTIR_CLOUD'] read outside lib/billing/availability.ts.

Context refs

  • lib/billing/availability.ts — the predicate
  • app/api/public/ — the gated routes
  • lib/services/projectMembersService.ts · app/api/projects/[key]/access/route.ts — the publish path

Discussion

No comments yet.

Adding to this discussion signs you in on app.motir.co and brings you back to this request.

Add a comment