Skip to content

okf: write stackoverflow bundle tags as YAML lists - #293

Merged
amirhormati merged 1 commit into
GoogleCloudPlatform:mainfrom
amirhormati:okf-tags-must-be-a-list
Aug 14, 2026
Merged

amirhormati merged 1 commit into
GoogleCloudPlatform:mainfrom
amirhormati:okf-tags-must-be-a-list

Conversation

@amirhormati

@amirhormati amirhormati commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Problem

tags: in OKF frontmatter is meant to be a list. Eight files in
okf/bundles/stackoverflow write it as a bare comma-separated string instead.

A JavaScript string is iterable, so the Documents Layout iterates it anyway and
each character becomes a Dataplex label. Pushing tables/votes.md
(tags: Stack Overflow, votes, posts, community) to Knowledge Catalog stored:

{" ": "true", ",": "true", "O": "true", "S": "true", "a": "true", "c": "true", ...}

No error, no warning. Those eight files round-tripped corrupted; the other 24
in the bundle were fine.

Fix

Rewrite the eight files as YAML flow sequences, matching the style the nine
acme_retail files already use:

tags: [Stack Overflow, votes, posts, community]

The brackets are the whole difference. Without them it is a plain scalar, not a
sequence.

Files changed:

datasets/stackoverflow.md, tables/posts_answers.md,
tables/posts_moderator_nomination.md, tables/posts_questions.md,
tables/posts_wiki_placeholder.md, tables/stackoverflow_posts.md,
tables/users.md, tables/votes.md

Bundle data only. #294 adds the library-side guard that makes this shape an
error instead of silent corruption; it should land after this PR, since these
are the files that trip it.

Verification

Against hormati-bqml / us-central1, using the demo's push/pull path:

  • Before: 24 of 32 stackoverflow files round-tripped losslessly.
  • After: 32 of 32.
  • tables/votes now stores four labels (Stack Overflow, votes, posts,
    community) instead of fourteen single characters.

Found while round-tripping the sample bundles for #292. #292, #293, and #294
share no files.

@google-cla

google-cla Bot commented Aug 14, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@amirhormati
amirhormati force-pushed the okf-tags-must-be-a-list branch from 1aaf9ba to e7b4a48 Compare August 14, 2026 17:10
@amirhormati amirhormati changed the title okf: require frontmatter tags to be a list okf: write stackoverflow bundle tags as YAML lists Aug 14, 2026
Eight files gave `tags:` a bare comma-separated string, which YAML reads as one
plain scalar, not a sequence. A JavaScript string is iterable, so the Documents
Layout expanded each one into a Dataplex label per character, and these files
round-tripped corrupted while the other 24 in the bundle were fine.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@amirhormati
amirhormati force-pushed the okf-tags-must-be-a-list branch from e7b4a48 to de5089d Compare August 14, 2026 17:52
@amirhormati
amirhormati merged commit 38c713f into GoogleCloudPlatform:main Aug 14, 2026
6 of 7 checks passed
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