Integrate relationship and convergence fixes into v3 - #171
Conversation
update_node stamped source/owner metadata on updated attributes but not on
updated relationships, so a relationship changed by a sync carried no lineage
back to the sync source/owner. This was asymmetric with the create path, which
attributes relationships via generate_payload_create.
Assign relationships via a data dict ({"id", "source", "owner"}) instead of the
bare peer, in both the cardinality-one and cardinality-many branches, so the
same attribution the attribute path applies is stamped on relationships too.
Adds unit tests covering attribute attribution (regression), cardinality-one
and cardinality-many relationships (with and without source/owner), and a
real-SDK check that the dict serialises to _relation__source/_relation__owner.
Fixes #142
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
…ionship-attribution
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
…ribution fix: attribute source/owner on relationships in update_node
…tity' into feature/v3-integrate-sync30-sync36 # Conflicts: # infrahub_sync/adapters/infrahub.py # infrahub_sync/cli.py
Keep the v3 execution lifecycle while presenting convergence refusals through its existing CLI error boundary. Co-Authored-By: Codex <noreply@openai.com>
Reconcile SYNC-36 with v3's id-less apply path and make plan diagnostics follow the actual Infrahub upsert key. Co-Authored-By: Codex <noreply@openai.com>
Validate all tier diffs before the first destination write so an unsafe later tier cannot leave an earlier partial sync. Co-Authored-By: Codex <noreply@openai.com>
…tity' into feature/v3-integrate-sync30-sync36 # Conflicts: # infrahub_sync/potenda/__init__.py
Classify saved-plan identity refusals operationally, compare nested identities against exact upsert paths, and recognize server-side default-filter keying. Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying infrahub-sync with
|
| Latest commit: |
59260bb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f380148b.infrahub-sync.pages.dev |
| Branch Preview URL: | https://feature-v3-integrate-sync30.infrahub-sync.pages.dev |
|
CI note: the first develop-workflow run fails before lint starts because |
Co-Authored-By: OpenAI Codex <noreply@openai.com>
|
Closing as superseded. This draft captured the then-current reconciliation of the relationship-attribution, convergence-identity, and relationship-fetch fixes into V3, but its base and source heads have moved and the branch is now conflicting. We will not repair or merge this branch. After the maintained-line source PRs reach their accepted final commits, we will create and requalify a fresh reconciliation from the then-current feature/v3-develop head. This closed PR and its branch remain available as historical conflict-resolution evidence. |
Summary
This draft brings the current main-line relationship attribution fix from PR #143, the pending convergence-identity safety boundary from PR #170, and the pending stale many-relationship reconciliation fix from PR #172 into
feature/v3-develop.The integration reconciles the v3 execution model rather than merely resolving text conflicts: live sync, tiered sync, and saved-plan apply use the actual Infrahub upsert key (HFID, then
default_filter), refuse lossy creates before destination writes, preserve ID-addressed live updates, and retain exact nested identity diagnostics. Saved-plan refusals use the plan error taxonomy and retain partial-apply context. The classic update path fetches lazy many-relationship peers before computing removals, while the saved replace-set path remains separate.This PR is intentionally draft and depends on teammate review/merge of PRs #170 and #172. Their source commits are pinned and qualified here; after either source changes or merges, this branch must be requalified against the final source SHA before this PR is readied.
Conflict resolutions
from_poolbehavior.Verification
1296 passed, 20 skipped, 1 xfailed409 passed, 1 skippedtyclean--helpandlist: passed59260bb654d24fecb32514e46d26fe63d75c58bbRepository-wide Pylint/ty still surface established optional Prefect/FastAPI dependency and baseline findings; the changed surfaces add no new diagnostic. The develop GitHub workflow currently fails before lint because it cannot authenticate
uvto the privateopsmill/prefect-extrasGit dependency; that workflow issue is not mixed into this feature integration.Depends on #170 and #172.