Skip to content

feat(substrate): type_heritage table and recipe rewire#142

Merged
SutuSebastian merged 3 commits into
mainfrom
docs/type-heritage-substrate-plan
May 26, 2026
Merged

feat(substrate): type_heritage table and recipe rewire#142
SutuSebastian merged 3 commits into
mainfrom
docs/type-heritage-substrate-plan

Conversation

@SutuSebastian
Copy link
Copy Markdown
Contributor

@SutuSebastian SutuSebastian commented May 26, 2026

Summary

  • Adds type_heritage substrate table (schema v35): AST-backed extends/implements extraction, import-aware resolve pass, and stats/perf wiring in the index engine.
  • Rewires type-ancestors / type-descendants recipes to JOIN type_heritage (drops signature-parsing fragment).
  • Includes plan doc docs/plans/type-heritage-substrate.md (marked shipped) and roadmap/delivery tracker updates.

Follow-up to merged #141 — replaces signature-parsing v1 with durable substrate.

Test plan

  • bun run typecheck
  • bun run test:golden
  • bun test src/extractors/heritage.test.ts src/db.test.ts
  • Pre-commit hook (format, lint, typecheck, tests) on commit
  • CI green

Documents the substrate path to replace signature parsing in type-ancestors
and type-descendants; links from roadmap and agent-surface related plans.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

🦋 Changeset detected

Latest commit: b540202

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stainless-code/codemap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Warning

Review limit reached

@SutuSebastian, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 27 minutes and 18 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b4ffd5fa-a6e3-41e2-801d-8d97e52473c5

📥 Commits

Reviewing files that changed from the base of the PR and between bd5a1fa and b540202.

📒 Files selected for processing (41)
  • .changeset/type-heritage-substrate.md
  • docs/architecture.md
  • docs/plans/agent-surface-and-ops.md
  • docs/plans/agent-surface-delivery.md
  • docs/plans/type-heritage-substrate.md
  • docs/roadmap.md
  • fixtures/golden/minimal/barrel-files.json
  • fixtures/golden/minimal/fan-in.json
  • fixtures/golden/minimal/fan-out-sample-json.json
  • fixtures/golden/minimal/fan-out-sample.json
  • fixtures/golden/minimal/fan-out.json
  • fixtures/golden/minimal/files-count.json
  • fixtures/golden/minimal/files-hashes.json
  • fixtures/golden/minimal/files-largest.json
  • fixtures/golden/minimal/index-summary.json
  • fixtures/golden/minimal/refactor-risk-ranking.json
  • fixtures/golden/minimal/type-descendants-animal.json
  • fixtures/golden/minimal/type-descendants-max-depth.json
  • fixtures/golden/minimal/unimported-exports.json
  • fixtures/golden/minimal/unused-type-members.json
  • fixtures/minimal/README.md
  • fixtures/minimal/src/types/heritage-qualified.ts
  • src/adapters/builtin.ts
  • src/adapters/types.ts
  • src/application/heritage-resolver.ts
  • src/application/index-engine.ts
  • src/application/run-index.ts
  • src/application/types.ts
  • src/db.test.ts
  • src/db.ts
  • src/extractors/heritage.test.ts
  • src/extractors/heritage.ts
  • src/extractors/symbols.ts
  • src/extractors/types.ts
  • src/parsed-types.ts
  • src/parser.ts
  • templates/recipes-fragments/heritage-edges.sql
  • templates/recipes/type-ancestors.md
  • templates/recipes/type-ancestors.sql
  • templates/recipes/type-descendants.md
  • templates/recipes/type-descendants.sql
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/type-heritage-substrate-plan

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Add AST-backed type_heritage extraction, import-aware resolve pass,
and rewire type-ancestors/type-descendants to JOIN substrate rows.
Schema bump 34→35; heritage-qualified fixture; goldens refreshed.
@SutuSebastian SutuSebastian changed the title docs(plans): type-heritage substrate plan feat(substrate): type_heritage table and recipe rewire May 26, 2026
@SutuSebastian SutuSebastian merged commit a085ec6 into main May 26, 2026
11 checks passed
@SutuSebastian SutuSebastian deleted the docs/type-heritage-substrate-plan branch May 26, 2026 08:30
@github-actions github-actions Bot mentioned this pull request May 26, 2026
SutuSebastian added a commit that referenced this pull request May 26, 2026
* fix(heritage): address PR #142 review findings (cycle 1)

Class superClass generics, type-alias resolve, incremental scope expansion,
module-level symbol preference, complex extends fallback, recipe dedupe;
heritage-resolver tests + new recipe goldens; doc/glossary updates.

* fix(heritage): address review cycle 2 (expression bases, SQL dedupe)

Skip resolve for (expression) heritage markers; align type-descendants
homonym dedupe with ancestors via scope_local_id ordering; add scoped
re-resolve test.

* docs: close type-heritage-substrate plan (review cycle 3)

Delete shipped plan per docs-governance; prune roadmap and agent-surface
cross-refs; document (expression) heritage rows in recipe help.

* fix(heritage): review cycle 4 (default import, re-export, SQL)

Resolve default-import bases; expand incremental scope for re-export
barrel importers; homonym dedupe on ancestor start symbols; align
type kind filters; doc/changeset parity updates.

* test(heritage): review cycle 5 (persist + incremental e2e)

Add persistTypeHeritageResolution unit test and run-index incremental
test proving scoped heritage re-resolve updates DB rows.

* docs(recipes): note type kind filter on type-descendants (cycle 6)
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