Skip to content

fix: Track resource inputs for incremental generation - #9

Merged
maximkrouk merged 9 commits into
mainfrom
codex/dev229-resource-inputs
Sep 6, 2026
Merged

fix: Track resource inputs for incremental generation#9
maximkrouk merged 9 commits into
mainfrom
codex/dev229-resource-inputs

Conversation

@maximkrouk

@maximkrouk maximkrouk commented Sep 5, 2026

Copy link
Copy Markdown
Member

Resource edits could leave generated accessors stale because the build-tool command declared no inputs. Declare target resource files, directories, and the selected configuration file so edits, additions, removals, and configuration changes invalidate generation. Exclude build/plugin output directories to avoid a second-build cycle when a source target uses the package root.

The dependency-free integration fixture runs the production plugin with a recording executable. It checks initial generation, edits, additions, removals, and configuration changes in both conventional and package-root target layouts. The package-root regression reproduced the cloud-reported cycle before the exclusion fix.

Dependency repairs required to validate the checkout:

  • Permit the available FunctionComposition 0.0.3 release, retaining its existing API and trait requirements.
  • Pin the merged Swift Snippets compatibility repair, which matches IssueReporting package identity to the compiler and avoids a symbolicated Swift 6.2 generic dependency metadata crash. No toolchain requirement is raised.

Validation:

  • All five production-plugin integration tests pass (27 incremental builds total), including a custom absolute scratch path symlink destination edits/retargeting, and dangling-link replacement. The old plugin reproduces a build cycle on the identical custom-scratch fixture.
  • All 43 package tests pass locally on Swift 6.4.
  • Swift Snippets passes all 66 local tests and both hosted Xcode 26.2 iOS/macOS checks; merged via fix: Resolve IssueReporting consistently on Swift 6.2 swift-snippets#10.
  • All 43 package tests also pass against both merged dependency pins. Casification passes all 25 local tests and all five hosted Xcode 26.2 platform checks (fix: Preserve reporting dependency compatibility across compilers swift-casification#13). Final hosted CLI CI passed on906c582 (Xcode26.2), and cloud review reported no major issues on that exact head.

Prerequisite for https://github.com/CaptureContext/myo-app/pull/39 and DEV-229; the application will pin this merged revision separately.

Release scope: this development revision is consumed by the application through a Git checkout/gitlink. SwiftPM does not allow a semantically versioned package to depend on revision-based packages, so these pins must become published-version requirements before a future semantic CLI release. This PR does not publish a release tag or claim semantic-release readiness.

The custom-scratch fixture uses an absolute path. The toolchain's separate unknown build description failure with a relative scratch path was reproduced even with inputFiles: []; it is not caused by plugin input traversal. Root targets also exclude their scratch directory from SwiftPM source discovery.

The production generator was independently verified to read a valid catalog through a directory symlink and reflect edited keys. The old plugin left the matching incremental fixture stale; the fixed traversal tracks the link and destination files with resolved-directory visitation to avoid recursive input loops. Nonexistent link destinations are omitted from explicit inputs; their existing parent directory still tracks link replacement. The previous code reproduced a missing-input build failure for a dangling link.

@maximkrouk

Copy link
Copy Markdown
Member Author

@codex review The production-plugin incremental test reproduces stale output on the old plugin and passes edits, additions, removals, and configuration changes with this repair. Please assess correctness of declared inputs and the published dependency fallback; app integration will use this pinned checkout.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T00:09:29.615057Z 906c582 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 9ecc39cff2

ℹ️ 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 Plugins/package-resources-plugin/plugin.swift Outdated
@maximkrouk

Copy link
Copy Markdown
Member Author

@codex review Fixed root-target build cycle in a922dc3: recursive inputs exclude build/plugin outputs. Both production-plugin fixture tests pass (ten incremental builds) and the old plugin reproduced the root-target cycle. Head1b24f18 pins merged SwiftSnippets repair aeb54d10; its66tests and both Xcode26.2 platform checks pass. All43 CLI tests pass with the merged pin. Please review final inputs and dependency graph.

@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: 1b24f1864b

ℹ️ 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 Package.swift
Comment thread Plugins/package-resources-plugin/plugin.swift Outdated
@maximkrouk

Copy link
Copy Markdown
Member Author

@codex review Headccab152 includes the verified active-scratch exclusion024e900 and both merged dependency repairs. All3pluginfixtures/15builds and43CLItests pass; the old plugin fails the identical custom absolute-scratch fixture with a build cycle. Relative-path unknown-build-description also reproduces with inputFiles:[], so that separate SwiftPM issue is documented. Revision pins intentionally serve this app checkout; the source/PR explicitly require published dependency versions before any future semantic CLI release. No tag is being published in this task.

@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: ccab15289b

ℹ️ 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 Plugins/package-resources-plugin/plugin.swift Outdated
@maximkrouk

Copy link
Copy Markdown
Member Author

@codex review Fixed verified symlink finding in90f24b1. The actual CLI follows the directory link and reflects destination catalog edits; the previous plugin leaves incremental output stale. The fix watches the link and resolved destination files, deduplicates inputs, and uses visited directories to avoid input-recursion cycles. All4production-plugin fixtures pass across21incremental builds, including retargeting. Prior43CLItests and both merged dependency compatibility matrices pass; hosted final check is running.

@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: 90f24b1a15

ℹ️ 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 Plugins/package-resources-plugin/plugin.swift
@maximkrouk

Copy link
Copy Markdown
Member Author

@codex review Final dangling-link guard in906c582 reproduces the reported failure before the fix and passes all5 production-plugin fixtures/27 incremental builds afterward. Parent-directory invalidation also picks up replacing the broken link with resource contents. Prior43 CLI tests and hosted Xcode26.2 check passed; final hosted check is running. Please review the small existence guard and regression.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 906c582806

ℹ️ 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".

@maximkrouk
maximkrouk merged commit b2838b4 into main Sep 6, 2026
1 check 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