Skip to content

fix(doctor): derive orphan stores from registry reconstruction#439

Merged
ScriptedAlchemy merged 2 commits into
masterfrom
codex/doctor-reconstruction-diff
Jul 10, 2026
Merged

fix(doctor): derive orphan stores from registry reconstruction#439
ScriptedAlchemy merged 2 commits into
masterfrom
codex/doctor-reconstruction-diff

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • derive orphan-store warnings from the same read-only registry reconstruction preflight used by migrations
  • count only manifests whose project, alias, store, scope, or artifact rows are actually missing
  • keep legacy token-accounting cleanup behavior unchanged
  • isolate regression fixtures from the repository's shared Git identity marker

Verification

  • cargo test orphan_reporting_uses_complete_registry_rows_not_token_accounting --lib
  • cargo check --workspace --all-targets --locked
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo fmt --check
  • live source-built tracedecay doctor: DB integrity ok; false orphan warning absent
  • tracedecay tool health --details true: 7107; exact writable branch store; no drift/storage warnings

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: de55e37

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/doctor-reconstruction-diff branch from 2336585 to 46bffbe Compare July 10, 2026 20:23

@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: 233658571d

ℹ️ 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 src/migrate/registry.rs
Comment on lines +95 to +96
if !diff.issues.is_empty() {
return diff;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Continue diffing after unrelated reconstruction conflicts

In profiles with more than one eligible store manifest, a single conflicting plan (for example an existing registry row for the same root owned by a different project) makes the preflight return an issue here and skips registry_plan_has_missing_rows for every other plan. doctor/health then report zero orphan reconstructable manifests even when other manifests simply have missing registry rows, so one bad manifest hides the actionable repairs this check is meant to surface. Keep the issue but still compute missing rows for non-conflicting plans, or preflight per plan.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Valid. Fixed with per-plan preflight plus a conflict+missing regression in #440.

@ScriptedAlchemy ScriptedAlchemy merged commit 974d423 into master Jul 10, 2026
10 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