@wix/himalaya-cli 0.1494.0 → 0.1495.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.
Files changed (79) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +3 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/live-activity/src/index.d.ts +4 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +2 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/extensions.d.ts +16 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +24 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/live-activity.mjs +3 -1
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -1
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +14 -0
  9. package/dist/cli.mjs +3584 -2540
  10. package/dist/preview-assets.generated.bin +0 -0
  11. package/guides/himi-json-output.md +46 -4
  12. package/guides/iap-products.md +68 -9
  13. package/guides/one-app-to-himi-app.md +80 -5
  14. package/guides/sdk-reference.json +11 -256
  15. package/guides/widgets.md +5 -3
  16. package/package.json +2 -2
  17. package/templates/beauty-salon/dev/index.ts +2590 -1034
  18. package/templates/beauty-salon/himalaya.content.json +1 -1
  19. package/templates/beauty-salon/tier5-src/_shared/himi-store-collection.ts +6 -3
  20. package/templates/beauty-salon/tier5-src/_shared/himi-store-saved.ts +7 -1
  21. package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +256 -19
  22. package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +196 -34
  23. package/templates/beauty-salon/tier5-src/himi-store-saved/index.ts +21 -5
  24. package/templates/beauty-salon/tier5-src/himi-store-shop/index.ts +14 -2
  25. package/templates/beauty-salon/tokens.json +15 -0
  26. package/templates/branded-lite/dev/index.ts +2696 -1140
  27. package/templates/branded-lite/himalaya.content.json +1 -1
  28. package/templates/branded-lite/tier5-src/_shared/himi-store-collection.ts +6 -3
  29. package/templates/branded-lite/tier5-src/_shared/himi-store-saved.ts +7 -1
  30. package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +256 -19
  31. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +196 -34
  32. package/templates/branded-lite/tier5-src/himi-store-saved/index.ts +21 -5
  33. package/templates/branded-lite/tier5-src/himi-store-shop/index.ts +14 -2
  34. package/templates/branded-lite/tokens.json +8 -0
  35. package/templates/community-club/dev/index.ts +1 -1
  36. package/templates/community-club/tier5-src/_shared/himi-store-saved.ts +7 -1
  37. package/templates/community-club/tokens.json +15 -0
  38. package/templates/events-meetups/dev/index.ts +1 -1
  39. package/templates/events-meetups/tier5-src/_shared/himi-store-saved.ts +7 -1
  40. package/templates/events-meetups/tokens.json +15 -0
  41. package/templates/gym-fitness/dev/index.ts +2695 -1139
  42. package/templates/gym-fitness/himalaya.content.json +1 -1
  43. package/templates/gym-fitness/tier5-src/_shared/himi-store-collection.ts +6 -3
  44. package/templates/gym-fitness/tier5-src/_shared/himi-store-saved.ts +7 -1
  45. package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +256 -19
  46. package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +196 -34
  47. package/templates/gym-fitness/tier5-src/himi-store-saved/index.ts +21 -5
  48. package/templates/gym-fitness/tier5-src/himi-store-shop/index.ts +14 -2
  49. package/templates/gym-fitness/tokens.json +15 -0
  50. package/templates/nonprofit-cause/dev/index.ts +1 -1
  51. package/templates/nonprofit-cause/tier5-src/_shared/himi-store-saved.ts +7 -1
  52. package/templates/nonprofit-cause/tokens.json +15 -0
  53. package/templates/podcast-creator/dev/index.ts +1 -1
  54. package/templates/podcast-creator/tier5-src/_shared/himi-store-saved.ts +7 -1
  55. package/templates/podcast-creator/tokens.json +15 -0
  56. package/templates/portfolio-creative/dev/index.ts +2569 -1013
  57. package/templates/portfolio-creative/himalaya.content.json +1 -1
  58. package/templates/portfolio-creative/tier5-src/_shared/himi-store-collection.ts +6 -3
  59. package/templates/portfolio-creative/tier5-src/_shared/himi-store-saved.ts +7 -1
  60. package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +256 -19
  61. package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +196 -34
  62. package/templates/portfolio-creative/tier5-src/himi-store-saved/index.ts +21 -5
  63. package/templates/portfolio-creative/tier5-src/himi-store-shop/index.ts +14 -2
  64. package/templates/portfolio-creative/tokens.json +15 -0
  65. package/templates/restaurant/dev/index.ts +1 -1
  66. package/templates/restaurant/tier5-src/_shared/himi-store-saved.ts +7 -1
  67. package/templates/restaurant/tokens.json +15 -0
  68. package/templates/retail-store/dev/index.ts +2541 -985
  69. package/templates/retail-store/himalaya.content.json +1 -1
  70. package/templates/retail-store/tier5-src/_shared/himi-store-collection.ts +6 -3
  71. package/templates/retail-store/tier5-src/_shared/himi-store-saved.ts +7 -1
  72. package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +256 -19
  73. package/templates/retail-store/tier5-src/himi-store-product/index.ts +196 -34
  74. package/templates/retail-store/tier5-src/himi-store-saved/index.ts +21 -5
  75. package/templates/retail-store/tier5-src/himi-store-shop/index.ts +14 -2
  76. package/templates/retail-store/tokens.json +15 -0
  77. package/templates/yoga-studio/dev/index.ts +1 -1
  78. package/templates/yoga-studio/tier5-src/_shared/himi-store-saved.ts +7 -1
  79. package/templates/yoga-studio/tokens.json +15 -0
