Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/validation/native-host-api-contract-20260919.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ as retired JavaScript invocation symbols:

These APIs exchange drag and download host requests. They do not expose the
retired JSON JavaScript invocation transport. Follow-up run `35430597424`
proved that they are deliberately header-only rather than package exports. The
contract now checks them in the public header, keeps exported host services
required in the export manifest, and uses the union only for the broad
fail-closed scan of unreviewed v1/v2 engine and interop symbols.
showed the first contract fix had not reconciled the export surface, and
architecture run `35430888338` established the authoritative rule: every
non-instrumentation `WEBSCENE_API` declaration must appear in the macOS export
manifest. All six drag/download functions are now exported and classified as
independently versioned host services while the broad fail-closed scan for
unreviewed v1/v2 engine and interop symbols remains.

Only `git diff --check` was run for this fast CI-recovery slice. Current-main
CI remains the authoritative execution gate.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ _webscene_engine_take_typed_host_request_v1
_webscene_host_request_release_v1
_webscene_engine_complete_host_request_v1
_webscene_engine_discard_host_request_v1
_webscene_engine_dispatch_drag_v1
_webscene_engine_take_download_request_v1
_webscene_download_request_release_v1
_webscene_engine_take_outbound_drag_request_v1
_webscene_outbound_drag_request_release_v1
_webscene_engine_complete_outbound_drag_v1
_webscene_engine_take_input_dispatch_failure
_webscene_engine_take_invoke_result_v3
_webscene_engine_take_callback_v3
Expand Down
18 changes: 7 additions & 11 deletions tooling/webscene/tests/native-binary-interop.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ test('native engine publishes only the versioned leased interop surface', async
'webscene_file_grant_release_request_release_v2',
'webscene_engine_complete_host_request_v1',
'webscene_engine_discard_host_request_v1',
'webscene_engine_dispatch_drag_v1',
'webscene_engine_take_download_request_v1',
'webscene_download_request_release_v1',
'webscene_engine_take_outbound_drag_request_v1',
'webscene_outbound_drag_request_release_v1',
'webscene_engine_complete_outbound_drag_v1',
'webscene_engine_set_window_focused_v1',
'webscene_engine_set_window_fullscreen_v1',
'webscene_engine_set_accessibility_preferences_v1',
Expand All @@ -108,20 +114,10 @@ test('native engine publishes only the versioned leased interop surface', async
assert.match(header + compiledHeader, new RegExp(`\\b${symbol}\\b`));
assert.match(exports, new RegExp(`_${symbol}\\b`));
}
const headerOnlyHostApis = new Set([
'webscene_engine_dispatch_drag_v1',
'webscene_engine_take_download_request_v1',
'webscene_engine_take_outbound_drag_request_v1',
'webscene_engine_complete_outbound_drag_v1'
]);
for (const symbol of headerOnlyHostApis) {
assert.match(header + compiledHeader, new RegExp(`\\b${symbol}\\b`));
}
const reviewedHostApis = new Set([...independentHostApis, ...headerOnlyHostApis]);
for (const [name, source] of [['header', header + compiledHeader], ['exports', exports]]) {
const legacySymbols = [...source.matchAll(
/\b_?(webscene_(?:engine|interop)_[a-z0-9_]+_v[12])\b/g
)].map(match => match[1]).filter(symbol => !reviewedHostApis.has(symbol));
)].map(match => match[1]).filter(symbol => !independentHostApis.has(symbol));
assert.deepEqual(legacySymbols, [], `${name} must not expose legacy interop`);
}
assert.match(
Expand Down
Loading