Skip to content

Loader Work Assignment — Caller Preflight Validation 2026-08-08

  • Status: DOCUMENTATION VALIDATION / STATIC SOURCE PREFLIGHT COMPLETE
  • Repository baseline: qa/master@e18aa7e5ab64b626b525d46d5db074f26e10fa06
  • Primary result: LOADER_WORK_ASSIGNMENT_CURRENT_CALLER_AND_GUARD_INVENTORY_2026-08-08.md
  • Evidence ledger: PROGRESS.md
  • Evidence worksheet: RBR-AWCO-002-EVIDENCE-WORKSHEET.md
  • Program state: PHASE IMPLEMENTATION USER HOLD
  • Effects: documentation and source inspection only

1. Validation Objective

Validate that the current caller inventory:

  1. distinguishes the active Route contract from the typed helper contract;
  2. identifies current Office and Loader UI callers;
  3. identifies typed-helper Runtime includes and selected current consumers;
  4. does not misclassify source presence as current Route execution;
  5. identifies every confirmed source-level cross-contract guard mismatch;
  6. separates source proof from DB, runtime, role, provider, and Wiki evidence;
  7. defines the smallest next evidence and correction order without activating implementation.

2. Source Files Reconciled

app/systems/TMS/transload/api_routes.php
app/systems/TMS/transload/assignment_work_helper.php
app/systems/TMS/transload/post_helper.php
app/systems/TMS/staff-time/api_routes.php
app/systems/TMS/transload/loader_transition_evidence.php
frontend/pages/system/TMS/transload/loader-assignment-board.php
frontend/pages/system/TMS/transload/inbound-loader.php
app/utils/KJDatabase.php

Supporting tests/scripts and current documentation were used as secondary inputs only.


3. Validation Results

Validation Result What it proves What it does not prove
Active Route registrations located PASS Current /work-assignments Route family exists in source. Deployed Route execution or DB compatibility.
Office caller located PASS Current Board source calls the active API family. Intended role authorization or browser success.
Loader caller located PASS Current Loader page source calls current/Start/Complete/Clock Out actions. Target-role field success or mobile acceptance.
Typed helper included by current Runtime owners PASS Helper is a compatibility dependency and cannot be called dead solely from lack of UI Route. Which helper functions run in Production.
Typed full-command direct Route/UI callers PASS — none located Repository static search found no direct current registration/caller for the typed full-command family. Dynamic invocation, deployed-only code, or external caller absence.
Terminal guard representation PASS — mismatch confirmed Shared guard reads typed Clock Out only; current Route writes a different identity. Existing affected rows or a field incident.
General Clock Out protection PASS — mismatch confirmed Staff Time bypass guard reads typed active rows only. Actual bypass success or event duplication.
Final Break ownership PASS — divergence confirmed Route uses linked Break planner; typed helper uses Staff Time events on Clock Out planner. Which representation is current DB authority.
Cancellation spelling PASS — divergence confirmed Current writers use CANCELED and CANCELLED. Current row counts and all query behavior.
Create duplicate identity PASS — divergence confirmed Typed helper has request token/lock; active Route does not expose the same command identity. Runtime duplicate frequency.
Notification attempt persistence PASS — divergence confirmed Route and typed helper persist different notification evidence. Provider delivery or retry success.
Transition Audit coverage PASS — bounded Selected Start/Undo Transloading writer exists. Work Assignment transition coverage or current DB activation.
DB/schema/data NOT_RUN None. All current row and index facts.
API/browser/role NOT_RUN None. Current user impact.
Provider/external time NOT_RUN None. Partial-result and recovery behavior.
Current Wiki NOT_READ None. Published procedure accuracy.

4. Static Search Interpretation

The validation uses this rule:

no direct static caller located
!= unreachable
!= safe to delete

A source function is classified as current application, compatibility dependency, test-only evidence, or unproven only after considering:

  • direct symbol references;
  • include graph;
  • Route registry;
  • UI caller;
  • helper-local calls;
  • test/script-only calls;
  • current DB representation requirements.

The typed helper is correctly classified as mixed:

full typed command family: no direct current Route/UI caller located
selected guards/locks/readers: current source consumers located

