Skip to content

id(world-manifest): plan/diff misreport seed and ceiling — a seed-only change reports 'no drift' and is never applied, while a ceiling reorder reports drift that grants (set-compared) ignore #1519

Closed

Description

@dezren39

Problem

plan() / diff() in pkgs/id/src/world_manifest.rs misreport drift in both directions:

  1. False negative — seed-only changes vanish. WorldState carries the live seed (world_manifest.rs:63-64, "The seed the active program was installed with"), and the manifest's seed is a declared field — but plan() only ever uses the seed as a ride-along on InstallModule (:207-218). If the module is unchanged and only the seed differs, the plan is empty and diff() prints "no drift". The new seed is never applied and the admin is told nothing is wrong.
  2. False positive — ceiling reorder is "drift", grants reorder is not. Grants are compared as BTreeSets (:231-240), so reordering the same grants produces no step. The ceiling is compared as an ordered slice (:242-249: current.ceiling.as_deref() != Some(ceiling.as_slice())), so writing the same ceiling in a different order produces a SetCeiling step and a drift line — a semantically empty change that id world apply will "apply" and count.

Evidence (verified this run, main 279c973)

Probe (crate on the laptop compiling the verbatim world_manifest.rs sha256 234f1dfc… + world_caps.rs sha256 679a2c25…, identical sandbox↔laptop; log hidden_files/probe-2026-10-27-laneB-manifest/out.log):

  • Manifest module_hash = "abc123", seed = 99 vs live state { module_hash: "abc123", seed: 7 } → steps=[], diff="no drift"
  • Manifest ceiling = ["time.now", "chat.say"] vs live ceiling ["chat.say", "time.now"] (same set) → steps=[SetCeiling { ceiling: Some(["time.now", "chat.say"]) }]
  • Control, grants mirror of the same reorder → steps=[]
  • Control, genuinely new schedule → ScheduleAt step as expected

Why it matters

id world diff is the admin's drift oracle and apply reconciles from the same plan(). A false "no drift" silently strands a seed change (the seed drives the program's deterministic initializer, so the world keeps running with the wrong one while the manifest claims otherwise), and order-noise drift trains admins to ignore diff output — the exact failure mode a declarative manifest exists to prevent.

Distinct from #818 (the CLI wiring fabricates the current state the plan runs against — this defect is in pure plan() itself, reproduced against a correct, hand-built state) and from closed #817 (omitted-field semantics).

Acceptance criteria

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. added
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 27, 2026
  4. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  5. added
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 28, 2026
  6. 85 remaining items

  7. added
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Oct 28, 2026
  8. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  9. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 28, 2026
  10. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions