# RIMS — Flows that are partial, missing, or blocked from manual testing

Companion to [`rims_testing.md`](rims_testing.md). Items here either cannot be exercised with the current seeders, are referenced in the SRS but not yet wired in the UI, or are wired but behind an external dependency we haven't configured. Each entry cites the SRS Functional Requirement (FR) that drove it so the team can triage.

> Date stamped: 2026-05-17. Re-check against the current codebase before acting on any item; the implementation moves quickly.

---

## A. Seeder gaps (block test cases that otherwise have UI)

These accounts are referenced by RIMS mixins or by SRS roles but are **not seeded** by `seed_users` or `seed_rims --comprehensive`. Until they are seeded (or the tester creates them manually via `/accounts/admin/`), some flows in the manual cannot run as the right actor.

| Missing role | Used by | Blocks |
|---|---|---|
| `FINANCE_MANAGER` (`finance_manager`) | `FinanceApprovalMixin` (disbursement approve/reject, payment batch reverse) | Two-eyes disbursement approval distinct from FINANCE_DIRECTOR (FRFM033, NFRFM005). Today's seed leans on FINANCE_DIRECTOR; the "finance manager only" tier is untested. |
| `PROGRAM_COORDINATOR` (`program_coordinator`) | `ProgramCoordinatorMixin` (budget revision approval) | The PRD splits revision approval from Programme Director; can only be exercised today by program.director@demo.local (FRFM011/029). |
| `PROJECT_MANAGER` (`project_manager`) | `DisbursementCreateMixin` (raise disbursement request) | Default disbursement raiser per SRS §5.4. Today only finance officers raise requests. |
| `PROGRAMME_OFFICER` (`programme_officer`) | SRS §5.1.1.2/3 "Funding Administrator / Programme Officer" actor in Call setup + Application screening | The PO-screen flow runs today as the GRANTS_MANAGER; the dedicated PO role has no fixture. |

**Suggested fix:** add personas to `apps/core/management/commands/seed_users.py:NAMED_PERSONAS` (`finance.manager@demo.local`, `program.coordinator@demo.local`, `project.manager@demo.local`, `programme.officer@demo.local`) and a corresponding RIMS seed assignment in `seed_rims.py`.

### Empty placeholder seeders

All five `apps/rims/<module>/seeders/*_seeder.py` files exist but are **0 bytes**:

```
apps/rims/grants/seeders/grants_seeder.py
apps/rims/finance/seeders/finance_seeder.py
apps/rims/operations/seeders/operations_seeder.py
apps/rims/projects/seeders/projects_seeder.py
apps/rims/scholarships/seeders/scholarships_seeder.py
```

All RIMS seed data is hand-rolled inside `apps/rims/grants/management/commands/seed_rims.py`. Either delete the empty placeholder files (cleaner) or move per-app seed helpers into them so `seed_all` can dispatch by app.

---

## B. SRS FRs without explicit code anchors

The following FR IDs appear in `setup/SRS.md` but no `apps/rims/**/*.py` source file references them. Some are covered behind a differently-named symbol — verify each before declaring a gap — but the absence of a code comment makes the contract untraceable from PRD to code.

### B.1 Grant Planning & Setup (SRS §5.1.1.1, FRFA-GPS / GPS)

| FR | Subject | Status |
|---|---|---|
| FRFA-GPS004 | Funding type configuration rules (Grant / Scholarship / Fellowship / Challenge) | Partially — only Grant + Scholarship call types are exercised in seed |
| FRFA-GPS008 / FRFA-GPS009 | Donor duplicate detection | Wired (FRFA-GPS009 in code as the form validator), but FRFA-GPS008 explicit ID not referenced |
| FRFA-GPS011 / 012 / 013 / 014 / 016 | Reporting calendar generation per frequency | Partially — `ReportingCalendarEntry` exists; calendar rendering on funding detail not visible |

### B.2 Call Setup (SRS §5.1.1.2, FRFA-CS)

Heavy gap. The SRS lists 33 FR IDs (CS001–033); only CS006, CS008, CS013, CS019, CS021, CS030, CS031 are explicitly anchored in code. The most likely **actual** gaps:

| FR | Subject |
|---|---|
| FRFA-CS003 | Pre-populate inherited fields from parent funding record |
| FRFA-CS009 | Type-configured form variations (Grant vs Scholarship vs Fellowship vs Challenge) |
| FRFA-CS010 | Eligibility-rule structured controls |
| FRFA-CS014 | Submission-settings configuration |
| FRFA-CS015 / 017 / 018 | Deadline + auto-close behaviour + reminder cadence config |
| FRFA-CS016 | Notification settings (publication, deadline, acknowledgement) |
| FRFA-CS022 / 023 | Document version tracking for revised call docs |
| FRFA-CS024 / 025 | Clarifications board on a live call |
| FRFA-CS026 / 027 | Inline edit window for non-critical fields after publish |
| FRFA-CS028 / 029 | Withdraw flow rules around already-submitted applications |
| FRFA-CS032 / 033 | Final submission count + analytics on closed calls |

### B.3 Application Management (SRS §5.1.1.3, FRFA-AM)

The seeded e2e applications cover the main success scenario; these FRs **lack code anchors**:

| FR | Subject |
|---|---|
| FRFA-AM001 / 002 / 003 | Application intake validation rules + draft ID issuance |
| FRFA-AM005 / 006 | Mandatory-field validation messages, malware scan path |
| FRFA-AM009 | Eligibility-criteria evaluation telemetry |
| FRFA-AM011 / 012 | Submission ack notification template |
| FRFA-AM017 | PO marks application "Eligible Ready for Review" notification path |
| FRFA-AM021 / 023 | Reviewer notification + secure-access grant on assignment |
| FRFA-AM026 | Aggregated-score panel formatting |
| FRFA-AM029 | Reviewer COI declaration UI (the data path is wired; the dedicated form is not) |
| FRFA-AM033–036 | Reviewer-recommendation conflict-resolution config (majority / threshold / escalate) |
| FRFA-AM039 | Withdrawn application retention rules |

### B.4 Award & Agreement (SRS §5.1.1.4, FRFA-AA)

Anchored in code: AA002/003/005/006/008/009/010/011/013/014/015/018/019/021/022/025. **Not anchored** (worth verifying):

| FR | Subject |
|---|---|
| FRFA-AA001 | Award-creation precondition checks |
| FRFA-AA004 | Award letter generation (FRFA-AA009 chase exists; letter generation itself is not in code search) |
| FRFA-AA007 / 012 | Tranche schedule generation + reconciliation back to budget |
| FRFA-AA016 / 017 | Award cancellation cascading rules |
| FRFA-AA020 | Amendment audit history surfacing |
| FRFA-AA023 / 024 / 026–030 | Late-cohort award addenda, escalation flows |

### B.5 Close-out (SRS §5.1.1.5, FRFA-CO)

Anchored: CO002/003/004/005/007/008/009/010/011/014/018/021/023/024/026. **Not anchored**:

| FR | Subject |
|---|---|
| FRFA-CO001 | Close-out precondition catalogue |
| FRFA-CO006 | Final-report comment loop |
| FRFA-CO012 / 013 | Outstanding-tranche reconciliation at close-out |
| FRFA-CO015 / 016 / 017 | Archive / retention schedule per `RetentionPolicy` (data row exists; closed-award archival job not located) |
| FRFA-CO019 | Donor close-out report dispatch |

### B.6 Finance Management (SRS §5.4)

Historical naming mismatch (resolved in Phase 6A 2026-05-18): SRS previously used 2-digit IDs (`FRFM04`, `FRFM10`, `FRFM50`); both SRS and code now use 3-digit IDs (`FRFM004`, `FRFM010`). The following SRS items have **no code anchor at all**:

| FR (SRS notation) | Subject |
|---|---|
| FRFM001 | Multi-year budget setup |
| FRFM006 / 007 / 008 / 009 | Funding-source assignment per line; multi-currency consolidation |
| FRFM012 / 013 / 015 | Approval workflow config (line vs total) |
| FRFM020 / 021 / 023 / 025 | Variance + cost analytics — partially wired in `FinanceAnalyticsDashboardView` but several detail FRs lack explicit anchors |
| FRFM027 | Reforecast (rolling budget) — not located |
| FRFM036 / 037 / 038 | Approval-workflow segregation telemetry |
| FRFM042 / 043 | Payment-failure handling + alert |
| FRFM046 / 047 / 048 / 049 / 050 / 051 | General-ledger posting + reconciliation reports |

### B.7 Non-functional (SRS §5.1.3)

Anchored: NFRFA001, 007, 008, 010, 011, 012. **Not anchored** (likely operational):

| NFR | Subject |
|---|---|
| NFRFA003 | Performance — page load thresholds |
| NFRFA004 | Availability target |
| NFRFA005 | Data backup cadence |
| NFRFA009 | Browser support matrix |

---

## C. Flows wired but blocked by external dependencies

| Flow | Block | FR |
|---|---|---|
| Publish-call notifications, deadline reminders, agreement chase, close-out reminders | Celery + SMTP must be configured to **observe delivery**. In-app notifications go to the user's bell feed; email delivery cannot be asserted manually without SMTP. | FRFA-CS016, FRFA-AA009, FRFA-CO024 |
| Document malware scan on application upload | Uses `libmagic`; verify the `web` container is the one with the scan path enabled (the dev `Dockerfile` includes it) | FRFA-AM006 |
| Interview ICS feed (`/rims/grants/interviews/<pk>/calendar.ics`) | Returns text/calendar; verification requires a calendar client | FRFA-AM032 |

---

## D. Documented partials in code

These are explicitly called out in source comments as "partial" or "deferred":

| Location | Note |
|---|---|
| `apps/rims/grants/models.py` (~L837) | `# PRD §5.1 FRFA-AA025 — deferred budget: Scholarship/Fellowship/Challenge`. The deferred-budget path for non-Grant call types is implemented for Scholarship; Fellowship/Challenge variants have model fields but no end-to-end UI flow in the seeders. |
| `apps/rims/scholarships/workflows.py` (~L228) | Stub `pass` — verify whether the scholar-status FSM has a transition without a body. |
| `apps/rims/grants/views.py` (~L2005) | Bare `pass` inside a flow — confirm whether it's an early-return on a known-handled branch or a TODO. |

---

## E. Seeded but UI surface unclear

These rows ship in seed data but have no obvious dedicated page in the URL conf — verify they surface somewhere meaningful before declaring success:

| Entity | Seeded count | Where surfaced |
|---|---|---|
| `ExchangeRate` | 5 rows | Used by analytics dashboard? — no dedicated admin page found at `/rims/finance/exchange-rates/` |
| `ReminderConfig` | 1 singleton | No `/rims/operations/reminders/` URL — appears admin-only |
| `VarianceAlertConfig` | 1 singleton | Same — admin-only configuration |
| `RetentionPolicy` | 4 rows | Surface unclear; likely consumed by close-out / archive Celery beat |

If these are intentionally admin-only, document the Django admin URL (`/admin/rims_operations/...`) in the testing manual; otherwise they belong in the operations dashboard.

---

## F. Recommended next steps for QA coverage

1. **Add the four missing role personas** so the SRS RBAC matrix is testable end-to-end.
2. **Backfill PRD-ID comments** for the FRs in section B so reviewers can grep from SRS to code.
3. **Add a per-app `seeders.py`** (or remove the empty placeholders) so volume seeding is consistent with the other apps.
4. **Decide on a Celery + MailHog `docker-compose.test.yml`** so notification FRs can be asserted manually.
5. **Surface `ExchangeRate`, `ReminderConfig`, `VarianceAlertConfig`, `RetentionPolicy`** in the operations dashboard or explicitly document the admin path.
