feat: add date-based OHIP data reporting alongside XML
This commit is contained in:
1 parent
5ecd571e3b
commit
ad2c59256f
259 files changed
+37326
-126
No files matched your search
@@ -1,7 +1,52 @@
|
||||
# Module Map
|
||||
|
||||
## 2026-09-18 本机OHIP沙箱运行入口
|
||||
|
||||
`arr_web/local_ohip.py`将真实OHIP凭据来源与独立本机库/存储组合,使用固定酒店OHIPSB02;不会在启动/登录时查询酒店。管理面check-access核对应用/密钥元数据;权限状态控制按钮、任务提交及执行。`local_replay`仅增加可选下载控制包装,`local_xml_replay`增加页面提示/状态扩展点,原XML和模拟默认行为保持。实例位置及当前缺权见[证据](../50-evidence/topics/2026-09-18-arr-ohip-activation.md)。
|
||||
|
||||
New direct-data acquisition: `integrations/ohip/arr_data.py` exposes `ARRDataSource.fetch(date, request_id)` and CLI;
|
||||
`data_client.py` owns eight fixed read operations, bounded retry/cache and raw response provenance. Output is private
|
||||
`arr-ohip-data/v1` JSON for15 fields, no XML or Finance writes.41 new/150 scoped offline checks pass. Existing XML
|
||||
collectors/executor remain separate; direct data-processing/Web consumption is implemented through DirectARRSource/DirectARRExecutor. [Guide](../../integrations/ohip/DATA_SOURCE.md).
|
||||
|
||||
`arr_web.arr_download_runtime` composes explicit source components with the same processing dependencies exposed by
|
||||
`ProcessingInputRuntime`; source.json pins identity before queued dispatch. Standard `run.main(..., arr_source=...)`
|
||||
uses ordered resource ownership; default CLI has no configured source. Queue owners wait for active work before
|
||||
closing shared clients/owned DB. This is assembly, not actual-source acceptance. [Handoff](../../arr_web/ARR_DOWNLOAD_HANDOFF.md).
|
||||
|
||||
Local API simulation: `arr_web.local_api_simulation` composes `local_api_fixture` (derived fixture, local adapter and independent native baseline validator), `local_api_server` (authenticated loopback search/detail/rate) and existing v2 capture/executor with isolated replay infrastructure. Separate8874/cookie/state; no platform URL/key or default runtime activation. [Guide](../../arr_web/LOCAL_API_SIMULATION.md).
|
||||
|
||||
Standalone local replay: `arr_web.local_replay` composes `local_xml_replay` snapshot/executor/label wrapper and
|
||||
`local_replay_database` owned socket-only PostgreSQL with existing processing, validation, queue and monthly services.
|
||||
It is not imported by the standard run entry; [guide](../../arr_web/LOCAL_XML_REPLAY.md). Native fixture replay does
|
||||
not implement the API source adapter. Private state lives outside the repository and booking simulator.
|
||||
|
||||
`integrations/ohip/room_calendar_evidence.py` inspects one previously authenticated room-calendar response with explicit
|
||||
hotel/date/target IDs. Preserves missing/empty states and all room/move occurrences, never infers pagination or selects
|
||||
anARR room. No network or runtime wiring; see [evidence](../50-evidence/topics/2026-09-17-arr-room-calendar-evidence.md).
|
||||
|
||||
ARR local acquisition now also includes `integrations/ohip/profile_supplement.py`: separately pinned profile enrichment
|
||||
over a verified completev2 base, bounded outage gaps, ordered prior-pin replay/cache reuse and optional source preparation.
|
||||
It does not change legacyv3 or activate the runtime executor. See [guide](../../integrations/ohip/profile-supplement.md).
|
||||
|
||||
| Path | Responsibility | Notes |
|
||||
|---|---|---|
|
||||
| `integrations/ohip/prepare_arr_source.py` | Integrated offline strict field candidates and gap diagnostics | Rechecks pinned v2/v3 field evidence, retains all16 fields/allrows, source/evidence hashes and private output; no report ordering, whitelist, dedup, XML or adapter/validator protocol |
|
||||
| `integrations/ohip/collect_arr_named_day.py`, `profile_reader.py`, `audit_arr_named_day.py`, `capture_named_day_job.py` | Versioned v3 capture with bounded exact-ID primary-name summaries | Four operations, explicit profile budget, private successful-response cache with per-reservation identity/name validation, immutable replay/reuse; separate v2 contract, no native display equivalence or runtime wiring |
|
||||
| `arr_web/arr_downloads.py` | Explicit single-day automatic-download task boundary | Injected accepted executor; private single-host SQLite/process lock; stable request/retry identity and unknown-outcome recovery. Default Web runtime remains unavailable. See `arr_web/ARR_DOWNLOAD_HANDOFF.md` |
|
||||
| `arr_web/arr_download_handoff.py` | Strict frozen-delivery acknowledgement conversion | Checks expected job/delivery/package/date and acknowledged Finance version before Web success; preserves review/failure and rejects unknown receipts. No source adapter or runtime executor |
|
||||
| `arr_web/arr_download_executor.py` | Explicit-date capture/adaptation/frozen-delivery orchestration | Defaultv2 or explicitv3/mandatory profilebudget; requires accepted adapter/independent mapping validator. Typed immutable request/version/acquisition bounds, full capture/policy comparison before delivery and pre-delivery package checkpoint; prepared recovery skips capture/adaptation. No credentials or default runtime wiring |
|
||||
| `tests/local_postgres.py`, `tests/test_arr_download_postgres_integration.py` | Opt-in real SQL acceptance in owned disposable cluster | No external DSN; private Unix socket with TCP disabled, current008–018 schema, synthetic source/local objects and automatic shutdown/cleanup |
|
||||
| `arr_web/preview.py` | Explicit local UI preview command | Loopback-only HTTP, actual assets plus visible preview label, empty history, unavailable services and all mutations rejected; isolated from production runtime/configuration |
|
||||
| `integrations/ohip/arr_xml_contract.py`, `arr_xml.py`, `validate_arr_xml.py` | Explicit source-row processing XML serialization and independent comparison | Preserves exact fields and row/note/Trace order,25MiB handoff cap; no API candidate selection, native report reconstruction, mapping approval or runtime wiring |
|
||||
| `integrations/ohip/source_facts_contract.py`, `source_facts.py`, `validate_source_facts.py` | Private per-record field evidence and independent raw-source verification | Explicit capturev2/v3; named evidencev2 independently joins raw Primary Profile identities/successful retry provenance, distinct unqueried state; old contract unchanged. All16 columns/context remain candidates, no business acceptance or Web adapter protocol |
|
||||
| `integrations/ohip/compare_arr_sources.py` | Pinned v2/v3 API/native ARR comparison aid | Same-hotel/date guards, unique internal-ID pairs, bounded observations including v3 validated primary name exact/trimmed comparison; no fallback, source adapter or equivalence/Finance approval |
|
||||
| `integrations/ohip/collect_arr_day.py`, `audit_arr_day.py`, `capture_day_job.py` | Explicit-date v2 search/detail/rate capture, pinned offline replay and local batch entry | Three equal system-supplied dates, exact request identity, independent price diagnostics; shared local job lifecycle, no source projection/runtime/Finance wiring |
|
||||
| `integrations/ohip/rate_info.py` | Reservation/day effective-rate read | Published0.7 GET/POST contract, bounded private response capture, exact decimals and fail-closed candidates; used by v2, v1 remains unchanged |
|
||||
| `integrations/ohip/processing_handoff.py` | Isolated frozen XML delivery primitive | Stable batch job, local processor/independent validation, pre-freeze intent pin and verified interrupted-ready recovery, exact artifact/envelope replay and optional expected capture/policy checks before writes; typed identity digests; explicitly injected dependencies only, no runtime wiring or API source-equivalence claim |
|
||||
| `integrations/ohip/capture_job.py` | Local acquisition batch lifecycle | Exact canonical JSON identity, private atomic state, OS file lock, full-attempt retry and pinned completed reuse; not a production queue or Finance submission interface |
|
||||
| `integrations/ohip/audit_arr_capture.py` | Offline capture integrity/protocol replay and candidate-field audit | Requires recorded manifest hash, verifies private original files, emits aggregate observations only; no network, source projection or business readiness claim |
|
||||
| `integrations/ohip/collect_arr_source.py` | Isolated OHIP search/detail candidate capture | Private raw archive with pre-write cumulative byte limit/reserved failure footer, completeness/drift checks and bounded retries; no runtime imports, source projection or Finance/OSS integration. Candidate completeness is not report equivalence |
|
||||
| `arr_web/auth.py` | Login credential verification and bounded attempt ledger | Environment-owned single-operator identity; dependency-free constant-time comparison; no secret logging |
|
||||
| `arr_web/programmatic.py` | XML upload and manual-price finalization coordinator | Registers the validated browser basename separately from canonical `source.xml`; pure price misses create no Finance version, while a frozen manifest replays the original source for final commit |
|
||||
| `arr_web/booking_uploads.py`, `booking_ingestion/excel.py` | Authenticated Booking source upload and bounded raw XLSX parsing | Parser 2.1 uses approved full-cell exact aliases for Tour Code/Group Code and hotel detail (including legacy Thai and current bilingual forms), latest-row cancellations and extracted room items with review state; coordinator/backend route contracts target drafts |
|
||||
@@ -37,4 +82,8 @@ by the active ARR2.0 entrypoint.
|
||||
|
||||
## Last Updated
|
||||
|
||||
2026-08-11
|
||||
2026-09-16
|
||||
|
||||
## Direct data entry — 2026-09-18
|
||||
|
||||
Direct data modules: arr_web/arr_data_executor.py freezes/replays JSON delivery; arr_data_runtime.py composes source and queue; run.py exposes explicit three-option OHIP configuration; processor/validator share business normalization; migration019 adds ohip_json and result5 review. tests/direct_data_portal.py is an explicitly synthetic independent local page.
|
||||
Reference in new issue
Block a user