Binary file
@@ -48,6 +48,7 @@ keeps its existing fields and adds the code:
48
48
  | `ux_evidence_unreadable` | The UX evidence artifact cannot be read. |
49
49
  | `lint_errors` | Build/lint validation found errors. |
50
50
  | `depth_budget_exceeded` | A screen or a bound list/grid row template nests deeper, or has more components, than the depth budget (`depth-budget` validator pass), or any of its JSON — props, modifiers, `input`, action `args` — nests past the raw-JSON ceiling of 256 levels. Each `issues[]` entry with `pass: "depth-budget"` carries the JSON `path` of the deepest node (the tree root for a node count, the first value past the ceiling for raw JSON), the `limit` and the `actual` value. Takes precedence over `lint_errors`, and `--force` does not override it: content over the budget overflows the renderer's stack on devices already in the field. Flatten the layout and push again. `himi patch screen` refuses an over-deep raw descriptor with the same code, before any network request, and `himi pack` / `himi template publish` refuse with it even under `--force`. |
51
+ | `one_app_readiness_failed` | Reserved legacy refusal code. One App migration readiness is now advisory: publish and promotion report structured warnings instead. Other independent release checks may still refuse a push. |
51
52
  | `control_token_expired` | The selected control token has expired. |
52
53
  | `app_source_contains_secrets` | Source archiving detected a possible credential. |
53
54
  | `app_source_too_large` | The encoded source archive exceeds its limit. |
@@ -123,6 +124,7 @@ An invalid manifest fails with `manifest_invalid`, like the other `store iap` co
123
124
  | `apple_key_missing` | No In-App Purchase key was given and the app has none stored. |
124
125
  | `invalid_usage` | The flags are incomplete or malformed (for example `--iap-key` without `--iap-key-id`). Nothing was read or written. |
125
126
  | `iap_key_unreadable` | `--iap-key` is missing, unreadable, inside the repository, or not a PEM private key. Nothing was written. |
127
+ | `catalog_route_unavailable` | Catalog needs an explicit valid gateway prefix via `--catalog-route` or `HIMI_IAP_CATALOG_ROUTE`. Nothing was written. |
126
128
  | `provider_route_unavailable` | The Serve target has no IAP routes, so the appleIAP provider was not connected. |
127
129
  | `manifest_invalid` | `--manifest` is not a valid IAP manifest; `problems` lists why. Nothing was read or written. |