5. Guard Validation Detail

Terminal Clock Out

Accepted invariant:

active terminal Clock Out
-> no later Work / Load / Break

Current source predicates:

typed guard
-> ASSIGNMENT_DATA.type = CLOCK_OUT

active Route writer
-> COMMODITY_NAME = CLOCK_OUT
   + SPECIAL_INSTRUCTION = QUEUE_WORK_ASSIGNMENT

Result:

cross-representation terminal decision: NOT UNIFIED

General Clock Out

Accepted invariant:

Started Clock Out assignment
-> complete through workflow-owned action
-> no general Clock Out bypass

Current Staff Time guard reads only active typed rows returned from ASSIGNMENT_DATA IS NOT NULL.

Result:

Route-owned Started Clock Out visibility: NOT ESTABLISHED BY CURRENT GUARD

6. Final Break Validation Detail

Route flow

Clock Out planner
-> create separate QUEUE_BREAK planner
-> link finalBreakId
-> wait for Break planner FINISHED

Typed flow

Clock Out planner
-> create linked BREAK_IN Staff Time event
-> derive elapsed interval
-> create BREAK_OUT during Clock Out completion

Result:

same user concept
+ different persisted identity and lifecycle
= migration and recovery decision required

The inventory correctly avoids choosing one merely because it is more detailed or currently called by the UI.


7. Evidence Scenario Validation

The caller inventory preserves existing scenario identity and adds specific source-driven cases:

AWCO-RUN-031 — later Break after Route-owned Clock Out
AWCO-RUN-032 — later Load/Work after Route-owned Clock Out
AWCO-RUN-050 — general Clock Out against Started Route-owned Clock Out
AWCO-RUN-051 — cleaning prerequisite bypass attempt
AWCO-RUN-052 — final-Break prerequisite bypass attempt
AWCO-RUN-060 — missing create response and queue reread
AWCO-RUN-061 — notification failure recovery on existing row

These scenarios are correctly classified as:

DEFINED
NOT AUTHORIZED
NOT RUN

8. Documentation Consistency

The following documents now agree:

  • current source contract says dual representation;
  • caller inventory identifies exact current consumers;
  • evidence ledger records static preflight complete;
  • worksheet index distinguishes source preflight from runtime evidence;
  • detailed worksheet remains the execution owner.

No document claims:

  • current DB population;
  • a proven Production incident;
  • target-role failure;
  • canonical contract selection;
  • M3 or M4.

9. Effect Validation

Runtime PHP/JavaScript/TypeScript changes: NONE
DB schema/data read or write: NONE
Role/menu/account/config changes: NONE
Provider calls: NONE
Physical work: NONE
Wiki DB read/write: NONE
Service/deployment/recovery action: NONE
Phase progress: NONE

10. Open Questions

The following cannot be closed by static source review:

  1. Which representation exists in current active and historical DB rows?
  2. Are there rows containing both representations?
  3. Has the general Clock Out bypass occurred against a Route-owned Clock Out?
  4. Have Break, Load, or Work rows been placed behind Route-owned Clock Out rows?
  5. Which cancellation spelling is present in current data and consumed by current queries?
  6. Which Final Break representation is used by current operators?
  7. Are typed helper full-command functions dynamically registered or deployed differently?
  8. What current role and provider recovery behavior is accepted?
  9. What current Wiki content describes the workflow?

11. Final Validation

Source set: PASS
Route/UI caller inventory: PASS
Typed helper include/consumer inventory: PASS
Static no-caller qualification: PASS
Terminal guard discrepancy: PASS — confirmed in source
General Clock Out guard discrepancy: PASS — confirmed in source
Final Break divergence: PASS — confirmed in source
Cancellation/request/notification divergence: PASS — confirmed in source
Evidence boundaries: PASS
Documentation links: PASS
Runtime/DB/role/provider/Wiki evidence: NOT RUN
Implementation authorization: NONE

12. Maintenance

Repeat this validation when Route registration, UI caller, helper include, guard predicate, Final Break writer, cancellation value, request identity, provider evidence, or Transition Audit integration changes.

---

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