Skip to content

Add DanceUIGraph shim mode#225

Merged
Kyle-Ye merged 9 commits intomainfrom
codex/danceuigraph-shims
Apr 26, 2026
Merged

Add DanceUIGraph shim mode#225
Kyle-Ye merged 9 commits intomainfrom
codex/danceuigraph-shims

Conversation

@Kyle-Ye
Copy link
Copy Markdown
Contributor

@Kyle-Ye Kyle-Ye commented Apr 26, 2026

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 31.14%. Comparing base (5d84ebd) to head (718fcef).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/OpenAttributeGraphShims/OAGShims.swift 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #225   +/-   ##
=======================================
  Coverage   31.14%   31.14%           
=======================================
  Files          71       71           
  Lines        2630     2630           
=======================================
  Hits          819      819           
  Misses       1811     1811           
Flag Coverage Δ
ubuntu 12.03% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rces/OpenAttributeGraphShims/Attribute+Debug.swift 0.00% <ø> (ø)
Sources/OpenAttributeGraphShims/OAGShims.swift 66.66% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye Kyle-Ye merged commit 77dc490 into main Apr 26, 2026
6 of 11 checks passed
@Kyle-Ye Kyle-Ye deleted the codex/danceuigraph-shims branch April 26, 2026 17:33
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 26, 2026

🤖 Augment PR Summary

Summary: Introduces a new shim mode that targets ByteDance’s DanceUIGraph backend, allowing OpenAttributeGraphShims to be built against a different attribute-graph implementation.

Changes:

  • Adds the OPENATTRIBUTESHIMS_DANCEUIGRAPH build flag and dependency wiring in Package.swift (local path or exact version via env).
  • Adds a new C/ObjC shim target (OpenAttributeGraphDanceUIGraphShims) that exposes Swift-callable wrappers around DanceUIGraph/DanceUISubgraph APIs.
  • Adds a large Swift adapter (Adapter/DanceUIGraph.swift) implementing Graph/Subgraph/Attribute/Rule APIs on top of DanceUIGraph.
  • Refactors existing Compute / AttributeGraph shims into dedicated adapter files for clearer vendor separation.
  • Updates debug-description handling to avoid the previous deep inspection path when building in DanceUIGraph mode.
  • Extends AttributeGraphVendor to include .danceUIGraph.

Technical Notes: The DanceUIGraph shim mode links c++ and z on Apple platforms and sets minimum platforms to iOS 13 / macOS 10.15 for that configuration.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

base.invalidate()
}

public var index: UInt32 {
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 26, 2026

Choose a reason for hiding this comment

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

Sources/OpenAttributeGraphShims/Adapter/DanceUIGraph.swift:555: Subgraph.index’s getter always returns 0, so reading back an index after setting it will be incorrect and may break callers relying on stable subgraph indices. If DanceUIGraph doesn’t expose an index getter, consider making this write-only or documenting that reads are unsupported in this shim mode.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

self.init(Optional(attribute))
}

public init(_details: Details) {
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 26, 2026

Choose a reason for hiding this comment

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

Sources/OpenAttributeGraphShims/Adapter/DanceUIGraph.swift:995: init(_details:) ignores seed, but Hashable/== are based on _details (including seed), so round-tripping AnyWeakAttribute(_details:) can change identity. This can also make instances reconstructed from stored Details compare unequal depending on base.subgraph_id.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

#if OPENATTRIBUTEGRAPH_DANCEUIGRAPH
extension AnyAttribute {
func _debugDescription(indent: Int) -> String {
"\(String(repeating: tab, count: indent))\(debugDescription)"
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 26, 2026

Choose a reason for hiding this comment

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

Sources/OpenAttributeGraphShims/Attribute+Debug.swift:28: In the DanceUIGraph branch, _debugDescription(indent:) only prefixes the first line of debugDescription, so multi-line base.debugDescription output won’t be indented consistently. This also changes the debug string format compared to other vendors, which may surprise callers relying on the structured output.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

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