Skip to content

0.5.240: a contact's node key comes before their binding - #826

Merged
emooreatx merged 1 commit into
mainfrom
fix/contact-node-key-first
Oct 27, 2026
Merged

emooreatx merged 1 commit into
mainfrom
fix/contact-node-key-first

Conversation

@emooreatx

Copy link
Copy Markdown
Contributor

Why

Five-platform run 40503540610: server 0.5.239 and client 0.5.234, with the canonical rolled to 0.5.239. request:android<-linux was still red.

  • #907 works: the canonical served android's announced owner-binding.
  • linux refused it: attested_key_id ciris-node-bootstrap-… resolves as neither a registered federation_keys row …. Persist admits delegates_to(owner → node) only once the node's Key row is held.
  • 0.5.239 pulled the node's key only after the person resolved to a node, and resolving needs that same binding. Each waited on the other.
  • Once refused, edge backs off re-asking for that row (CIRISEdge#544).

What

The contact code already names the person's nodes (CodeAdmission.owned_nodes). This PR uses them.

  • Track every add. add_contact_for_owner tracks every add until the person resolves, not only adds completed by the pending pass. It passes along the node ids from the code.
  • Node keys first. The resolve pass pulls those nodes' keys first, on the public Key plane. It asks for the person's records once the keys are held, or after 60 s regardless, so a stale code can't block resolution.
  • Logging. CONTACT UNRESOLVED gains code_nodes and code_node_keys_missing.

Tests

contact_key_pull_e2e::a_contacts_announced_owner_binding_arrives_on_a_subject_pull now starts as the run did: the asker holds the person's key but not their node's. The test pulls the node key first, then the binding. Asking for the binding first reproduces the refusal and the #544 backoff.

Local runs, all green:

  • clippy -D warnings
  • the 634 lib tests
  • contacts_chat (41) and contact_key_pull_e2e (3)
  • release_gates, field_conformance, log_citations and localization_gate

The canonical needs no change for this fix. It already serves the key and the binding.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QriZxPx5aJvHXCGaTZmvKF

On 0.5.239 with the canonical rolled, the canonical served the contact's
announced owner-binding (#907 works) and linux refused it: persist admits
`delegates_to(owner -> node)` only once it holds the node's Key row
(`attested_key_id ... resolves as neither`), and 0.5.239 pulled the node's key
only after the person resolved, so each waited on the other. A refused row is
then held back by edge for a backoff window (CIRISEdge#544).

The contact code already names the person's nodes (`owned_nodes`). Every add
(not only a pending one) is now tracked with those node ids; the resolve pass
pulls their keys first and asks for the person's records once they are held
(after 60 s regardless, so a stale code cannot block). CONTACT UNRESOLVED gains
code_nodes and code_node_keys_missing. The #907 probe now starts with the asker
lacking the node key, as in the run, and resolves.

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

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-27T13:05:08.807146Z
We couldn’t complete this review. Comment @codex review to try again.
18ab673 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@emooreatx
emooreatx merged commit 80031ee into main Oct 27, 2026
17 checks passed
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