Skip to content

MK Trade / Allocation / Scale — Post-Refresh Validation — 2026-08-09

  • Status: STATIC VALIDATION PASS / ENVIRONMENT EVIDENCE NOT RUN
  • Release source: master@baff406d964b9f785bf98d2ae84cfb262e26f4b2
  • QA integration source: qa@1dfed7d5c827f992e763c63bfca95324a60af387
  • Parent delta: MK_TRADE_ALLOCATION_SCALE_POST_REFRESH_BRANCH_DELTA_2026-08-09.md
  • Evidence addendum: RBR-MK-TAS-POST-REFRESH-READONLY-ADDENDUM.md
  • Effects: static source and documentation review only

1. Validation Purpose

This document validates that:

  1. release and QA source authorities are not conflated;
  2. post-refresh Trade, Allocation and Scale findings are supported by source;
  3. closed and open Scale discrepancies are classified correctly;
  4. the read-only package contains no mutation or provider/device action;
  5. documentation does not claim current environment acceptance or M3/M4.

2. Branch Relationship

Static comparison result:

master = baff406d964b9f785bf98d2ae84cfb262e26f4b2
qa     = 1dfed7d5c827f992e763c63bfca95324a60af387
merge base = master@baff406...
qa ahead = 485 commits
master-only commits = 0

Result:

QA CONTAINS RELEASE
QA ALSO CONTAINS MATERIAL UNPROMOTED SOURCE
DUAL-REF AUTHORITY REQUIRED

Validation: PASS.


3. Existing Packet Reuse

The repository already contained complete current refreshes for:

  • Trade lineage and current callers;
  • Allocation baseline and current callers;
  • Physical Scale baseline and current callers;
  • read-only Trade/Allocation/Scale evidence packages;
  • Runbook and Wiki projections.

The new package is a dated delta, not a duplicate replacement.

Validation: PASS.


4. Trade Findings

4.1 Undated rows

Released Trade query source adds ETA IS NULL AND ETD IS NULL as an accepted branch in both From and To date predicates.

Finding:

Date-filtered result can contain undated rows.

Validation: PASS.

4.2 Alias migration candidate

The repository contains a targeted migration candidate for:

mk-deal-ledger
oms.deal-ledger -> oms.trade-summary

The source does not prove applied DB state.

Validation: PASS.

4.3 Cost and Order actor boundary

Released source removes the earlier shared advanced-operation helper check from Outbound Cost and selected Order/Booking write paths.

The documentation classifies this as an access/policy evidence gap rather than approved broad access.

Validation: PASS.

4.4 Reference preservation

Released source contains resolver logic that can:

apply valid new reference
unlink
or preserve the current reference by ignoring an invalid request

The documentation requires exact stored readback and does not infer from HTTP success.

Validation: PASS.


5. Allocation Findings

5.1 Direct command

No direct post-refresh released change was identified in the named Allocation Apply route or page owner.

The documentation does not claim the entire family is unchanged. It records material shared writer changes in Inbound, Outbound, Booking and order/reference paths.

Validation: PASS.

5.2 Handoff risks

The following source-supported adjacent risks are included:

  • zero-item target Orders;
  • broader line deletion path;
  • reference request preserved rather than applied;
  • locked execution bridge preservation;
  • QA-only OrderSync/shared writer changes.

Validation: PASS.


6. Scale Findings

6.1 Prefix-direction correction

Released integrated Check-in selects:

inbound -> GROSS
outbound -> TARE

Therefore the prior Gross-for-all discrepancy is correctly marked closed in released source.

Validation: PASS.

6.2 Released outbound Tare provenance

Released integrated Check-in assigns the commodity Gross aggregate to the selected entry-prefix steering field. For outbound flow, that field is Tare.

The documentation marks provenance as unresolved rather than claiming the stage value is correct.

Validation: PASS.

6.3 Integrated Check-out route

