Skip to content

Phase 2: deterministic ordering (glob sorting, makeReplacer, GraphQL SDL sort)#1370

Merged
pyramation merged 2 commits into
mainfrom
feat/phase2-ordering
Jul 13, 2026
Merged

Phase 2: deterministic ordering (glob sorting, makeReplacer, GraphQL SDL sort)#1370
pyramation merged 2 commits into
mainfrom
feat/phase2-ordering

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Phase 2 ordering fixes for the non-determinism in the code generation pipeline.

  • pgpm/core/src/resolution/deps.ts: resolves SQL files in deploy/ in a deterministic glob-sorted order and avoids re-resolving a module once its normalized moduleToResolve is already in resolved.
  • pgpm/core/src/core/class/pgpm.ts: sorts the resolved loadAllowedDirs list and the .control files found by listModules.
  • pgpm/export/src/export-utils.ts: sorts makeReplacer schemas by length and name before building the replacer array, and sorts the pgpm.plan glob in preparePackage.
  • graphile/graphile-schema/src/build-schema.ts: applies lexicographicSortSchema before printSchema so the generated SDL is stable.
  • Updated pgpm/core snapshots for the new deterministic ordering.

Closes https://github.com/constructive-io/constructive-planning/issues/1148

Link to Devin session: https://app.devin.ai/sessions/866a2246ce1345918ec707e9a09e5b9b
Requested by: @pyramation

@pyramation pyramation self-assigned this Jul 13, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@blacksmith-sh

This comment has been minimized.

@pyramation pyramation merged commit a5a336f into main Jul 13, 2026
37 checks passed
@pyramation pyramation deleted the feat/phase2-ordering branch July 13, 2026 00:37
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