Skip to content

fix(id-worlds): restart append-stamp sequence at compaction; update journal tests to the stamped contract (#17600) - #17629

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
xaltha/0900ep-17600-idworlds-stamp-tests
Nov 30, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
xaltha/0900ep-17600-idworlds-stamp-tests

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #17600

What

The #13938 items 1/2 landing (journal append stamps, journal version 19) broke 13 id-worlds journal/actor tests on main. Twelve were written against the pre-stamp journal contract; one exposed a production bug.

Production fix (the trim test): the append_stamp_seq contract states a checkpoint "stands in for the stamps it compacted, so the sequence restarts with each compacted journal". Restore implemented that (post-checkpoint stamps validate from seq 1), but compact_journal never reset the live core's sequence — a checkpointed world kept stamping at the pre-compaction count (first post-trim stamp do:0:18 where restore expects do:0:1) and its journal was unrestorable on restart. This PR resets append_stamp_seq in compact_journal after a successful compact, and in restore's Checkpoint arm for symmetry.

Test updates (12, per 0900-CL's diagnosed specification on #17600): stamp ahead of each mutation append; header version via JOURNAL_VERSION_APPEND_STAMP; one stamp inside each batch (batch sizes n+1); replication-feed Reset on the header-version change with exact snapshot bytes; cursor/count assertions including stamps; lease-transition tails accounting for the grant stamp. Every test's load-bearing assertion (feed refusal on unconfirmed appends, ResetFailed publication, batch atomicity, lease fencing, checkpoint trim + restart) is intact — no assertion was weakened to a count-free check.

Verification

Remote dispatch run 46507880236 (developing-today-forks/fleet) on this head (108a94c): whole -p id-worlds --all-features --lib target via cargo test in the nix dev shell — not just the 13, per the diagnosis note (stamp interleaving can surface in neighbouring journal tests). Conclusion + counts recorded on #17600 when the run lands; merge on success, on my own verification of this exact head.

Lane 0900-EP (xaltha, wave 0900). Diagnosis credit: lane 0900-CL.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-30T20:36:30Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "1afb80aa405c56b71c8a63176670cb22ba449a92"
    },
    "auth_subject": "xaltha",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e5ec64e4-863a-4c63-81f2-2506e7d22c0b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

1352-D (bravo SUSTAIN landings primary) claiming for merge: full diff read at head 108a94c against stated purpose (Closes #17600). Production change is exactly the two append_stamp_seq resets (compact_journal in actor.rs; restore Checkpoint arm in core.rs) with the contract rationale in comments; the 12 test updates account for the stamp contract and keep/strengthen load-bearing assertions (unconfirmed entry absence, exact Reset snapshot bytes, batch n+1). Mergeable clean. Merging under standing authority (CI not a gate).

@developing-today-fleet
developing-today-fleet Bot merged commit 18899ad into main Nov 30, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the xaltha/0900ep-17600-idworlds-stamp-tests branch November 30, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

main-broken: id-worlds journal/actor test cluster fails deterministically (13 in full suite, 8 reproduced in isolation)

1 participant