ReviewOS

craft-native/craft

Expose local database and notification opt-ins in Android config types

#439
Closed chris opened this 13 hours ago ·
13 hours ago

The public CraftAndroidConfig declaration omits enableLocalDatabase and enableLocalNotifications. Both options are documented by the Android package, serialized by the maintained builder, and read by the existing native capability host. A strict consumer of the original packed package therefore cannot request capabilities the package supports.

Related delivery epic: https://github.com/stacksjs/the-settlers-iii-remake/issues/6 Related investigation: https://github.com/craft-native/craft/issues/438

Reproduced at source fd55fd116d709de4cf894a7becd1dd01bb0a0e92 by extending the maintained packed-package consumer and running:

bun test scripts/mobile-package.test.ts --test-name-pattern android

The real build and tarball extraction succeed, then strict NodeNext TypeScript reports TS2353 for enableLocalDatabase and TS2561 for enableLocalNotifications in imported CraftAndroidConfig. The same valid options also fail in InitOptions.config. Result: 0 pass, 1 fail.

Acceptance:

  • Declare the two existing opt-ins as optional booleans on the owning public Android config interface, with accurate native capability documentation.
  • Retain true, false and omitted values through real builder generation and packaged runtime config without changing defaults or native runtime behavior.
  • Verify the built, packed public package accepts the valid typed options and still rejects unknown option names and nonboolean values.
  • Build and verify public exports, run focused and relevant owner checks, and retain red/green evidence before delivery.

No casts, index signatures, new dependencies, generated-source rewriting, native runtime/template changes or workflow changes are part of this correction. This does not diagnose or repair JavaScriptSandbox provider service loss under #438 and does not establish native game presentation.

9 hours ago

Verified shipped in Craft0.0.423, exact source 08c1dbed2ebeafa5d665cc212bd3ca213662712f, including the owning interface correction 21d96072.

The actual public packages pass a strict NodeNext consumer for both config fields and InitOptions.config. Independent negative files still reject string database/notification values (TS2322) and a misspelled option (TS2561). Three real public-init cases preserve true, false and omitted values; native defaults remain unchanged. No cast, index signature, dependency, native template/runtime change or generated-source rewrite was added.

All eight public tarballs match their original CI archive SHA256 plus registry SHA1/SHA512. Normal and frozen registry installs passed; all432 installed payload files and16 public runtime/type entrypoints matched. The canonical Releaser, exact source CI, and full native acceptance completed successfully. The only two Releaser skips are duplicate suite jobs replaced by successful exact-source acceptance; no required gate was bypassed.

Independent publication receipt /tmp/craft-0.0.423-verification/publication-proof.json, SHA256 f50287867216d8711dca4e619f3fdef8738abc6799cb92b9d006362c779af2b3, retains original artifact and consumer identities. Source red/green checks, public export/build/type/lint checks and actual package acceptance satisfy this narrow public-type correction, so closing as completed. The broader native foundations and Stacks/game dependency adoption continue separately; this does not diagnose provider service loss or establish native game presentation.

Sign in to comment on this issue.