@wix/himalaya-cli 0.2044.0 → 0.2045.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -321,6 +321,7 @@ worker's bundle. These names are stable.
321
321
  | `attestation_history_corrupt` | Retained attestation history failed integrity checks. Takes precedence if stale runs are also present. |
322
322
  | `attestation_stale` | Retained runs at this commit do not describe the current release. |
323
323
  | `headless_run_failed` | A verified headless run failed. |
324
+ | `widget_errors_unverified` | The latest headless run (`himi test --outcomes 2`) passed with confirmed One App custom widget failures on record (a failed widget journey, an error in a widget's own action), and the push's own re-check (the contained verification `himi one-app widgets check --outcomes 2` runs) found a widget that is not an acceptable rebuild or confirmed the failure (`failures`, attributed per widget), or could not run on this content (`reason`). A widget whose verification is only unavailable or inconclusive is a warning (`one_app_widget_unverified`), never this refusal. Repair or skip what it names, or `--force`. |
324
325
  | `ux_evidence_absent` | No UX evidence artifact exists. |
325
326
  | `ux_evidence_unrecorded` | No usable native UX drive was recorded. |
326
327
  | `ux_evidence_stale` | UX evidence belongs to a different release/commit. |
@@ -871,6 +872,19 @@ added, so treat an unknown one generically).
871
872
  - Retired: `custom_widget_unidentified`. A section with no `pageUri` is now always skipped (`widget_unidentified` in
872
873
  `skippedWidgets`), so `check` no longer fails on it.
873
874
 
875
+ With `--outcomes 2` (the v2 contract; the One App guide, Custom widgets) every envelope carries `widgetOutcomes: 2` and
876
+ `widgetResults`, and a skipped widget's reasons may also be `access_unpreservable`. `check --outcomes 2` needs
877
+ `--release-hash` (else `invalid_usage`) and fails with the most fundamental of: `custom_widget_present`,
878
+ `custom_widget_outcome_missing` (a skip whose only reason is `test_runtime_unavailable`: rebuild the widget),
879
+ `custom_widget_invalid` (also a module that does not compile), `custom_widgets_pending`, `custom_widgets_unplaced` (also a
880
+ placement the built descriptor does not hold), `custom_widget_access_unpreserved` (the build does not gate a placement as
881
+ its source does), `custom_widget_evidence_missing`, `custom_widget_decision_required`, `custom_widget_tests_failed` (a
882
+ trusted check ran and failed) and `custom_widgets_unverified` (`scope: "ledger"`: the ledger is absent or stale). Each
883
+ failure names `widgetKey` and every source placement of that widget. `release_mismatch`: the contained run tested another
884
+ release than `--release-hash` (exit 1). Missing or inconclusive verification is never a failure in v2: the widget stays,
885
+ `outcome: "unverified"`, with a typed `warning`. `test --outcomes 2` refuses with `custom_widget_test_program_unsupported` (v2 runs no
886
+ widget test program; exit 1).
887
+
874
888
  `himi one-app generate` refuses a component it cannot place with `custom_widget_invalid` and writes nothing (exit 1).
875
889
 
876
890
  ## `himi one-app header-badges` codes
@@ -154,6 +154,32 @@ exit/stdout, bind the full report to its own run and immutable final source/rele
154
154
  and supply independent required-control/case policy. Neither a negative-clear scan
155
155
  nor an unkeyed receipt is whole-product acceptance or trusted agent prose.
156
156
 
157
+ ### One App widget scope (`--outcomes 2`)
158
+
159
+ A One App migration keeps app journeys and its custom widgets' fixture journeys (`custom-widget <key> <label>`) in the same
160
+ `himi-test.json`. `--outcomes 2` opts into the widget outcome contract v2 so that a widget's own problem never fails the
161
+ app-level run, while an app failure still does. Without the flag the report is unchanged. With it:
162
+
163
+ - the report carries `widgetOutcomes: 2`, and every finding in `failures` and `warnings` carries `scope: "app"` or
164
+ `scope: "custom-widget"` with its `widgetKey`. Nothing is dropped;
165
+ - `ok`, the exit code and `code: "test_journey_failed"` come from `app` errors only. `widgetScope` counts the widget errors
166
+ (`confirmed`: the failures among them, from a failed widget journey or the widget's own action) and warnings, and `widgetJourneys` says how each widget journey ended (`passed`, `failed`, `inconclusive`, `unavailable`;
167
+ `runs`, `keys`), as information: the widget gate is `himi one-app widgets check --outcomes 2`;
168
+ - a finding is a widget's only through a **binding** (`widgetBindings`): an embedded placement generate recorded
169
+ (`.himi/one-app/gen/screens.json.custom-widgets.json`, with generate's own service name and node id), that the verified
170
+ One App source in `.himi/one-app` holds for a widget the ledger does not record skipped, and that the built descriptor
171
+ holds (the placement's node exists and every action site of its services lies inside it). Then a widget journey counts
172
+ only when every step, cold visits included, dispatches that widget's own service from its own controls on screens where
173
+ it is bound; any other journey is an app journey, whatever its name, and is listed in `widgetJourneys.refused`. Outside
174
+ journeys, a finding is a widget's when its trigger is that widget's own action and control, or when a `worker-threw`
175
+ maps to the widget's module in its own action. A throw at boot stays the app's, even from the widget's module: the page
176
+ worker imports that module at top level, so a boot throw stops every section on the screen. A journey's findings are
177
+ scoped only by the journey itself. With no evidence, no ledger or no binding, every finding is
178
+ the app's;
179
+ - `inputEvidence.subject` is unchanged, so the release hash binds the run as before.
180
+
181
+ `--outcomes` takes only `2`, and not with `--browser` (`invalid_usage`).
182
+
157
183
  ## Typed form journeys
158
184
 
159
185
  The crawl types into a control **only when it can read a legal value off the app itself** — an id
@@ -759,6 +785,7 @@ behavior. This instruction does not add an automatic suppression or retry gate t
759
785
  | `--no-webview-pages` | Skip loading bridged WebView pages in the headless browser (the page-channel passes still run). See [WebView pages](#webview-pages). |
760
786
  | `--webview-live` | Also load `url` WebView pages, from the live network. Without it only `inlineHtml` pages load. Not with `--offline`. |
761
787
  | `--input-evidence` | Requires `--json`; capture actual typed probes and authored-journey receipts in contained local worker mode (see the receipt contract above). |
788
+ | `--outcomes 2` | One App migrations: tag each finding `app` or `custom-widget` and fail only on app errors (see "One App widget scope" above). |
762
789
  | `--net <file>` | Use an explicit net-mocks file instead of the app's own. |
763
790
  | `--budget <ms>` | Per-action settle budget (default 2000). |
764
791
  | `--native` | Also decode every baked descriptor, and the release's `tokens.json`, with the real native decoders; bare `--native` runs whichever toolchains are present and names each one it could NOT check in a top-level `skippedPlatforms: [{ platform, reason }]` (never a pass), while `--native ios` or `--native android` selects one and exits 2 when it is unavailable. The Android SDK is found from `ANDROID_HOME`, then `ANDROID_SDK_ROOT`, then `sdk.dir` in the source checkout's Android test harness `local.properties`, then the default install path (`~/Library/Android/sdk` on macOS, `~/Android/Sdk` on Linux). **Source-checkout only** — the decoder oracles are that tree's own HimalayaCore Swift package and Gradle harness, which a published install does not ship, so it cannot run this at all (and its coverage ledger stays silent about native decoding rather than suggesting it). |
@@ -396,6 +396,81 @@ Its failure codes are `custom_widget_present` (a skipped widget left something i
396
396
  `custom_widgets_pending`, `custom_widgets_unplaced`, `custom_widget_evidence_missing`, `custom_widget_decision_required`
397
397
  and `custom_widgets_unverified`.
398
398
 
399
+ #### Widget outcome contract v2 (`--outcomes 2`)
400
+
401
+ Pass `--outcomes 2` to every `himi one-app widgets` subcommand, to `himi one-app coverage verify` and to `himi test` to use
402
+ the v2 contract. Without the flag every command keeps the v1 behavior above, byte for byte. In v2, **rebuilding and
403
+ verifying are separate facts**, and each widget has one of three outcomes:
404
+
405
+ | `outcome` | Meaning |
406
+ | --- | --- |
407
+ | `verified` | Rebuilt natively: `build: "built"`, every placement embedded (or placed by hand), `access: "preserved"`, and every trusted check passed on this exact release. |
408
+ | `unverified` | Rebuilt the same way and kept in the app, with a typed `warning`: verification was unavailable, incomplete or inconclusive. Report it in the final reply. |
409
+ | `skipped` | Not rebuilt, with a typed reason, and nothing of it left in the content. |
410
+
411
+ - **Missing or unsupported verification never skips a widget.** In v2 the preflight's `runner` check is information only
412
+ (`"contained"`), `widgets skip` refuses `test_runtime_unavailable`, and there is no implicit skip: a widget with no
413
+ component is `custom_widgets_pending` (build it, or skip it after a bounded repair). Skip a widget only when it cannot be
414
+ rebuilt faithfully: `rebuild_failed`, `unsupported_behavior`, `access_unpreservable`, `backend_code_unavailable` or
415
+ `velo_source_unavailable`. A missing source page or Velo code is still a preflight skip, with its own reason.
416
+ - **Fixtures are declarative.** Write each widget's journeys in `himi-test.json`, named `custom-widget <key> <label>`, whose
417
+ steps dispatch only that widget's own service actions (`tier5.himiPage_<screen>_widget<position>.<action>`) from its own
418
+ controls (one placement per journey: a widget placed twice on a screen has a service per placement, and each placement needs
419
+ its own journey), with controlled responses in `dev/net-mocks.json`. No widget test program runs on the host in v2: `widgets test
420
+ --outcomes 2` refuses (`custom_widget_test_program_unsupported`). `widgets skip` removes a skipped widget's journeys from `himi-test.json`, and the absence check
421
+ reports any `custom-widget <key> ` journey left behind.
422
+ - **`widgets check --outcomes 2 --release-hash <sha256>` runs the verification itself**: the existing contained engine
423
+ (`himi test --json --input-evidence --outcomes 2` on the widgets' screens; QuickJS/WASM realms, no host fallback), bound
424
+ to the release by its receipt's `subject.releaseHash`. A receipt for another release is refused (`release_mismatch`); a
425
+ receipt with no hash leaves every widget `unverified` (`verification_unbound`). The trusted checks, per placement:
426
+ - `render`: its screen was crawled with input evidence, no error of the widget at boot, and a value of the widget's own
427
+ controls was observed;
428
+ - `actions`: no error in the widget's own actions, none left undispatched, and a widget journey passed on that screen.
429
+ No journey on a screen is a gap (`fixture_journey_missing`), not a failure;
430
+ - `access`: a build fact read from the built descriptor: a placement under rules is mounted only in the `open` case of
431
+ its generated gate (`FragmentSlot` on `$service:<gate>.widgetAccess`, `defaultCase: "locked"`), that gate is registered
432
+ in the page worker the release builds with exactly the source placement's rules (same rules, order and ids; read from the
433
+ worker's syntax tree, never run), and a placement the source shows to everyone is not gated. A locked-looking gate with
434
+ empty, different or doubly registered rules is not a rebuild: `custom_widget_access_unpreserved`, whatever verification
435
+ says. Repair it, or skip the widget (`access_unpreservable`). A gated placement's member path is never proven offline, so it keeps the gap
436
+ `member_path_unverified` and stays `unverified`. Live permissions are a separate authorized read-only check.
437
+ - **A positive failure is a repair, not a warning.** A widget journey that fails, an error in the widget's own action or
438
+ at its boot is `custom_widget_tests_failed`. After a bounded, widget-only repair that still fails, skip that widget with
439
+ `rebuild_failed`; the migration continues.
440
+ - **Every refusal names its widget.** Each `failures[]` entry has `scope: "widget"`, `widgetKey` and every source placement
441
+ of the widget (`sectionId`, `context`, `requirementId`); only `scope: "ledger"` (the ledger itself is absent or stale)
442
+ names none. In a refusal, `widgetResults[]` still lists every widget: the one to repair is `outcome: "failed"` with
443
+ `problem: { code, codes, details }`, the others keep their outcome. Skip or repair only the failed widget, never the others.
444
+ - **`build`** on every non-skipped row: `built`, `failed` (the component is invalid, or its module does not compile: Himi
445
+ bundles it in memory, packages external, without running it) or `missing`. `plan --outcomes 2` reports it too, so a
446
+ failing app build can be traced to the one widget module that breaks it.
447
+ - **App gates are unchanged.** `himi test --outcomes 2` tags each finding `scope: "app" | "custom-widget"` and fails only on
448
+ app errors. A finding is a widget's only through a binding: generate's placement record, the verified source (same widget,
449
+ section and page; the widget not skipped in the ledger) and the built descriptor (the placement's node exists and holds
450
+ every action site of its services). A journey that borrows the `custom-widget` prefix but dispatches anything else is an
451
+ app journey, and its failure still fails the run (`widgetJourneys.refused`). `coverage verify --outcomes 2` defers only a
452
+ rebuilt widget's own `custom-widget` rows to `widgets check --outcomes 2` (`deferredRows`); every other row keeps its proof.
453
+ - **Pushing a v2 migration.** `himi test --outcomes 2` keeps a widget's own findings out of `ok`; its record counts only the
454
+ CONFIRMED widget failures (a failed widget journey, an error in a widget's own action) as errors, and an inconclusive or
455
+ unavailable widget journey as a warning. With confirmed failures on record, `himi push` re-checks the widgets itself with
456
+ the same contained verification `widgets check --outcomes 2` runs, on the content it publishes, and refuses
457
+ (`widget_errors_unverified`, attributed per widget) a widget that is not an acceptable rebuild or whose failure is
458
+ confirmed, or when that verification cannot run. A widget whose verification is only unavailable or inconclusive is
459
+ published, and each one is a `one_app_widget_unverified` warning. A verdict file in the package only feeds warnings. A host
460
+ that checks a private copy of the exact content needs nothing more.
461
+
462
+ The v2 envelope adds `verificationRuntime` (`contained` | `unavailable`), `verification` (`engine`, `status`, `reason`,
463
+ `releaseHash`), `counts` (`widgets`, `placements`, `verified`, `unverified`, `skipped`, and `failed` in a refusal), `receipt`
464
+ (the verdict kept under `.himi/one-app-widgets/verify-runs/`) and `widgetResults[]`: `key`, `widgetId` (only when
465
+ authoritative) with `widgetIdStatus`, `pageUri`, `url`, `outcome`, `build`, `access`, `verification` (`passed`,
466
+ `unavailable`, `incomplete`, `inconclusive`; `not-run` in `plan`), `warning` (`reason` and every `reasons`:
467
+ `verification_unavailable`, `verification_incomplete`, `verification_inconclusive`, `verification_unbound`; `gaps` of
468
+ `{ requirementId, check, why }`), `skip` and `absence` for a skipped widget, and every placement (`sectionId`, `context`,
469
+ `requirementId`, `layoutItemId`, `screenName`, `screenId`, and for an embedded one `placement`, `nodeId`, `svc`, `gate`,
470
+ `checks`). `skippedWidgets` and `widgets` stay as in v1. The other v2 envelopes (`plan`, `preflight`, `skip`, `inspect`,
471
+ `test`) carry `widgetResults` too, as the content holds them when they print, with `verification.status: "not-run"` and
472
+ `widgetCounts`.
473
+
399
474
  An app released before this rule keeps working: its pushes still only warn on coverage, and the One App `WebView`
400
475
  section (`platform_elements_web_view_section`) is unrelated and unchanged. A new migration never accepts a WebView proof
401
476
  (`approach: "webview"`) for a custom widget.
@@ -18,6 +18,15 @@ areas, always in the same order, so you can skim for the one you care about.
18
18
 
19
19
  ### Getting started & the CLI
20
20
 
21
+ - **One App custom widgets can stay in the app with a verification warning (opt-in `--outcomes 2`).** With the flag on
22
+ every `himi one-app widgets` command, `coverage verify` and `himi test`, a widget is rebuilt and verified, rebuilt and
23
+ kept with a typed warning (`verification_unavailable`, `_incomplete`, `_inconclusive`, `_unbound`), or skipped only when
24
+ it cannot be rebuilt. Missing verification never skips a widget. `widgets check --outcomes 2 --release-hash` runs the
25
+ widgets' declarative journeys (`custom-widget <key> <label>` in `himi-test.json`) in the existing contained engine,
26
+ bound to that release, checks that each gated placement is mounted only behind its generated gate, and names the one
27
+ widget to repair in every refusal. `himi test --outcomes 2` fails only on app findings: a finding counts as a widget's
28
+ only for a placement proven against the source and the built screen. Without the flag nothing changes.
29
+
21
30
  - **A migrated One App now keeps much more of what its sections showed.** A product review of a full migration found
22
31
  sections that dropped controls and styling. `himi one-app` now carries them over:
23
32
  - Repeater cards put their title and subtitle on the photo when the source does.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.2044.0",
3
+ "version": "0.2045.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -82,5 +82,5 @@
82
82
  "artifactId": "himalaya-cli"
83
83
  }
84
84
  },
85
- "falconPackageHash": "35881e6cd3e9699b7f93e63c3e79f28a37fd0d46956ed130faddf995"
85
+ "falconPackageHash": "664524e4b4a1b665fdeeeb3dddce3c9c5146eefcb5ea060da0d54539"
86
86
  }