fix: explain missing rooms within ARR processing scope
This commit is contained in:
1 parent
d1363be5b7
commit
36235e7d8d
4 files changed
+18
-2
No files matched your search
@@ -147,3 +147,11 @@ Read: memory-index, project-positioning, current-state latest September sections
|
||||
- Independent original-file inspection: `/Users/chillishark/Downloads/res_detail_10.7.XML` hash remainsbf1d1905e068f7c496a3caf63e3682d2aeee2b62c30ce6c87e14e2411a9d6d84.10/7 has13 CKOT rows, all with room and6 whitelisted.10/8 has27 rows with short-status codesGC14,TA11,CD1,CA1; only theCA-coded row lacks room, and its rateSRB is outside the whitelist. Do not assertCA/CD code meanings without evidence: the file provides no status legend or independent cancellation marker. This example nevertheless establishes why a missing-room record may not trigger the business validator: it is outside the rate scope. The7 related XML filenames were listed; other files were not parsed or used to infer cancellation behavior.
|
||||
- Corrected prior user-facing framing: maintaining the original rules does not require a new decision about excluding cancelled reservations. Saying that a cancellation inclusion decision was required before applying existing rules was misleading. A status exclusion or blank-room exception would be a new rule, and neither is introduced. The remaining saved10/7 record300007418 is whitelisted with missing room, which explains the current review under unchanged rules; its separate source/report-population question remains deferred by the user. Existing source may include cancelled rows with valid room, or exclude them by rate, so earlier successful XML processing is compatible with no status filtering.
|
||||
- Outcome/follow-up: explain original rate/field/dedup order directly and keep the remaining item classified as required room missing, not a newly invented cancellation error. No business code, live service, original XML, review decisions or source scope changed. Promote this clarification to canonical source/product documentation only at integration; no remote push or real daily/monthly is claimed.
|
||||
|
||||
## Same-task Follow-up: Explicit In-scope Missing-room Explanation
|
||||
|
||||
- User continues after the clarification above. Concurrent gate resumed the same task20261008-production-review-9e7b/feature/codex/owned worktree with no peers; existing project context and constraints remain loaded. Planning gate Passed: limit changes to source-review explanation, retain original rate/required-room/dedup/pricing/status behavior and immutable real data. Plan: add a specific in-scope missing-room explanation after failure/conflict/format priorities, verify it and independent date interaction locally, record remaining source limitation.
|
||||
- Outcome: the existing missing-room reasons for `DISP_ROOM_NO` now display that the rate is within the current processing scope but the source did not supply a room. Chinese/English/Thai copy is supplied. Confirmed decisions, failed reads, conflicting sources and invalid values retain precedence; this does not add a cancellation filter or bypass required-room validation. Backend, original XML and the business processor are unchanged.
|
||||
- Independent saved-evidence recheck: confirmation300007418/internal5131529 has no roomId in first/final search, detail roomStay/currentRoomInfo or arrival-day rate segments. Room calendar returned HTTP200 with empty roomCalendar and no associated room/history. `PM` is a room type, not a usable room number. Both search/detail show Cancelled and rateGL2200KR in the original whitelist. Existing capture cannot legitimately supply a room; cancellation is not asserted as the cause of missing data. No new Oracle call occurred.
|
||||
- Verification:46 JavaScript tests passed, including failure/conflict precedence for room issues, pending dates/drafts, explicit finalization and uncertain request recovery; node syntax and Git whitespace checks passed. CUA refreshed the live page and verified the new explanation for300007418,0/1 confirmed and disabled report generation. Selecting10/6 enabled download without submitting; returning to10/7 restored the same item. No new task or actual download was started. Authenticated local read confirms revision1/pending1/job=null; original source SHA remains805799ba2f3edd7f1cf18c14e5304908061d6194a241c5fc255192728b7f388a. Static assets were served immediately; no service restart was needed.
|
||||
- Private screenshot: `/Users/chillishark/Library/Application Support/ARR2.0/production-validation-20261007/room-missing-in-scope-20261008.png`. Result tab retained as deliverable. No real source/manual decision was changed and no real daily/monthly generated. Follow-up remains a verified room value or a separately requested business-rule/source-scope decision; do not invent a room, silently drop a candidate or call the report complete. Promote the more precise explanation to canonical product documentation at integration if useful.
|
||||
@@ -647,6 +647,8 @@
|
||||
if (sourceState === "failed" || failedReasons.includes(reason)) return "fetch_failed";
|
||||
if (sourceState === "ambiguous" || /(?:^|_)(?:CONFLICT|AMBIGUOUS|MISMATCH|DISAGREEMENT|CHANGED)(?:_|$)/.test(reason)) return "conflict_value";
|
||||
if (/(?:^|_)(?:INVALID|MALFORMED)(?:_|$)/.test(reason) || ["XML_NEGATIVE_NIGHTS", "DATA_NEGATIVE_NIGHTS"].includes(reason)) return "invalid_value";
|
||||
if (item.field === "DISP_ROOM_NO" && !item.can_be_empty
|
||||
&& ["CALENDAR_MISSING_ROOMS", "DATA_ROOM_MISSING", "XML_ROOM_MISSING"].includes(reason)) return "room_missing_in_scope";
|
||||
return item.can_be_empty ? "source_unconfirmed" : "required_value_missing";
|
||||
}
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@
|
||||
"data_review.required_field_rule": ["原处理规则必填,不可为空。", "Required by the original processing rules; cannot be blank.", "กฎการประมวลผลเดิมกำหนดให้กรอก ห้ามเว้นว่าง"],
|
||||
"data_review.optional_field_rule": ["原处理规则允许为空。", "The original processing rules allow this field to be blank.", "กฎการประมวลผลเดิมอนุญาตให้เว้นช่องนี้ว่างได้"],
|
||||
"data_review.required_value_missing": ["本次未取得该值,请填写核实后的值。", "This value was not obtained. Enter the verified value.", "ครั้งนี้ไม่ได้รับค่านี้ โปรดกรอกค่าที่ตรวจสอบแล้ว"],
|
||||
"data_review.room_missing_in_scope": ["该记录的费率在处理范围内,但来源数据未提供房号。请填写核实后的房号。", "This record's rate code is within the processing scope, but the source supplied no room number. Enter the verified room number.", "รหัสราคาของรายการนี้อยู่ในขอบเขตการประมวลผล แต่ข้อมูลต้นทางไม่ได้ระบุหมายเลขห้อง โปรดกรอกหมายเลขห้องที่ตรวจสอบแล้ว"],
|
||||
"data_review.source_unconfirmed": ["来源尚未确认。请核实有无此信息;没有则点击“确认无此信息”。", "The source is unconfirmed. Check whether this information exists; if it does not, choose “Confirm no value”.", "ยังยืนยันข้อมูลจากแหล่งต้นทางไม่ได้ โปรดตรวจสอบว่ามีข้อมูลนี้หรือไม่ หากไม่มี ให้เลือก “ยืนยันว่าไม่มีข้อมูล”"],
|
||||
"data_review.fetch_failed": ["接口读取未完成,请先核实来源,不能直接认定没有此信息。", "The interface read did not complete. Verify the source before concluding that no information exists.", "การอ่านข้อมูลผ่านอินเทอร์เฟซยังไม่เสร็จ โปรดตรวจสอบแหล่งข้อมูลก่อนสรุปว่าไม่มีข้อมูลนี้"],
|
||||
"data_review.conflict_value": ["来源值有冲突,请核实后填写正确的值。", "Source values conflict. Verify and enter the correct value.", "ข้อมูลต้นฉบับขัดแย้งกัน โปรดตรวจสอบและกรอกค่าที่ถูกต้อง"],
|
||||
|
||||
@@ -12,7 +12,11 @@ const plain=value=>JSON.parse(JSON.stringify(value));
|
||||
|
||||
for (const fixture of [
|
||||
{name:'missing room retains the original required rule', field:'DISP_ROOM_NO', can_be_empty:false,
|
||||
source_state:'missing', reason_code:'calendar_missing_rooms', expected:'required_value_missing'},
|
||||
source_state:'missing', reason_code:'calendar_missing_rooms', expected:'room_missing_in_scope'},
|
||||
{name:'failed room lookup is not described as confirmed absence', field:'DISP_ROOM_NO', can_be_empty:false,
|
||||
source_state:'failed', reason_code:'calendar_missing_rooms', expected:'fetch_failed'},
|
||||
{name:'conflicting room evidence is not described as confirmed absence', field:'DISP_ROOM_NO', can_be_empty:false,
|
||||
source_state:'ambiguous', reason_code:'calendar_missing_rooms', expected:'conflict_value'},
|
||||
{name:'missing block is optional information awaiting confirmation', field:'BLOCK_CODE', can_be_empty:true,
|
||||
source_state:'missing', reason_code:'missing_reservation_block', expected:'source_unconfirmed'},
|
||||
{name:'missing packages are optional information awaiting confirmation', field:'PRODUCTS', can_be_empty:true,
|
||||
@@ -54,7 +58,7 @@ test('review explanations have distinct Chinese, English and Thai copy for requi
|
||||
const context=vm.createContext({window:{},document:{readyState:'loading',addEventListener(){}}});
|
||||
vm.runInContext(fs.readFileSync(path.resolve(__dirname,'../../arr_web/static/i18n.js'),'utf8'),context);
|
||||
const catalog=context.window.ARRI18n.CATALOG;
|
||||
const keys=['required_field_rule','optional_field_rule','required_value_missing','source_unconfirmed',
|
||||
const keys=['required_field_rule','optional_field_rule','required_value_missing','room_missing_in_scope','source_unconfirmed',
|
||||
'fetch_failed','conflict_value','invalid_value'];
|
||||
for(const key of keys) {
|
||||
const translations=catalog[`data_review.${key}`];
|
||||
@@ -63,6 +67,7 @@ test('review explanations have distinct Chinese, English and Thai copy for requi
|
||||
}
|
||||
assert.match(catalog['data_review.required_field_rule'][0],/原处理规则必填/);
|
||||
assert.match(catalog['data_review.optional_field_rule'][0],/允许为空/);
|
||||
assert.match(catalog['data_review.room_missing_in_scope'][0],/费率在处理范围内/);
|
||||
assert.match(catalog['data_review.source_unconfirmed'][0],/确认无此信息/);
|
||||
assert.match(catalog['data_review.fetch_failed'][0],/不能直接认定没有此信息/);
|
||||
assert.equal(catalog['data_review.fetch_failed'][0].includes('刷新'),false,
|
||||
|
||||
Reference in new issue
Block a user