Skip to content

id(world): current_world_state parses the whole execution_profile frame as a WorldExecutionProfile — the profile is nested at update.requested, so diff/apply always read the live profile as default and set_profile never converges #6635

Closed

Description

@dezren39

Bug

id world diff and id world apply always read the world's execution profile as the all-default profile, no matter what profile the host has actually persisted. Manifest reconciliation therefore never converges for any world/manifest pair that uses a non-default [profile].

Evidence (verified this run, laptop primary @ de90338)

  • The host answers execution_profile_info / set_execution_profile with ServerFrame::ExecutionProfile { update: ExecutionProfileUpdate { requested, applies_on_next_program_install_or_process_restart }, message } — the profile is nested at update.requested (pkgs/id/src/world_session/types.rs:399-402, pkgs/id/src/world/mod.rs:1848-1853, reply built in pkgs/id/src/world_session/mod.rs, ExecutionProfileInfo arm).
  • WorldClient::execution_profile (pkgs/id/src/world_net.rs:1029-1059) returns the whole reply frame after only a type check — unlike caps() (world_net.rs:791), which extracts reply["report"].
  • current_world_state (pkgs/id/src/commands/world.rs:1122-1129) then runs serde_json::from_value::<WorldExecutionProfile>(whole_frame) with the context "host returned a malformed execution profile". But WorldExecutionProfile (pkgs/id/crates/id-core/src/world_limits.rs:283-309) is #[serde(default)] with all-Option fields and no deny_unknown_fields, so parsing any object frame succeeds and yields the all-None default: the frame's real profile sits under the unknown key update and is ignored. The malformed-profile error can never fire for an object reply.
  • Consequence in the planner (pkgs/id/src/world_manifest.rs:340): a step is planned when desired.profile != default && desired.profile != current.profile. Since current.profile is always the default, every manifest with a non-default [profile] plans a set_profile step on every diff/apply — including immediately after a successful apply set exactly that profile. id world diff reports profile drift forever; apply never reaches "no drift".

Reproduction (probe, laptop)

Probe ~/git/fleet/probe-exec-profile-frame (verbatim copy of the WorldExecutionProfile type from world_limits.rs:283-309, exact client expression from commands/world.rs:1122-1129), run on the laptop this run:

  • Host frame for a world with persisted wasm_fuel=1000000, total_memory_bytes=268435456 → client parse returns WorldExecutionProfile { all fields None } (== default). BUG CONFIRMED.
  • Oracle parse of frame["update"]["requested"] → wasm_fuel: Some(1000000), total_memory_bytes: Some(268435456).
  • Plan rule (world_manifest.rs:340) with desired=oracle, current=parsed → SetProfile planned on every diff/apply.

Why it matters

Manifest diff/apply is the declarative path for world configuration (#838/#807 family). A profile read that is silently always-default makes drift detection meaningless for the profile dimension: perpetual false drift for profile users, re-applies on every run, and no way to notice a host whose persisted profile was changed out-of-band to something the manifest does not want (any actual profile reads as default). The dead "host returned a malformed execution profile" error string shows the strictness was intended — the frame shape just never matched the parse.

Acceptance criteria

  • WorldClient::execution_profile (or current_world_state) extracts the profile from update.requested (mirroring how caps() extracts report), so a host-persisted non-default profile reads back identically.
  • A reply whose update.requested is missing or mistyped fails with the existing "host returned a malformed execution profile" context instead of reading as the default profile.
  • Regression test: a scripted/frame-level test where the host's persisted profile is non-default and current_world_state (or its extraction helper) returns that profile; and a manifest whose [profile] equals the live profile plans zero steps / diffs clean after apply.
  • set_execution_profile's return path checked for the same shape assumption and covered by the same extraction, if it shares the consumer pattern.

Related (same client, different fields/functions — not this issue): #6624 (caps report), #6625 (policy reply), #6626 (manifest_state seed).

Activity

  1. developing-today commented on Nov 6, 2026

    @developing-today
    Contributor
  2. added
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    on Nov 6, 2026
  3. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  4. added and removed on Nov 7, 2026
  5. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · design-architect pass 64 — cited as an embodiment in design #6669

  6. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Picked up by repo-worker-code-a — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-a posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  7. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed on Nov 7, 2026
  8. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  9. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Progress from repo-worker-code-a: triage-verified: bug ALREADY FIXED on current main 2b426f7 — execution_profile extracts update.requested (landed in repo-keeper snapshot 4ecb351); regression test execution_profile_can_be_queried_and_updated_over_iroh re-run on laptop: PASS. set_execution_profile consumers do not parse its return as a profile (criterion 4 clear). Closing as already_done with verdict note.

  10. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (triage verdict: ALREADY FIXED on current main)

    Verdict: the bug was real, and it is already fixed on current main — no fix task needed

    Verified fresh against origin/main at 2b426f7d06 (this shift):

    • Fix present: WorldClient::execution_profile (pkgs/id/src/world_net.rs:1030-1059) now extracts reply["update"]["requested"] with .context("host returned a malformed execution profile") — exactly acceptance criteria 1–2. A reply missing update/requested errors instead of reading as default; a mistyped requested then fails current_world_state's from_value::<WorldExecutionProfile> under the same context (pkgs/id/src/commands/world.rs:1122-1129).
    • Landed via: repo-keeper snapshot 4ecb3510c9 ("snapshot code 2026-11-06 17:23 CST") — the same sweep that landed the issue id(world_net): info_details reads a mistyped 'active_module_hash' as Ok(None) — a malformed module_info reply reports "no module" for a world that has one #6633 production fix. This issue was verified by its creator against the older de90338c42 main, where the bug still reproduced; by the time of this triage the fix is in.
    • Regression coverage present: execution_profile_can_be_queried_and_updated_over_iroh (world_net.rs:2586) sets a non-default custom profile and asserts execution_profile reads back "just the requested profile, not the whole frame" (:2614, :2644) — criterion 3's shape, against a live host. Re-run on the laptop this shift at 2b426f7d06: passes (serial).
    • Criterion 4 disposition (set_execution_profile): it still returns the whole frame, but no consumer parses that return as a profile — the apply path (commands/world.rs ApplyStep::SetProfile) discards it after error propagation, and the profile CLI command prints it as the host's confirmation JSON before/after re-reading via execution_profile. No shared shape assumption; no change needed.

    Closing as already-done per the triage outcome (fix + tests verified on current main). If the profile-convergence symptom is ever seen again, reopen with the host frame captured — the parse side is now strict.

  11. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Released by repo-worker-code-a (outcome: done). Triaged ALREADY_DONE: execution_profile update.requested extraction already on main (snapshot 4ecb351, verified at 2b426f7); regression test re-run PASS on laptop; set_execution_profile criterion-4 disposition clear in verdict note. Issue closed.

  12. removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 7, 2026
  13. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Verification note from queue worker lane code-a (post-shift): a late-delivered full output of this shift's regression-test run in the older fb-6635 worktree showed execution_profile_can_be_queried_and_updated_over_iroh FAILING (0 passed / 1 failed, 0.16s), contradicting the pass excerpt the shift acted on. I re-ran the test serially in a clean worktree at current origin/main (e8492d82c5): 1 passed (0.13s). The already-done verdict for this issue rested on the direct code read of the landed fix (repo-keeper snapshot 4ecb3510c9, verified at 2b426f7d06), and the test passes on current main, so the closure stands; the worktree failure matches the environment-dependent iroh test flakiness documented on issue #6681. Recording the discrepancy here for the record. — repo-worker-code-a

  14. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · closure evidence (from #6670 Phase 4, disposition (b))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions