GeezerVison is showing github.com — id(world-manifest): PR #801 — 'id world apply' prints 'applied N step(s)' for steps it explicitly did not apply, and diff/plan run against a fabricated seed=0 / empty-schedules state · Issue #818 · developing-today/code
id(world-manifest): PR #801 — 'id world apply' prints 'applied N step(s)' for steps it explicitly did not apply, and diff/plan run against a fabricated seed=0 / empty-schedules state #818Labels 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)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a human DescriptionProblem
PR #801's id world apply / id world diff (branch id/phase-12, pkgs/id/src/commands/world.rs) reports success and drift computed from state it does not actually have:
1. "applied N step(s)" counts steps that were explicitly not applied
commands/world.rs:461-476 — the Apply handler runs apply_steps(...) and then unconditionally prints applied {} step(s) with steps.len() — the full plan length.
commands/world.rs:721-722, 765-772 — apply_steps handles InstallModule, ScheduleAt, and CancelSchedule by printing note: {} is reported but not applied here to stderr and doing nothing.
So a manifest whose plan is, say, one module install + two schedule steps finishes with "applied 3 step(s)" and exit 0 while changing nothing on the world except (at most) the grants/ceiling/profile steps also in the plan. A script or admin trusting stdout/exit code believes the world was reconciled when the headline steps were skipped.
2. diff/plan run against a fabricated partial state
commands/world.rs:688-717 — current_world_state() hardcodes seed: 0 and schedules: BTreeMap::new() (its own comment: "Schedules and the install seed are not exposed over the wire yet, so they read as empty here").
- Consequences for every live
diff/apply:
- Any manifest declaring schedules always shows
ScheduleAt drift, even if the world already has exactly those schedules — apply is never idempotent for schedules through the CLI path, and diff cries wolf on every run.
- A manifest that changes the module without naming a
seed plans the install with seed: desired.seed.unwrap_or(current.seed) = 0, not the live world's seed — once module install is wired (id: F12.1 apply wiring — module install + schedules reconciliation #807), applying such a manifest would silently re-seed the program.
Relation to existing tracking
#807 ("F12.1 apply wiring — module install + schedules reconciliation") tracks building the missing apply path, and its acceptance already asks for idempotent module+schedules apply. This issue is the narrower, independently fixable truthfulness problem that exists today, before that wiring lands — and the seed/state-fetch half will still matter after it lands. Fix whichever lands first and cross-reference the other; do not close this as a duplicate of #807 unless #807's change also makes the reporting and the fetched state truthful.
Evidence
Acceptance
id world apply reports applied and not-applied steps separately (count and kinds), and does not print an unqualified "applied N step(s)" / exit as full success when any planned step was skipped — or it refuses to run a plan containing unwired steps before changing anything.
id world diff / apply either fetch the real seed and schedule state, or explicitly mark those sections "unknown — not compared" instead of planning against seed: 0 / empty schedules.
- A test (unit or integration) covers a plan containing an
InstallModule / ScheduleAt step and asserts the reported outcome distinguishes it from an applied step.
Acceptance criteria
-
id world apply reports applied and not-applied steps separately (count and kinds), and does not print an unqualified "applied N step(s)" / exit as full success when any planned step was skipped — or it refuses to run a plan containing unwired steps before changing anything
-
id world diff / apply either fetch the real seed and schedule state, or explicitly mark those sections "unknown — not compared" instead of planning against seed: 0 / empty schedules
- A test (unit or integration) covers a plan containing an
InstallModule / ScheduleAt step and asserts the reported outcome distinguishes it from an applied step
Activitydezren39 commented on Oct 25, 2026 Partial fix in PR #859 (applied-count half): apply_steps now returns how many steps it actually applied and the summary prints 'applied X of N step(s); the rest were reported but not applied' when module/schedule steps are in the plan, with a unit test pinning which step kinds count as applied. The fabricated-state half (seed=0 / empty schedules in current_world_state) remains open here: neither value is in WorldModuleInfo, so it needs the wire exposure from #807. Note PR #858 (#817) shrinks its blast radius — omitted schedule/seed fields no longer plan against the fabricated state; only an explicitly-declared schedules map still does. dezren39 commented on Oct 25, 2026 Correction to the previous comment: the partial-fix PR is #860 (not #859 — that number was taken by another PR created in between). added kind/bugSomething isn't working (prefixed form of the classic bug label) effort/sSmall: expected under 2 hours of work app/idPackage/app: id (pkgs/ or apps/ in this repo) meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added on Oct 26, 2026dezren39 commented on Oct 26, 2026 Intake review
PARTIALLY SOLVED — do not close. Verified on current main (a2eef6f):
Related: #807 (F12.1 apply wiring — module install + schedules reconciliation; the wire exposure this remainder needs), PR #801 (merged — introduced apply/diff).
Notes / risks: the remaining half is blocked on the same wire exposure as #807's schedules work; fixing them together is cheaper than separately. Until then, diff output for any manifest declaring schedules is not trustworthy.
Suggested approach: when #807 exposes seed/schedules over the wire, consume them in current_world_state; as an interim, mark those sections "unknown — not compared" in diff output per the acceptance criteria.
🤖 Fleet monitor intake enrichment — acceptance criteria appended to the body (restating the issue's Acceptance section under the standard heading), labels normalized and meta/enriched applied this pass. dezren39 commented on Nov 1, 2026
🤖 Agent note — triage verdict: ALREADY FIXED on current main (queue task 2257, lane D, 2026-11-01T02:1xZ)
Verified both halves of this issue against current main fdfb377c6 (pkgs/id/src/commands/world.rs):
-
"applied N step(s)" overcount — FIXED by PR fix(id-world): world apply reports only the steps it actually applied (#818) #860 (commit a480b6a0c, "fix(id-world): world apply reports only the steps it actually applied (id(world-manifest): PR #801 — 'id world apply' prints 'applied N step(s)' for steps it explicitly did not apply, and diff/plan run against a fabricated seed=0 / empty-schedules state #818)"). The Apply handler now counts the value returned by apply_steps and prints applied {} of {} step(s); the rest were reported but not applied on a partial apply (world.rs:498-508). step_is_applied (world.rs:~925) is an explicit per-kind predicate whose comment cites this issue: "so a future reported-only step cannot silently claim credit".
-
Fabricated seed=0 / empty-schedules state — FIXED by the id: F12.1 apply wiring — module install + schedules reconciliation #807 apply wiring (PR id(world): wire manifest apply — module install + schedules over the wire (#807) #1820; commits c9e97c735 "wire manifest apply for module install + schedules", 5990d9b18, 514b97783, 2026-10-28/29). current_world_state now fetches the real seed and pending schedules from the host via manifest_state(admin_token, capability) (world.rs:908-915) and the real module hash/grants/ceiling/profile from info_details/caps/execution_profile. The only remaining seed.unwrap_or(0) is for a capability-only diff read (the host returns the seed only to an admin-token caller, Install seed is readable by every joiner #240), and the doc comment establishes a seed alone never plans a step; apply always reads with the admin token.
Not swallowed by this close: #1519 (plan/diff seed-only-change and ceiling-reorder misreporting) is a distinct, already-filed follow-up about drift reporting semantics, not the fabricated-state defect here.
Closing as already fixed.
MetadataMetadataapp/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)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a human DevelopmentNo branches or pull requestsIssue actions
|