Skip to content

fix: repair botched forward-port (compile + runner-host dep)#133

Merged
vampik33 merged 4 commits into
developfrom
fix/forward-port-wasmtime45-compile
Jun 5, 2026
Merged

fix: repair botched forward-port (compile + runner-host dep)#133
vampik33 merged 4 commits into
developfrom
fix/forward-port-wasmtime45-compile

Conversation

@vampik33
Copy link
Copy Markdown
Contributor

@vampik33 vampik33 commented Jun 5, 2026

Tail of the wasmtime 43→45 migration train, and the fix for the original nightly dev-publish failure.

Background

The nightly dev-publish failed on greentic-setup. Two layers:

  1. A corrupt Cargo.lock (orphaned indexmap fragment from the chore: forward-port main → develop (conflicts) #130 forward-port conflict) — fixed + merged in Fix corrupted Cargo.lock breaking nightly dev-publish (forward-port conflict) #132. That only unmasked the real breakage:
  2. greentic-setup has been non-compiling on develop since the chore: forward-port main → develop (conflicts) #130 forward-port — the conflict resolution dropped imports, a dependency, and two function bodies while keeping their call sites. CI never caught it because the lockfile parse error killed the build first.

Fixes (all match main's compiling code)

  • Cargo.toml — restore the dropped greentic-runner-host dependency (still used by executors.rs / oauth_device.rs).
  • engine/executors.rs — restore dropped imports BTreeMap, std::fs::File, std::io::Read; borrow provider_id at 4 execute_apply_pack_setup call sites (owned String&str).
  • cli_commands/setup.rs — restore the dropped wait_for_pending_oauth_callbacks / execute_pending_oauth_device_actions definitions (verbatim from main).

Verification ✅

Built end-to-end against the wasmtime-45 train (local path-patched greentic-flow / greentic-pack-lib / greentic-runner-host on 45): cargo check and cargo clippy --all-targets both clean. wasmtime unified on 45 (0 refs to 43). The full compile is what surfaced the io::Read drop (it was masked while greentic-runner-host was unresolvable).

Merge ordering (tail of the tier train)

  • ✅ greentic-interfaces (#152, on 45)
  • ⏳ greentic-flow (greentic-flow#225)
  • ⏳ greentic-pack (greentic-pack#165)
  • ⏳ greentic-runner (greentic-runner#403 — restores the dep this PR needs, on wasmtime 45)
  • 👉 this PR — merge last, after greentic-runner publishes on 45

Cargo.lock intentionally not bumped: greentic-runner-host@45 isn't published yet; the lock + new dep entry self-heal via the nightly cargo update once runner lands. CI expected red until the train publishes.

⚠️ Separate pre-existing risk: greentic-types has a non-monotonic dev publish — 1.1.0-dev.26731975668 lacks telemetry::attr_keys that .26640937120 has. If CI resolves the former, greentic-runner-host fails to compile (attr_keys, ProviderDecl.provider_id). Affects greentic-runner#403 too. Not caused by this PR; flagged for the train.

vampik33 added 4 commits June 5, 2026 10:24
The forward-port main->develop (#130) left greentic-setup non-compiling on
develop; the corrupt Cargo.lock (fixed in #132) masked it in CI. Three classes
of damage from the conflict resolution:

- Cargo.toml: the greentic-runner-host dependency was dropped even though
  executors.rs still uses it (invoke_wasm_registration_component + the WASM
  registration path, also reached via oauth_device.rs). Restore it on the
  dev-range pin.
- engine/executors.rs: the BTreeMap + std::fs::File imports were dropped
  (used by SetupRegistrationSecrets + pack reading), and four execute_apply_pack_setup
  call sites passed an owned String where &str is expected. Restore the imports
  and borrow provider_id (matches main).
- cli_commands/setup.rs: the wait_for_pending_oauth_callbacks /
  execute_pending_oauth_device_actions definitions were dropped while their
  call sites + imports were forward-ported. Restore both fns (verbatim from main).

Source fixes match main's compiling code; dependency graph resolves cleanly
against the wasmtime-45 train (interfaces#152 + flow#225 + pack#165 + runner#403).

Cargo.lock not bumped: greentic-runner-host@45 isn't published yet (tail of the
wasmtime-45 train). The lock + runner-host entry self-heal via the nightly
cargo-update once runner publishes. CI expected red until then.
The forward-port (#130) also dropped `use std::io::Read;`, needed by the
ZipFile::read_to_string call in the registration-component reader. This was
masked until the greentic-runner-host dependency resolved (its absence stopped
type-checking that code path). Surfaced by a full compile against the
wasmtime-45 train; matches main (executors.rs:7).
Regenerate Cargo.lock now the full wasmtime 43->45 train has published:
  greentic-flow        -> 1.1.0-dev.27001972969
  greentic-interfaces  -> 1.1.0-dev.26993916101
  greentic-pack-lib    -> 1.1.0-dev.27003773775
  greentic-runner-host -> 1.1.0-dev.27007625967 (rustls crypto-provider fix)
  greentic-types       -> 1.1.0-dev.27002562828 (has attr_keys + provider_id;
                          runner-host compiles clean against it)
  wasmtime family      -> 45.0.0 (no 43/45 split)

Also clears the stale greentic-types 0.5.2 duplicate (old greentic-secrets
bumped to .26677358416, now on types 1.1.0-dev).

Verified: cargo check --workspace --locked + clippy --all-targets
--all-features --locked -D warnings clean; 359/363 lib tests pass (the 4
failures are pre-existing forward-port debt unrelated to deps — see PR).
The 2026-06-01 main->develop forward-port re-landed 4 main-era
execute_apply_pack_setup tests that drive a provider whose pack ships no
classifiable setup metadata, then assert registration outputs are written
as plaintext into setup-answers.json. B12a (#119) deliberately fails closed
in that case and routes registration outputs to the dev secrets store, so
the merged tests panicked (same class as #124, which reconciled one such
test). This is independent of the wasmtime-45 dep bump.

Reconcile, preserving each test's unique coverage:
- All 4 packs now declare a (non-secret) question so pack_to_form_spec
  yields a form spec -> B12a classifies (empty secret set) and proceeds
  instead of failing closed.
- hydrates_oauth_install_url_from_answers: add a classifying pack; the
  install action stays answer-provided (the behavior under test).
- runs_pack_declared_registration_before_oauth_hydration: keep the hydrated
  install-URL assertion (proves registration ran before hydration); drop
  the stale setup-answers.json secret-output asserts (B12a redaction is
  covered by engine::executors unit tests).
- uses_bundle_name_for_registration_app_name_template: redirect the app-name
  assertions to the dev secrets store, where B12a now persists registration
  outputs (env via the A4b dev->local alias).
- registration_passes_original_input_field_names: classifying-question fix
  only; its install-URL assertion already holds.

Verified: cargo test --all-features --locked (363 lib + integration, all
green) + clippy --all-targets --all-features --locked -D warnings + fmt.
@vampik33 vampik33 merged commit 641636d into develop Jun 5, 2026
8 checks passed
@vampik33 vampik33 deleted the fix/forward-port-wasmtime45-compile branch June 5, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant