Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Trulana is a working macOS MVP with two verified transports:

- **REST** — 38 verification checks passing (`scripts/demo_client.sh`)
- **MCP** — 18 verification checks passing (`scripts/test_mcp.sh`)
- **117 unit + integration tests** passing (`flutter test`)
- **134 unit + integration tests** passing (`flutter test`)

The full auth → token → vault query → redact → response → audit log loop works end-to-end on both transports. The three items below are the documented gaps between the current MVP and a production-ready release.

Expand Down Expand Up @@ -38,7 +38,7 @@ These are ordered by impact. Each one maps directly to a "Current Limits" entry
**Why it matters:** The dashboard shows pending lease requests and the backend logs them, but the two action buttons in the UI are stubbed out.

**Where to start:**
- `lib/features/dashboard/widgets/monetization_card.dart` — lines 199 and 207 have the TODO comments
- `lib/features/dashboard/widgets/monetization_card.dart` — the Approve/Deny buttons have TODO comments
- Wire the "Approve" button to accept the lease and record it in the Ledger table
- Wire the "Deny" button to reject the lease and log the denial in the Audit Log
- Add tests to verify the approve/deny flow updates the database correctly
Expand All @@ -58,7 +58,7 @@ These are larger efforts that build on top of the MVP:
git clone https://github.com/AdamsLocal/trulana.git
cd trulana
flutter pub get
flutter test # run all 117 tests
flutter test # run all 134 tests
flutter test --reporter expanded # verbose output
```

Expand Down Expand Up @@ -88,10 +88,10 @@ flutter build macos --release

```
test/
├── engine/ # 72 tests — Auto-Redact pipeline (regex, NER, privacy filter, full pipeline)
├── engine/ # 89 tests — Auto-Redact pipeline (regex, NER, privacy filter, full pipeline, vault)
├── security/ # 11 tests — log hygiene, auth consistency across transports
├── integration/ # 14 tests — full service loop E2E (auth → query → redact → audit)
└── widget_test.dart # widget smoke tests
├── integration/ # 31 tests — full service loop E2E + preference model (auth → query → redact → audit)
└── widget_test.dart # 3 tests — model round-trip smoke tests
```

When adding a new feature, add tests in the matching directory. Engine changes go in `test/engine/`, auth/security changes go in `test/security/`, and end-to-end flows go in `test/integration/`.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Trulana turns any device into a private context server for AI tools. Apps query over localhost or MCP — every response is redacted on-device before it leaves. MCP-native. Cross-platform. Zero cloud.

![Tests](https://img.shields.io/badge/tests-117%20passing-3DFFD0?style=flat-square) ![Flutter](https://img.shields.io/badge/Flutter-Dart%203.x-3DFFD0?style=flat-square) ![License](https://img.shields.io/badge/license-BUSL--1.1-3DFFD0?style=flat-square) ![Platform](https://img.shields.io/badge/platform-macOS%20·%20Windows%20·%20Linux%20·%20iOS%20·%20Android-0A0820?style=flat-square&labelColor=1ABFA0)
![Tests](https://img.shields.io/badge/tests-134%20passing-3DFFD0?style=flat-square) ![Flutter](https://img.shields.io/badge/Flutter-Dart%203.x-3DFFD0?style=flat-square) ![License](https://img.shields.io/badge/license-BUSL--1.1-3DFFD0?style=flat-square) ![Platform](https://img.shields.io/badge/platform-macOS%20·%20Windows%20·%20Linux%20·%20iOS%20·%20Android-0A0820?style=flat-square&labelColor=1ABFA0)

---

Expand Down Expand Up @@ -113,10 +113,10 @@ See [SECURITY.md](SECURITY.md) for the full security model and trust boundaries.
## Tests

```bash
flutter test # all 117 tests
flutter test test/engine/ # redaction pipeline
flutter test test/security/ # log hygiene + auth consistency
flutter test test/integration/ # full service loop E2E
flutter test # all 134 tests
flutter test test/engine/ # redaction pipeline (89 tests)
flutter test test/security/ # log hygiene + auth consistency (11 tests)
flutter test test/integration/ # full service loop + preferences E2E (31 tests)
```

---
Expand Down
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ Before distributing the Trulana binary:

| Area | Tests | What Is Asserted |
|---|---|---|
| Redaction pipeline | 72 unit tests | All PII types stripped at all privacy levels |
| Redaction pipeline | 89 unit tests | All PII types stripped at all privacy levels |
| REST API | 38 integration checks | Auth, rejection, redaction, PII leak detection, token expiry |
| MCP protocol | 18 checks (release) | Stdout cleanliness, tool discovery, auth, redaction, rejection |
| Service loop + models | 31 integration tests | Full auth → query → redact → audit E2E + preference model |
| Log hygiene | 6 tests | No tokens, PII, keys, or DB paths in log output |
| Auth consistency | 5 tests | Singleton identity, identical validation across transports |
4 changes: 2 additions & 2 deletions lib/core/router/app_router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';

import 'package:trulana/features/dashboard/dashboard_screen.dart';
import 'package:trulana/features/onboarding/onboarding_screen.dart';
import 'package:trulana/features/shell/app_shell.dart';
import 'package:trulana/providers/user_config_provider.dart';

/// Central [GoRouter] instance wired to Riverpod so route guards
Expand Down Expand Up @@ -40,7 +40,7 @@ final appRouterProvider = Provider<GoRouter>((Ref ref) {
GoRoute(
path: '/dashboard',
builder: (BuildContext context, GoRouterState state) =>
const DashboardScreen(),
const AppShell(),
),
GoRoute(
path: '/gatekeeper',
Expand Down
Loading
Loading