fix: RTC observed live with provenance, non-circular PIS/COFINS applicability, canonical CST normalization (1.1.8)
- RTC: Agent reads ALL PARAMETROS rows every sync (conflict => off), reports rtc_source/rtc_observed_at/rtc_param_rows; legal_effective_context is informational only - PIS/COFINS: applicability from CRT + PISCOFINS flag + incidence only (never from empty fields); Simples w/o special treatment NOT_APPLICABLE, taxed regime with explicit N OPTIONAL, unreadable declaration NEEDS_REVIEW - CST: one digit with an official zero-padded form is VALID_AFTER_NORMALIZATION (non-blocking warning), nothing is written to the ERP - tests: RTC toggle 0->1->0 across syncs (Agent + Hub stale closing), non-circularity, normalization, panel provenance Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"mode": "FULL (Hub decision + fiscal)",
|
||||
"database": "TESTESOFICIAIS",
|
||||
"crt": "1",
|
||||
"products": 521,
|
||||
@@ -19,21 +20,18 @@
|
||||
"UNCLASSIFIED_PRODUCTS": 0,
|
||||
"COVERAGE_PERCENT": 0.0,
|
||||
"INVARIANT_PASS": true,
|
||||
"PIS_BLOCKERS": 2,
|
||||
"COFINS_BLOCKERS": 2,
|
||||
"PIS_BLOCKERS": 1,
|
||||
"COFINS_BLOCKERS": 1,
|
||||
"RTC_BLOCKERS": 521,
|
||||
"OTHER_BLOCKERS": 0,
|
||||
"blockers_by_type": {
|
||||
"CCLASSTRIB_MISSING": 521,
|
||||
"COFINS_CST_INCIDENCE_MISMATCH": 1,
|
||||
"COFINS_CST_INVALID": 1,
|
||||
"PIS_CST_INCIDENCE_MISMATCH": 1,
|
||||
"PIS_CST_INVALID": 1
|
||||
"PIS_CST_INCIDENCE_MISMATCH": 1
|
||||
},
|
||||
"applicability": {
|
||||
"NOT_APPLICABLE": 518,
|
||||
"REQUIRED": 2,
|
||||
"OPTIONAL": 1
|
||||
"NOT_APPLICABLE": 519,
|
||||
"REQUIRED": 2
|
||||
},
|
||||
"rtc_applicability": {
|
||||
"REQUIRED": 521
|
||||
@@ -281,11 +279,26 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"non_canonical_warnings": 1,
|
||||
"context": {
|
||||
"rtc_enabled": true,
|
||||
"erp_rtc_enabled": true,
|
||||
"rtc_supported": true,
|
||||
"rtc_catalog_valid": true,
|
||||
"rtc_param": 1,
|
||||
"rtc_param": "1",
|
||||
"rtc_source": "PARAMETROS.USAR_REFORMA_TRIBUTARIA",
|
||||
"rtc_param_rows": 1,
|
||||
"rtc_param_conflict": false,
|
||||
"rtc_observed_at": "2026-09-24T20:40:30+00:00",
|
||||
"legal_effective_context": {
|
||||
"crt": "1",
|
||||
"informational_only": true,
|
||||
"ibs_cbs_in_documents": "FROM_2027_FOR_SIMPLES_ORIENTATION_PENDING",
|
||||
"sources": [
|
||||
"NT 2025.002-RTC v1.51 (Portal NF-e, 04/08/2026): CRT 1/2/4 orientations in a future NT; IBS/CBS taxation of these taxpayers only from 2027",
|
||||
"LC 214/2025 art. 348"
|
||||
]
|
||||
},
|
||||
"catalog_integrity": {
|
||||
"classes": 145,
|
||||
"cst": 18,
|
||||
@@ -296,37 +309,67 @@
|
||||
"valid": true
|
||||
},
|
||||
"crt": "1",
|
||||
"products_evaluated": 521
|
||||
"products_evaluated": 521,
|
||||
"pis_cofins_applicability": {
|
||||
"NOT_APPLICABLE": 519,
|
||||
"REQUIRED": 2
|
||||
},
|
||||
"non_canonical_warnings": {
|
||||
"products": 1,
|
||||
"by_type": {
|
||||
"CST_COFINS_NON_CANONICAL_FORMAT": 2,
|
||||
"CST_PIS_NON_CANONICAL_FORMAT": 2
|
||||
},
|
||||
"samples": [
|
||||
{
|
||||
"product_code": "001434",
|
||||
"type": "CST_PIS_NON_CANONICAL_FORMAT",
|
||||
"reason": "ENTRY:2->02"
|
||||
},
|
||||
{
|
||||
"product_code": "001434",
|
||||
"type": "CST_PIS_NON_CANONICAL_FORMAT",
|
||||
"reason": "EXIT:2->02"
|
||||
},
|
||||
{
|
||||
"product_code": "001434",
|
||||
"type": "CST_COFINS_NON_CANONICAL_FORMAT",
|
||||
"reason": "ENTRY:2->02"
|
||||
},
|
||||
{
|
||||
"product_code": "001434",
|
||||
"type": "CST_COFINS_NON_CANONICAL_FORMAT",
|
||||
"reason": "EXIT:2->02"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"RTC_OFF_SIMULATION": {
|
||||
"rtc_enabled": false,
|
||||
"TOTAL_PRODUCTS": 521,
|
||||
"COMPLETE_PRODUCTS": 493,
|
||||
"SAFE_BLOCKED_PRODUCTS": 28,
|
||||
"COMPLETE_PRODUCTS": 494,
|
||||
"SAFE_BLOCKED_PRODUCTS": 27,
|
||||
"FAILED_PRODUCTS": 0,
|
||||
"UNCLASSIFIED_PRODUCTS": 0,
|
||||
"COVERAGE_PERCENT": 94.63,
|
||||
"COVERAGE_PERCENT": 94.82,
|
||||
"INVARIANT_PASS": true,
|
||||
"PIS_BLOCKERS": 2,
|
||||
"COFINS_BLOCKERS": 2,
|
||||
"PIS_BLOCKERS": 1,
|
||||
"COFINS_BLOCKERS": 1,
|
||||
"RTC_BLOCKERS": 0,
|
||||
"OTHER_BLOCKERS": 0,
|
||||
"blockers_by_type": {
|
||||
"COFINS_CST_INCIDENCE_MISMATCH": 1,
|
||||
"COFINS_CST_INVALID": 1,
|
||||
"PIS_CST_INCIDENCE_MISMATCH": 1,
|
||||
"PIS_CST_INVALID": 1
|
||||
"PIS_CST_INCIDENCE_MISMATCH": 1
|
||||
},
|
||||
"applicability": {
|
||||
"NOT_APPLICABLE": 518,
|
||||
"REQUIRED": 2,
|
||||
"OPTIONAL": 1
|
||||
"NOT_APPLICABLE": 519,
|
||||
"REQUIRED": 2
|
||||
},
|
||||
"rtc_applicability": {
|
||||
"NOT_APPLICABLE": 521
|
||||
},
|
||||
"changed_products": 2,
|
||||
"changed_products": 1,
|
||||
"examples": [
|
||||
{
|
||||
"product": "000700",
|
||||
@@ -336,17 +379,9 @@
|
||||
"COFINS_CST_INCIDENCE_MISMATCH",
|
||||
"PIS_CST_INCIDENCE_MISMATCH"
|
||||
]
|
||||
},
|
||||
{
|
||||
"product": "001434",
|
||||
"BEFORE_STATUS": "COMPLETE",
|
||||
"AFTER_STATUS": "BLOCKED_FISCAL_DATA",
|
||||
"REASON": [
|
||||
"COFINS_CST_INVALID",
|
||||
"PIS_CST_INVALID"
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"non_canonical_warnings": 1
|
||||
},
|
||||
"RTC_ON_SIMULATION": {
|
||||
"rtc_enabled": true,
|
||||
@@ -357,21 +392,18 @@
|
||||
"UNCLASSIFIED_PRODUCTS": 0,
|
||||
"COVERAGE_PERCENT": 0.0,
|
||||
"INVARIANT_PASS": true,
|
||||
"PIS_BLOCKERS": 2,
|
||||
"COFINS_BLOCKERS": 2,
|
||||
"PIS_BLOCKERS": 1,
|
||||
"COFINS_BLOCKERS": 1,
|
||||
"RTC_BLOCKERS": 521,
|
||||
"OTHER_BLOCKERS": 0,
|
||||
"blockers_by_type": {
|
||||
"CCLASSTRIB_MISSING": 521,
|
||||
"COFINS_CST_INCIDENCE_MISMATCH": 1,
|
||||
"COFINS_CST_INVALID": 1,
|
||||
"PIS_CST_INCIDENCE_MISMATCH": 1,
|
||||
"PIS_CST_INVALID": 1
|
||||
"PIS_CST_INCIDENCE_MISMATCH": 1
|
||||
},
|
||||
"applicability": {
|
||||
"NOT_APPLICABLE": 518,
|
||||
"REQUIRED": 2,
|
||||
"OPTIONAL": 1
|
||||
"NOT_APPLICABLE": 519,
|
||||
"REQUIRED": 2
|
||||
},
|
||||
"rtc_applicability": {
|
||||
"REQUIRED": 521
|
||||
@@ -618,7 +650,8 @@
|
||||
"CCLASSTRIB_MISSING"
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"non_canonical_warnings": 1
|
||||
}
|
||||
},
|
||||
"SAFETY": {
|
||||
|
||||
Reference in New Issue
Block a user