Skip to content

Commit da89fe9

Browse files
JasonVMoCopilot
andcommitted
test(desktop-test): honor the void application recovery contract
Correct the native consumer expectation without changing the host API or helper behavior. Preserve replacement-survival and matching-start identity refusal assertions, and record old-helper RED plus complete Fabric/REX GREEN qualification and default-environment validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3be5f341-831b-40d4-9582-337c8ea65709
1 parent dbaf558 commit da89fe9

3 files changed

Lines changed: 281 additions & 1 deletion

File tree

‎packages/agentic/desktop-driver/references/current-status.md‎

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,3 +1019,136 @@ No app or native contract was launched. The desktop remained disconnected;
10191019
both endpoints' corrected native recovery qualification remains **Not run**
10201020
pending an active/unlocked session and a separate grant. No push occurred.
10211021
Part of #4447 and #4435.
1022+
1023+
## Windows Fabric and Win32 Paper — recovery native re-verification — 2026-11-12 UTC
1024+
1025+
**Observed source:** native implementation
1026+
`dbaf558939db31b4a3935ad68b1eb20d25d90d3e`, stacked on pinned #4492
1027+
`6489386956c0485cb91b478a8f4adc4828f4178b`. The helper and public host API
1028+
were unchanged in this phase. The harness consumer needed a test-only fix:
1029+
`recoverApplication` checks native `{ state: 'exited' }` internally and resolves
1030+
`Promise<void>`, so the consumer must expect `undefined`. That one-line
1031+
assertion correction is committed with this evidence and needs review before
1032+
publication; no production, protocol or F11 file changed.
1033+
1034+
**Observed granted native session:** active/unlocked **remote** session 1,
1035+
input desktop `Default`, with eligible before/after checks for every native
1036+
wrapper. Both W2 campaigns used the machine lock and `-RequirePhysical`; no
1037+
exit 75 or session change occurred. The final consumer wrapper ran
1038+
`21:54:54Z–21:57:02Z`. Fabric registration was checked before each phase and
1039+
remained the `furn-81` Debug/x64 build at `bdeb0b291`, with no relevant native
1040+
source difference and executable SHA-256
1041+
`df9cb3559843fcfb0158ee4ab5edbae78890c4e231ebd895cbb636c24b18cd45`.
1042+
The exact AUMID remained
1043+
`40411fc5-8e92-4d46-b68d-b62df44b1366_syyqehzwccsyy!App`.
1044+
REX Paper used the canonical worktree image `0.81.1-6828073195`, exact launch
1045+
arguments, a fresh Win32 bundle and owned worktree Metro. A Win32 native-app
1046+
build remains **Unsupported**.
1047+
1048+
**Observed native RED/GREEN:** the retained pre-review helper's source was
1049+
`ea76e931dc4cdebc87e0621a7d730f81faabce5ef902063a0512cd7c2b100f2d`,
1050+
executable SHA-256
1051+
`863cc2dbfc8f5792d22c8606376d226affbf8655fe4ded62ba78c23a29c516c7`.
1052+
It produced **4 expected failures / 0 passed / 7 filtered skips** across the
1053+
two endpoints' stale-start and crashed-recoverer cases:
1054+
`recoverApplication` rejected with `identity-start-mismatch`.
1055+
1056+
The selected review-fixed consumer helper had source
1057+
`3558e8597f6cfe1ee3f4e38dca2137710b80d193a5c30bf946d54065bf8bc153`
1058+
and executable SHA-256
1059+
`97f0072ce22449bc5c87c05de259d3e4c46eca666e6135977432b30fa16053b2`.
1060+
Its first consumer run had **9 passed / 2 failed**, solely because the test
1061+
expected the wire object rather than the host's void resolution.
1062+
After correcting only that assertion, all **11 consumers passed / 0 failed /
1063+
0 skipped**. Native recovery settles a different recorded start without
1064+
control/termination access or replacement signals; matching-start
1065+
session/executable/AUMID mismatches still fail closed. Unreadable native starts
1066+
remain fenced; no real protected-process access-denial case was induced here.
1067+
1068+
**Exact provider command:** from the driver package, inside the granted
1069+
physical-gated machine lock, with `FURN_NATIVE_DRIVER_TEST=1`,
1070+
`FURN_NATIVE_PHYSICAL_INPUT_TEST=1`, Debug configuration and worktree-local
1071+
scratch/cache. `$W2` denotes the assigned worktree; `$E` is its ignored
1072+
`artifacts\desktop\f10w\review-native-20261112` directory.
1073+
The direct-helper override is unset for the cache-resolution contract.
1074+
1075+
```powershell
1076+
yarn test --runInBand `
1077+
--cacheDirectory "$W2\artifacts\desktop\f10w\jest-driver" `
1078+
--runTestsByPath src\native\nativeDriver.test.ts src\native\windows\applicationOwnership.contract.test.ts `
1079+
--testNamePattern 'Windows exact application ownership|builds, reuses, resolves, and handshakes with the Windows helper' `
1080+
--json --outputFile "$E\driver-green-results.json"
1081+
```
1082+
1083+
| Provider/self-test case | Outcome |
1084+
| ------------------------------------------------------------------------------------------------ | --------------- |
1085+
| Build, reuse, resolve, handshake and Windows helper self-test | **Passed** |
1086+
| Noncontrolling inspection and exclusion of another independent helper | **Passed** |
1087+
| Reused recorded start settles without signalling the live replacement; other mismatches rejected | **Passed** |
1088+
| Multiple matching process/window candidates rejected | **Passed** |
1089+
| Five contained exact-identity launch/close cycles | **Passed**, 5/5 |
1090+
| Independent applications serialize through the physical input mutex | **Passed** |
1091+
1092+
Final provider result: **6 passed / 0 failed / 10 unrelated filtered skips**.
1093+
The first invocation mistakenly set a direct-helper path, so the five ownership
1094+
cases passed but the isolated cache test resolved that explicit artifact
1095+
instead of its temporary build. Removing the conflicting invocation override,
1096+
without changing source, produced the full passing result. Both receipts are
1097+
preserved; this was not a resolver fix or an additional production defect.
1098+
1099+
**Observed real consumer results:** both endpoints passed five distinct
1100+
PID/start incarnations, exact independent-service exclusion, native mismatch
1101+
refusals, crashed-recoverer barrier retirement, crashed-owner journal
1102+
reconciliation and three concurrent pairs. Fabric consistently reported
1103+
`uncontained` and exact survivor cleanup; REX reported `job-object` and
1104+
reconciled its job drain. The cross-endpoint physical-mutex case passed with
1105+
cancellation, release and transfer. All recorded application sessions were
1106+
`windows-session:1`. The crash fixtures verified each owned child's native
1107+
identity before literal-PID termination; the new dead-recoverer PIDs were
1108+
**54440** and **55808**. Live replacements survived stale-record retirement.
1109+
The harness's matching section records all 11 cases and exact consumer
1110+
commands.
1111+
1112+
Ignored evidence root: `artifacts\desktop\f10w\review-native-20261112`.
1113+
`driver-green-results.json`, `red-consumer-results.json`,
1114+
`green-initial-consumer-results.json`, `green-consumer-results.json`,
1115+
`green-consumer-evidence.json`, `consumer-assertion-fix.diff` and
1116+
`qualification-summary-final.json` retain the failures, corrected results,
1117+
digests and actual test-source provenance. Final consumer evidence:
1118+
`windows-application-ownership-3BLzLV`; lifecycle report
1119+
`32f3d6be-c4b0-4792-aeb6-a5d7df165fc0` has no test counts.
1120+
1121+
**Observed portable/aggregate closeout:** harness format/lint/build and
1122+
**453** portable tests **Passed** (**28** native skips). Existing driver
1123+
`NativeDesktopHost.applicationIdentity` contracts **Passed**, **31/31**.
1124+
Locked default-environment `yarn clean-lage-cache` then `yarn lage buildci`
1125+
initially **Failed** the reported intermittent Storybook `serverIntegration`
1126+
readiness assertion, `A stopping command cannot publish readiness`
1127+
(`176` successful tasks, one failed). The cause remains unproven.
1128+
After the fail-fast test children settled and a clean audit, the sole unchanged
1129+
full rerun **Passed**, **178 successful / 0 failed / 0 skipped**, 2m 38.65s.
1130+
No TEMP, concurrency, timeout, dependency or guidance workaround was applied.
1131+
Both W2 campaigns ended and the final audit **Passed**:
1132+
`FURN-AUDIT: no FURN desktop processes found`.
1133+
1134+
**Publication/remaining limits:** no push or PR-body update occurred because
1135+
the test-only correction needs review. Initial PR #4494 CI at `dbaf558939`
1136+
was observed green: run `43282149276`, all **19/19** checks successful.
1137+
Windows job `131405956387` selected the ownership provider suite
1138+
(`PASS applicationOwnership.contract.test.ts`; **4** nonphysical ownership
1139+
cases selected, physical case gated off; full driver **1,281 passed /
1140+
46 skipped**). The Win32 jobs did not select that ownership step, and the
1141+
actual-endpoint consumer opt-in was absent: **0/11** consumers hosted.
1142+
These are historical hosted counts, not new CI for the local test correction
1143+
or substitutes for this physical campaign. F11 claim naming is deferred and
1144+
untouched. Actual kernel PID recycling and shared-PID activation were
1145+
**Not induced**; all concurrent winners were distinct. Arbitrary uncontained
1146+
descendants and mixed-graph recovery remain unqualified. The existing
1147+
`windows-exact-application-ownership.md` patch changeset remains applicable.
1148+
Part of #4447 and #4435.
1149+
1150+
**Observed reference checks:** Markdown links in both edited ledgers
1151+
**Passed** (6 driver links, 15 harness links). Root `yarn oxfmt --check`
1152+
(3,163 files), `yarn check-agent-instructions`, `yarn change:check`, and
1153+
`git diff --check` **Passed**. Their receipts are in the same ignored evidence
1154+
directory.

‎packages/agentic/desktop-test/references/current-status.md‎

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,3 +1773,150 @@ No application/native contract was launched, no desktop campaign started,
17731773
and no push occurred. Corrected native recovery re-verification remains
17741774
**Not run**, awaiting an active/unlocked session and its separate grant.
17751775
Part of #4447 and #4435.
1776+
1777+
## Windows Fabric and Win32 Paper — recovery native re-verification — 2026-11-12 UTC
1778+
1779+
**Observed source:** native helper and harness implementation
1780+
`dbaf558939db31b4a3935ad68b1eb20d25d90d3e`, still stacked on #4492 at
1781+
`6489386956c0485cb91b478a8f4adc4828f4178b`. The consumer test alone had
1782+
the one-line assertion correction committed with this section: the public
1783+
`NativeDesktopHost.recoverApplication` returns `Promise<void>`, after checking
1784+
the native `{ state: 'exited' }` verdict. Its consumer must expect an undefined
1785+
resolution, not the wire-level result. No production, protocol or F11
1786+
file changed in this phase. The exact test diff and test-file digest are retained
1787+
in ignored `artifacts\desktop\f10w\review-native-20261112`.
1788+
1789+
**Observed session and application provenance:** both granted W2 campaigns ran
1790+
in active/unlocked **remote** session 1, input desktop `Default`. Every native
1791+
wrapper used the machine lock and `-RequirePhysical`; before/after gates stayed
1792+
eligible, with no exit 75 or session change. The final consumer wrapper ran
1793+
`21:54:54Z–21:57:02Z`. Registration and image hash were checked before each
1794+
phase: packaged Fabric remained the `furn-81` Debug/x64 build from `bdeb0b291`,
1795+
with no relevant native-app/source difference. Its executable SHA-256 remained
1796+
`df9cb3559843fcfb0158ee4ab5edbae78890c4e231ebd895cbb636c24b18cd45`.
1797+
The AUMID was
1798+
`40411fc5-8e92-4d46-b68d-b62df44b1366_syyqehzwccsyy!App`.
1799+
Win32 Paper used the worktree's canonical prebuilt REX
1800+
`0.81.1-6828073195` image, its exact arguments and a fresh Win32 bundle;
1801+
a Win32 native application build remains **Unsupported**.
1802+
1803+
Fresh Win32 and Windows bundles **Passed**, with run IDs
1804+
`3830f2d5-30b1-405b-a205-71f45dcc9490` and
1805+
`e2fb42e1-c5ec-41b3-bae3-64cedad0aeb6`. Each consumer invocation owned a
1806+
fresh Metro, verified its listener's native PID/start/session and worktree
1807+
command line, and stopped it in `finally`. No preexisting Metro was adopted.
1808+
Native scratch/cache paths stayed inside the worktree.
1809+
1810+
**Observed test-first sequence:**
1811+
1812+
1. Retained old helper `863cc2dbfc8f5792d22c8606376d226affbf8655fe4ded62ba78c23a29c516c7`,
1813+
source `ea76e931dc4cdebc87e0621a7d730f81faabce5ef902063a0512cd7c2b100f2d`:
1814+
**4 expected failures / 0 passed / 7 filtered skips**. Both endpoints rejected
1815+
stale-start recovery, including interrupted-recoverer journal settlement,
1816+
with `identity-start-mismatch`. This was the required native RED, not an
1817+
environment failure.
1818+
2. Review-fixed helper
1819+
`97f0072ce22449bc5c87c05de259d3e4c46eca666e6135977432b30fa16053b2`,
1820+
source `3558e8597f6cfe1ee3f4e38dca2137710b80d193a5c30bf946d54065bf8bc153`:
1821+
the first complete run had **9 passed / 2 failed / 0 skipped**. Both failures
1822+
were the consumer's wrong return-value assertion; recovery resolved
1823+
successfully, but the test expected the native wire object. The existing
1824+
host identity unit contract already expects `undefined`.
1825+
3. Correct only that assertion to `.resolves.toBeUndefined()`, retaining the
1826+
independent assertion that the real replacement is alive and all
1827+
matching-start mismatch refusals. Rerun the whole native consumer suite:
1828+
**11 passed / 0 failed / 0 skipped**.
1829+
1830+
| Consumer case | Windows Fabric packaged | Win32 Paper REX |
1831+
| -------------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------- |
1832+
| Exact identity, independent-service exclusion, five launches/teardowns without leaks | **Passed**, 5/5 distinct PID/start pairs | **Passed**, 5/5 distinct PID/start pairs |
1833+
| Stale-start settlement; matching-start session/executable/AUMID mismatches fail closed | **Passed** | **Passed** |
1834+
| Crashed recoverer, stale journal and dead recovery barrier; live replacement preserved | **Passed** | **Passed** |
1835+
| Crashed owner/helper and exact application journal recovery | **Passed**, packaged survivor recovered | **Passed**, job-object drain reconciled |
1836+
| Concurrent pairs, ambiguity refusal, pinned exclusion and independent teardown | **Passed**, 3/3 pairs | **Passed**, 3/3 pairs |
1837+
| Physical input mutex, cancellation without effect, release and transfer | **Passed**, one cross-endpoint case | Same cross-endpoint case |
1838+
1839+
Every repeated identity reported `windows-session:1`. Fabric consistently
1840+
reported `uncontained`; REX consistently reported `job-object`. All three
1841+
concurrent pairs on each endpoint acquired two distinct incarnations: the
1842+
shared-PID packaged activation race was **Not induced**. Interrupted recoverers
1843+
were identity-verified Node processes stopped by literal PIDs **54440** and
1844+
**55808**, with recorded native starts
1845+
`2026-11-12T21:55:28.3844388Z` and
1846+
`2026-11-12T21:56:07.0500082Z`. The subsequent supervisor retired the dead
1847+
recovery barrier and injected stale application record without signalling the
1848+
real replacement. These injected recorded-start mismatches are **not** actual
1849+
kernel PID recycling.
1850+
1851+
**Exact consumer commands:** `$W2` denotes the assigned worktree and `$E`
1852+
its `artifacts\desktop\f10w\review-native-20261112` directory. From `$W2`,
1853+
inside the granted campaign and physical-gated machine lock:
1854+
1855+
```powershell
1856+
node -- artifacts\desktop\f10w\review-native-20261112\run-consumer.mjs red artifacts\desktop\f10w\native-20261112\selected-helper.json
1857+
node -- artifacts\desktop\f10w\review-native-20261112\run-consumer.mjs green artifacts\desktop\f10w\review-20261112\selected-helper.json
1858+
```
1859+
1860+
The retained bounded orchestration uses `NodeDesktopCommandRunner`, the two
1861+
explicit application descriptors, all three native/application/physical
1862+
opt-ins, the selected immutable helper and `buildPolicy=never`. Its GREEN
1863+
Jest child command is:
1864+
1865+
```powershell
1866+
yarn workspace @fluentui-react-native/desktop-test test --runInBand `
1867+
--cacheDirectory "$W2\artifacts\desktop\f10w\jest-harness" `
1868+
--runTestsByPath src\windowsApplicationOwnership.contract.test.ts `
1869+
--json --outputFile "$E\green-consumer-results.json"
1870+
```
1871+
1872+
RED adds `--testNamePattern 'native start|crashed recoverer'` and uses
1873+
`red-consumer-results.json`. The final real consumer evidence directory is
1874+
`windows-application-ownership-3BLzLV`; outer command report
1875+
`32f3d6be-c4b0-4792-aeb6-a5d7df165fc0` is lifecycle-only, not the test-count
1876+
source. `green-consumer-results.json`, `green-consumer-evidence.json`,
1877+
`green-invocation.json`, registration receipts and `consumer-assertion-fix.diff`
1878+
retain the actual counts, identities and dirty-test provenance. Expected RED
1879+
and first-GREEN failures are preserved separately, not overwritten.
1880+
1881+
**Observed additional validation:**
1882+
1883+
- `yarn workspace @fluentui-react-native/desktop-test format`, `lint`, and
1884+
`build`: **Passed**.
1885+
- `yarn workspace @fluentui-react-native/desktop-test test --runInBand
1886+
--cacheDirectory "$W2\artifacts\desktop\f10w\jest-harness"
1887+
--json --outputFile "$E\harness-portable-results.json"`:
1888+
**Passed**, **453 passed / 28 native skipped**.
1889+
- `yarn workspace @fluentui-react-native/desktop-driver test --runInBand
1890+
NativeDesktopHost.applicationIdentity
1891+
--cacheDirectory "$W2\artifacts\desktop\f10w\jest-driver"
1892+
--json --outputFile "$E\host-identity-portable-results.json"`:
1893+
**Passed**, **31 passed**, including the existing void-return and unsettled
1894+
native-verdict contracts.
1895+
- The driver's matching native selection: **Passed**, **6 passed / 10
1896+
unrelated filtered skips**, including native build/cache/handshake/self-test
1897+
and the physical mutex. Its ledger records the exact invocation.
1898+
- Locked default-environment `yarn clean-lage-cache` followed by
1899+
`yarn lage buildci`: initial attempt **Failed**, 176 successful tasks and one
1900+
Storybook task failure, `A stopping command cannot publish readiness` in
1901+
`serverIntegration`. The reported intermittent readiness failure was observed
1902+
again; its cause remains unproven. After remaining fail-fast test children
1903+
settled and the audit was clean, the **one** unchanged full rerun **Passed**:
1904+
**178 successful / 0 failed / 0 skipped**, 2m 38.65s. Neither attempt changed
1905+
default TEMP, concurrency, timeouts, dependencies or repository guidance.
1906+
Logs are `buildci-default.log` and `buildci-default-rerun.log`.
1907+
1908+
**Closeout and limits:** both W2 campaigns ended. Native and final aggregate
1909+
audits **Passed**: `FURN-AUDIT: no FURN desktop processes found`. No W2 app,
1910+
helper, fixture or Metro survived. The existing three-package patch changeset
1911+
`windows-exact-application-ownership.md` remains applicable. The test-only
1912+
correction requires coordinator review before push; this phase has not pushed,
1913+
edited the PR body, or started new hosted CI. Initial PR #4494 CI at `dbaf558939`
1914+
was observed green; it does not qualify this new local test correction.
1915+
F11 claim naming remains deferred and untouched. Real kernel PID recycling,
1916+
shared-PID activation, arbitrary uncontained descendants and mixed-graph
1917+
recovery remain unqualified. Part of #4447 and #4435.
1918+
1919+
**Observed reference checks:** Markdown link checks for both edited ledgers
1920+
**Passed** (15 harness links, 6 driver links). Root `yarn oxfmt --check`
1921+
(3,163 files), `yarn check-agent-instructions`, `yarn change:check`, and
1922+
`git diff --check` **Passed**. Receipts are retained beside the native results.

‎packages/agentic/desktop-test/src/windowsApplicationOwnership.contract.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ for (const endpoint of endpoints) {
230230
try {
231231
await expect(pinned.inspectApplication({ ...registration(endpoint), host: pinned })).rejects.toMatchObject({ data: { reason } });
232232
if (reason === 'identity-start-mismatch') {
233-
await expect(pinned.recoverApplication(processIdentity)).resolves.toEqual({ state: 'exited' });
233+
await expect(pinned.recoverApplication(processIdentity)).resolves.toBeUndefined();
234234
} else {
235235
await expect(pinned.recoverApplication(processIdentity)).rejects.toMatchObject({ data: { reason } });
236236
}

0 commit comments

Comments
 (0)