fix(pull): exclude ObsessionDB metadata tables from pulled schema#199
Open
alvarogar4 wants to merge 1 commit into
Open
fix(pull): exclude ObsessionDB metadata tables from pulled schema#199alvarogar4 wants to merge 1 commit into
alvarogar4 wants to merge 1 commit into
Conversation
chkit pull emitted ObsessionDB product-metadata tables (metadata_folder, metadata_table_folder, metadata_table_tag) as schema definitions. These are ObsessionDB internals provisioned inside customer databases, not the user's schema, so pulling them polluted the schema file and produced drift against tables the user does not own. They are now filtered before rendering on both the executor and custom- introspector paths, and excluded from the skipped-object summary (matching mapIntrospectedObjectToDefinition's rule that a kind-less object is a table). Closes #126 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Biy2vG7iixRiBsBBsFg5Nu
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #126.
chkit pullemitted ObsessionDB product-metadata tables —metadata_folder,metadata_table_folder,metadata_table_tag— astable(...)definitions. These are ObsessionDB internals provisioned inside customer databases, not part of the user's schema, so pulling them polluted the generated schema file and produced drift against tables the user does not own.They are now excluded before rendering, on both introspection paths (the executor path and a custom introspector), and are not counted as skipped/unsupported objects — they vanish entirely.
One correctness detail: the filter treats an object as a table when it has
kind === 'table'or nokindfield at all, mirroringmapIntrospectedObjectToDefinition. Custom introspectors return bare table objects without akind, so a naivekind === 'table'check would have missed metadata tables coming from that path.Test plan
excludes ObsessionDB metadata tables from pulled schema output): a mocked introspector returns a normaleventstable plus the three metadata tables →definitionCountis 1 (was 4), and the rendered content containseventsbut none of the metadata namestypecheck+lintclean; full@chkit/plugin-pullsuite green (incl. e2e)Scope
A hardcoded denylist of the three known ObsessionDB metadata table names, matching the issue. No config surface added — if a user ever needs to pull a table genuinely named one of these, that's a future enhancement.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Biy2vG7iixRiBsBBsFg5Nu