N17 — recognize live INR currency identities, name the forex balance failure, and capture the Agst Ref shape - #177
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13106355ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d050d620e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b1a5ac83a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfe338e68d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Accept both observed single-currency Indian mailing names, INR and Indian Rupees, while retaining the count-one guard. Preserve failure-closed foreign-currency ledger parsing but name the ledger in a typed screen error. Replace self-authored currency shapes with captured UTF-16LE evidence and add captured Agst Ref allocation coverage. The All Clients symbol change is latent consistency work: the sweep currently refuses non-INR books, so no foreign balance reaches that screen today. #107 item 4 no longer needs its formal-name-export deferral because render_company_currency_request reaches it. No dependency added; no licence change.
bfe338e to
0c7f37d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c7f37dfd7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Closes #172. Addresses #170 and item 4 of #107.
1.
is_inrrejected ordinary TallyPrime books (#172)Bridge required the base currency's
MAILINGNAMEto be the literalIndian Rupees. TallyPrime7.1 writes
INR. Measured 2026-08-23 against a licensed Silver gateway: six of eight companies onthe machine report
INR, includingBridge Validation Lab— Bridge's own reference company, whichpredates the corpus generators entirely. Every one of those books evaluated to
is_inr = false, sothe bulk sweep refused them with
company_base_currency_not_inrand the single-company screendemanded a manual assertion on every ordinary Indian book.
The accepted set now includes
INR. Thecurrency_count == 1guard is unchanged — with severalcurrencies defined, which one is BASE is not determinable from that read, and guessing would put a
rupee symbol in front of a dollar balance. Only the name half was wrong. Both spellings are live on
the same machine (older books still say
Indian Rupeeswith the ERP-9-eraRs.symbol), so thematch was widened rather than swapped.
2. Captured fixtures replace hand-authored currency XML
The rule survived because every
Indian Rupeesin the tree was hand-written — an inlineconst LIVEinwire.rs, an inlineconst CURRENCYinruntime.rs, a doc comment, and theprotocol reference. The tests built their own input and then confirmed Bridge agreed with it. There
was no captured currency response anywhere in the repository.
Three captures now drive those tests, each asserted by SHA-256:
MAILINGNAMEcurrency_inr_modern_liveBridge Validation LabI₹INRcurrency_inr_legacy_liveBridge Billwise LabRs.Indian Rupeescurrency_multi_liveBRIDGE CORPUS FOREX$USDNote the modern symbol is
I₹—U+0049followed byU+20B9— not a bare₹.3. A forex ledger's
CLOSINGBALANCEis a string, and the error blamed the data (#170)On a foreign-currency party ledger Tally returns a composite display string
(
-$ 2000.00 @ I₹ 84/$ = -I₹ 168000.00) whereBILLCLstays a plain decimal. Parsing failed withInvalidAmount— "Tally returned an invalid native amount" — which reads as though Tally sentgarbage.
Bridge still fails closed, and that is deliberate. No attempt is made to parse the composite
string or to fall back to its base-currency tail. This is a diagnostics change only: the error is now
typed, recognises the shape structurally rather than by symbol, and names the offending ledger. On
the measured book ~98.4% of the party balance sat in the unnamed residual, so naming the ledger is
the difference between an actionable message and a dead end.
4.
AllClientsScreenhard-coded ₹ (#107 item 4)Both outstandings screens now derive the symbol from the same assertion-derived helper.
This was latent, not a live money bug — the sweep refuses non-INR books at the
company_base_currency_not_inrgate, so no foreign balance reaches that screen today. It isconsistency work that stops a future change to the sweep gate from becoming one.
Note #107 item 4's stated reason for deferral — "the currency formal name is unreachable by export"
— is now false;
render_company_currency_requestreaches it.5. Captured coverage for the
Agst RefpathA review finding on #171 claimed due-date ageing degrades to bill-date ageing when a settled bill is
reopened by an
Agst Refcarrying an empty credit period. Tested live: the premise does nothold. Tally populates
BILLCREDITPERIODandBILLDATEon theAgst Refitself, echoing theoriginal bill — the corpus generator sends neither field, so the values cannot be an echo of its
input.
That finding was wrong, but it exposed a real gap: neither committed ageing capture contained a
single
Agst Refallocation.vouchers_agst_ref_reopen_live(127,166 B,BRIDGE CORPUS SETTLED)now provides them — 12
New Refand 12Agst Ref, all30 Days.Known limit, stated rather than glossed: that book settles bills to zero but never reopens one
afterwards, so the capture does not execute the post-zero reopen arm — that arm fires on a
bill's first allocation here. The reopen arm remains covered by constructed input, and the
provenance addendum says so. Closing it needs a settle-then-reopen book.
Gates
fmt, clippy with warnings denied, full workspace tests in both feature configurations,
portable-core feature tests,
toolsworkspace tests, TypeScript check, fixture integrity(
72 files, 0 new), and the compatibility gate (unknown_claims=11:evidenced_claims=0).All six changed pinned files were resealed with the full three-step procedure, verified
independently: 119 pins, 0 stale, and
compatibility_surface_sha256set to the surface'smanifest_sha256(not the file hash — a distinction that failed CI once already this week).No dependency or licence change.