128
130
  | `credentials_unavailable` | The `--profile` App Store Connect credentials could not be resolved. Nothing was read or written. |
@@ -133,13 +135,43 @@ An invalid manifest fails with `manifest_invalid`, like the other `store iap` co
133
135
  | `sku_in_use` | The Apple product is already mapped to another Wix item; left as it is. |
134
136
  | `mapping_unsupported` | The purchase flow cannot map this item yet (a vertical other than Online Programs, Wix Stores or one-time Pricing Plans, a price tier, or an item declared as a consumable). |
135
137
  | `no_purchases_app` | A step did not run because the site has no purchases app for the bundle. |
136
- | `request_failed` | A purchases-service call failed for another reason; the original message is preserved. |
138
+ | `request_failed` | A Purchases or Catalog call failed for another reason; the original message is preserved. |
137
139
  | `setup_incomplete` | Steps are only planned (a dry run) or otherwise not yet in place. |
138
140
  | `confirmation_required` | Writes were planned, but there was no terminal to ask and no `--yes`. Nothing was written. |
139
141
  | `config_conflict` | The backend setup is complete, but the app's config names a different purchases app, site or bundle. |
140
142
  | `config_not_applied` | `--content` was given, but the binding is not in its `config.ts` (no config file, a dynamic or symlinked config, an edit `himi validate` rolled back, or no validator); the `config` report or `note` says what to add by hand. |
141
143
  | `connect_failed` | An otherwise unclassified error stopped connect (for example an unreadable manifest, or a failed `--out` write). The original message is preserved. |
142
144
 
145
+ ## Managed `himi store iap plan|apply|status` codes
146
+
147
+ Managed mode uses the site's Catalog connection and never falls back to `--profile`.
148
+ New failure paths preserve existing error text and exit codes and add a typed code.
149
+
150
+ | Code | Meaning |
151
+ |---|---|
152
+ | `catalog_route_unavailable` | No assigned gateway prefix was supplied, or the prefix is invalid. |
153
+ | `catalog_capability_missing` | Catalog has no endpoint for the requested operation. `endpoint` names it. Review screenshots use the managed upload endpoint. |
154
+ | `catalog_mapping_missing` | No unique Catalog Product maps this SKU; submission was not sent. Create/reconcile the mapping first. |
155
+ | `catalog_screenshot_upload_failed` | Wix Media upload failed or returned a URL outside `https://static.wixstatic.com/media/…`; the image was not sent to Catalog. |
156
+ | `catalog_submit_blocked` | Submission returned blockers. Per-item `catalogReview` carries Product.review, readiness and blockers (`NOT_READY`, `NO_SUBMITTABLE_VERSION`, `UNSUPPORTED_PRODUCT_TYPE`); `REVIEW_SCREENSHOT_MISSING` is a readiness blocker under `NOT_READY`. |
157
+ | `catalog_write_outcome_unknown` | A screenshot or submission write may have landed; readback did not prove completion. No blind resend. Inspect/rerun later. |
158
+ | `catalog_request_failed` | A managed Catalog request or other unclassified managed command operation failed. |
159
+ | `invalid_usage` | A managed flag is malformed, required flags are missing, or `--profile` was combined with `--managed`. |
160
+ | `confirmation_required` | Apply requires confirmation; no write was sent. |
161
+ | `apply_incomplete` | Apply produced a result with incomplete or failed items (stdout, exit 1). |
162
+
163
+ Existing `manifest_invalid` and provisioning codes (`target`, `access`, `plan`, `account`,
164
+ `drift`) retain their meanings. Managed apply compares site and purchases-app identity;
165
+ a different identity is `account` before writes. Status retains its existing status codes. Per-item managed apply failures carry
166
+ `items[].provisioning.code` inside the existing top-level `apply_incomplete` envelope. Review
167
+ read failures in managed status carry the same per-item codes inside `status_incomplete`,
168
+ while preserving the other items. Managed step failures also include `steps[].code`. Mapping
169
+ preflight reuses the existing `sku_in_use`, `mapping_conflict`, `mapping_inactive`,
170
+ `mapping_type_mismatch` and `mapping_unsupported` codes; these refuse the affected item
171
+ before its Apple writes and never fix/reactivate a mapping. Managed
172
+ status exposes `catalogReview.review` and `catalogReview.readiness.blockers`. Empty gateway
173
+ 404s are not automatically retried; an owner reruns after rollout.
174
+
143
175
  ## `himi template publish` codes
