feat: deterministic cClassTrib resolver + gated CCLASSTRIB auto-apply (default OFF), RTC panel summary; 1.1.9

- resolver (rules RTC-R0..R4/A1..A3/G1..G2) over the official cClassTrib table 2026-06-22 and LC 214/2025 annexes; local vs official catalog comparison
- ONE root-cause RTC blocker per product (missing/unresolved/ambiguous/conflict/official mismatch/catalog outdated/evidence missing)
- auto-apply: C000025.CCLASSTRIB only, three switches (FIREBIRD_WRITES + RTC_AUTO_APPLY_ENABLED + Hub authorization), per-product re-read and re-decision, never overwrites, rowcount 1, audit table rtc_write_audits (migration 0027)
- copy-only write E2E (280/280 applied, only CCLASSTRIB changed, 2nd run 0 writes, stale decision 0 writes); real databases untouched
- docs: cclasstrib_resolution, rtc_auto_apply, unified_fiscal_completeness

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
gti
2026-09-24 21:18:34 -03:00
co-authored by Claude Sonnet 5
parent 88f4318072
commit 9f08998800
51 changed files with 16461 additions and 47 deletions
@@ -0,0 +1,79 @@
{
"official_catalog": {
"file": "cClassTrib 2026-06-22.xlsx",
"sha256": "1448cb63a41bdb67ea30b4e11f4dc200d9568542c6b9335b6cff87a4fd664654",
"publication": "2026-06-22",
"source": "Portal Nacional da NF-e (cClassTrib)",
"parser": "rtc-cclasstrib-xlsx-v1"
},
"official_classes": 164,
"lc214": {
"document": "Lei Complementar 214/2025 compiled (through LC 227/2026)",
"url": "https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp214.htm",
"sha256": "5c7d59b3c49e5b7c066c2ad28bedf32791193a676ec1a163bec14bea5fa2f680",
"accessed_at": "2026-09-24",
"fetched_via": "Internet Archive copy of the official URL"
},
"annex_items_total_and_clean": {
"I": [
26,
16
],
"II": [
9,
6
],
"III": [
30,
28
],
"IV": [
105,
98
],
"V": [
3,
3
],
"VI": [
81,
80
],
"VII": [
17,
7
],
"VIII": [
7,
7
],
"IX": [
35,
18
],
"X": [
57,
47
],
"XI": [
2,
0
],
"XII": [
17,
12
],
"XIII": [
6,
4
],
"XIV": [
82,
82
],
"XV": [
6,
4
]
}
}