Repository navigation
fix(publish): publish host-provided singletons as peers and keep repository peer choices - #18
Conversation
… as host-provided peers
🏷️ label rationale -
|
🤖
|
|
🤖 |
|
🤖 |
pkarw
left a comment
There was a problem hiding this comment.
🔍 Code Review: fix(publish): publish host-provided singletons as peers and keep repository peer choices
Verdict
❌ request changes — the implementation and conflict resolution are coherent, but this risk-high shared-contract change still needs consumer-side integration evidence before approval.
🎯 Summary
Exported modules now treat TanStack Query and Table as host-provided caret peers with exact development versions, and linked releases avoid publishing the same package as both a peer and runtime dependency. The resolved merge preserves main's caret framework peers and catalog metadata behavior.
Findings
⛔ Blocker
test/framework-peers.test.cjs:72— the tests inspect generated manifests, but do not install the generated module into a consumer and prove that a compatible host-provided TanStack version is reused without a nested copy.SDLC.mdclassifies shared contract surfaces asrisk-highand requires the consuming side to be exercised. Add a hermetic consumer-install regression test using local fixture packages, then assert the host copy is present and the module has no nested TanStack copy.
🧪 Validation Gate
| Command | Status | Evidence or limitation |
|---|---|---|
npm run typecheck |
PASS | TypeScript completed with no diagnostics on 09debf9. |
npm test |
PASS | 246 tests: 241 passed, 5 expected environment-dependent skips, 0 failed. |
npm pack --dry-run |
PASS | 59 files; 105.9 kB package. |
💥 Breaking Changes
The peer-dependency layout is a protected published-package contract. The changelog and compatibility table document the migration for newly exported or republished modules; already published versions remain unchanged.
🧪 Test Coverage
Manifest generation, linked-manifest merge behavior, compatible and incompatible simple peer ranges, and stale exact dependency cleanup are covered. The missing consumer-install boundary is the blocker above.
CI pending: Tests against Open Mercato and the latest-app local release lane are still running on this head. Required CI still gates merge; a follow-up will report the result.
|
@wojciechszyjka, consumer-install integration evidence is required by the shared-contract risk gate; see #18 (review). This autofix run is adding that regression coverage now and will re-request the verdict itself. |
|
🤖
The configured |
pkarw
left a comment
There was a problem hiding this comment.
🔍 Re-review: fix(publish): publish host-provided singletons as peers and keep repository peer choices
Verdict
✅ approve — the shared-contract evidence blocker is resolved and the final diff passes the complete local gate.
🎯 Summary
The branch now merges cleanly with main, preserves its caret framework-peer and catalog behavior, and publishes TanStack Query/Table as host-provided peers. Linked releases keep valid repository peer choices while preventing a package from remaining in both peer and runtime dependencies.
Resolved finding
- The missing consumer boundary is covered in
628aa34: an offline npm install consumes the generated module with a compatible host-provided TanStack package and verifies there is no nested module copy.
🧪 Validation Gate
| Command | Status | Evidence or limitation |
|---|---|---|
npm run typecheck |
PASS | TypeScript completed with no diagnostics on 133bcac. |
npm test |
PASS | 247 tests: 242 passed, 5 expected environment-dependent skips, 0 failed. |
npm pack --dry-run |
PASS | 59 files; 105.9 kB package. |
💥 Breaking Changes
The protected peer-dependency layout change is documented in the changelog, guide, and compatibility contract. Existing publications do not change; new exports and republishes receive the new layout.
🧪 Test Coverage
Manifest generation, linked-release merging, compatible and incompatible simple ranges, stale exact dependency cleanup, and the consumer-install boundary are covered.
CI pending: GitHub has not registered checks for head 133bcac yet. Required CI still gates merge; a follow-up will report the result.
|
🤖 One autofix iteration added the consumer-install evidence in |
|
🤖 ✅ Final head Review: #18 (review) |
🤖
|
|
🤖 |
Tracking plan: .ai/runs/2026-10-29-host-provided-peers.md
Status: complete
🎯 What changes
Exported modules now publish
@tanstack/react-queryand@tanstack/react-tableas^<installed>peer dependencies and keep their exact installed versions indevDependencies. The module therefore shares the host application's React context and TanStack types instead of installing an exact nested runtime copy.Linked releases also reconcile repository manifests safely: a package cannot remain in both
peerDependenciesanddependencies; a repository peer range for an imported runtime or host-provided package is kept when the supported range check accepts the built version, and otherwise the generated caret range wins.The branch now includes current
main. Conflict resolution preservesmain's caret framework peers, exact build-time dependencies, package description/keywords, and catalog behavior alongside this PR's host-provided peer rules.💥 Compatibility
The published package layout is a protected surface. Already-published package versions do not change; newly exported or republished modules receive the new layout. Framework peers continue to follow current
main. The changelog, guide, andBACKWARD_COMPATIBILITY.mddocument the contract.🧪 Validation
npm run typecheck: passnpm test: 247 tests, 242 pass, 0 fail, 5 expected environment-dependent skipsnpm pack --dry-run: pass, 59 files, 105.9 kB628aa34No registry publication or real-app release was performed; repository policy keeps those outside unit validation. GitHub CI for the final head remains a merge gate.
📋 Progress
All steps in the tracking plan are complete.