144
176
 
145
177
  `template publish` is still mostly legacy. It carries one code so far, on the path that sends the
@@ -223,8 +255,10 @@ redirects, invalid data, source changes and disk errors remain failures.
223
255
 
224
256
  Failures print `ok: false` and a top-level `code` on stderr. The validator reads
225
257
  authored header choices from `settings.topBarSettings`, falls back to the legacy
226
- `settings.showCartIconInTopBar` / `showChatIconInTopBar` values, and treats a
227
- choice that is absent from both locations as false.
258
+ `settings.showCartIconInTopBar` / `showChatIconInTopBar` values, and also checks
259
+ hashed platform-enriched top-bar definitions. An absent authored choice is false,
260
+ but an enriched button definition still needs a target action or an explicit
261
+ unresolved migration finding.
228
262
 
229
263
  - `invalid_usage`: required options are missing, duplicated, or malformed (exit 2).
230
264
  - `evidence_invalid`: the evidence manifest or `raw-structure.json` is missing,
@@ -232,9 +266,17 @@ choice that is absent from both locations as false.
232
266
  file does not match that hash (exit 1).
233
267
  - `config_uninspectable`: the target `config.ts` cannot be read or the relevant
234
268
  `navigation.topBarDefault.actions` cannot be inspected (exit 1).
235
- - `topbar_coverage_failed`: an authored cart/chat control has no matching action
269
+ - `topbar_coverage_failed`: a source top-bar control has no matching action
236
270
  with a non-empty `onTap.actionId` (exit 1).
237
271
 
272
+ ## `himi one-app coverage` codes
273
+
274
+ - `invalid_usage`: the mode or required paths are missing (exit 2).
275
+ - `evidence_invalid`: collected evidence cannot be read or fails its manifest hash (exit 1).
276
+ - `coverage_drift`: a requirement disappeared or `check` found new requirements not
277
+ recorded in `ONE-APP-COVERAGE.json` (exit 1).
278
+ - `coverage_unverified`: `verify` found unresolved, failed, or stale requirement checks (exit 1).
279
+
238
280
  ## `himi base44 entities` codes
239
281
 
