Skip to content

composer: fix incomplete path-repo closures (sugar-glow/stickers/wishlist) + harden checker for transitive gaps#880

Merged
detain merged 2 commits into
masterfrom
ai/fix-path-repo-closures
May 25, 2026
Merged

composer: fix incomplete path-repo closures (sugar-glow/stickers/wishlist) + harden checker for transitive gaps#880
detain merged 2 commits into
masterfrom
ai/fix-path-repo-closures

Conversation

@detain
Copy link
Copy Markdown
Owner

@detain detain commented May 25, 2026

Summary

  • The candy-forms extraction added a transitive sugarcraft/candy-forms dep to sugar-bits. Three downstream libs that consume sugar-bits (sugar-glow, sugar-stickers, sugar-wishlist) never had the new transitive path-repos added to their repositories[], so a fresh composer install could not resolve candy-forms (the one monorepo lib not yet on Packagist) and failed. sugar-stickers surfaced this as 27 Bits\Viewport not found test errors.
  • Completed the full transitive sugarcraft/* path-repo closure for all three libs (added candy-forms plus the rest of each lib's closure: candy-pty, candy-sprinkles, candy-zone, honey-bounce, candy-palette, and the candy-shine sub-tree for sugar-glow).
  • Hardened tools/check-path-repos.php: it now walks the full transitive sugarcraft/* require graph (previously only direct requires) and reports the introducing dependency path, so a gap several hops deep — exactly this class of bug — is caught instead of passing as "closure clean". Default mode treats Packagist-published deps as resolvable (matches how Composer actually resolves today); --strict-closure demands a local path-repo for the entire closure regardless, --no-network skips the Packagist probe.
  • Docs: added improvements.md §3.7 (found+fixed) and updated the CONTRIBUTING.md line describing the checker.

Checker before/after

Before (flags the 3 broken libs):

  - sugar-glow: missing path-repo for candy-forms (required transitively via sugar-glow -> sugar-bits -> candy-forms)
  - sugar-stickers: missing path-repo for candy-forms (required transitively via sugar-stickers -> sugar-bits -> candy-forms)
  - sugar-wishlist: missing path-repo for candy-forms (required transitively via sugar-wishlist -> sugar-bits -> candy-forms)

After:

check-path-repos: scanned 47 libs
check-path-repos: closure clean

Test plan

  • Checker flags the 3 libs BEFORE the composer.json fixes, "closure clean" AFTER.
  • Fresh rm -rf vendor composer.lock && composer install + full vendor/bin/phpunit per lib:
    • sugar-glow: install clean, 66 tests, 141 assertions, OK
    • sugar-stickers: install clean, 60 tests, 107 assertions, OK (27 Bits\Viewport not found errors gone)
    • sugar-wishlist: install clean, 70 tests, 180 assertions, OK
  • Full-repo resolve scan (composer update --dry-run over every lib): no STILL BROKEN lines.

🤖 Generated with Claude Code

…list) + harden checker for transitive gaps

The candy-forms extraction added a transitive sugarcraft/candy-forms dep to
sugar-bits. Three downstream libs that consume sugar-bits never had the new
transitive path-repos added to repositories[], so a fresh composer install
could not resolve candy-forms (the one lib not yet on Packagist) and failed.
sugar-stickers surfaced this as 27 "Bits\Viewport not found" test errors.

Completed the full transitive sugarcraft/* path-repo closure for sugar-glow,
sugar-stickers, and sugar-wishlist. Hardened tools/check-path-repos.php to walk
the FULL transitive require graph (not just direct requires) and report the
introducing dependency path, so a gap several hops deep is caught instead of
passing as "closure clean". Default mode treats Packagist-published deps as
resolvable; --strict-closure demands a local path-repo for the entire closure.

## Test plan
- Checker BEFORE fix: flags sugar-glow/sugar-stickers/sugar-wishlist
  (each: missing path-repo for candy-forms via -> sugar-bits -> candy-forms).
- Checker AFTER fix: "closure clean" (exit 0).
- Fresh composer install + full phpunit per lib (rm -rf vendor composer.lock):
  - sugar-glow:     install clean, 66 tests, 141 assertions, OK
  - sugar-stickers: install clean, 60 tests, 107 assertions, OK (27 Viewport errors gone)
  - sugar-wishlist: install clean, 70 tests, 180 assertions, OK
- Full-repo resolve scan: no "STILL BROKEN" lines.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@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.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 25, 2026

Not up to standards ⛔

🔴 Issues 3 minor

Alerts:
⚠ 3 issues (≤ 0 issues of at least minor severity)

Results:
3 new issues

Category Results
CodeStyle 3 minor

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@detain detain merged commit c5a1be8 into master May 25, 2026
3 of 10 checks passed
@detain detain deleted the ai/fix-path-repo-closures branch May 25, 2026 16:50
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