1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Codegen policy for banking.
#
# `user_owned` globs are hand-written files that live inside generator-owned trees but are
# NOT schema-derived. `metaphor schema generate [--force]` skips them wholesale (never reads,
# merges, or deletes them). Everything else in src/ is regenerated from schema/models.
#
# Re-exports/declarations that must sit alongside generated code live inside
# `// <<< CUSTOM ... // END CUSTOM` markers (service/mod.rs, presentation/http/mod.rs, lib.rs)
# and are preserved by the marker mechanism, not listed here.
#
# Add your hand-authored services, handlers, tests, and docs below as you write them.
user_owned:
- "src/application/service/banking_events.rs"
- "src/application/service/banking_gl.rs"
- "src/application/service/banking_write_service.rs"
# Fail-closed IBAN validation (registry length/structure table, mod-97 checksum, named
# unknown-country escape; local-format account numbers pass unchanged).
- "src/application/service/iban_validation.rs"
# The write surface, chunked out of banking_write_service.rs. Each is an `impl BankingWriteService`
# block; the shared vocabulary (input structs, outcomes, errors) stays in banking_write_service.rs.
- "src/application/service/banking_statement.rs"
- "src/application/service/banking_clearance.rs"
- "src/application/service/banking_reconciliation.rs"
# Own the hand-written banking SQL (the masters, the statement import's header+lines, the clearing
# engine's line reads + settlement lock/SUM + clearance writes + allocation watermark, and the
# reconciliation close-gate's exception count) that the write service orchestrates. Declared here —
# not renamed with a `_custom` suffix — so the generator skips them wholesale; this declaration is
# what makes editing them legitimate.
- "src/infrastructure/persistence/bank_repository.rs"
- "src/infrastructure/persistence/bank_account_repository.rs"
- "src/infrastructure/persistence/bank_clearance_repository.rs"
- "src/infrastructure/persistence/bank_reconciliation_repository.rs"
- "src/infrastructure/persistence/bank_statement_import_repository.rs"
- "src/infrastructure/persistence/bank_transaction_repository.rs"
# FX realisation SQL, orchestrated by fx_service.rs. (The rate-table repository retired with the
# FX-catalogue move to corporate — only the gain/loss engine remains.)
- "src/infrastructure/persistence/fx_gain_loss_repository.rs"
# Reconcile-preset candidate ordering — a read, never a match. Hand-authored over the preset +
# line + candidate-pool vocabulary; the pool port is injectable so tests (and non-payment
# compositions) substitute their own source of candidates.
- "src/application/service/reconcile_preset_candidates.rs"
- "src/presentation/http/guarded_routes.rs"
- "tests/banking_golden_cases.rs"
- "tests/integrity_probes.rs"
- "tests/clearing_seam.rs"
# IBAN fail-closed probes (valid/unknown/checksum/length/local/escape).
- "tests/iban_probes.rs"
- "scripts/**"
# Hand-authored behavior (services + their HTTP surface). Examples:
# - "src/application/service/onboarding_service.rs"
# - "src/presentation/http/guarded_routes.rs"
# Behavior tests (the golden cases / oracle) + BDD features.
- "tests/features/**"
# - "tests/*_golden_cases.rs"
# - "tests/integrity_probes.rs"
# Hand-authored module documentation.
- "docs/**"
- "src/application/service/fx_service.rs"
# FX retirement probe (rate tables gone, realisation engine + shared enum types survive, no HTTP
# route left for the retired catalogue).
- "tests/fx_retirement_probe.rs"
# Statement-side invariant suite (ADR-0005: evidence, not accounting).
- "tests/born_posted_invariant_suite.rs"
# Reconcile-preset candidate ordering (deterministic, side-effect-free, fenced).
- "tests/reconcile_preset_candidate_ordering.rs"
# Durable BankClearanceRecorded staging inside the clearance transaction.
- "tests/clearance_event_staging.rs"
# The integration-test target root — a module-declaration stub made user-owned so its
# crate-root lint expectation (the expect_used instrumented allow) covers the generated
# scaffold under tests/integration/ without editing generator-owned files.
- "tests/integration_tests.rs"