JEDI ACADEMY PENDING LEAVE DEMO — 17 October 2026

Applied only to the explicitly authorised isolated local Dev_AlexForbes_HR on BRENDANDESKTOP. Remote dev unchanged. This package is independent of the completed team, manager, department and480-interaction analytics packages.

Created exactly two native pending annual-leave requests:
94665 — Luke Skywalker / employee0140765 —27 October2026 —1 day /8 hours.
94666 — Ahsoka Tano / employee9053433 —29 October2026 —1 day /8 hours.
Both remain at existing instruction6 / manager step13, directed to Leia Organa /0901633. They were NOT approved. No approved leave form, balance movement, payroll transaction or notification was created. The real HRF_SP_ELEAVE_APPROVER_PENDING_INDEX returned both IDs for Leia using direct-manager scope, and the native HRF_FN_ELEAVE_GET_APPROVERS resolved Leia for each request.

Native path:
- Existing company/employee keys, annual leave assignments and actual composite Posi reporting links are checked. Existing first annual workflow step must still be MANAGER6/13, excluding custom procedures or automatic/no-approval routing.
- The native HRF_SP_ELEAVE_SUBMIT_REQUEST_BASIC_API runs only with ValidateOnly=1 and DisableSelectOutput=1 before any outer rehearsal transaction. That path validates date/overlap/cycle rules and explicitly rolls back before approver-notification processing. Its ordinary submit mode is never called.
- Days/hours are calculated by HRF_SP_ELEAVE_GET_NUM_WORKDAYS. Exactly one workday, positive hours and no overlap are required. Target-native balances are read internally and never invented or exported.
- The core HRF_SP_ELEAVE_SUBMIT_REQUEST then creates My_Requests, its single Initial Request routing-history entry and my_Leave_Requests. That core path calls neither approval nor mail; current manager workflow is retained. No approval API or completed leave-form path is invoked. Native contact input is blank.
- All11 exact ordered JSON snapshots preserve existing requests/detail/history, scoped Lv_Form/Lv_Emp/Lv_Xact/PW_Master/User_Access_To, both scoped payroll queues and the entire My_Mail_Bot queue. Any difference aborts the transaction. Existing rows, security, balances and queue state remain exact; no integration config or trigger is changed.

Ownership and replay:
Stable comment namespace CODEX_JEDI_PENDING_LEAVE_20261017 with separate LUKE/AHSOKA markers owns only these two new requests. IDs are resolved on each target, never transported. Complete rerun adds zero and does not change existing demo dates. No backup table is required because no existing business record is edited. Removal deletes only owned pending child/history/header records in foreign-key order and refuses if either request advances beyond the original pending step/history. Preserve progressed requests and review them manually. Native validation/rehearsal can consume identity values despite rollback; identity gaps are expected.

Set HRF_SQL_CONNECTION_STRING securely in the PowerShell process. No credentials are retained. Read-only DryRun is the runner default.
.\Run-JediPendingLeave.ps1 -Mode DryRun -ExpectedDatabase Dev_AlexForbes_HR -ExpectedMachine BRENDANDESKTOP
.\Run-JediPendingLeave.ps1 -Mode Rehearse -ExpectedDatabase Dev_AlexForbes_HR -ExpectedMachine BRENDANDESKTOP -AllowDemoChanges -IsolationConfirmed
.\Run-JediPendingLeave.ps1 -Mode Apply -ExpectedDatabase Dev_AlexForbes_HR -ExpectedMachine BRENDANDESKTOP -AllowDemoChanges -IsolationConfirmed
.\Run-JediPendingLeave.ps1 -Mode Verify -ExpectedDatabase Dev_AlexForbes_HR -ExpectedMachine BRENDANDESKTOP
.\Run-JediPendingLeave.ps1 -Mode Rollback -ExpectedDatabase Dev_AlexForbes_HR -ExpectedMachine BRENDANDESKTOP -AllowDemoChanges -IsolationConfirmed

For dev replay provide the actual target ExpectedDatabase/ExpectedMachine and its own secure connection string; confirm target isolation. StartDate defaults to local today+10 days, with Ahsoka two days later and weekend dates advanced to Monday. Supply -StartDate YYYY-MM-DD for an explicit future base date; dates must pass current native rules. Existing marked requests remain unchanged even if StartDate differs on rerun. Publish current leave prerequisites first. Never run notification-enabled wrappers or manually approve these demo requests as part of the seed.

Completed validation:
Native ValidateOnly returned Y/200 for both; no open transaction remained. Rehearse created2, verified them through native approver resolution, removed2 using the retained removal path, then rolled back the complete outer transaction. Real Apply created2; the next Apply validated0 new and added0. All11 exact business/security/mail/payroll snapshots passed. The actual native pending index contains both real local IDs. JSON exports contain only these owned synthetic records; unrelated real pending requests are excluded.

The current ManagerWorkspace summary procedure does not itself compute leave counts. These records populate the established eLeave manager pending-index contract; any new manager-workspace leave tiles should consume that authoritative secured handler. No application source was changed by this package.

Identifier-bracketing verification: Passed across 3/3 SQL files.