Released app/systems/YMS/scale/api_routes.php registers:

/yms/scale/check-out

but does not register:

/yms/scale/check-out/execute

The released Scale workflow smoke expects the integrated route.

The documentation marks a source/test mismatch and does not claim Runtime failure without deployment evidence.

Validation: PASS.

6.4 QA integrated Check-out

QA source adds:

  • /yms/scale/check-out/execute;
  • order-ticket bridge assertion;
  • integrated Order save + Scale Out;
  • Check-in item-count assertion;
  • outbound entry handling that does not overwrite ticket Tare from commodity Gross.

Legacy Check-out remains present.

The documentation classifies these as QA candidate facts and keeps one-writer/cutover open.

Validation: PASS.


7. Read-Only Package Validation

7.1 SQL inventory

The addendum contains 20 SQL templates:

Environment: 2
Trade: 6
Allocation: 6
Scale: 6

Allowed forms:

SELECT
information_schema read
UNION ALL within a SELECT

No template contains:

INSERT
UPDATE
DELETE
REPLACE
ALTER
CREATE
DROP
TRUNCATE
FOR UPDATE
LOCK TABLES
GET_LOCK
RELEASE_LOCK
mutating CALL

Result: PASS.

7.2 Schema-first behavior

The package begins with DB identity and required-table inventory. It directs the executor to reuse the existing family schema inventories before column-specific queries.

Result: PASS.

7.3 Tenant and ID scope

Business queries require:

  • verified <CLIENT_ID>;
  • approved Order/Ticket/Lot/Allocation IDs;
  • bounded output limits;
  • named time windows where broad recent populations are needed.

Result: PASS.

7.4 Browser scope

Browser evidence is restricted to:

  • authenticated GET page access;
  • GET read APIs;
  • network route observation;
  • control visibility;
  • source/cache identity.

No form submission or consequential verb is allowed.

Result: PASS.

7.5 Sensitive data

The package excludes credentials, session data, broad customer records, full remarks, raw provider payloads and unrelated tenant rows.

Result: PASS.


8. Overclaim Review

The package does not claim:

  • QA is production;
  • master is currently deployed;
  • source/test mismatch is a confirmed field outage;
  • outbound Tare provenance produced a current bad row;
  • broad Order/Cost access is accepted policy;
  • the alias migration ran;
  • Allocation balances are currently inconsistent;
  • Scale device support exists;
  • M3 or M4.

Result: PASS.


9. Documentation Consistency

The new files consistently use:

CURRENT RELEASE SOURCE
CURRENT QA CANDIDATE
CURRENT SOURCE PRESENT / EVIDENCE REQUIRED
MIXED SOURCE / BLOCKED
OPEN POLICY

They preserve the existing detailed packets as lower-level owners and use the new dated delta for post-baseline facts.

Result: PASS.


10. Validation Summary

branch authority separation: PASS
existing packet reuse: PASS
Trade source findings: PASS
Allocation handoff findings: PASS
Scale released findings: PASS
Scale QA candidate findings: PASS
read-only SQL construction: PASS
GET-only browser boundary: PASS
sensitive-data boundary: PASS
overclaim review: PASS

11. Not Validated

current deployed SHA
current DB rows/schema
current role/account behavior
current Trade accounting policy
current Allocation integrity
current Scale payloads/tickets
physical device behavior
current Wiki content
field acceptance

12. Final Disposition

STATIC DOCUMENTATION PACKAGE: PASS
ENVIRONMENT EVIDENCE: NOT RUN
POLICY ACCEPTANCE: OPEN / PARTIAL
M3: NO
M4: NO
PHASE PROGRESS: NONE

---

Source: docs/reconstruction/MK_TRADE_ALLOCATION_SCALE_POST_REFRESH_VALIDATION_2026-08-09.md — ctc repository · This page is an English translation of the source document. Identifiers, file paths and code symbols are unchanged.