Skip to content

id(world-manifest): module_hash documentation names a blake3:<hex> form that validate rejects — a world.toml written per the docs fails to parse #2166

Closed

Description

@dezren39

Summary

pkgs/id world manifest: the only documented format for module_hash is rejected by the manifest's own validation. The field's rustdoc says the hash is written blake3:<hex>, but WorldManifest::validate accepts only 1–64 hex digits — a blake3:-prefixed value is 71 characters for a real 32-byte hash and contains non-hex characters (:, and the letters in blake3 beyond a–f), so any world.toml written by following the documentation fails to parse, and id world diff / id world apply refuse it.

Evidence (main c58507a3, verified this run)

  • pkgs/id/src/world_manifest.rs:29 — field doc: "A content hash of an already-installed module (blake3:<hex>)."
  • pkgs/id/src/world_manifest.rs:182-189 — validation: !hash.is_empty() && hash.len() <= MAX_NAME_BYTES && hash.bytes().all(|b| b.is_ascii_hexdigit()), with the error "module hash must be 1 to 64 hex digits". MAX_NAME_BYTES = 64 (pkgs/id/src/world_caps.rs:60).
  • The live producer is plain hex with no prefix: pkgs/id/src/world_session/mod.rs:657-659 module_hash() is iroh_blobs::Hash::new(wasm).to_string() (64 hex chars), and the world-fixture doc also describes module_hash as "<hex>" (pkgs/id/docs/2026-10-17T09-00-00Z_feature_world_fixtures/…md:20). The blake3: form appears nowhere else in src/ or the docs.
  • Verbatim-predicate probe (the exact valid expression from validate, compiled and run on the laptop, ~/git/fleet/probe-2026-10-29-manifesthash/):
    • plain 64-hex (the live form): valid=true
    • documented blake3:<64 hex> (71 chars): valid=false
    • blake3:abc123 (short): valid=false

So the documented form fails on both independent grounds: length (71 > 64) and charset.

Why it matters

world.toml is the declarative interface for reconciling a live world (id world apply / id world diff, pkgs/id/src/cli.rs:1730-1759). An operator who copies the documented hash form into a manifest gets a parse failure before any step is planned, with an error that contradicts the documentation they followed. One of the two sides is wrong, and until they agree, the documented interface is unusable as written.

Acceptance criteria

  • Triage pins the canonical form (the evidence points to plain hex: the live producer, the fixture doc, and the existing tests in world_manifest.rs all use bare hex; accepting/stripping a blake3: prefix is the alternative).
  • The rustdoc on WorldManifest::module_hash and validate's rule/error message agree on exactly one accepted form.
  • A test in world_manifest.rs covers the pinned form: the documented example parses (or, if the doc is corrected, a regression test shows the previously documented blake3: form's behaviour is the intended one and the doc no longer names it).
  • No change to plan/apply semantics for manifests that already parse.

Dedup

Searched open + closed for world_manifest, manifest module_hash, world.toml, blake3 prefix: #1517 (closed) was the empty-string case of the same validator and is fixed on main; #817/#1519 are plan/diff semantics. None covers the documented-prefix mismatch.

Activity

  1. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  2. added
    kind/docsDocumentation improvement or addition
    priority/lowNice to have; do when convenient
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/xsTrivial: expected under 30 minutes of work
    on Oct 29, 2026
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-a (Lane A)
    • Session / ID: cron job new-issue-creator-code-a, run 2026-10-29T07:16Z
    • Found via: filed this run
    • Task: Filed after verifying with a verbatim-predicate probe (compiled/run on the laptop, ~/git/fleet/probe-2026-10-29-manifesthash/) that the documented blake3:<hex> module_hash form fails WorldManifest::validate on both length (71 > 64) and charset, while the plain 64-hex form the live producer emits passes. NOT self-solved: which side is canonical (fix the rustdoc vs accept/strip the prefix) is triage's pin.
    • Expectation: effort/xs — triage pins the canonical form, then a small-fix aligns the rustdoc, the validator and its error message, with a regression test.
    • Links: packet queue-pilot/packet-2166-triage.json (repo-health-code-pilot)
  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  5. 6 remaining items

  6. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    work/assignedQueue worker lifecycle state
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  7. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  8. added a commit that references this issue on Nov 1, 2026
    ecd8b2f
  9. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    • Agent: repo-worker-code (Lane C queue shift)
    • Session / ID: queue task 5197
    • Result: fixed and merged — PR id(world-manifest): document module_hash as plain hex, not blake3:<hex> #3412 (merge commit 7a340a8). Rustdoc on WorldManifest::module_hash now names the plain-hex canonical form (1 to 64 hex digits, no blake3: prefix); regression test module_hash_uses_plain_hex_without_a_blake3_prefix pins it (64-hex parses; blake3:abc123 and 71-char prefixed values rejected). validate/producer/plan semantics unchanged.
    • Tests: laptop cargo test --lib world_manifest (pkgs/id) — 18 passed, 0 failed; Codex review on PR head ecd8b2f completed with no findings.
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/xsTrivial: expected under 30 minutes of workkind/docsDocumentation improvement or additionpriority/lowNice to have; do when convenientsource/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