240
282
  Covers `himi base44 adopt` and `himi base44 entities query` (#4557,
@@ -6,8 +6,8 @@ initial price and explicit territories. It then exports a Wix→Apple mapping fo
6
6
  backend import.
7
7
 
8
8
  It is an administration workflow, not a build: it never builds, signs or bumps a version,
9
- and it runs anywhere `himi` is installed. An owner needs only a credential profile, plus
10
- either a manifest or a Wix site for `draft` to read. It does not run during an app build or
9
+ and it runs anywhere `himi` is installed. Choose an explicit local credential profile, or
10
+ managed Catalog provisioning with the site's existing Branded Apple connection. It does not run during an app build or
11
11
  a customer checkout.
12
12
 
13
13
  It registers one-time **non-consumables**, and **consumable price tiers** for large
@@ -31,8 +31,62 @@ catalogs. Subscriptions are refused before anything reaches Apple.
31
31
  The profile and the key must both live outside the repository. That is checked after
32
32
  resolving symlinks. The profile's `team` must equal the manifest's `teamId`.
33
33
 
34
- There is **no ambient fallback**. `--profile` is required, and exported `ASC_*` variables
35
- are never used to decide which account to write to.
34
+ These key and profile prerequisites apply to direct Apple mode. There is **no ambient fallback**: direct mode requires `--profile`, and exported `ASC_*` variables never select the account. Managed mode below uses no local `.p8`.
35
+
36
+ ## Managed provisioning through Catalog
37
+
38
+ `plan`, `apply`, and `status` accept `--managed --purchases-app <registration-id>`.
39
+ They use the manifest's Wix site and the site's existing Branded Apple connection. No local
40
+ credential profile or `.p8` is opened. `--profile` and `--managed` cannot be combined, and a
41
+ Catalog refusal never falls back to direct Apple mode. Existing manifests retain their
42
+ `target.profile` and `target.teamId` fields for compatibility; those fields do not select
43
+ managed credentials or identify a managed plan.
44
+
45
+ Supply the assigned Catalog gateway prefix, including its
46
+ version segment, through `--catalog-route <assigned-prefix>` or `HIMI_IAP_CATALOG_ROUTE`.
47
+ There is no default. During rollout some gateway nodes can return an empty 404. The CLI
48
+ does not retry it automatically; the owner reruns. Reads are safe to rerun, and writes
49
+ read state before creating resources.
50
+
51
+ ```sh
52
+ himi store iap plan --managed --purchases-app <registration-id> --catalog-route <assigned-prefix> --manifest ./iap-products.json --out ./iap-plan.json
53
+ himi store iap apply --managed --purchases-app <registration-id> --catalog-route <assigned-prefix> --plan ./iap-plan.json --out ./iap-result.json --yes
54
+ himi store iap status --managed --purchases-app <registration-id> --catalog-route <assigned-prefix> --manifest ./iap-products.json --json
55
+ ```
56
+
57
+ A managed plan records `{ mode: "managed", siteId, purchasesAppId }`; apply refuses a
58
+ different site or registration before writing. Catalog verifies the Apple app and bundle
59
+ on the server. Localization upsert creates the editable version when necessary. Price writes
60
+ send the requested amount, currency, territory and `EXACT`/`AT_LEAST` rule, never a client-selected
61
+ price-point id. Catalog reports `APPLIED` or `ALREADY_APPLIED`. Existing product locks,
62
+ read-before-write checks, plan review, confirmation and local apply locking still apply.
63
+
64
+ Managed apply finishes each configured item by uploading its App Review screenshot and calling
65
+ Catalog's Product `submit-for-review`. Without `reviewScreenshot`, Catalog generates an image
66
+ from the first localization's display name; no `imageUrl` is sent. If the manifest names a PNG
67
+ or JPEG, the CLI uploads the checked bytes to the site's Wix Media and sends its
68
+ `https://static.wixstatic.com/media/…` URL. An already complete screenshot is **reused**,
69
+ even when a different image is requested; the CLI never replaces it.
70
+
71
+ Before any managed apply writes for an item, Catalog must have one active mapping for its
72
+ expected Wix item, SKU and type. Conflicts use the existing connect codes (`sku_in_use`,
73
+ `mapping_conflict`, `mapping_inactive`, `mapping_type_mismatch`, `mapping_unsupported`) and
74
+ leave the mapping unchanged.
75
+
76
+ Submission sends the desired localizations, base price (amount/currency/territory/rule), and
77
+ territories after metadata, price and availability writes succeed. Each item's `catalogReview`
78
+ contains Product.review, readiness and submission blockers: `NOT_READY`, `NO_SUBMITTABLE_VERSION`
79
+ or `UNSUPPORTED_PRODUCT_TYPE`. A missing screenshot is the readiness blocker
80
+ `REVIEW_SCREENSHOT_MISSING` underneath `NOT_READY`. `status --managed` reads Product.review and
81
+ readiness blockers without submitting or uploading anything. Review acceptance and approval
82
+ remain Apple's decisions; `WAITING_FOR_APP_VERSION` still needs an app-version submission.
83
+
84
+ An unknown screenshot or submit write outcome is read back before further action; it is never
85
+ blindly resent. If that read cannot prove completion, the item reports
86
+ `catalog_write_outcome_unknown` and the owner reruns after inspecting the state. A missing Catalog
87
+ mapping reports `catalog_mapping_missing`; create/reconcile mappings with `connect` before
88
+ managed submission. Other per-item failures include `catalog_screenshot_upload_failed` and
89
+ `catalog_submit_blocked` (see [JSON codes](himi-json-output.md)).
36
90
 
37
91
  ## Drafting the manifest from your Wix catalog
38
92
 
@@ -158,7 +212,7 @@ himi store iap plan --manifest ./iap-products.json --profile fit-club-owner --
158
212
  himi store iap apply --plan ./iap-plan.json --profile fit-club-owner --out ./iap-result.json
159
213
  himi store iap status --manifest ./iap-products.json --profile fit-club-owner --json
160
214
  himi store iap screenshots --manifest ./iap-products.json --content . --profile fit-club-owner
161
- himi store iap connect --manifest ./iap-products.json --profile fit-club-owner \
215
+ himi store iap connect --manifest ./iap-products.json --profile fit-club-owner --catalog-route <assigned-prefix> \
162
216
  --iap-key ~/keys/SubscriptionKey_ABCD123456.p8 --iap-key-id ABCD123456 --content . --dry-run
163
217
  ```
164
218
 
@@ -345,8 +399,13 @@ a live status check identifies it. Wix order and charge amounts are not changed
345
399
  `connect` makes the manifest's Wix site ready to sell those products, from the same manifest,
346
400
  as the site owner (your Wix login, like `draft`). To run it against a Serve deploy preview, pass
347
401
  `--preview-tag dp-<tag>` (or set `HIMI_SERVE_PREVIEW_TAG`). Only the Serve calls (the appleIAP
348
- provider connection) are routed to the preview; the purchases service and App Store Connect are
349
- called as usual. In order:
402
+ provider connection) are routed to the preview; Purchases and Catalog are called directly.
403
+ Mapping calls require `--catalog-route <assigned-prefix>` or `HIMI_IAP_CATALOG_ROUTE`; no default
404
+ is supplied. The migration depends on catalyst-server #24707 removing Purchases ProductsApi.
405
+ For an existing app, migrate its mappings into Catalog with their original SKU, type and active
406
+ state before running `connect`. Catalog is this command's mapping source; an empty Catalog is
407
+ not evidence that the app had no legacy mappings. This command is not the legacy-data migration.
408
+ In order:
350
409
 
351
410
  1. **The purchases app.** It reads the site's apps and reuses the one for the manifest's bundle
352
411
  id. Only when the site has none does it register one. A bundle id belongs to one purchases
@@ -361,7 +420,7 @@ called as usual. In order:
361
420
  (`ConnectProviderAccount`). Reported as `provider_route_unavailable` only when the Serve target
362
421
  has no IAP routes; a refusal from the service behind it is `request_failed`. There is no read
363
422
  of the provider's state, so a rerun connects it again (the call is safe to repeat).
364
- 4. **One mapping per Wix item → Apple product.** Online Programs map by program id, Wix Stores
423
+ 4. **One mapping per Wix item → Apple product, through Catalog `listProducts` / `createProduct`.** Online Programs map by program id, Wix Stores
365
424
  digital products by product id, and one-time unlimited Pricing Plans by plan id (the ids the
366
425
  purchase flow looks up), all only as non-consumables. A plan is mapped only when the site reads it
367
426
  as one-time unlimited (one payment, valid until cancelled); a recurring, time-limited or archived
@@ -369,7 +428,7 @@ called as usual. In order:
369
428
  are skipped with `mapping_unsupported`. An item already mapped to another
370
429
  product (`mapping_conflict`), a mapping of another product type (`mapping_type_mismatch`), an
371
430
  inactive mapping (`mapping_inactive`), or an Apple product mapped to another item
372
- (`sku_in_use`) is reported and left exactly as it is.
431
+ (`sku_in_use`, including Catalog's `STORE_PRODUCT_ID_IN_USE` refusal) is reported and left exactly as it is.
373
432
  5. **The app's config.** With `--content <dir>`, it records `wixIap: { purchasesAppId }` (and the
374
433
  `iap` capability) in the package's `config.ts`, keeping everything else byte for byte. The edit
375
434
  is backed up under `.himi/store-iap-backup/`, checked with `himi validate`, and rolled back if it
@@ -67,6 +67,9 @@ settings or claiming coverage.
67
67
  An unavailable supporting runtime view is recorded as `runtime_context_unavailable`
68
68
  with its platform and typed failure code; that enriched file is absent. Continue
69
69
  from authored intent and mark the platform behavior as unverified in the report.
70
+ `coverage verify` cannot pass while either platform runtime view is missing, and
71
+ `validate-topbar` reports an evidence error when collection recorded an unavailable
72
+ runtime context. These checks report the gap; they do not block promotion.
70
73
  Authorization, invalid responses, source changes and evidence-write failures still
71
74
  stop collection. Never infer unrestricted access from a missing runtime view.
72
75
 
@@ -121,12 +124,15 @@ Apply these interpretation rules:
121
124
  end-user access policy. Never expose protected content beneath a visual gate.
122
125
  - Exclude `ntt.*` definitions and placements from coverage. Preserve configured
123
126
  header/top-bar intent; do not add unconfigured drawer or header surfaces.
124
- - Before publishing, run the migration-only authored-control check:
127
+ - Before publishing, run the migration-only top-bar coverage check:
125
128
  `himi one-app validate-topbar --evidence-dir .himi/one-app --content .`.
126
- It reads each screen's `raw-structure.json` header settings and checks that
127
- `navigation.topBarDefault.actions` has a matching tappable action for every
128
- authored cart/chat control. It does not use the iOS/Android enriched views to
129
- infer visibility, access, or membership rules. This check is specific to this
129
+ It verifies the collected raw and platform-enriched evidence hashes, then checks
130
+ authored cart/chat settings and the resolved platform top-bar button definitions
131
+ against tappable `navigation.topBarDefault.actions` or mapped
132
+ `ScreenDescriptor.topBar.actions` when a screen replaces the default. A dynamic
133
+ bar that cannot be inspected is reported as unverified. Platform definitions establish
134
+ a feature to account for; they do not alone prove visibility or access for every
135
+ visitor or member. Resolve those rules separately. This check is specific to this
130
136
  migration workflow; it does not change the behavior of `himi validate`.
131
137
  - For each configured Detailed header, import and call the shared
132
138
  `detailedHeader` builder from `@wix/himalaya/screens`. Do not recreate its
@@ -227,6 +233,75 @@ placement and interaction, record supported, adapted, conditional or unresolved
227
233
  status, the implementation and evidence, and intentional prompt-driven differences.
228
234
  Track dangling/unreachable relationships and unknown source context explicitly.
229
235
 
236
+ Run `himi one-app coverage init --evidence-dir .himi/one-app --content .` to
237
+ create `ONE-APP-COVERAGE.json` from the verified source graph. After edits or a
238
+ CLI upgrade, run `coverage sync` and review new rows; `coverage check` fails when
239
+ the file is absent or source requirements have appeared, disappeared or changed.
240
+ Rows cover source graph warnings as well as routes and controls. This is an
241
+ inventory of migration obligations, not proof that their target actions work.
242
+
243
+ Map each row to a target screen and, for interactions or top-bar controls, a
244
+ target control. Set its `status` to `supported`, `adapted`, `conditional`, or
245
+ `unresolved`. For an adaptation, cite the user's instruction and explain the
246
+ change. Each resolved row needs a `verification` record using the required check
247
+ ID for its kind (`route-walkthrough`, `visual-comparison`, `behavior-crawl`,
248
+ `topbar-control`, `access-state`, or `source-resolution`), a safe relative path to
249
+ a JSON check record, and the exact release payload SHA-256 in `releaseHash`.
250
+ The JSON file's `checks[]` must contain a passed record with that requirement ID,
251
+ check ID, release hash, target mapping, and a relative `artifact` path to the
252
+ actual screenshot, test output, or walkthrough record. Multiple rows may share
253
+ one file, but each needs its own passed check record. Keep private evidence under
254
+ `.himi/` so it is excluded from the app source archive.
255
+
256
+ For example, one entry in the referenced JSON file is:
257
+
258
+ ```json
259
+ {"checks":[{"requirementId":"<row-id>","check":"route-walkthrough","releaseHash":"<64-hex-sha256>","status":"passed","target":{"screenId":"home"},"artifact":".himi/one-app/screens/home-compact.png"}]}
260
+ ```
261
+
262
+ The artifact must exist. Review the actual route and state shown in it before
263
+ recording a pass; a valid record is an index to the check, not a substitute for it.
264
+
265
+ After publishing a draft, build a QA APK pinned to that draft release with
266
+ `himi dist --platform android --release <draft-id> --allow-draft`. Install
267
+ and walk through every requirement on the device. Save
268
+ `.himi/one-app/native-proof.json` with the distribution job ID, the APK SHA-256
269
+ reported by `himi dist status`, the exact release hash, and one passed check per
270
+ requirement. Each check points to a local screenshot or walkthrough artifact:
271
+
272
+ ```json
273
+ {"jobId":"qa-job-id","artifactSha256":"<apk-sha256>","releaseHash":"<release-sha256>","checks":[{"requirementId":"<row-id>","status":"passed","artifact":".himi/one-app/device/home.png"}]}
274
+ ```
275
+
276
+ The verification command checks every source requirement against this record.
277
+ The hosted release service also checks that the job succeeded for this app and
278
+ release, that the recorded APK hash matches its build artifact, and that the
279
+ claimed release hash matches the published payload. It does not rerun `himi test`
280
+ or inspect device screenshots; those results are supplied by the publisher.
281
+ Keep the device artifacts for review. A check record alone cannot show whether a
282
+ screen looks or behaves correctly.
283
+ `himi one-app coverage verify --evidence-dir .himi/one-app --content .
284
+ --release-hash <sha256>` reports every unresolved or stale row. `himi push`
285
+ checks local coverage and the top bar for a marked migration and warns when
286
+ either is incomplete. A partial push warns because its derived release may
287
+ inherit screens the local checks did not cover. These One App warnings do not
288
+ prevent a live push, activation, promotion, Play bundle, or customer TestFlight
289
+ build. Other release rules still apply.
290
+
291
+ The hosted release service remembers One App provenance in a separate enrollment
292
+ record after the first marked full release, so it cannot overwrite the owner's
293
+ visibility setting. It returns `warnings` with code `one_app_readiness_unverified`
294
+ for every enrolled or marked release because publisher-supplied checks are not an
295
+ independent hosted verification receipt. An unmarked
296
+ replacement or partial release is warned, and a partial release loses its prior
297
+ ready claim. A draft may be republished under the same release ID after checks
298
+ pass: the content stays immutable while its `oneAppMigration` readiness metadata,
299
+ matching `himi test` attestation, and QA APK job binding are updated. The server
300
+ checks their internal consistency and QA job binding, then stores `ready: false`
301
+ because it cannot rerun `himi test` or inspect the linked screenshots or native
302
+ walkthrough. Review that evidence before claiming production readiness. A warning
303
+ is advisory; it is not a readiness approval.
304
+
230
305
  For each mapping gap, inspect current components, SDKs and portable examples;
231
306
  implement app-local sections, workers, action adapters or compositions where
232
307
  possible. Reuse verified live-data logic while retaining the original inline