Skip to content

fix(generate): recover conflicted single-contract library metadata - #1186

Open
crisfiorini-oss wants to merge 5 commits into
codefly-dev:mainfrom
crisfiorini-oss:fix/generate-client-conflicted-manifest
Open

crisfiorini-oss wants to merge 5 commits into
codefly-dev:mainfrom
crisfiorini-oss:fix/generate-client-conflicted-manifest

Conversation

@crisfiorini-oss

@crisfiorini-oss crisfiorini-oss commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

codefly generate client --force stops on a generated library manifest containing merge conflicts before it can regenerate the library. Recover an explicitly selected single-contract library through the existing generator, using that contract's identity/version and only the freshly generated language declarations.

Classification: fix at the existing client-generator owner.

  • Preserve ordinary no-force refusal, filesystem errors, aggregate-version ambiguity, package preflight and staged output safety.
  • Do not retain language claims from malformed metadata. Existing language package files remain subject to the current ownership rules.
  • Update existing --force help and command documentation. The owning reference generator now writes the complete reference under docs/generated/, removes its old output after a successful write, and fixes its backlink. .gitattributes marks only that generated directory; authored docs stay visible.
Build or reuse Searched and verified Decision
Library recovery Released 0.1.215 and current main's GenerateClientLibrary, existing manifest readers, single-contract version selection and staged writes; no matching open recovery PR found Extend those owners. No alternate generator, YAML conflict selector or consumer-side output deletion.

Validation:

  • Focused recovery/preflight/filesystem guards PASS; complete generator package tests PASS (65.443s).
  • go vet ./pkg/generators ./cmd/generate PASS. Owning go test ./cmd -run TestCLIReferenceIsCurrent -update-reference PASS; full generated reference change retained. Formatting and whitespace checks PASS.
  • Build exact source b90cf31 as 0.1.216-dev.b90cf31 and regenerate a real merge-conflicted single-contract TypeScript library through its existing owner script: PASS. Both facade generation and its complete proto generation finish; no generated conflict is hand-resolved.
  • The consumer's complete released-0.1.215 regeneration and canonical clean-tree library reproduction PASS. Final consumer metadata records the released generator; the development build was only the initial recovery. No release publication or dependency-pin change is claimed for this CLI PR.
  • Metadata validation/language retention lives in one helper, preserving recovery guards and the existing complexity limit. Refactored complete generator tests PASS (24.238s); targeted full-config lint PASS (0 issues).
  • Rebased onto current upstream main bcf5d5b; head 55e444e9e236110e4c45e9476699aed949848d45. All five retained feature patches remain identical. Main now owns the deterministic deadline diagnostic test with a real client refusal before virtual time, so drop this branch's redundant variant and its empty CI retry commit. This further reduces the PR and preserves main's assertions.
  • Complete owner reference generation PASSes (0.180s) with no drift. Focused recovery, deadline and reference guards PASS (0.175s / 0.256s / 0.204s). Formatting and whitespace pass; no full local suite repeated.
  • All 18 runnable checks PASS on this exact rebased head, including every generation shard and docker-generate, race, coverage and lint. The conditional pins check skips. Marked ready only after the complete gate passed; GitHub reports MERGEABLE/CLEAN. Generation qualification and quality checks are green.

@crisfiorini-oss
crisfiorini-oss marked this pull request as ready for review October 26, 2026 19:17
@crisfiorini-oss
crisfiorini-oss marked this pull request as draft October 26, 2026 19:32
@crisfiorini-oss
crisfiorini-oss marked this pull request as ready for review October 26, 2026 19:34
@crisfiorini-oss
crisfiorini-oss marked this pull request as draft October 27, 2026 15:45
@crisfiorini-oss
crisfiorini-oss force-pushed the fix/generate-client-conflicted-manifest branch from 79ff5d2 to 063a444 Compare October 27, 2026 15:45
@crisfiorini-oss
crisfiorini-oss marked this pull request as ready for review October 27, 2026 16:14
@crisfiorini-oss
crisfiorini-oss marked this pull request as draft October 27, 2026 18:14
@crisfiorini-oss
crisfiorini-oss force-pushed the fix/generate-client-conflicted-manifest branch from c725ce9 to b13ce09 Compare October 27, 2026 18:16
@crisfiorini-oss
crisfiorini-oss marked this pull request as ready for review October 27, 2026 18:35
@crisfiorini-oss
crisfiorini-oss marked this pull request as draft October 27, 2026 21:31
@crisfiorini-oss
crisfiorini-oss force-pushed the fix/generate-client-conflicted-manifest branch from 6972559 to 55e444e Compare October 27, 2026 21:38
@crisfiorini-oss
crisfiorini-oss marked this pull request as ready for review October 27, 2026 21: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