Skip to content
This repository was archived by the owner on Aug 17, 2026. It is now read-only.

fix(hive): restore explicit lost identity reset - #89

Merged
100yenadmin merged 16 commits into
mainfrom
fix/78-explicit-lost-identity-reset
Jul 31, 2026
Merged

fix(hive): restore explicit lost identity reset#89
100yenadmin merged 16 commits into
mainfrom
fix/78-explicit-lost-identity-reset

Conversation

@100yenadmin

@100yenadmin 100yenadmin commented Jul 30, 2026

Copy link
Copy Markdown
Member

Closes #78

Why

The installed exact-main Internal Canary reproduced identity_recovery_not_available after successful Electric OAuth because primary operator's canonical identity has neither a matching local key nor a custody envelope. Exact recovery is impossible, and silent key rotation is forbidden.

Change

  • offer reset only for the exact missing-envelope response
  • require explicit destructive confirmation in Hive
  • stage and read back a membership-scoped replacement key in macOS Keychain before server rotation
  • reuse the existing signed identity-rotation backend protocol
  • require custody enrollment before native identity and managed-session commitment
  • preserve unmanaged Buzz behavior and native collaboration paths

Focused proof

  • cargo test --features evaos-teams-managed evaos_teams: 46 passed
  • cargo test evaos_teams: 28 passed
  • cargo clippy --features evaos-teams-managed --lib --tests -- -D warnings: passed
  • managed login/reset UI tests: 5 passed

This PR proves source behavior only. A rebuilt signed artifact and resumed installed canary remain separate gates.

Signed-off-by: Eva <eva@100yen.org>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Priority Level: P1

  • UI-only destructive consent; backend-initiated replacement is not bound to user confirmation. The Tauri command proceeds when pending_identity_reset exists, without requiring a confirmation token or equivalent backend-side authorization tied to that reset. Why it matters: identity replacement is destructive, and any caller able to invoke the command can bypass the checkbox. Location: desktop/src-tauri/src/evaos_teams/identity_rotation.rs; desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx. Recommended fix: require a one-time, pending-reset-scoped confirmation nonce or equivalent backend-enforced confirmation gate. Required before merge.

  • P4/NIT (optional): clarify staged-material behavior after failed reset attempts. Replacement keys may remain staged while the pending reset remains active after failures. Why it matters: documenting or enforcing the retry invariant would ensure no background path can progress identity state without a fresh explicit reset action. Location: identity_rotation.rs; login_identity.rs. Recommended fix: explicitly require both an active pending reset and fresh confirmation before progression. Not required before merge.

Walkthrough

Managed authentication now validates complete identity bindings, distinguishes unavailable recovery, tracks pending resets, stages membership-scoped replacement keys, performs identity rotation, and exposes a confirmation-based reset action through Tauri and React surfaces.

Changes

Managed identity recovery

