feat: central RTC write modes (DISABLED/DRY_RUN/APPROVAL/ENABLED), R4 suggestion-only, preview/approval, per-record rollback, bulk blocker upsert; 1.2.0
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+226
-184
@@ -1,12 +1,14 @@
|
||||
{
|
||||
"database": "scratch_rtc_e2e/TESTESOFICIAIS_RTC_COPY.FDB (gbak restore of TESTESOFICIAIS)",
|
||||
"database": "scratch_rtc_e2e/TESTESOFICIAIS_RTC_COPY.FDB (restored from its .fbk at start)",
|
||||
"real_database_writes": 0,
|
||||
"real_database_write_attempts": 0,
|
||||
"mechanism": "job authorizations only (no env switches)",
|
||||
"copy_original_crt": [
|
||||
"1"
|
||||
],
|
||||
"copy_crt_for_experiment": "3",
|
||||
"copy_rtc_param": 1,
|
||||
"copy_crt_for_experiment": "3",
|
||||
"tables_hashed": 324,
|
||||
"coverage_before": {
|
||||
"total": 521,
|
||||
"complete": 0,
|
||||
@@ -14,14 +16,61 @@
|
||||
"unclassified": 0,
|
||||
"coverage_percent": 0.0
|
||||
},
|
||||
"disabled_run": {
|
||||
"write_attempts": 0,
|
||||
"preview": 0,
|
||||
"ready_total": 77
|
||||
},
|
||||
"dry_run": {
|
||||
"write_attempts": 0,
|
||||
"preview": 77,
|
||||
"ready_total": 77,
|
||||
"rules": [
|
||||
"RTC-R3"
|
||||
],
|
||||
"sample": [
|
||||
{
|
||||
"product_code": "000024",
|
||||
"description": "COXINHA ( 6 UNID )",
|
||||
"ncm": "19022000",
|
||||
"current": "",
|
||||
"proposed": "200034",
|
||||
"cst": "200",
|
||||
"rule_id": "RTC-R3",
|
||||
"basis": "RTC-R3:ANNEX_TEXT_MATCH"
|
||||
},
|
||||
{
|
||||
"product_code": "000027",
|
||||
"description": "RISOLE DE CAMARAO",
|
||||
"ncm": "19022000",
|
||||
"current": "",
|
||||
"proposed": "200034",
|
||||
"cst": "200",
|
||||
"rule_id": "RTC-R3",
|
||||
"basis": "RTC-R3:ANNEX_TEXT_MATCH"
|
||||
},
|
||||
{
|
||||
"product_code": "000028",
|
||||
"description": "SALGADOS (MIXTO 10 UND)",
|
||||
"ncm": "19022000",
|
||||
"current": "",
|
||||
"proposed": "200034",
|
||||
"cst": "200",
|
||||
"rule_id": "RTC-R3",
|
||||
"basis": "RTC-R3:ANNEX_TEXT_MATCH"
|
||||
}
|
||||
]
|
||||
},
|
||||
"resolution_before": {
|
||||
"total": 521,
|
||||
"valid_existing": 0,
|
||||
"ready_to_apply": 280,
|
||||
"ready_to_apply": 77,
|
||||
"suggestion_only": 203,
|
||||
"ambiguous": 215,
|
||||
"insufficient": 26,
|
||||
"conflicts": 0,
|
||||
"official_mismatch": 0,
|
||||
"catalog_incompatible": 0,
|
||||
"not_applicable": 0,
|
||||
"other_blocked": 0,
|
||||
"by_rule": {
|
||||
@@ -35,196 +84,189 @@
|
||||
"catalog_compatibility": {
|
||||
"compatibility": "MATERIAL_MISMATCH",
|
||||
"counts": {
|
||||
"MATCH": 131,
|
||||
"LOCAL_ONLY": 0,
|
||||
"OFFICIAL_ONLY": 19,
|
||||
"MATCH_SAFE": 131,
|
||||
"MATCH_WITH_NON_MATERIAL_DIFFERENCE": 0,
|
||||
"MISMATCH": 11,
|
||||
"EXPIRED": 3
|
||||
"EXPIRED": 3,
|
||||
"MISSING_LOCAL": 19,
|
||||
"MISSING_OFFICIAL": 0
|
||||
},
|
||||
"expired_present_locally": 3
|
||||
}
|
||||
},
|
||||
"stale_decision_run": {
|
||||
"write_attempts": 280,
|
||||
"write_successes": 0,
|
||||
"aborted_reasons": {
|
||||
"RTC_NO_LONGER_ENABLED": 280
|
||||
}
|
||||
},
|
||||
"first_run": {
|
||||
"mode": "AUTO_APPLY",
|
||||
"ready_total": 280,
|
||||
"write_attempts": 280,
|
||||
"write_successes": 280,
|
||||
"aborted_reasons": {},
|
||||
"audit_sample": [
|
||||
{
|
||||
"outcome": "APPLIED",
|
||||
"product_code": "000023",
|
||||
"field": "CCLASSTRIB",
|
||||
"old_value": null,
|
||||
"new_value": "000001",
|
||||
"cst_ibscbs": "000",
|
||||
"rule_id": "RTC-R4",
|
||||
"confidence_type": "EXCLUSION_OF_ALL_SPECIAL_REGIMES",
|
||||
"evidence": {
|
||||
"inputs_used": {
|
||||
"ncm": "16025000",
|
||||
"crt": "3",
|
||||
"rtc_enabled": true
|
||||
},
|
||||
"evidence": [
|
||||
{
|
||||
"annex_hits": 0,
|
||||
"chapter": "16"
|
||||
}
|
||||
],
|
||||
"reason": "NCM_IN_NO_ANNEX_AND_NO_NATURE_BASED_CHAPTER"
|
||||
},
|
||||
"official_source_version": {
|
||||
"cclasstrib_table": "2026-06-22",
|
||||
"cclasstrib_sha256": "1448cb63a41bdb67ea30b4e11f4dc200d9568542c6b9335b6cff87a4fd664654",
|
||||
"lc214_sha256": "5c7d59b3c49e5b7c066c2ad28bedf32791193a676ec1a163bec14bea5fa2f680"
|
||||
},
|
||||
"local_catalog_hash": "1da77aec27fbde88488d1edf562f3af315ab2b5d06efb2e0b2f1ed606585d459",
|
||||
"timestamp": "2026-09-25T00:07:47+00:00",
|
||||
"job_id": 424242,
|
||||
"rowcount": 1,
|
||||
"verified_after": true
|
||||
},
|
||||
{
|
||||
"outcome": "APPLIED",
|
||||
"product_code": "000024",
|
||||
"field": "CCLASSTRIB",
|
||||
"old_value": null,
|
||||
"new_value": "200034",
|
||||
"cst_ibscbs": "200",
|
||||
"rule_id": "RTC-R3",
|
||||
"confidence_type": "ANNEX_TEXT_MATCH",
|
||||
"evidence": {
|
||||
"inputs_used": {
|
||||
"ncm": "19022000",
|
||||
"crt": "3",
|
||||
"rtc_enabled": true
|
||||
},
|
||||
"evidence": [
|
||||
{
|
||||
"annex": "VII",
|
||||
"item": 9,
|
||||
"prefix": "19022000",
|
||||
"clean": true,
|
||||
"revoked": false,
|
||||
"text": "Massas alimentícias dos códigos 1902.20.00 e 1902.30.00 da NCM/SH"
|
||||
}
|
||||
],
|
||||
"reason": "ANNEX_VII_CLEAN_ITEM_UNIQUE_DEFAULT_CLASS"
|
||||
},
|
||||
"official_source_version": {
|
||||
"cclasstrib_table": "2026-06-22",
|
||||
"cclasstrib_sha256": "1448cb63a41bdb67ea30b4e11f4dc200d9568542c6b9335b6cff87a4fd664654",
|
||||
"lc214_sha256": "5c7d59b3c49e5b7c066c2ad28bedf32791193a676ec1a163bec14bea5fa2f680"
|
||||
},
|
||||
"local_catalog_hash": "1da77aec27fbde88488d1edf562f3af315ab2b5d06efb2e0b2f1ed606585d459",
|
||||
"timestamp": "2026-09-25T00:07:47+00:00",
|
||||
"job_id": 424242,
|
||||
"rowcount": 1,
|
||||
"verified_after": true
|
||||
},
|
||||
{
|
||||
"outcome": "APPLIED",
|
||||
"product_code": "000027",
|
||||
"field": "CCLASSTRIB",
|
||||
"old_value": null,
|
||||
"new_value": "200034",
|
||||
"cst_ibscbs": "200",
|
||||
"rule_id": "RTC-R3",
|
||||
"confidence_type": "ANNEX_TEXT_MATCH",
|
||||
"evidence": {
|
||||
"inputs_used": {
|
||||
"ncm": "19022000",
|
||||
"crt": "3",
|
||||
"rtc_enabled": true
|
||||
},
|
||||
"evidence": [
|
||||
{
|
||||
"annex": "VII",
|
||||
"item": 9,
|
||||
"prefix": "19022000",
|
||||
"clean": true,
|
||||
"revoked": false,
|
||||
"text": "Massas alimentícias dos códigos 1902.20.00 e 1902.30.00 da NCM/SH"
|
||||
}
|
||||
],
|
||||
"reason": "ANNEX_VII_CLEAN_ITEM_UNIQUE_DEFAULT_CLASS"
|
||||
},
|
||||
"official_source_version": {
|
||||
"cclasstrib_table": "2026-06-22",
|
||||
"cclasstrib_sha256": "1448cb63a41bdb67ea30b4e11f4dc200d9568542c6b9335b6cff87a4fd664654",
|
||||
"lc214_sha256": "5c7d59b3c49e5b7c066c2ad28bedf32791193a676ec1a163bec14bea5fa2f680"
|
||||
},
|
||||
"local_catalog_hash": "1da77aec27fbde88488d1edf562f3af315ab2b5d06efb2e0b2f1ed606585d459",
|
||||
"timestamp": "2026-09-25T00:07:47+00:00",
|
||||
"job_id": 424242,
|
||||
"rowcount": 1,
|
||||
"verified_after": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"rows_changed": 280,
|
||||
"columns_changed": [
|
||||
"CCLASSTRIB"
|
||||
],
|
||||
"fk_orphans": 0,
|
||||
"cst_orphans": 0,
|
||||
"written_by_class": {
|
||||
"000001": 203,
|
||||
"200014": 2,
|
||||
"200034": 75
|
||||
},
|
||||
"catalog_rows_unchanged": 145,
|
||||
"coverage_after": {
|
||||
"total": 521,
|
||||
"complete": 279,
|
||||
"blocked": 242,
|
||||
"unclassified": 0,
|
||||
"coverage_percent": 53.55
|
||||
},
|
||||
"resolution_after": {
|
||||
"total": 521,
|
||||
"valid_existing": 280,
|
||||
"ready_to_apply": 0,
|
||||
"ambiguous": 215,
|
||||
"insufficient": 26,
|
||||
"conflicts": 0,
|
||||
"official_mismatch": 0,
|
||||
"not_applicable": 0,
|
||||
"other_blocked": 0,
|
||||
"by_rule": {
|
||||
"RTC-A1": 41,
|
||||
"RTC-A3": 10,
|
||||
"RTC-R2": 26,
|
||||
"RTC-R4": 203,
|
||||
"RTC-R3": 77,
|
||||
"RTC-A2": 164
|
||||
},
|
||||
"catalog_compatibility": {
|
||||
"compatibility": "MATERIAL_MISMATCH",
|
||||
"counts": {
|
||||
"MATCH": 131,
|
||||
"LOCAL_ONLY": 0,
|
||||
"OFFICIAL_ONLY": 19,
|
||||
"MISMATCH": 11,
|
||||
"EXPIRED": 3
|
||||
},
|
||||
"expired_present_locally": 3
|
||||
}
|
||||
},
|
||||
"second_run": {
|
||||
"ready_total": 0,
|
||||
"write_attempts": 0,
|
||||
"write_successes": 0
|
||||
},
|
||||
"approval_run": {
|
||||
"without_approval_attempts": 0,
|
||||
"approved": 5,
|
||||
"write_successes": 5,
|
||||
"only_approved": true
|
||||
},
|
||||
"enabled_jobs": [
|
||||
{
|
||||
"write_attempts": 72,
|
||||
"write_successes": 72,
|
||||
"aborted": {}
|
||||
},
|
||||
{
|
||||
"write_attempts": 0,
|
||||
"write_successes": 0,
|
||||
"aborted": {}
|
||||
}
|
||||
],
|
||||
"total_applied": 77,
|
||||
"audit_sample": [
|
||||
{
|
||||
"outcome": "APPLIED",
|
||||
"product_code": "000024",
|
||||
"field": "CCLASSTRIB",
|
||||
"old_value": null,
|
||||
"new_value": "200034",
|
||||
"cst_ibscbs": "200",
|
||||
"rule_id": "RTC-R3",
|
||||
"confidence_type": "ANNEX_TEXT_MATCH",
|
||||
"evidence": {
|
||||
"inputs_used": {
|
||||
"ncm": "19022000",
|
||||
"crt": "3",
|
||||
"rtc_enabled": true
|
||||
},
|
||||
"evidence": [
|
||||
{
|
||||
"annex": "VII",
|
||||
"item": 9,
|
||||
"prefix": "19022000",
|
||||
"clean": true,
|
||||
"revoked": false,
|
||||
"text": "Massas alimentícias dos códigos 1902.20.00 e 1902.30.00 da NCM/SH"
|
||||
}
|
||||
],
|
||||
"reason": "ANNEX_VII_CLEAN_ITEM_UNIQUE_DEFAULT_CLASS"
|
||||
},
|
||||
"official_source_version": {
|
||||
"cclasstrib_table": "2026-06-22",
|
||||
"cclasstrib_sha256": "1448cb63a41bdb67ea30b4e11f4dc200d9568542c6b9335b6cff87a4fd664654",
|
||||
"lc214_sha256": "5c7d59b3c49e5b7c066c2ad28bedf32791193a676ec1a163bec14bea5fa2f680"
|
||||
},
|
||||
"local_catalog_hash": "1da77aec27fbde88488d1edf562f3af315ab2b5d06efb2e0b2f1ed606585d459",
|
||||
"timestamp": "2026-09-25T01:06:30+00:00",
|
||||
"job_id": 2,
|
||||
"rowcount": 1,
|
||||
"verified_after": true,
|
||||
"action": "APPLY",
|
||||
"rule_version": "rtc-rules-v2",
|
||||
"company_crt": "3",
|
||||
"description_snapshot": "COXINHA ( 6 UNID )",
|
||||
"rtc_status": "ENABLED",
|
||||
"local_catalog_state": "MATCH_SAFE",
|
||||
"authorization_origin": "HUB_MODE:APPROVAL_REQUIRED"
|
||||
},
|
||||
{
|
||||
"outcome": "APPLIED",
|
||||
"product_code": "000027",
|
||||
"field": "CCLASSTRIB",
|
||||
"old_value": null,
|
||||
"new_value": "200034",
|
||||
"cst_ibscbs": "200",
|
||||
"rule_id": "RTC-R3",
|
||||
"confidence_type": "ANNEX_TEXT_MATCH",
|
||||
"evidence": {
|
||||
"inputs_used": {
|
||||
"ncm": "19022000",
|
||||
"crt": "3",
|
||||
"rtc_enabled": true
|
||||
},
|
||||
"evidence": [
|
||||
{
|
||||
"annex": "VII",
|
||||
"item": 9,
|
||||
"prefix": "19022000",
|
||||
"clean": true,
|
||||
"revoked": false,
|
||||
"text": "Massas alimentícias dos códigos 1902.20.00 e 1902.30.00 da NCM/SH"
|
||||
}
|
||||
],
|
||||
"reason": "ANNEX_VII_CLEAN_ITEM_UNIQUE_DEFAULT_CLASS"
|
||||
},
|
||||
"official_source_version": {
|
||||
"cclasstrib_table": "2026-06-22",
|
||||
"cclasstrib_sha256": "1448cb63a41bdb67ea30b4e11f4dc200d9568542c6b9335b6cff87a4fd664654",
|
||||
"lc214_sha256": "5c7d59b3c49e5b7c066c2ad28bedf32791193a676ec1a163bec14bea5fa2f680"
|
||||
},
|
||||
"local_catalog_hash": "1da77aec27fbde88488d1edf562f3af315ab2b5d06efb2e0b2f1ed606585d459",
|
||||
"timestamp": "2026-09-25T01:06:30+00:00",
|
||||
"job_id": 2,
|
||||
"rowcount": 1,
|
||||
"verified_after": true,
|
||||
"action": "APPLY",
|
||||
"rule_version": "rtc-rules-v2",
|
||||
"company_crt": "3",
|
||||
"description_snapshot": "RISOLE DE CAMARAO",
|
||||
"rtc_status": "ENABLED",
|
||||
"local_catalog_state": "MATCH_SAFE",
|
||||
"authorization_origin": "HUB_MODE:APPROVAL_REQUIRED"
|
||||
}
|
||||
],
|
||||
"audit_fields_complete": true,
|
||||
"rows_changed": 77,
|
||||
"fk_orphans": 0,
|
||||
"cst_orphans": 0,
|
||||
"coverage_after": {
|
||||
"total": 521,
|
||||
"complete": 77,
|
||||
"blocked": 444,
|
||||
"unclassified": 0,
|
||||
"coverage_percent": 14.78
|
||||
},
|
||||
"second_run": {
|
||||
"write_attempts": 0,
|
||||
"write_successes": 0,
|
||||
"ready_total": 0
|
||||
},
|
||||
"rollback": {
|
||||
"rolled_back": 3,
|
||||
"conflict": [
|
||||
"ABORTED",
|
||||
"ROLLBACK_CONFLICT_VALUE_CHANGED"
|
||||
],
|
||||
"records": [
|
||||
"ROLLED_BACK",
|
||||
"ROLLED_BACK",
|
||||
"ROLLED_BACK",
|
||||
"ABORTED"
|
||||
],
|
||||
"reread": {
|
||||
"000024": "",
|
||||
"000027": "",
|
||||
"000028": "",
|
||||
"000032": "200035"
|
||||
}
|
||||
},
|
||||
"reapply": {
|
||||
"write_successes": 3,
|
||||
"codes": [
|
||||
"000024",
|
||||
"000027",
|
||||
"000028"
|
||||
],
|
||||
"expected": [
|
||||
"000024",
|
||||
"000027",
|
||||
"000028"
|
||||
]
|
||||
},
|
||||
"idempotency_after_reapply": {
|
||||
"write_attempts": 0,
|
||||
"write_successes": 0
|
||||
},
|
||||
"NON_TARGET_COLUMNS_CHANGED": 0,
|
||||
"CATALOG_CHANGED": 0,
|
||||
"PARAMETERS_CHANGED": 0,
|
||||
"DOCUMENT_TABLES_CHANGED": 0,
|
||||
"OTHER_TABLES_CHANGED": 0,
|
||||
"changed_tables": [],
|
||||
"IDEMPOTENT": true,
|
||||
"ONLY_CCLASSTRIB_CHANGED": true,
|
||||
"PASS": true
|
||||
}
|
||||
Reference in New Issue
Block a user