Skip to content

Identity activation follow-ups from #341 review - #345

Merged
schickling-assistant merged 2 commits into
mainfrom
schickling-assistant/2026-10-30-identity-review-followups338
Nov 3, 2026
Merged

schickling-assistant merged 2 commits into
mainfrom
schickling-assistant/2026-10-30-identity-review-followups338

Conversation

@schickling-assistant

@schickling-assistant schickling-assistant commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Nathan's round-two review of #341 identified four follow-ups before 0.9.4: teardown-timeout recovery abandoned a stopped node, failed/crashed preparation could retain an unreferenced secret, operational read errors could replace a valid pending key, and termination signals could interrupt recovery after Shutdown.

Goal

Fix exactly those four items; no deferred #343 work.

Decisions

  1. src/main.rs:3251: a reconciliation Shutdown returning daemon_not_running falls through to the lifetime-lease barrier and restart; regression: identity_stop_timeout_recovery_waits_for_teardown_and_restarts_current (tests/json_output.rs:293) exercises actual activation, the 15-second stop timeout, delayed teardown, and successful old-identity restart while retaining the original coded error.
  2. src/identity.rs:86,115: remove failed private scratch writes and sweep abandoned .identity.next.*.tmp while holding the identity lock, including idempotent prepare; regressions: prepare_removes_private_scratch_after_sync_or_rename_failure, prepare_sweeps_crashed_scratch_only_while_locked_even_when_already_prepared.
  3. src/identity.rs:53,65: distinguish malformed TOML/UTF-8 from operational pending-key read errors. EMFILE/EIO/EACCES propagate through the existing internal error code without replacing either key; regressions: pending_read_io_failure_preserves_valid_key_and_propagates_existing_error_code, prepare_replaces_pending_only_when_absent_or_invalid.
  4. src/main.rs:3133,3181: scoped caught no-op handlers discard SIGINT/SIGTERM/SIGHUP through activation and awaited recovery/restart, restore prior dispositions afterward, and reset on exec rather than making children inherit SIG_IGN; regressions: identity_activation_survives_sigint_through_restart_and_recovery, identity_activation_survives_sigterm_through_restart_and_recovery, identity_activation_survives_sighup_through_restart_and_recovery. Each isolated subprocess receives its signal at Shutdown before rename and again during reconciliation/recovery; both completion and pre-rename recovery, disposition restoration, and exec-child termination are asserted.

README and CHANGELOG describe these behaviors. No CLI, wire, dependency, or version changes.

Verification

Exact reviewed head: bd45ec9cac98c217266855a696f772d364fe66a5.

One serial heavy-gated run in the repository dev shell completed with exit=0, clean=yes, and head=bd45ec9cac98:

cargo test --locked -p fabric --lib identity::tests -- --test-threads=1
18 passed; 0 failed
cargo test --locked -p fabric --bin fabric identity_ -- --test-threads=1
8 passed; 0 failed
cargo test --locked -p fabric --test json_output identity_ -- --test-threads=1
4 passed; 0 failed

Independent source reviews before push: correctness GO (confidence 0.94) and security GO, both at the full exact head above. Reviewers inspected all four changes and their regressions; they did not execute tests. Existing dead-code warnings remain outside this delta.

Hosted proof at this head: test and Nix were in progress at the initial status check (public-text already passed); no CI watch is running. The dedicated local Cargo target was removed after testing (3.9 GiB).

Complexity

No dependencies. The scoped signal guard is the sole production lifecycle addition; I/O fault injection is test-only and thread-local.

Concerns

Catchable cancellation signals received during activation are intentionally discarded, not deferred. SIGKILL and machine failure remain governed by the existing crash/retry contract. Recovery remains bounded and best-effort if teardown exceeds its recovery deadline.

Friction & bottlenecks

The first local run passed but an empty temporary PR-body file caused dirty-worktree classification. Removed it and repeated all three filters to obtain the clean exact-head receipt above.

Follow-ups

Other #343 items remain unchanged and deferred.

References

Refs #341, #343. Implements Nathan's round-two review on #341, posted 2026-10-29 at 17:52:13 UTC.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree fabric/2026-10-30-identity-review-followups338

agent-identity: agent/dotfiles/fabric-mesh
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.12.5
agent-runtime: OMP 18.12.5
agent-model: anthropic/claude-opus-5-5
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

CI at bd45ec9 is green. The first macOS run failed only in the known timing test daemon::tests::a_peer_returns_after_minutes_and_hours_without_errors_or_a_helper (633 passed, 1 failed; job); one rerun of the failed job passed without code changes. Independent correctness and security reviews: GO at bd45ec9.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree smalltalk/main

@schickling-assistant

Copy link
Copy Markdown
Contributor Author

Status from the Fractal side: compoundingtech/fractal#3644 now implements the one-command re-key on top of this PR (identity prepare/activate plus runtime_peers set_expiry for the bounded overlap of 10 minutes at most). It has an independent review GO and green targeted tests. It currently pins this PR head (bd45ec9). As agreed, it moves to the v0.9.4 tag before it becomes ready. When you merge this PR and cut 0.9.4, Fabric-mesh repins and lands it. There are no open requests from our side on this PR.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree smalltalk/main

@schickling-assistant

Copy link
Copy Markdown
Contributor Author

@myobie this PR is ready for your review at head bd45ec9, and CI is green. It contains the follow-ups from your #341 review. Fractal re-key work (compoundingtech/fractal#3644) needs a v0.9.4 tag that includes these changes. Could you review it, or say when you expect to? Thank you.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree smalltalk/main

@schickling-assistant

Copy link
Copy Markdown
Contributor Author

Fabric-mesh (agent/dotfiles/fabric-mesh) records an authorization. On 2026-11-03, in a live session with Fabric-mesh, Johannes Schickling asked Fabric-mesh to drive all Fabric work end to end. For compoundingtech/fabric he answered: "self-merge as needed so we're not blocked on anything". Consequence: Fabric-mesh splits this PR into parts of 300 lines or fewer (per Bottlenecks). Each part merges after an independent review GO. Fabric-mesh then tags v0.9.4 through the release workflow. @myobie: your review is still welcome after the merge.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree smalltalk/main

…2026-10-30-identity-review-followups338

# Conflicts:
#	CHANGELOG.md
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

Integrated main after #346 using a normal merge commit, without rebasing or force-pushing.

New head: bc88770.

The CHANGELOG retains both Fixed bullets exactly once. Diff against integrated main is now 237 changed lines: CHANGELOG +3, README +7, src/main.rs +184/-1, tests/json_output.rs +42. src/identity.rs is identical to main (same Git blob 172759e381a9a46871d68ea2e57af9f398d2bce8).

Hosted CI watched to completion at this head:

Release preparation #347 has not been changed.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree fabric/2026-10-30-identity-review-followups338

@schickling-assistant

Copy link
Copy Markdown
Contributor Author

GO at bc88770 (Review346, an independent reviewer subagent). The merge of main (#346 fc34b89) is clean, and src/identity.rs equals main. The remainder (signal guard, recovery, JSON output, tests) has no findings. Hosted test run 41719459414 and Nix run 41719459276 passed. Fabric-mesh merges it under Johannes's self-merge authorization (issuecomment-6609960025).

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree smalltalk/main

@schickling-assistant
schickling-assistant merged commit 0cf0544 into main Nov 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant