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,7 +1,7 @@
|
||||
{
|
||||
"mode": "FISCAL_ONLY (no Hub decision)",
|
||||
"database": "UNIAO",
|
||||
"crt": "3",
|
||||
"crt": "1",
|
||||
"products": 8942,
|
||||
"fiscal_products_read": 8942,
|
||||
"BEFORE": {
|
||||
@@ -14,50 +14,45 @@
|
||||
"ERP_AS_FOUND": {
|
||||
"rtc_enabled": false,
|
||||
"TOTAL_PRODUCTS": 8942,
|
||||
"COMPLETE_PRODUCTS": 8940,
|
||||
"SAFE_BLOCKED_PRODUCTS": 2,
|
||||
"COMPLETE_PRODUCTS": 8942,
|
||||
"SAFE_BLOCKED_PRODUCTS": 0,
|
||||
"FAILED_PRODUCTS": 0,
|
||||
"UNCLASSIFIED_PRODUCTS": 0,
|
||||
"COVERAGE_PERCENT": 99.98,
|
||||
"COVERAGE_PERCENT": 100.0,
|
||||
"INVARIANT_PASS": true,
|
||||
"PIS_BLOCKERS": 0,
|
||||
"COFINS_BLOCKERS": 2,
|
||||
"COFINS_BLOCKERS": 0,
|
||||
"RTC_BLOCKERS": 0,
|
||||
"OTHER_BLOCKERS": 0,
|
||||
"blockers_by_type": {
|
||||
"COFINS_CST_INVALID": 2
|
||||
},
|
||||
"blockers_by_type": {},
|
||||
"applicability": {
|
||||
"NOT_APPLICABLE": 8170,
|
||||
"OPTIONAL": 772
|
||||
"NOT_APPLICABLE": 8942
|
||||
},
|
||||
"rtc_applicability": {
|
||||
"NOT_APPLICABLE": 8942
|
||||
},
|
||||
"changed_products": 2,
|
||||
"examples": [
|
||||
{
|
||||
"product": "000304",
|
||||
"BEFORE_STATUS": "COMPLETE",
|
||||
"AFTER_STATUS": "BLOCKED_FISCAL_DATA",
|
||||
"REASON": [
|
||||
"COFINS_CST_INVALID"
|
||||
]
|
||||
},
|
||||
{
|
||||
"product": "003090",
|
||||
"BEFORE_STATUS": "COMPLETE",
|
||||
"AFTER_STATUS": "BLOCKED_FISCAL_DATA",
|
||||
"REASON": [
|
||||
"COFINS_CST_INVALID"
|
||||
]
|
||||
}
|
||||
],
|
||||
"changed_products": 0,
|
||||
"examples": [],
|
||||
"non_canonical_warnings": 2,
|
||||
"context": {
|
||||
"rtc_enabled": false,
|
||||
"erp_rtc_enabled": false,
|
||||
"rtc_supported": true,
|
||||
"rtc_catalog_valid": true,
|
||||
"rtc_param": 0,
|
||||
"rtc_param": "0",
|
||||
"rtc_source": "PARAMETROS.USAR_REFORMA_TRIBUTARIA",
|
||||
"rtc_param_rows": 1,
|
||||
"rtc_param_conflict": false,
|
||||
"rtc_observed_at": "2026-09-24T20:41:07+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,
|
||||
@@ -67,52 +62,54 @@
|
||||
"duplicates": 0,
|
||||
"valid": true
|
||||
},
|
||||
"crt": "3",
|
||||
"products_evaluated": 8942
|
||||
"crt": "1",
|
||||
"products_evaluated": 8942,
|
||||
"pis_cofins_applicability": {
|
||||
"NOT_APPLICABLE": 8942
|
||||
},
|
||||
"non_canonical_warnings": {
|
||||
"products": 2,
|
||||
"by_type": {
|
||||
"CST_COFINS_INVALID_IGNORED": 2
|
||||
},
|
||||
"samples": [
|
||||
{
|
||||
"product_code": "000304",
|
||||
"type": "CST_COFINS_INVALID_IGNORED",
|
||||
"reason": "ENTRY:000"
|
||||
},
|
||||
{
|
||||
"product_code": "003090",
|
||||
"type": "CST_COFINS_INVALID_IGNORED",
|
||||
"reason": "EXIT:060"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"RTC_OFF_SIMULATION": {
|
||||
"rtc_enabled": false,
|
||||
"TOTAL_PRODUCTS": 8942,
|
||||
"COMPLETE_PRODUCTS": 8940,
|
||||
"SAFE_BLOCKED_PRODUCTS": 2,
|
||||
"COMPLETE_PRODUCTS": 8942,
|
||||
"SAFE_BLOCKED_PRODUCTS": 0,
|
||||
"FAILED_PRODUCTS": 0,
|
||||
"UNCLASSIFIED_PRODUCTS": 0,
|
||||
"COVERAGE_PERCENT": 99.98,
|
||||
"COVERAGE_PERCENT": 100.0,
|
||||
"INVARIANT_PASS": true,
|
||||
"PIS_BLOCKERS": 0,
|
||||
"COFINS_BLOCKERS": 2,
|
||||
"COFINS_BLOCKERS": 0,
|
||||
"RTC_BLOCKERS": 0,
|
||||
"OTHER_BLOCKERS": 0,
|
||||
"blockers_by_type": {
|
||||
"COFINS_CST_INVALID": 2
|
||||
},
|
||||
"blockers_by_type": {},
|
||||
"applicability": {
|
||||
"NOT_APPLICABLE": 8170,
|
||||
"OPTIONAL": 772
|
||||
"NOT_APPLICABLE": 8942
|
||||
},
|
||||
"rtc_applicability": {
|
||||
"NOT_APPLICABLE": 8942
|
||||
},
|
||||
"changed_products": 2,
|
||||
"examples": [
|
||||
{
|
||||
"product": "000304",
|
||||
"BEFORE_STATUS": "COMPLETE",
|
||||
"AFTER_STATUS": "BLOCKED_FISCAL_DATA",
|
||||
"REASON": [
|
||||
"COFINS_CST_INVALID"
|
||||
]
|
||||
},
|
||||
{
|
||||
"product": "003090",
|
||||
"BEFORE_STATUS": "COMPLETE",
|
||||
"AFTER_STATUS": "BLOCKED_FISCAL_DATA",
|
||||
"REASON": [
|
||||
"COFINS_CST_INVALID"
|
||||
]
|
||||
}
|
||||
]
|
||||
"changed_products": 0,
|
||||
"examples": [],
|
||||
"non_canonical_warnings": 2
|
||||
},
|
||||
"RTC_ON_SIMULATION": {
|
||||
"rtc_enabled": true,
|
||||
@@ -124,16 +121,14 @@
|
||||
"COVERAGE_PERCENT": 0.0,
|
||||
"INVARIANT_PASS": true,
|
||||
"PIS_BLOCKERS": 0,
|
||||
"COFINS_BLOCKERS": 2,
|
||||
"COFINS_BLOCKERS": 0,
|
||||
"RTC_BLOCKERS": 8942,
|
||||
"OTHER_BLOCKERS": 0,
|
||||
"blockers_by_type": {
|
||||
"CCLASSTRIB_MISSING": 8942,
|
||||
"COFINS_CST_INVALID": 2
|
||||
"CCLASSTRIB_MISSING": 8942
|
||||
},
|
||||
"applicability": {
|
||||
"NOT_APPLICABLE": 8170,
|
||||
"OPTIONAL": 772
|
||||
"NOT_APPLICABLE": 8942
|
||||
},
|
||||
"rtc_applicability": {
|
||||
"REQUIRED": 8942
|
||||
@@ -380,7 +375,8 @@
|
||||
"CCLASSTRIB_MISSING"
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"non_canonical_warnings": 2
|
||||
}
|
||||
},
|
||||
"SAFETY": {
|
||||
|
||||
Reference in New Issue
Block a user