Repository navigation
fix(crux): clear crux type errors and make the crux typecheck blocking - #4993
Conversation
- Delete crux-tsc-baseline.txt (unread since QUA-524). - Type-only fixes for 16 errors (missing path aliases, Next fetch options, exec options, test annotations). - propose-client: publication and organization-fact are not accepted by /api/enrichment/propose; refuse them with a clear error instead of crashing on the FK map (semantic-scholar, openalex, crossref and wikidata T1 proposals hit this). - typecheck-crux is no longer advisory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WXiHX1a9DEuvwydgTP43ZE
Protected paths modifiedThis PR modifies files that affect agent behavior, CI, or validation rules. Modified protected files:
|
|
Warning Review limit reachedNext included review available in 45 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Generated by Claude Code |
Test Coverage Report
Coverage is advisory only — no thresholds enforced. Generated by |
The crux typecheck has been advisory with 17 real errors. Its "baseline" file (
crux/validate/crux-tsc-baseline.txt, bumped ~50 times) has not been read by anything since QUA-524 deleted the validator that used it. This PR fixes all 17 errors and makes thetypecheck-cruxgate step blocking (QUA-636).@wiki-server/*-routepath aliases tocrux/tsconfig.json(copied fromapps/web/tsconfig.json).crux/next-fetch.d.tsfor Next'sfetch(…, { next })option.crux/lib/aiid/fetch.ts.error !== 'not_found'comparison incrux/commands/agents.ts.mutex.test.tsandlifecycle.test.ts.ENTITY_REF_FK_MAPincrux/commands/tb-importers/propose-client.tshad no entry forpublicationororganization-fact. The semantic-scholar, openalex, crossref and wikidata T1 importers emit those, sobuildProposeRequestcrashed with "is not iterable". The server's/api/enrichment/proposedoes not accept those record types at all (SUPPORTED_RECORD_TYPES= grants, personnel, funding-rounds, benchmark-results), so guessing an FK mapping would only move the failure.buildProposeRequestnow refuses them with a clear error naming the supported types. New tests cover both types and a supported one.advisory: truefromtypecheck-crux, and removes the "known baseline" exception fromerror-handling.mdandvalidation-gate-system.md.Verified:
tsc --noEmit -p crux/tsconfig.jsonreports 0 errors;crux/commands/tb-importerstests 351/351; pre-push gate passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01WXiHX1a9DEuvwydgTP43ZE
Generated by Claude Code