Skip to content

id(serve): seitan admission vs durable world directories — AccountVerified lands in the server-config journal, not the live world directory (Codex P1 follow-up to #8529) #8538

Closed

Description

@dezren39

Problem

Codex P1 finding on PR #8529 (seitan admission path for #8487), review comment 4534012963:

When id serve serves a durable world, the live world uses its own .id-worlds/<name>/directory.jsonl (loaded by world_store.rs), but the seitan admit path built for #8487 checks accounts and appends AccountVerified in the server-config directory journal (server_config_directory_path, beside the groups log). Consequences Codex names:

  • a provisioned account can be admitted successfully (invite consumed) while remaining unverified in the named world's live directory — capability authorization consults the live directory (world/core.rs);
  • accounts created through the world's directory API are absent from the server-config directory lookup, so their admits refuse unknown_account.

Why this is a follow-up, not a PR #8529 change

The recorded design for #8487 (task 14857, design comment on #8487) decision 3 scopes v1 deliberately: the membership change is directory-level, appended via Directory::verify_account into the server-config directory journal; "World-session membership is a separate existing mechanism (world_session invites) and is out of scope here." PR #8529 implements exactly that design, and its acceptance criteria (packet for task 14862) name the server directory. Rebinding admission to per-world live directories is a design change beyond that recorded scope.

What to decide / do

  1. Decide the intended binding: when the invite names a world that has a live .id-worlds/<name>/directory.jsonl, should admit resolve that directory for the account check + AccountVerified append instead of (or in addition to) the server-config journal?
  2. Reconcile the account universes: accounts created via the world's directory API vs provisioning / /api/identity/register in the server-config directory — which one is authoritative for the unknown_account check?
  3. Implement the decided binding with integration tests in the routes.rs seitan idiom (durable-world admit lands in the live world directory; world-created account admits without unknown_account).

Refs: PR #8529, issue #8487, task 14862 (lane tmp-code-b dispositioned the Codex thread with this follow-up).

Activity

  1. added
    source/queue-workerFiled or worked by the queue/worker pilot
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 11, 2026
  2. developing-today commented on Nov 11, 2026

    @developing-today
    Contributor
  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    effort/mMedium: expected under 1 day of work
    priority/highImportant and time-sensitive
    and removed
    priority/normalOrdinary priority (the default)
    on Nov 17, 2026
  4. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — task 18685 (lane any-f)

    • State: triaged. Issue id(serve): seitan admission vs durable world directories — AccountVerified lands in the server-config journal, not the live world directory (Codex P1 follow-up to #8529) #8538 is OPEN, unheld. PR feat(id): seitan admission path for id serve (#8487) #8529 is MERGED (2026-11-11) and id(serve): build the seitan admission path so ServerConfig::freshness() reaches a live admit check (split from #5119) #8487 is CLOSED — this follow-up is the live remainder.
    • Work kind: task/small-fix (bounded Rust change in the seitan admit path + integration tests). Effort: effort/m.
    • Priority: raised normal → priority/high. Why: this is a Codex P1 on an authorization path — an invite can be consumed and return success while the account stays unverified in the directory capability authorization actually consults (world/core.rs reads the live world directory), and world-created accounts are refused unknown_account. Admission that silently does not admit is a correctness bug, not polish.
    • Fresh verification (2026-11-17, origin/main e205708): the defect is still present exactly as filed. pkgs/id/crates/id-web/src/seitan.rs: SeitanInner holds ONE directory ("In id serve this is the directory beside the groups log (the server-config directory journal)"); RegisteredInvite carries the world name but admission never resolves a per-world directory. pkgs/id/crates/id-cli/src/commands/serve.rs:1154/1179 server_config_directory_path is what gets opened for seitan state. The live world directory is a different file: pkgs/id/crates/id-worlds/src/world_store.rs:645/879 loads .id-worlds//directory.jsonl. The unknown_account refusal is seitan.rs:312; the existing test idiom is routes.rs:2960 (seitan_admit_unknown_account_is_403_and_does_not_consume_the_invite).
    • Decision (triage decision, recorded here; it is a fleet design call within the id(serve): build the seitan admission path so ServerConfig::freshness() reaches a live admit check (split from #5119) #8487 design's own terms, not a Drew-reserved one): when the invite names a world that has a live world directory, admission resolves THAT directory — the account check and the AccountVerified append both run against the live world directory, because that is the directory capability authorization consults. The server-config journal remains the binding only when the named world has no live directory. For the account-universe question: the live world directory is authoritative for world-named invites; the account check consults the world directory first and the server-config directory second, so an account known to either is not refused unknown_account — but AccountVerified is appended only to the live world directory (appending it to the server journal as well would recreate the split-brain this issue exists to remove).
    • First concrete step (follow-on fix packet): in serve.rs, where seitan state is built, also hand SeitanState a resolver from world name → the world's live directory (opened from the world store path); in seitan.rs admit, resolve per RegisteredInvite.world. Integration tests in the routes.rs seitan idiom: (a) durable-world admit lands AccountVerified in the live world directory; (b) an account created through the world's directory API admits without unknown_account; (c) the existing server-config-only flow (no live world directory) still passes, including the unknown-account 403 / invite-not-consumed test.
    • Acceptance check for the fix: those tests pass in CI; no change to invite registration, freshness, or the world_session mechanism (out of scope per the id(serve): build the seitan admission path so ServerConfig::freshness() reaches a live admit check (split from #5119) #8487 design).
    • Routing: scoped fix packet enqueued from this triage (dedupe repo-health:v1:fix:developing-today/code:issue:8538); this triage task completes as triaged naming that follow-on.
  5. added and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 17, 2026
  6. dezren39 commented on Nov 18, 2026

    @dezren39
    MemberAuthor

    Agent note · task 20174 (lane code-g): already done, no change made

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/mMedium: expected under 1 day of workpriority/highImportant and time-sensitivequeue/queuedHas a queued queue tasksource/queue-workerFiled or worked by the queue/worker pilotstatus:donetask/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