Skip to content

Let fprintd start and the first enrollment run after a no-change recovery - #20

Closed
pablo-ur-fixer wants to merge 6 commits into
macintog:mainfrom
pablo-ur-fixer:pr/startup-after-no-change-recovery
Closed

pablo-ur-fixer wants to merge 6 commits into
macintog:mainfrom
pablo-ur-fixer:pr/startup-after-no-change-recovery

Conversation

@pablo-ur-fixer

Copy link
Copy Markdown

Stacked on #19; the last four commits are new here.

Fixes failures 3 to 5 in #17.

After recover-outcome closes a no-change first enrollment, the completed journal stays under mutations/ and the failed attempt's keybag activation journal stays under activation/ (only t2-native-match prunes it). Every pre-first-enrollment gate assumed those directories were empty, so Touch ID stayed unusable with messages that did not say why:

  1. t2-touchid-post-reboot.service ran t2-touchid-manage reconcile-external-deletion-if-needed, whose management lease needs the per-user E4 authority that a first enrollment has not published. The child exited 1 with an unmapped message (reason: null) and fprintd failed its dependency at every boot. Complete no-change enrollment journals now count as the initial state (t2_mutation_registry.retains_only_no_change_enrollments).
  2. fprintd's bootstrap projection, the enrollment worker and legacy first-run call _require_fresh_enrollment_state, which rejected any file under mutations/ or activation/; ListEnrolledFingers and EnrollStart failed with "fingerprint inventory unavailable". The check now accepts the same no-change journals and activation journals in a phase the pruner already treats as resolved (t2_activation_journal_retention.retains_only_resolved). Unresolved, blocked, quarantined, malformed or foreign entries still reject.
  3. The post-reboot verification, authority publication and E4 publication candidate selectors either collected every reconciled journal or counted any other phase as a later mutation; with a retained no-change journal the next successful enrollment would have been ambiguous after its reboot. They now skip journals for which the new t2_enrollment_journal.is_no_change_history is true.
  4. The enrollment screen dropped the client-side error text, showing only "Enrollment stopped · No fingerprint was saved." It now shows the bounded, printable-ASCII reason and repeats it on stderr after the screen closes.

Verified on the affected machine: chain healthy, enrollment succeeded end to end, finger matches, state survives a normal reboot and the post-reboot reconciler reports no-pending-mutation with two journals present.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Z5eh5T2UPSQnihyoB12TP

pablo-ur-fixer and others added 6 commits October 31, 2026 17:47
The enrollment worker logged only the exception class names and an
authorization reason, so a Catacomb persistence failure appeared as
"classes=...>CatacombBridgeError reason=unclassified" and could not be
told apart from the other bridge checks. Add a JSON "detail=" list with
the messages of exceptions raised by t2_* modules along the cause chain.
Those messages are fixed strings; foreign exceptions are dropped and the
text is bounded to printable ASCII, so the line still carries no
identifiers or raw bridge replies.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z5eh7nvcZfcnceC8vskKu
A Linux-only first enrollment can confirm and stage user_<UID>.cat and
then stop at the master.cat prepare request with nothing committed on
the host (observed on MacBookPro16,3 / bridgeOS 24P6005). The journal
stays outcome-unknown and blocks every further enrollment, and no
recovery command accepts that shape: recover-outcome refused the staged
prepare directory, and even after a cold bridgeOS restart returned the
SEP to the pre-enrollment surface the E3 bootstrap rule rejected a zero
Catacomb UUID as invalid.

Admit the exact returned-to-baseline case. The E3 classifier accepts a
bootstrap baseline whose live Catacomb is absent again when no identity
remains and nothing else changed. The journal forgets a witnessed
identity on a no-change recovery only when its persistence failure left
host commit impossible. recover-outcome discards the staged user file
only once the fresh inventory already shows the empty baseline, because
while bridgeOS is warm that file is the sole durable copy of the
fingerprint. Everything else is still left for manual review.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z5eh7nvcZfcnceC8vskKu
The post-reboot reconciler skipped external-deletion reconciliation only
when the mutation directory was empty.  After recover-outcome closes a
first enrollment that never kept its identity, the completed journal is
retained, so the reconciler ran t2-touchid-manage
reconcile-external-deletion-if-needed, which needs the per-user E4
authority that a first enrollment never published.  The child exited 1
with an unmapped message, fprintd failed its dependency at every start,
and the account could never enrol again.

Treat retained enrollment journals that are complete and proved no SEP
change (baseline-reconciled, aborted-before-start, or reconciled with no
terminal identity and no post-reboot verification pending) as part of
the initial no-op state.  Any other journal kind, an unfinished or
post-reboot-pending entry, an unreadable journal, Catacomb bytes,
per-user history or an authority manifest still go through
reconciliation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z5eh5eb1bKqSt7Ec1CdVV
fprintd's pre-E4 bootstrap projection, the enrollment worker and legacy
first-run call _require_fresh_enrollment_state, which rejected any file
in the mutation directory.  After recover-outcome closes a first
enrollment that changed nothing, the retained journal made EnrollStart
fail and the desktop enrollment ended at "Enrollment stopped" with no
reason, even though the service chain was healthy.

Move the no-change rule into t2_mutation_registry as
retains_only_no_change_enrollments and use it both there and in the
post-reboot reconciler's startup no-op.  Add
t2_enrollment_journal.is_no_change_history and use it in the post-reboot
verification, authority publication and E4 publication candidate
selectors, so the retained journal neither becomes a second candidate
nor counts as a later mutation once the next enrollment succeeds.
Catacomb bytes, activation state, other journal kinds and unfinished or
post-reboot-pending entries still require reconciliation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z5eh5eb1bKqSt7Ec1CdVV
When the enrollment or verification task raised EnrollmentUIError or
OSError, the TUI set the stopped state and dropped the message, so an
EnrollStart rejection looked exactly like a sensor-side stop.  Keep a
bounded, printable-ASCII copy of the message as the terminal detail and
repeat it on stderr after the screen closes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z5eh5eb1bKqSt7Ec1CdVV
_require_fresh_enrollment_state also demanded an empty activation
directory.  Every enrollment writes a keybag activation journal there
and only t2-native-match prunes it, so the failed first enrollment's own
resolved activation record blocked the next first enrollment with
"native first-enrollment state is not empty" even after the mutation
journal was reconciled.

Add t2_activation_journal_retention.retains_only_resolved, true only
when every entry is a private activation journal in a phase the pruner
already treats as resolved, and let the fresh-state check accept that
directory state.  Unresolved, blocked, quarantined, malformed or foreign
entries still reject.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z5eh5eb1bKqSt7Ec1CdVV
@macintog

macintog commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thanks for this. We're closing it as superseded, along with the rest of the stack: T2Touch is moving its Touch ID support into Omarchy itself. #17 has the details, the answers to your questions, and what we've recorded from these fixes for that work, with credit.

@macintog macintog closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants