Skip to content

id(chain): integration tests do not compile — ChainExt initializers missing new link field #4522

Closed

Description

@dezren39

Problem

cargo test (all targets) in pkgs/id does not compile on current main (verified 2026-11-02 on origin/main c91c679, worktree for task 6304 / issue #4067 — that change touches only pkgs/id/src/app_manifest.rs and its lib tests all pass).

Integration test targets fail with:

error[E0063]: missing field `link` in initializer of `ChainExt`
  --> tests/documents.rs:101, 117, 375
  --> tests/tag_claims.rs:258, 268
  --> tests/bridge_poc.rs:159, 190
  (also production_ingest, aliases targets fail to compile)

pkgs/id/src/chain.rs:99 ChainExt gained a link field; the integration-test initializers were not updated.

Evidence

  • cargo test app_manifest in pkgs/id: could not compile id (test "documents"), (test "tag_claims"), (test "bridge_poc"), (test "production_ingest"), (test "aliases") — all E0063 above.
  • cargo test --lib app_manifest: 12 passed — the lib target is unaffected.

Acceptance

  • All pkgs/id test targets compile again (initializers updated for the link field, or the field gains a default the tests can rely on — author's call).
  • cargo test in pkgs/id runs the integration suites again.

Acceptance criteria

  • The pkgs/id integration tests compile on main (the ChainExt initializers name the new link field).
  • The affected integration test target passes in CI on main.
  • No production behavior changes beyond what the compile fix requires.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 2, 2026
  2. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: code issue #4454 (references.rs compile breakage on main, enriched earlier today) is the sibling main-compile failure class; no merged PR fixing this ChainExt initializer gap was found at this pass.

    Notes: Labels at filing: kind/bug, priority/normal, app/id. This pass adds the acceptance section, status/needs-triage, effort/s, meta/enriched.

    Risks: Main does not compile for this test target until fixed, which blocks other id work queue-wide (several lanes already cite the #4454-class breakage); speed matters.

    Suggested approach: Smallest compile fix: update the ChainExt initializers in the integration tests to the current struct shape, verify via CI on the PR.

    — fleet monitor intake enrichment, 2026-11-02.

  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 2, 2026
  4. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  5. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Deploy-blocker escalation + fresh evidence (2026-11-02)

    Escalating this from a test-compile bug to a deploy blocker, per Drew's call today: this suite runs inside the Nix build, so the next laptop switch attempt fails until it compiles.

    Nix wiring (verified on main):

    • pkgs/id/flake.nix → packages.id-web is buildRustPackage with doCheck = true, checkType = "ci-check", checkFlags only ["--skip" "serve_tests"] — the check phase runs cargo test over all targets. The root flake merges the id sub-flake's packages unprefixed (lib/default.nix make-id), so the attribute is .#id-web.
    • nixos/services/id-mail/default.nix:76 sets services.id.package = inputs.self.packages.${system}.id-web, putting the derivation in the laptop system closure (unit-id-primary.service). A check-phase failure fails the whole switch build.

    Fresh reproduction on current main (origin/main 0ea90ece0, scratch worktree on the laptop, cargo test --all-targets --no-run in pkgs/id):

    error[E0063]: missing field `link` in initializer of `ChainExt`
      --> tests/crash/store.rs:430:46
    error: could not compile `id` (test "crash")
    

    The crash target is additional to the set verified at filing (documents, tag_claims, bridge_poc, production_ingest, aliases). The lib and lib-test targets compile — the #4454 lib breakage stays fixed (PR #4477); this is test-target-only.

    Wasm item: a queue lane's 2026-11-02 shift report also described a "missing wasm" failure in the full-suite build. It did not reproduce in the cargo run above — the include_bytes! artifacts used by tests/worker_poc_reference.rs (examples/roc-counter/counter.wasm, apps/tic-tac-toe/program/tic-tac-toe.wasm) are both checked into git and present. The fix task's acceptance includes dispositioning this: if it appears in the nix sandbox build, fix it; if not, record that here.

    Queued: repo-health-code-pilot task 6445 (kind small_fix, priority 10 — top of the scale), acceptance = all test targets compile + integration suites pass + nix build .#id-web succeeds on the laptop. The task was claimed by a code lane within minutes of enqueue.

  6. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Direction from Drew (2026-11-02) on the wasm item of this issue, for the task-6445 fixer:

    The wasm artifacts are checked into git — verified via API just now on main: pkgs/id/examples/roc-counter/counter.wasm (59,951 B) and pkgs/id/apps/tic-tac-toe/program/tic-tac-toe.wasm (69,319 B). The build must CONSUME the checked-in artifacts, not generate them. So if the nix sandbox build still fails on wasm, the bug is in the build wiring (source filtering dropping the .wasm files from the derivation source, or a build step trying to regenerate them) — fix that path so the checked-in copies are what gets used. Do not add a generation step to the build. Report the disposition on this issue per the packet's acceptance.

  7. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up to resume the existing fix

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane
    • Session / ID: queue task 6445 (attempt 2)
    • Resume artifact: branch queue/6445-4522-chainext-tests, worktree /home/user/git/fleet/task-6445; prior progress points to reproduction process pty_persistent_4049868108511187.
    • Action: revalidate issue/PR and inspect the existing worktree/process before continuing; no new branch or worktree will be created unless the recorded artifact is absent.
    • Link: id(chain): integration tests do not compile — ChainExt initializers missing new link field #4522
  8. 36 remaining items

  9. added
    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
    on Nov 3, 2026
  10. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: done (already_done, awaiting CI confirmation)
    queue: repo-health-code-pilot
    task: 8425 (completed, outcome already_done)
    by: openchamber-scheduled-lane (repo-worker-code, lane bf419306)
    at: 2026-11-03T19:46Z

    Triage at current main: fixed. PR #4566 fix(id): name the new link field in ChainExt test fixtures (#4522) merged 2026-11-02T21:40Z (merge commit a1e808a; fix commit 8d95c12 on main). Static check on current main: every ChainExt { initializer in pkgs/id/tests/{documents,tag_claims,bridge_poc,production_ingest,aliases}.rs names link or uses struct-update syntax (..document_ext(...)), and pkgs/id/src/chain.rs still declares pub link: Option<NoteLinkOp>.
    Not yet done: the PR rollup did not show an id check run, so the issue's acceptance item (integration target passes in CI on main) is unconfirmed. Leaving the issue OPEN; close it once an id run on main is green. No follow-up task, no branch.
    Labels: removed queue/queued and status/needs-triage; added status/triaged.

  12. added
    status/triagedTriaged and routed (see agent note)
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  13. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Direct priority unblock — superseding the queue bookkeeping on this issue

    Queue task 6445 was marked done with outcome already_done (the original link-field E0063 was merged in PR #4566), but its own recorded result states that nix build .#id-web was NOT run — the Nix-facing acceptance never closed this issue. Triage task 8425 later repeated a static link-only check and also landed on already_done; that check is stale, per the fresh evidence below. This fix is being taken directly as the priority switch unblock.

    Fresh reproduction on current origin/main bb4624b (laptop worktree, cargo test --all-targets --no-run in pkgs/id, exit 101) shows the same stale-initializer class has recurred for the newer ChainExt.checkpoint field (added by the session-checkpoint work, #3794):

    • chain_properties: 3 E0063 errors
    • cli_documents: 1
    • documents: 3
    • production_ingest: 2
    • retention_pruning: 4
    • search: 2

    Total: 15 initializers across 6 test targets, all missing the checkpoint field. None of these fixtures constructs a session.checkpoint event, so the correct fixture value is checkpoint: None, matching how the production-side test fixtures in src/ were updated.

    Fix in progress on branch fix/4522-current-main-unblock: name checkpoint: None in the 15 initializers, then re-run the full suite and nix build .#id-web as the closing proof.

    (Editorial note: this comment replaces an earlier garbled posting of the same note, issuecomment-6614042233, whose markdown backticks were eaten by a shell heredoc on the way in.)

  14. added 2 commits that reference this issue on Nov 3, 2026
  15. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Closed — the compile breakage is fixed on current main; what remains is tracked separately

    What this issue became

    The link-field breakage in the original report was fixed by PR #4566 (merged 2026-11-02). The issue stayed open because the build was never run to green, and the same stale-initializer class then recurred for the next ChainExt field: checkpoint (added by the session-checkpoint work, #3794; the src/ fixtures were updated, the integration tests were not). Queue task 6445 closed as already_done on the strength of #4566 without ever running nix build .#id-web; task 8425 later re-checked statically and missed the recurrence. This direct fix supersedes both (see the earlier note on this issue).

    The fix

    PR #5117, merged as 421250e: 31 initializers across 14 integration-test files under pkgs/id/tests/ now name checkpoint: None after their link field (every affected fixture constructs a non-checkpoint event). 31 insertions, 0 deletions, test-only.

    Files: aliases, bridge_poc, chain_properties, cli_documents, content_removal, crash/store, documents, event_store_properties, production_ingest, retention_pruning, search, tag_claims, voiding_properties, voiding_scenarios.

    Verification (laptop, branch tree with main merged in)

    Wasm disposition

    Both checked-in artifacts (examples/roc-counter/counter.wasm, apps/tic-tac-toe/program/tic-tac-toe.wasm) are consumed as-is; nothing generates them and the Nix build phase succeeds with them untouched. The tic-tac-toe fixture hash drift is a fixture-versus-artifact question tracked in #5021, not a build-wiring failure.

    Bottom line for the fleet switch

    The pkgs/id COMPILE blocker that failed the 2026-11-02 switch attempt is gone. .#id-web still goes red in its check phase, now solely on the runtime-red tests tracked in #5020, #5021, #5128 and #5132 — those four are the remaining switch blockers for this package, and none of them is a compilation problem.

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)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus/triagedTriaged and routed (see agent note)task/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