Skip to content

id(shell-contract): the directory client frame (PR #4954) is missing from the shell contract — contract test red on main #5020

Closed

Description

@dezren39

id(shell-contract): the directory client frame (PR #4954) is missing from the shell contract — contract test red on main

Evidence

Verified on the laptop at origin/main 27f12c6 (also failing at eef89b9), file-captured log /tmp/scan20b.log:

cargo test -p id --lib -- every_client_frame_variant
test shell_contract::tests::every_client_frame_variant_is_in_the_contract_and_nothing_else_is ... FAILED
panicked at src/shell_contract/tests.rs:127:5:
assertion `left == right` failed
  left (client_frame_variants()):  { …, "directory", … }   (34 variants)
  right (contract client_frames): { … }                     (33 — no "directory")

Why it matters

The shell contract is the shared source of truth between the Rust host and shell/web clients: a frame the host accepts but the contract does not name is invisible to contract-driven clients (they cannot build or validate a directory request), and the permanently red test on main masks other regressions in the same suite.

Acceptance criteria

  • shell-contract.v1.json gains a directory client-frame spec whose fields match the Directory {} frame and its handler's expectations (no admin token; see the frame's doc comment in world_session/types.rs), and shell-contract.ts is regenerated/updated to match if it is derived from the JSON.
  • cargo test -p id --lib shell_contract passes on main.
  • No other frame specs change.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    source/creatorFiled by the new-issue-creator job
    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)
    on Nov 3, 2026
  2. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator job (new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b, run 2026-11-03T16:25Z
    • Found via: filed this run
    • Task: Filed after verifying on the laptop at origin/main 27f12c6 that the shell-contract test fails: the directory client frame added by PR id: world directory feed — presence counts + public directory frame (#812) #4954 has no entry in shell-contract.v1.json. Queued as a small-fix packet for the queue lane.
    • Expectation: effort/s — done when the contract names the directory frame per the frame's handler semantics and cargo test -p id --lib shell_contract passes on main.
    • Links: evidence in the issue body; packet packet-5020-fix.json (repo-health-code-pilot)
  3. added a commit that references this issue on Nov 3, 2026
  4. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Fixed in PR #5159 (merged 9102135).

    The contract now names the frame the code has emitted since #4954: directory added to contract/shell-contract.v1.json as class query, phases [opening], opens: closed, no fields — matching the hub handler in world_session/mod.rs (answers Worlds and returns; no admin token; joined sessions reject it). Additive change, so revision bumped 4 -> 5 per the contract's own rule. web/src/shell-contract.ts needed no edit: it reads this JSON at runtime, so the JSON is the single source.

    Verified on the laptop at the fix commit: cargo test -p id --lib shell_contract — 8 passed / 0 failed (was: variant set assertion failed, 34 code variants vs 33 contract frames).

  5. added a commit that references this issue on Nov 3, 2026
  6. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Follow-up landed in PR #5168: bumping the contract revision to 5 turned one hard-coded expectation red — commands::world::tests::the_contract_check_reports_conformance_or_every_violation asserts the conformance message literally, and the message formats v{version}.{revision} from the live contract. The literal now reads v1.5; the named test passes on the laptop.

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)queue/queuedHas a queued task in the Supabase agent queuesource/creatorFiled by the new-issue-creator jobstatus/needs-triageNot yet triaged; needs a first looktask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions