# Review of the short specifications · Codex · 30-09-2026

## Verdict
Final agreement only after fixes. The set is close enough to repair, but not safe to freeze: pilot 2 has no provider spec, pilot 1 tariff data is under-sourced for legal accuracy, and several cross-module states are only hinted at. Step 3 could draw a pleasant page, but step 4 would still be forced to invent contract, failure, translation, and publishing details.

## Coverage

| Concept-note commitment | Module(s) | OK or MISSING |
|---|---:|---|
| Public importer page, standalone or embedded | 0, 8 | OK |
| Estimate, never declaration/assessment | 0, 3 | OK |
| Product search; importer chooses code | 1 | OK |
| One provider-neutral contract | 4, 5, 10 | OK, incomplete result/version contract |
| ASYCUDA provider | 4 | OK |
| Computing provider and engine | 5, 6 | OK, legal-source gaps |
| rwandatrade.rw provider for Rwanda | none | MISSING |
| One installation per country; provider in admin | 7, 10 | OK |
| Exports through ASYCUDA only | 0, 2, 4 | OK, disabled-state gap |
| Shadow mode, differences logged | 7, 9 | OK, privacy gap |
| French/English; Kirundi off | 0 | OK |
| Swahili/Kinyarwanda when supplied | none | MISSING |
| Accessibility to template bar | 0 | OK |
| Print and CSV | 3 | OK |
| Health probe and usage across restarts | 9 | OK |
| No personal data | 0, 9 | OK, commercially sensitive logs unresolved |
| Embedding security | 8, 10 | OK, needs detailed CORS/postMessage policy |
| Vertical-base stack and gate | 10 | OK |

## Findings

| # | Severity | Module | Finding | Evidence | Suggested fix |
|---|---|---|---|---|---|
| S1 | blocker | none / 10 | Rwanda’s `rwandatrade.rw` provider is a committed provider and pilot source, but no module specifies its adapter, endpoints, auth/consent, failures, or trace. | Concept names three providers, including rwandatrade.rw: `docs/step1/final/concept-note-30-09-2026.md:87`; pilot 2 uses it: `:198`; D21: `docs/DECISIONS.md:33`. | Add a provider spec section/module, or explicitly defer pilot 2 out of this Step 2 set. |
| S2 | blocker | 6 | Pilot 1 data cannot be legally trusted from the EAC CET alone. Burundi stays/remissions, COMESA preferences, finance-law levies, and national changes are required but partly “not seen”. | Country differences are measures: concept `:116`; pilot 1 includes stays/remissions/national taxes: `:197`; module 6 only names EAC duty rates for pilot 1: `docs/step2/6-tariff-data.md:39`; “Not seen” stays/remissions: `:64`. | Make the data register mandatory for every Burundi source before publish; split DDI, stays/remissions, preferences, national taxes, exchange-rate notices. |
| S3 | major | 3, 4, 5 | Currency ownership is blurred. ASYCUDA converts incoming multi-currency amounts to declaration currency, Module 3 converts returned figures for display, and the engine converts to local currency. The contract does not name canonical amount, display amount, rate direction, or rounding. | Contract exact decimals/currency per amount: concept `:81`; ASYCUDA request conversion: `docs/step2/4-asycuda-provider.md:26`; result display conversion: `:36`; engine local currency: `docs/step2/5-engine.md:20`; result rule: `docs/step2/3-result-and-evidence.md:45`. | Define canonical provider result, display conversion, rate direction, precision, and CSV/print fields in one contract. |
| S4 | major | 0, 3, 4, 7 | Customs-down fallback is not specified. A setting can allow computed replacement, but the public/result specs only cover “down” and “indicative” separately. | D11 allows fallback by country: `docs/DECISIONS.md:23`; admin setting: `docs/step2/7-administration.md:18`; down notice: `docs/step2/0-public-page.md:26`; computed result label: `docs/step2/3-result-and-evidence.md:47`; ?13 deferred: concept `:261`. | Specify the exact fallback state, labels, source line, print/CSV wording, and whether it is blocked until ?13 closes. |
| S5 | major | 1, 7 | Customs-description translations have no owner or workflow. D35 requires every description translated, but admin only covers page settings and tariff registers. | D35: `docs/DECISIONS.md:47`; module 1 promise: `docs/step2/1-product-search.md:31`; module 7 settings/data omit translation workflow: `docs/step2/7-administration.md:20-27`. | Add import/edit/review/source/original-display rules for nomenclature translations. |
| S6 | major | 0-4 | Step-3/4 states are under-specified: search loading/empty/error, reference-table loading/stale, estimate submit timeout, 4xx field mapping, empty 200, and stale catalogue. | Step 5 expects every state: concept `:176`; module 0 only has provider-down notice: `docs/step2/0-public-page.md:26`; module 3 only has out-of-date result: `docs/step2/3-result-and-evidence.md:21`; module 4 maps 4xx/empty 200 but not UI states: `docs/step2/4-asycuda-provider.md:51-52`. | Add a state matrix per public workflow before mockups. |
| S7 | major | 7 | Password import is overconfident. v7 verification also accepts plaintext legacy values and treats empty CAS-managed accounts as non-password accounts; the spec only says bcrypt/SHA-256/no password. | Module 7: `docs/step2/7-administration.md:31-32`; v7 accepts SHA-256 and plaintext: `/Users/melux/Work/UN/GIT/eRegulations-4.0-Admin/Project/Unctad.eRegulations.Library/Utils/PasswordHasher.cs:9-12`, `:67-68`; empty CAS rows invalid: `:60-62`; template uses bcryptjs: `/private/tmp/.../vb/package.json:31`. | Import bcrypt only; force reset for plaintext/CAS/ambiguous hashes, or specify a migration threat model. |
| S8 | major | 6, 7 | Publishing gates are split and ambiguous. D40 says any admin may publish, while Module 6 requires “the analyst has read” differences and golden cases pass. No actor/system enforces these. | D40: `docs/DECISIONS.md:52`; publish checks: `docs/step2/6-tariff-data.md:31-33`; any admin publishes: `docs/step2/7-administration.md:25`. | Define publish preconditions, attestations, audit fields, and whether self-review is acceptable. |
| S9 | major | 9 | Shadow logs are not personal data, but they are commercially sensitive. Public status and 90-day shipment logs need access boundaries. | Public status: `docs/step2/9-health-and-usage.md:20`; shadow stores shipment and both answers: `:29`; no personal data rule: `:42`; concept says shadow logs hold shipment values/origins: `docs/step1/final/concept-note-30-09-2026.md:73`. | Keep public page aggregate-only; make shadow logs admin-only, minimized, and retention-configured. |
| S10 | minor | 0 | If Export is configured first but the provider cannot compute exports, the first-tab rule has no fallback. | Export only when provider computes: `docs/step2/0-public-page.md:20`; D31 first tab opens by setting: `docs/DECISIONS.md:43`; exports ASYCUDA-only: `:27`. | Say Import opens when Export is unavailable, regardless of tab-order setting. |
| S11 | minor | 0 | Concept commits future Swahili/Kinyarwanda handling, but no module owns adding authority-supplied texts. | Concept languages: `docs/step1/final/concept-note-30-09-2026.md:69`; module 0 only French/English/Kirundi-off: `docs/step2/0-public-page.md:19`, `:44`. | Add “additional public languages when supplied” to module 0/admin translation settings. |
| S12 | minor | 0, 3 | “Every estimate says tariff version” is narrowed to computed figures only. That may be right, but it changes the concept commitment. | Concept: every estimate says provider and tariff version: `docs/step1/final/concept-note-30-09-2026.md:85`; module 0 says tariff version only for computed figures: `docs/step2/0-public-page.md:27`; module 3 says customs evidence is customs’ words: `docs/step2/3-result-and-evidence.md:27`. | Either revise concept wording or require provider/catalogue/date evidence for delegated providers. |

## Questions for the analyst

1. Rwanda provider: **Specify rwandatrade adapter now (recommended)** / defer pilot 2 / replace with direct RRA ASYCUDA access.
2. Customs-down fallback: **Keep blocked until ?13 closes (recommended)** / allow per-country admin setting now / remove fallback entirely.
3. Publishing: **System-enforced checklist with self-publish allowed (recommended)** / second reviewer required / analyst-only publish.
4. Password import: **Import bcrypt, reset the rest (recommended)** / migrate SHA-256 on login / import every v7-compatible value.
5. Shadow logs: **Admin-only, minimized, 90 days (recommended)** / aggregate only / keep full shipment logs.

## What holds

- The modular split is mostly sound: public page, form, result, ASYCUDA adapter, engine, tariff data, admin, embed, health, technical.
- The inherited rule “customs answer is shown, not corrected” is consistently carried.
- The prototype defects are used well: unknown codes, accent-sensitive search, blank preference, zero rates, certificate handling.
- The vertical-base choice is reflected realistically: Next.js, Prisma, Postgres, next-auth, bcryptjs, PR gate.
- The short specs stay within the intended template and are generally concise enough for Step 2.