Layer / File(s) Summary
Binding and custody contracts
desktop/src-tauri/src/evaos_teams/identity_binding.rs, desktop/src-tauri/src/evaos_teams/identity_custody.rs, desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs
Authoritative binding scope, challenge, entitlement, recovery-error, encryption, device-binding, and custody validation are implemented and tested.
Binding-aware authentication flow
desktop/src-tauri/src/evaos_teams.rs, desktop/src-tauri/src/evaos_teams/login_identity.rs, desktop/src-tauri/src/evaos_teams/tests.rs
Enrollment, challenge signing, entitlement installation, login recovery, refresh, logout, and session persistence use complete validated bindings and pending reset state.
Membership-scoped rotation storage
desktop/src-tauri/src/evaos_teams/keychain_migration.rs, desktop/src-tauri/src/evaos_teams/tests.rs
Pending rotation keys are validated, preserved, staged per membership, reused when present, and removed after adoption.
Challenge validation and identity replacement
desktop/src-tauri/src/evaos_teams/identity_rotation.rs, desktop/src-tauri/src/lib.rs
The backend validates server templates, selects resume or rotate recovery, persists replacement identity material, registers the Tauri command, and resumes event publishing.
Reset status and confirmation UI
desktop/src/features/evaosTeams/*, desktop/src/testing/e2eBridge.ts
The new status phase renders a confirmation-gated replacement action with API, surface-test, and mock-command support.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

  • electricsheephq/electric-sheep-website-dashboard-6158a244#751: Covers the managed encrypted identity-recovery contract, device binding, membership validation, and fail-closed custody behavior implemented by these client changes.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 51.52% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: restoring an explicit lost-identity reset flow. Confidence: 99%.
Description check ✅ Passed The description is directly related, specific, and summarizes the reset, confirmation, Keychain staging, protocol reuse, and validation scope. Confidence: 99%.
Linked Issues check ✅ Passed The changes implement issue #78 objectives with scoped recovery, fail-closed validation, explicit reset confirmation, custody gating, and preserved unmanaged behavior. Confidence: 93%.
Out of Scope Changes check ✅ Passed The publisher, migration, backend recovery, UI, and test changes all support the linked identity-recovery and reset objectives; no unrelated code is evident. Confidence: 94%.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/78-explicit-lost-identity-reset

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands.

Eva added 2 commits July 31, 2026 02:46
Signed-off-by: Eva <eva@100yen.org>
Signed-off-by: Eva <eva@100yen.org>
@100yenadmin
100yenadmin marked this pull request as ready for review July 30, 2026 20:15
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: ea7c2bf104cff8e5bcdebe0b8157b063a47b70cf
Updated: 2026-07-30T20:19:58.082Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: ea7c2bf104cff8e5bcdebe0b8157b063a47b70cf into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +14/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +44/-358 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +374/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +438/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +30/-3 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +42/-1 Test coverage Low
desktop/src-tauri/src/lib.rs modified +1/-0 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +49/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +13/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 1, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 3

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea7c2bf104

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx`:
- Around line 146-161: Update runIdentityReset() to use the existing shared
run() wrapper instead of manually managing the replaceLostEvaosTeamsIdentity()
operation. Preserve the reset-specific success behavior, while ensuring failures
invoke refresh() to resynchronize status and clear lostIdentityConfirmed so the
confirmation panel does not remain stale.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ab8143ff-0cfe-4ab6-a44f-562f5e58ab39

📥 Commits

Reviewing files that changed from the base of the PR and between e49b126 and ea7c2bf.

📒 Files selected for processing (12)
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/identity_custody.rs
  • desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
  • desktop/src-tauri/src/evaos_teams/keychain_migration.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/lib.rs
  • desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx
  • desktop/src/features/evaosTeams/api.ts
  • desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs
  • desktop/src/testing/e2eBridge.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Do not introduce unsafe Rust code.
Do not introduce new unwrap() or expect() calls in production Rust paths; use ? and proper error types.
Add doc comments to every new public Rust API.

Files:

  • desktop/src-tauri/src/lib.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs
  • desktop/src-tauri/src/evaos_teams/keychain_migration.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
  • desktop/src-tauri/src/evaos_teams/identity_custody.rs
desktop/src/**/*.{ts,tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use rem-based named text-size tokens in the desktop app; do not use arbitrary px, rem, or em text-size literals. Prefer stock tokens or the named text-2xs/text-3xs tokens, and add a named rem token when necessary.

Files:

  • desktop/src/features/evaosTeams/api.ts
  • desktop/src/testing/e2eBridge.ts
  • desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx
desktop/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Every community-scoped module-level cache, Map, singleton, or class instance must expose a reset and be wired into resetCommunityState() in useCommunityInit.ts.

Files:

  • desktop/src/features/evaosTeams/api.ts
  • desktop/src/testing/e2eBridge.ts
  • desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx
desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Build desktop E2E tests with pnpm build:e2e, not pnpm run build; prefer pnpm test:e2e:smoke or pnpm test:e2e:integration.

Files:

  • desktop/src/features/evaosTeams/api.ts
  • desktop/src/testing/e2eBridge.ts
  • desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx
🧠 Learnings (1)
📚 Learning: 2026-07-30T11:25:18.286Z
Learnt from: 100yenadmin
Repo: electricsheephq/evaOS-Hive PR: 82
File: desktop/src-tauri/src/shutdown.rs:258-294
Timestamp: 2026-07-30T11:25:18.286Z
Learning: When reviewing code that concerns the Hive Internal Canary supported architecture, use the supported-release-path model as the baseline: it is a single company, single relay/community, single VM, and single Hermes gateway. Do not treat multi-community runtime-pair behavior (e.g., a single local managed-agent record spanning multiple communities) as a “release-path regression” in review—this multi-community pattern is not a supported release path, so its presence should not trigger regression warnings.

Applied to files:

  • desktop/src-tauri/src/lib.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs
  • desktop/src-tauri/src/evaos_teams/keychain_migration.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
  • desktop/src-tauri/src/evaos_teams/identity_custody.rs
🔇 Additional comments (13)
desktop/src-tauri/src/evaos_teams.rs (1)

45-50: LGTM!

Also applies to: 157-171, 507-518

desktop/src-tauri/src/evaos_teams/identity_custody.rs (1)

42-65: LGTM!

Also applies to: 578-652, 678-679

desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs (1)

15-43: LGTM!

Also applies to: 317-375

desktop/src-tauri/src/evaos_teams/login_identity.rs (1)

4-39: LGTM!

Also applies to: 74-204

desktop/src-tauri/src/evaos_teams/keychain_migration.rs (1)

3-29: LGTM!

Also applies to: 30-45, 47-80, 121-164

desktop/src-tauri/src/evaos_teams/tests.rs (1)

1-4: LGTM!

Also applies to: 418-455

desktop/src-tauri/src/evaos_teams/identity_rotation.rs (2)

89-350: LGTM! (aside from the flagged schema-constant concern above)

Also applies to: 352-438


7-7: 🗄️ Data Integrity & Integration

Confirm IDENTITY_ROTATION_SCHEMA matches the backend contract

validate_identity_rotation_challenge() hard-rejects any response whose schema_version differs from IDENTITY_ROTATION_SCHEMA, so a contract mismatch would break the rotate flow before verify_identity_rotation_challenge() runs. The local fixture only mirrors the same constant, so this still needs an explicit backend/source-of-truth check. Confidence: 55%.

desktop/src-tauri/src/lib.rs (1)

657-657: LGTM!

desktop/src/features/evaosTeams/api.ts (1)

13-27: LGTM!

Also applies to: 47-50, 99-105

desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx (1)

16-16: LGTM!

Also applies to: 38-38, 133-133, 282-311

desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs (1)

13-13: LGTM!

Also applies to: 36-46

desktop/src/testing/e2eBridge.ts (1)

9757-9765: LGTM!

Comment thread desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: f0bc847723b202ab41483926276152bd8b13aa78
Updated: 2026-07-30T21:06:35.069Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: f0bc847723b202ab41483926276152bd8b13aa78 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +20/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +44/-358 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +559/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +32/-3 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +73/-1 Test coverage Low
desktop/src-tauri/src/lib.rs modified +1/-0 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +49/-0 Changed file Moderate: validated P3 finding
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +13/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 4 (P0: 0, P1: 0, P2: 2, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 4

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated
Comment thread desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0bc847723

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated
Comment thread desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx
Comment thread desktop/src/testing/e2eBridge.ts
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: dd42a0374f1f24e21e371ff44b6da7fa6e13c485
Updated: 2026-07-30T21:23:55.830Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: dd42a0374f1f24e21e371ff44b6da7fa6e13c485 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +20/-33 Changed file Moderate: validated P3 finding
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +43/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +44/-358 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +559/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +32/-3 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +73/-1 Test coverage Low
desktop/src-tauri/src/lib.rs modified +1/-0 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +49/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +13/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 4 (P0: 0, P1: 0, P2: 2, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • API compatibility: 1
  • Data loss: 1
  • Runtime correctness: 2

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
desktop/src-tauri/src/evaos_teams/identity_rotation.rs (1)

300-334: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Preserve the authoritative community and relay scope across rotation. Confidence: 93%.

current_binding is checked only for membership_id; its community_id and relay_host are discarded. A mismatched rotation challenge/entitlement can therefore pass validation against its own scope and commit the replacement identity to a different community or relay. Compare the final entitlement scope to current_binding before enrollment and persistence.

Proposed fix
         let current_binding =
             get_identity_binding(&app_state.http_client, pending.session.as_str()).await?;
         if current_binding.membership_id != pending.membership_id {
             return Err("Managed identity replacement changed the selected membership".to_string());
         }
+        let expected_community_id = current_binding.community_id.clone();
+        let expected_relay_host = current_binding.relay_host.clone();
         let entitlement = match identity_rotation_progress(
             current_binding.public_key.as_deref(),
             &pending.public_key,
             &replacement_public_key,
@@
             }
         };
+        if entitlement.community_id != expected_community_id
+            || entitlement.relay_host != expected_relay_host
+        {
+            return Err("Managed identity replacement changed its authoritative scope".to_string());
+        }
 
         let replacement_binding = IdentityBinding {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@desktop/src-tauri/src/evaos_teams/identity_rotation.rs` around lines 300 -
334, Validate that the final `entitlement` returned by
`identity_rotation_progress` matches `current_binding.community_id` and
`current_binding.relay_host`, in addition to the existing membership check,
before constructing `replacement_binding` or continuing enrollment/persistence.
Return an error on either scope mismatch and retain the authoritative values
from `current_binding` for the replacement binding.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@desktop/src-tauri/src/evaos_teams/identity_rotation.rs`:
- Around line 300-334: Validate that the final `entitlement` returned by
`identity_rotation_progress` matches `current_binding.community_id` and
`current_binding.relay_host`, in addition to the existing membership check,
before constructing `replacement_binding` or continuing enrollment/persistence.
Return an error on either scope mismatch and retain the authoritative values
from `current_binding` for the replacement binding.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 73650bd2-4e4b-42cc-9114-3cd84f75ebfc

📥 Commits

Reviewing files that changed from the base of the PR and between ea7c2bf and dd42a03.

📒 Files selected for processing (6)
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/identity_binding.rs
  • desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
📜 Review details
⏰ Context from checks skipped due to timeout. (12)
  • GitHub Check: Desktop E2E Integration (2/2)
  • GitHub Check: Desktop E2E Integration (1/2)
  • GitHub Check: Desktop Build (macOS)
  • GitHub Check: Desktop Smoke E2E (2)
  • GitHub Check: Desktop Smoke E2E (1)
  • GitHub Check: Windows Rust (x86_64-pc-windows-msvc)
  • GitHub Check: Desktop Smoke E2E (4)
  • GitHub Check: Desktop Smoke E2E (3)
  • GitHub Check: Rust Lint
  • GitHub Check: Desktop Core
  • GitHub Check: Analyze (rust)
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Do not introduce unsafe Rust code.
Do not introduce new unwrap() or expect() calls in production Rust paths; use ? and proper error types.
Add doc comments to every new public Rust API.

Files:

  • desktop/src-tauri/src/evaos_teams/identity_binding.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
🧠 Learnings (1)
📚 Learning: 2026-07-30T11:25:18.286Z
Learnt from: 100yenadmin
Repo: electricsheephq/evaOS-Hive PR: 82
File: desktop/src-tauri/src/shutdown.rs:258-294
Timestamp: 2026-07-30T11:25:18.286Z
Learning: When reviewing code that concerns the Hive Internal Canary supported architecture, use the supported-release-path model as the baseline: it is a single company, single relay/community, single VM, and single Hermes gateway. Do not treat multi-community runtime-pair behavior (e.g., a single local managed-agent record spanning multiple communities) as a “release-path regression” in review—this multi-community pattern is not a supported release path, so its presence should not trigger regression warnings.

Applied to files:

  • desktop/src-tauri/src/evaos_teams/identity_binding.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
🔇 Additional comments (6)
desktop/src-tauri/src/evaos_teams/identity_binding.rs (1)

1-43: LGTM!

desktop/src-tauri/src/evaos_teams.rs (1)

43-55: LGTM!

Also applies to: 176-176, 501-510

desktop/src-tauri/src/evaos_teams/login_identity.rs (1)

34-37: LGTM!

Also applies to: 70-73, 161-191

desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs (1)

196-323: LGTM!

desktop/src-tauri/src/evaos_teams/tests.rs (1)

162-183: LGTM!

Also applies to: 294-376, 447-470, 615-624

desktop/src-tauri/src/evaos_teams/identity_rotation.rs (1)

121-265: LGTM!

Also applies to: 375-559

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dd42a0374f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/evaos_teams/login_identity.rs
Signed-off-by: Eva <eva@100yen.org>
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 0ab266c63ad7ea00a32e152e86b125af02503547
Updated: 2026-07-30T22:07:57.748Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 0ab266c63ad7ea00a32e152e86b125af02503547 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +63/-37 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +77/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +44/-358 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +596/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +52/-4 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +189/-2 Test coverage Low
desktop/src-tauri/src/lib.rs modified +1/-0 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +64/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +23/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 2, P3: 1).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Auth: 1
  • Runtime correctness: 2

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Signed-off-by: Eva <eva@100yen.org>
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: aafde5c4d9a4ccf15c299b42331b8a3341ff1541
Updated: 2026-07-30T22:21:44.116Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: aafde5c4d9a4ccf15c299b42331b8a3341ff1541 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +94/-56 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +77/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +46/-362 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +596/-0 Changed file Elevated: validated P1 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +56/-18 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +218/-11 Test coverage Elevated: large change
desktop/src-tauri/src/lib.rs modified +1/-0 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +64/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +23/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 5 (P0: 0, P1: 1, P2: 4, P3: 0).
Dropped findings before posting: 0. High-severity findings: 1.

Risk Taxonomy

  • Auth: 1
  • Data loss: 1
  • Runtime correctness: 1
  • Security boundary: 2

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: bug, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aafde5c4d9

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated
Comment thread desktop/src-tauri/src/evaos_teams/login_identity.rs
Signed-off-by: Eva <eva@100yen.org>
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 9bc9d71deea93d2d8f31d278308eb7ee96a82f9e
Updated: 2026-07-30T22:35:08.490Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 9bc9d71deea93d2d8f31d278308eb7ee96a82f9e into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +70/-56 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +100/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +46/-362 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +596/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +56/-18 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +218/-11 Test coverage Elevated: large change
desktop/src-tauri/src/lib.rs modified +1/-0 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +64/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +23/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 1, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 1
  • Security boundary: 2

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 28c933e2f6fe31cef03808b144b9b604218a394b
Updated: 2026-07-30T23:22:47.474Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 28c933e2f6fe31cef03808b144b9b604218a394b into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +70/-56 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +114/-0 Changed file Moderate: validated P3 finding
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +46/-362 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +650/-0 Changed file Moderate: validated P3 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +92/-21 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +229/-11 Test coverage Elevated: large change
desktop/src-tauri/src/lib.rs modified +1/-0 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +64/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +23/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 2 (P0: 0, P1: 0, P2: 0, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Auth: 1
  • Runtime correctness: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_binding.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 28c933e2f6

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/evaos_teams/login_identity.rs Outdated
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 6a573feaf0837fd3ef10f941181d88cb6ee789dc
Updated: 2026-07-30T23:45:13.658Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 6a573feaf0837fd3ef10f941181d88cb6ee789dc into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +76/-62 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +114/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +46/-362 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +666/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +132/-21 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +229/-11 Test coverage Elevated: large change
desktop/src-tauri/src/lib.rs modified +19/-17 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +64/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +23/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 4 (P0: 0, P1: 0, P2: 2, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Auth: 1
  • Data loss: 1
  • Runtime correctness: 1
  • Security boundary: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a573feaf0

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@desktop/src-tauri/src/lib.rs`:
- Around line 79-95: Prevent duplicate active pending-event publisher loops by
adding an atomic started-once guard to AppState and checking/setting it at the
start of spawn_active_pending_event_publisher before spawning. In
desktop/src-tauri/src/lib.rs lines 79-95, make subsequent calls no-ops; retain
the boot-time call at lines 643-643 so it initializes the guard, and retain the
unconditional call in desktop/src-tauri/src/evaos_teams/identity_rotation.rs
lines 405-407 as the safe resume path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5949773c-801c-45c9-bb93-d15c1632a5d4

📥 Commits

Reviewing files that changed from the base of the PR and between 9bc9d71 and 6a573fe.

📒 Files selected for processing (6)
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/identity_binding.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/lib.rs
📜 Review details
⏰ Context from checks skipped due to timeout. (12)
  • GitHub Check: Desktop E2E Integration (1/2)
  • GitHub Check: Desktop E2E Integration (2/2)
  • GitHub Check: Desktop Smoke E2E (3)
  • GitHub Check: Desktop Smoke E2E (4)
  • GitHub Check: Windows Rust (x86_64-pc-windows-msvc)
  • GitHub Check: Desktop Build (macOS)
  • GitHub Check: Desktop Smoke E2E (2)
  • GitHub Check: Desktop Smoke E2E (1)
  • GitHub Check: Desktop Core
  • GitHub Check: Rust Lint
  • GitHub Check: Analyze (rust)
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Do not introduce unsafe Rust code.
Do not introduce new unwrap() or expect() calls in production Rust paths; use ? and proper error types.
Add doc comments to every new public Rust API.

Files:

  • desktop/src-tauri/src/lib.rs
  • desktop/src-tauri/src/evaos_teams/identity_binding.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
🧠 Learnings (1)
📚 Learning: 2026-07-30T11:25:18.286Z
Learnt from: 100yenadmin
Repo: electricsheephq/evaOS-Hive PR: 82
File: desktop/src-tauri/src/shutdown.rs:258-294
Timestamp: 2026-07-30T11:25:18.286Z
Learning: When reviewing code that concerns the Hive Internal Canary supported architecture, use the supported-release-path model as the baseline: it is a single company, single relay/community, single VM, and single Hermes gateway. Do not treat multi-community runtime-pair behavior (e.g., a single local managed-agent record spanning multiple communities) as a “release-path regression” in review—this multi-community pattern is not a supported release path, so its presence should not trigger regression warnings.

Applied to files:

  • desktop/src-tauri/src/lib.rs
  • desktop/src-tauri/src/evaos_teams/identity_binding.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
🔇 Additional comments (6)
desktop/src-tauri/src/evaos_teams/identity_binding.rs (1)

7-7: LGTM!

Also applies to: 38-50

desktop/src-tauri/src/evaos_teams.rs (1)

55-57: LGTM!

Also applies to: 669-670, 699-701, 724-783, 813-819, 874-874, 876-976, 978-996

desktop/src-tauri/src/evaos_teams/login_identity.rs (2)

4-19: LGTM!

Also applies to: 104-121, 123-259, 261-288


21-58: 🗄️ Data Integrity & Integration

No change needed: initialize_runtime preserves pending reset state. It returns immediately when runtime.initialized is true; the state is cleared only after successfully persisting an active session. Confidence: 99%.

			> Likely an incorrect or invalid review comment.
desktop/src-tauri/src/evaos_teams/tests.rs (1)

603-610: LGTM!

desktop/src-tauri/src/evaos_teams/identity_rotation.rs (1)

212-223: LGTM!

Also applies to: 296-298, 332-333, 456-463, 634-665

Comment thread desktop/src-tauri/src/lib.rs
Signed-off-by: Eva <eva@100yen.org>
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 19393259d481c5e4f85133312e8c78d4b6657499
Updated: 2026-07-30T23:56:41.865Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 19393259d481c5e4f85133312e8c78d4b6657499 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +76/-62 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +114/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +46/-362 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +666/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +132/-21 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +229/-11 Test coverage Elevated: large change
desktop/src-tauri/src/lib.rs modified +57/-17 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +64/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +23/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 2 (P0: 0, P1: 0, P2: 1, P3: 1).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Data loss: 1
  • Runtime correctness: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs Outdated
Signed-off-by: Eva <eva@100yen.org>
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: d08316cc6330b4eaa1ebb13ab61e3114a889b92d
Updated: 2026-07-31T00:01:22.683Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: d08316cc6330b4eaa1ebb13ab61e3114a889b92d into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +76/-62 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +114/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +46/-362 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +731/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +132/-21 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +229/-11 Test coverage Elevated: large change
desktop/src-tauri/src/lib.rs modified +57/-17 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +64/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +23/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 4 (P0: 0, P1: 0, P2: 2, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 3
  • Security boundary: 1

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d08316cc63

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/evaos_teams.rs
Signed-off-by: Eva <eva@100yen.org>
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 4c19552d7bcb31d2a7d739e6f93108c755705acb
Updated: 2026-07-31T00:15:40.399Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: 4c19552d7bcb31d2a7d739e6f93108c755705acb into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +76/-62 Changed file Moderate: validated P3 finding
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +114/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +46/-362 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +731/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +132/-21 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +229/-11 Test coverage Elevated: large change
desktop/src-tauri/src/lib.rs modified +57/-17 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +64/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +23/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 2, P3: 1).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Auth: 1
  • Runtime correctness: 2

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4c19552d7b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/evaos_teams/login_identity.rs
Signed-off-by: Eva <eva@100yen.org>
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: e5549e2e2737ad5010daa30b07ed690ca7b331e8
Updated: 2026-07-31T00:33:02.022Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: e5549e2e2737ad5010daa30b07ed690ca7b331e8 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +83/-69 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +114/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +46/-362 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +731/-0 Changed file Moderate: validated P2 finding
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +132/-21 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +263/-11 Test coverage Elevated: large change
desktop/src-tauri/src/lib.rs modified +57/-17 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +64/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +23/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 2, P3: 1).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Auth: 1
  • Runtime correctness: 2

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread desktop/src-tauri/src/evaos_teams.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Comment thread desktop/src-tauri/src/evaos_teams/identity_rotation.rs
Signed-off-by: Eva <eva@100yen.org>
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #89 - fix(hive): restore explicit lost identity reset
Head: e1d0c773006c72dd89858d99db439671f99a4b50
Updated: 2026-07-31T00:56:11.252Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #89

Review URL: #89 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #89 - fix(hive): restore explicit lost identity reset
Head: e1d0c773006c72dd89858d99db439671f99a4b50 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
desktop/src-tauri/src/evaos_teams.rs modified +83/-69 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_binding.rs added +114/-0 Changed file Low
desktop/src-tauri/src/evaos_teams/identity_custody.rs modified +46/-362 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_custody_tests.rs added +382/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/identity_rotation.rs added +731/-0 Changed file Elevated: large change
desktop/src-tauri/src/evaos_teams/keychain_migration.rs modified +48/-2 Changed file Low
desktop/src-tauri/src/evaos_teams/login_identity.rs modified +145/-25 Changed file Low
desktop/src-tauri/src/evaos_teams/tests.rs modified +290/-11 Test coverage Elevated: large change
desktop/src-tauri/src/lib.rs modified +57/-17 Changed file Low
desktop/src/features/evaosTeams/EvaosTeamsAuthGate.tsx modified +64/-0 Changed file Low
desktop/src/features/evaosTeams/api.ts modified +12/-0 Changed file Low
desktop/src/features/evaosTeams/managedRecoverySurface.test.mjs modified +23/-0 Test coverage Low
desktop/src/testing/e2eBridge.ts modified +9/-0 Test coverage Low

Review Signal

No validated inline findings.
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

No finding categories.

Validation and Proof

1 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
    Proof status: sufficient - PR metadata mentions acceptable proof for each required validation recommendation.
    Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
    Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #78.
Suggested labels: tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
desktop/src-tauri/src/evaos_teams/identity_rotation.rs (1)

321-437: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing doc comment on the destructive identity-replacement command.

replace_lost_evaos_teams_identity (Line 324) is a pub(crate) Tauri command that performs an irreversible identity rotation/replacement, yet has no doc comment describing its preconditions (requires a pending reset), the resume-vs-rotate decision it delegates to, or its failure semantics. As per coding guidelines, "Add doc comments to every new public Rust API."

📝 Suggested doc comment
+/// Replace a native identity that could not be recovered through the
+/// membership-bound encrypted envelope. Requires a `PendingIdentityReset`
+/// staged by `complete_login`'s `NotAvailable` recovery path; stages a
+/// membership-scoped replacement key in Keychain, resumes an in-flight
+/// rotation or performs a fresh signed rotation, then re-validates the
+/// resulting binding/entitlement scope before adopting the new identity.
 pub(crate) async fn replace_lost_evaos_teams_identity(
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@desktop/src-tauri/src/evaos_teams/identity_rotation.rs` around lines 321 -
437, Add a Rust doc comment immediately above replace_lost_evaos_teams_identity
describing that it requires a pending identity reset, delegates to resume or
rotate based on rotation progress, and returns an error without completing
replacement when validation or any rotation step fails.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@desktop/src-tauri/src/evaos_teams/identity_rotation.rs`:
- Around line 321-437: Add a Rust doc comment immediately above
replace_lost_evaos_teams_identity describing that it requires a pending identity
reset, delegates to resume or rotate based on rotation progress, and returns an
error without completing replacement when validation or any rotation step fails.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d437f69d-6436-4367-aeb0-14c7f27354ef

📥 Commits

Reviewing files that changed from the base of the PR and between 6a573fe and e1d0c77.

📒 Files selected for processing (5)
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/lib.rs
📜 Review details
⏰ Context from checks skipped due to timeout. (12)
  • GitHub Check: Desktop E2E Integration (1/2)
  • GitHub Check: Desktop E2E Integration (2/2)
  • GitHub Check: Desktop Smoke E2E (3)
  • GitHub Check: Desktop Smoke E2E (2)
  • GitHub Check: Desktop Smoke E2E (1)
  • GitHub Check: Desktop Smoke E2E (4)
  • GitHub Check: Desktop Build (macOS)
  • GitHub Check: Windows Rust (x86_64-pc-windows-msvc)
  • GitHub Check: Rust Lint
  • GitHub Check: Desktop Core
  • GitHub Check: Analyze (rust)
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Do not introduce unsafe Rust code.
Do not introduce new unwrap() or expect() calls in production Rust paths; use ? and proper error types.
Add doc comments to every new public Rust API.

Files:

  • desktop/src-tauri/src/lib.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
🧠 Learnings (1)
📚 Learning: 2026-07-30T11:25:18.286Z
Learnt from: 100yenadmin
Repo: electricsheephq/evaOS-Hive PR: 82
File: desktop/src-tauri/src/shutdown.rs:258-294
Timestamp: 2026-07-30T11:25:18.286Z
Learning: When reviewing code that concerns the Hive Internal Canary supported architecture, use the supported-release-path model as the baseline: it is a single company, single relay/community, single VM, and single Hermes gateway. Do not treat multi-community runtime-pair behavior (e.g., a single local managed-agent record spanning multiple communities) as a “release-path regression” in review—this multi-community pattern is not a supported release path, so its presence should not trigger regression warnings.

Applied to files:

  • desktop/src-tauri/src/lib.rs
  • desktop/src-tauri/src/evaos_teams/tests.rs
  • desktop/src-tauri/src/evaos_teams/login_identity.rs
  • desktop/src-tauri/src/evaos_teams.rs
  • desktop/src-tauri/src/evaos_teams/identity_rotation.rs
🔇 Additional comments (7)
desktop/src-tauri/src/evaos_teams/login_identity.rs (1)

123-268: LGTM!

desktop/src-tauri/src/evaos_teams/tests.rs (1)

612-638: LGTM!

Also applies to: 809-842

desktop/src-tauri/src/evaos_teams/identity_rotation.rs (2)

173-320: LGTM!


439-731: LGTM!

desktop/src-tauri/src/lib.rs (2)

79-110: LGTM!


965-987: LGTM!

desktop/src-tauri/src/evaos_teams.rs (1)

535-562: 🎯 Functional Correctness

No logout ordering bug here

persist_pending_session initializes runtime.session before complete_login; the reset-required UI also invokes logout_evaos_teams. current_session therefore succeeds and the pending reset is cleared as intended. Confidence: 99%.

			> Likely an incorrect or invalid review comment.

@100yenadmin
100yenadmin merged commit 38c68e2 into main Jul 31, 2026
30 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release blocker: managed OAuth must restore the canonical Hive identity without pairing

1 participant