Skip to content

Fall back to the stored id when one entity pointer's Git identity is unreadable - #688

Merged
leojkwan merged 5 commits into
mainfrom
fix/identity-index-unreadable-pointer
Sep 16, 2026
Merged

leojkwan merged 5 commits into
mainfrom
fix/identity-index-unreadable-pointer

Conversation

@leojkwan

@leojkwan leojkwan commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Problem

_identity_index in scripts/shadow_root_board.py calls entity_id() on every registered pointer. When one pointer's plan lives where the process cannot read it (a TCC-protected ~/Documents checkout on this Mac), plan_identity_parts raises BoardError("project Git identity could not be read") and the whole portfolio refresh, shadow read, and shadow throw refuse for all 46 entities, blaming Git.

Change

One unreadable pointer now falls back to its stored id for that cycle and prints a quarantine notice once per pointer per process, matching the local-plan quarantine precedent in shadow_board_import.py. The docstring already declared stored ids the fallback for missing plans; this extends it to unreadable ones.

Proof

  • New tests.test_root_board.OneUnreadablePointerNeverBlanksThePortfolio: red before the change (3 errors at the real refusal site), green after (Ran 3 tests ... OK).
  • Neighbors: test_status_fast_path test_status_focus test_throw test_plan_read test_style_guard test_shadow_lint test_public_ready_grep_gate -> Ran 278 tests ... OK.
  • ADegradedPortfolioReadNamesItsTrueCause passes unchanged.
  • Live: the patched binary refreshed this computer's real board with no STALE banner, one quarantine line, and completed throw/amend/accept/return cycles on four rows.

Known, out of scope

ProjectMapMigrationIsAtomicAndReversible fails 11/12 on clean origin/main (6a40b1f) on this machine because SHADOW_TELEMETRY=local is exported in the operator's shell and the test harness passes os.environ through, so telemetry writes dirty the scratch checkout the migration requires clean. With the variable unset the class passes 12/12. Not caused by this branch; a separate test-harness PR scrubs the variable.

Contract note for review

A failed refresh used to be named board-wide as STALE. This change converts one unreadable pointer into a per-entity notice plus stored-id fallback, so that entity may sit on a stale id while the board prints as current. Reviewer call whether the notice is loud enough.

…unreadable

A registered pointer under a TCC-protected directory makes git rev-parse
fail with Operation not permitted, so plan_identity_parts raised and
_identity_index refused the portfolio refresh, shadow read, and shadow
throw for every entity. Quarantine that pointer for the cycle the way the
board importer quarantines an unreadable local plan: keep the stored id,
print one stderr notice per pointer, and let every healthy peer index.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@cursor cursor 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.

Approved. Cursor Bugbot was not running after the first check poll, no approval policy applies, and nothing else required human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

Comment thread scripts/shadow_root_board.py Fixed
Comment thread scripts/shadow_root_board.py Fixed
Comment thread scripts/shadow_root_board.py Fixed
@leojkwan
leojkwan merged commit d4817a4 into main Sep 16, 2026
14 checks passed
@leojkwan
leojkwan deleted the fix/identity-index-unreadable-pointer branch September 16, 2026 08:27
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