Skip to content

test(resource): pin the close-during-assembly invariant CIRISEdge relies on - #75

Closed
emooreatx wants to merge 1 commit into
mainfrom
test/close-during-assembly-invariant
Closed

emooreatx wants to merge 1 commit into
mainfrom
test/close-during-assembly-invariant

Conversation

@emooreatx

Copy link
Copy Markdown

Test-only. Requested from the CIRISEdge side, where it came out of a Codex finding on the v0.29 adoption (CIRISEdge#810).

CIRISEdge clears its per-link attribution at LinkClosed. It relies on this: a receiver-side resource whose link closes while its off-lock assembly (#71) is running fails exactly once, as ResourceFailed{LinkClosed}, emitted before LinkClosed. The assembly's late result (complete_resource_assembly) then yields no ResourceCompleted and no second failure.

The #71 test checked only part of that. It is now one helper that asserts the whole invariant, used for:

  • a local close_link during assembly;
  • a close sent by the peer during assembly.

Mutation-checked: if remove_link stops taking the resource out of assembling_resources, both variants fail.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BXj7C4ZeFuczxxDVadAHZ5

…ies on

CIRISEdge clears its per-link attribution at LinkClosed (CIRISEdge#810).
It therefore relies on this: a receiver-side resource whose link closes
while its off-lock assembly (#71) is running fails exactly once, with
ResourceFailed{LinkClosed}, and that failure is emitted before
LinkClosed. The assembly's late result then yields no ResourceCompleted
and no second failure.

The #71 test only checked that some failure appeared and that the late
result delivered nothing. It now asserts the full invariant. A variant
covers a close sent by the peer. Mutation-checked: when remove_link stops
taking the assembling resource, both variants fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BXj7C4ZeFuczxxDVadAHZ5
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-06T03:26:03.476002Z 7a6aebc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

emooreatx added a commit that referenced this pull request Oct 8, 2026
… telemetry (#77), the close-during-assembly pin

Lands PRs #74, #75 and #76.
- #74: direct-link upgrade, wire-compatible with rns-rs. Five Codex rounds.
- #75: a test pinning the close-during-assembly invariant CIRISEdge
  relies on.
- #76: link census, link list, lifecycle counters, the mirror-divergence
  alarm and the metrics facade. Four Codex rounds.

The final fixes on #74 (round 5) and #76 (reject_link) answer Codex's own
findings. Codex then hit its usage limit and could not review them; each
has a test. Releasing on green CI was the maintainer's call.

Integration: #74 and #76 overlapped only where both appended to the same
places (NodeCore fields, ReticulumNode fields, lib.rs re-exports, the
event loop's prologue and timer branch, the lock census). Each commit
builds on its own. The apply_inbound citation in event_log.rs follows the
combined driver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ye3GBY8MB38EsYH5eaZKq
@emooreatx

Copy link
Copy Markdown
Author

Landed in v0.30.0+ciris.1 via release PR #78 (rebase-merged; main at fa6cff3). The commits are on main with new SHAs; the later Codex rounds raised on #78 are fixed there too.

@emooreatx emooreatx closed this Oct 8, 2026
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.

1 participant