diag/identity_health: report cluster_identity_is_directory precisely#4
Merged
Merged
Conversation
When /uniondrive/ipfs-cluster/identity.json is a DIRECTORY (the Docker bind-mount footgun that wedges ipfs-cluster), identity_health previously returned the generic missing_cluster_peer_id, which the not-earning tree could not distinguish from a legitimately-absent identity (-> "indeterminate"). Detect os.path.isdir(CLUSTER_IDENTITY_PATH) and return a distinct cluster_identity_is_directory reason so the tree (fula-ota not-earning.yaml) can emit a concrete "cluster identity is a folder" verdict + restart_fula recommendation. Adds a unit test. pool_member_reason is a free-form string in diag_responses.schema.json, so no schema change is needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When
/uniondrive/ipfs-cluster/identity.jsonis a directory (the Docker bind-mount footgun that wedges ipfs-cluster),diag/identity_healthreturned the genericmissing_cluster_peer_id, which the "not earning" tree could not distinguish from a legitimately-absent identity -> "indeterminate" verdict.Change
identity_health.py: detectos.path.isdir(CLUSTER_IDENTITY_PATH)and return a distinctcluster_identity_is_directoryreason so the tree (functionland/fula-otanot-earning.yaml) can emit a concrete "cluster identity is a folder" verdict +restart_fularecommendation. Adds a unit test (test_identity_health_cluster_identity_is_directory).pool_member_reasonis a free-form string indiag_responses.schema.json, so no schema change is needed. Pairs with the functionland/fula-ota PR (the tree branch is inert until this ships).🤖 Generated with Claude Code