Skip to content

test(e2e): Wiki bullet metrics — Outline + Confluence (#1440) - #1510

Merged
mozhaev-dev merged 3 commits into
mainfrom
test/e2e-wiki-outline
Jun 30, 2026
Merged

test(e2e): Wiki bullet metrics — Outline + Confluence (#1440)#1510
mozhaev-dev merged 3 commits into
mainfrom
test/e2e-wiki-outline

Conversation

@mozhaev-dev

@mozhaev-dev mozhaev-dev commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

What

E2E specs for the Wiki bullet (IC Bullet Wiki, …0041) across both wiki-class connectors — Outline and Confluence. One spec per (connector, metric), 8 total:

metric_key class source value
wiki_pages_created sum class_wiki_pages 1 per authored page
wiki_edits sum class_wiki_pages Σ (version_count − 1)
wiki_active_authors active marker class_wiki_pages value 1, median 0, range_max = headcount
wiki_comments sum class_wiki_engagement ⋈ pages comments attributed to the page author

Pipeline: bronze_{outline,confluence}.*{outline,confluence}__wiki_{pages,engagement} → silver class_wiki_pages / class_wiki_engagement (union_by_tag) → gold insight.wiki_bullet_rows → IC Bullet Wiki.

Values (per connector): pages 3·2·1 → median 2, range [1,3]; edits v5/v3/v2 → 4·2·1, median 2, range [1,4]; active 1-of-3; comments 3·2·1 on alice/bob/carol's pages → median 2, range [1,3]. Each seeds a re-sync duplicate to prove dedup.

Notable findings / supporting changes

  • Both connectors feed the same silver union, so class_wiki_pages/class_wiki_engagement won't run unless both connectors' bronze tables exist. This PR adds placeholders for both Outline (4 streams) and Confluence (6 streams), even though each spec seeds only its own.
  • bronze_jira.jira_user was missing tenant_idconfluence__wiki_pages' identity join (accountId → email) reads it, so the model failed to compile on a fresh cluster. Added it (Nullable, so connectors seeding jira_user without it still load). Latent placeholder gap, not specific to these tests.
  • Confluence comment placeholders carry parent_comment_id (the reply-integrity singular tests under tests/wiki/ reference it).
  • Confluence runs standalone (no Jira) in these specs → person_id falls back to author_id; specs set author_id to the seeded person's email so identity resolves to a team member (for the team median).
  • conftest: reset class_wiki_pages / class_wiki_engagement / class_wiki_activity at session start (incremental delete+insert unions both connectors → warm-rerun determinism; CI is fresh).

Verification

./e2e.sh test -k "wiki_outline or wiki_confluence"8 passed.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added fresh-environment setup for Outline and Confluence wiki placeholder databases and Bronze wiki tables.
    • Expanded end-to-end metrics test coverage for wiki activity, comments, edits, pages created, and active authors.
  • Bug Fixes

    • Updated placeholder contracts to include nullable tenant_id for wiki-related Jira placeholders.
  • Tests

    • Added/updated JSON schema and YAML templates for new wiki metrics fixtures.
    • Improved end-to-end test isolation by truncating wiki incremental tables on warm re-runs.

@mozhaev-dev
mozhaev-dev requested a review from a team as a code owner June 27, 2026 06:12
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

📝 Walkthrough

Walkthrough

Adds Bronze placeholder databases and wiki tables for Outline and Confluence, updates the Jira user placeholder contract with tenant_id, extends e2e cleanup for wiki silver tables, and adds schema, template, and metric-query YAML fixtures for Confluence and Outline wiki metrics.

Changes

Wiki bronze and e2e fixtures

Layer / File(s) Summary
Bronze databases and wiki tables
src/ingestion/scripts/create-bronze-placeholders.sh
Creates bronze_outline and bronze_confluence, updates bronze_jira.jira_user with tenant_id, and adds placeholder wiki tables for Outline and Confluence sources.
Shared wiki schemas, templates, and cleanup
src/ingestion/tests/e2e/conftest.py, src/ingestion/tests/e2e/metrics/schemas/*, src/ingestion/tests/e2e/metrics/templates/*
Adds strict Bronze schemas and reusable page/comment templates for Outline and Confluence, and truncates incremental wiki silver tables at e2e session start.
Confluence metric specs
src/ingestion/tests/e2e/metrics/wiki_confluence_*.test.yaml
Adds Confluence metric specs for active authors, comments, edits, and pages created, with seeded fixtures and query assertions.
Outline metric specs
src/ingestion/tests/e2e/metrics/wiki_outline_*.test.yaml
Adds Outline metric specs for active authors, comments, edits, and pages created, with seeded fixtures and query assertions.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • cyberantonz
  • mitasovr

Poem

A bunny hopped through bronze at dawn,
With Outline leaves and Confluence drawn.
I nibbled deduped pages, neat and bright,
Then twitched my nose at metrics in flight.
🥕 Hop! The wiki carrots sing tonight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: new e2e wiki bullet metrics coverage for Outline and Confluence.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/e2e-wiki-outline

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/ingestion/scripts/create-bronze-placeholders.sh (1)

736-758: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Reconcile existing jira_user placeholders when adding tenant_id.

Line 742 fixes fresh tables, but warm ClickHouse/e2e clusters with an older bronze_jira.jira_user skip this branch and keep the old schema. confluence__wiki_pages reads tenant_id, so reruns can still fail unless the existing table is altered.

Proposed fix
 if ! ch_table_exists bronze_jira jira_user; then
   echo "  Creating placeholder: bronze_jira.jira_user"
   run_ch <<'SQL'
 CREATE TABLE IF NOT EXISTS bronze_jira.jira_user (
@@
     _airbyte_generation_id UInt32        DEFAULT 0
 ) ENGINE = ReplacingMergeTree(_airbyte_extracted_at) ORDER BY unique_key;
 SQL
+else
+  echo "  Reconciling placeholder schema: bronze_jira.jira_user"
+  run_ch <<'SQL'
+ALTER TABLE bronze_jira.jira_user ADD COLUMN IF NOT EXISTS tenant_id Nullable(String);
+SQL
 fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/ingestion/scripts/create-bronze-placeholders.sh` around lines 736 - 758,
The jira_user placeholder creation only handles new tables, so existing
bronze_jira.jira_user tables can remain on the old schema without tenant_id.
Update the create-bronze-placeholders.sh logic around the jira_user block to
reconcile pre-existing tables by adding an ALTER TABLE path (or equivalent
schema migration) when ch_table_exists bronze_jira jira_user is true but
tenant_id is missing, ensuring confluence__wiki_pages can always read tenant_id.
Use the bronze_jira.jira_user creation block and its ch_table_exists check as
the place to detect and upgrade older schemas.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/ingestion/tests/e2e/metrics/schemas/bronze_confluence.wiki_footer_comments.yaml`:
- Around line 7-20: Add the new parent_comment_id field to the strict Confluence
footer-comments schema so fixtures with that placeholder validate successfully
under additionalProperties: false. Update
bronze_confluence.wiki_footer_comments.yaml alongside the existing comment
fields (such as page_id, comment_id, and author_id) to include parent_comment_id
with the same nullable string shape used by the other optional IDs.

In `@src/ingestion/tests/e2e/metrics/schemas/bronze_outline.wiki_comments.yaml`:
- Around line 4-22: The bronze_outline.wiki_comments schema currently only
blocks unknown fields via additionalProperties, but still allows required
columns to be omitted. Update the wiki_comments schema definition to add a
required list covering the expected bronze contract fields, using the existing
property names in bronze_outline.wiki_comments so fixtures must include them
during validation. Keep additionalProperties: false, and make sure the required
set matches the columns that must always be present (including identifiers and
timestamps such as page_id, comment_id, author_id, and created_at).

In `@src/ingestion/tests/e2e/metrics/schemas/bronze_outline.wiki_pages.yaml`:
- Around line 4-28: The bronze_outline.wiki_pages schema is missing a required
list, so it still accepts rows that omit expected fields while blocking only
unknown ones. Update the schema definition in bronze_outline.wiki_pages.yaml to
add a required section for the mandatory columns used by this contract,
especially the core identifiers and timestamps such as page_id, author_id,
version_number, and created_at. Keep the existing properties and
additionalProperties setting unchanged, and ensure the required set matches the
strict bronze expectations for this fixture.

---

Outside diff comments:
In `@src/ingestion/scripts/create-bronze-placeholders.sh`:
- Around line 736-758: The jira_user placeholder creation only handles new
tables, so existing bronze_jira.jira_user tables can remain on the old schema
without tenant_id. Update the create-bronze-placeholders.sh logic around the
jira_user block to reconcile pre-existing tables by adding an ALTER TABLE path
(or equivalent schema migration) when ch_table_exists bronze_jira jira_user is
true but tenant_id is missing, ensuring confluence__wiki_pages can always read
tenant_id. Use the bronze_jira.jira_user creation block and its ch_table_exists
check as the place to detect and upgrade older schemas.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 35b3775a-03d4-483d-8467-e97f09549e1a

📥 Commits

Reviewing files that changed from the base of the PR and between 95009a5 and 09016b085fae40ae0c47fd0b1defb6e70cbfafe4.

📒 Files selected for processing (18)
  • src/ingestion/scripts/create-bronze-placeholders.sh
  • src/ingestion/tests/e2e/conftest.py
  • src/ingestion/tests/e2e/metrics/schemas/bronze_confluence.wiki_footer_comments.yaml
  • src/ingestion/tests/e2e/metrics/schemas/bronze_confluence.wiki_pages.yaml
  • src/ingestion/tests/e2e/metrics/schemas/bronze_outline.wiki_comments.yaml
  • src/ingestion/tests/e2e/metrics/schemas/bronze_outline.wiki_pages.yaml
  • src/ingestion/tests/e2e/metrics/templates/confluence_wiki_footer_comments.yaml
  • src/ingestion/tests/e2e/metrics/templates/confluence_wiki_pages.yaml
  • src/ingestion/tests/e2e/metrics/templates/outline_wiki_comments.yaml
  • src/ingestion/tests/e2e/metrics/templates/outline_wiki_pages.yaml
  • src/ingestion/tests/e2e/metrics/wiki_confluence_active_authors.test.yaml
  • src/ingestion/tests/e2e/metrics/wiki_confluence_comments.test.yaml
  • src/ingestion/tests/e2e/metrics/wiki_confluence_edits.test.yaml
  • src/ingestion/tests/e2e/metrics/wiki_confluence_pages_created.test.yaml
  • src/ingestion/tests/e2e/metrics/wiki_outline_active_authors.test.yaml
  • src/ingestion/tests/e2e/metrics/wiki_outline_comments.test.yaml
  • src/ingestion/tests/e2e/metrics/wiki_outline_edits.test.yaml
  • src/ingestion/tests/e2e/metrics/wiki_outline_pages_created.test.yaml

Comment on lines +4 to +22
bronze_outline.wiki_comments:
$schema: http://json-schema.org/draft-07/schema#
type: object
additionalProperties: false
properties:
_airbyte_raw_id: { type: string }
_airbyte_extracted_at: { type: string, format: date-time }
_airbyte_meta: { type: string }
_airbyte_generation_id: { type: integer }
unique_key: { type: string }
tenant_id: { type: [string, "null"] }
source_id: { type: [string, "null"] }
page_id: { type: [string, "null"] }
comment_id: { type: [string, "null"] }
author_id: { type: [string, "null"] }
created_at: { type: [string, "null"] }
resolution_status: { type: [string, "null"] }
parent_comment_id: { type: [string, "null"] }
anchor_text: { type: [string, "null"] }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Make the schema enforce column presence, not just reject extras.

additionalProperties: false only blocks unknown keys; without a required list, a fixture can still omit page_id, comment_id, author_id, created_at, etc. and pass validation. That weakens this file’s role as the strict bronze contract and can let broken placeholders slip through until the dbt model runs.

Proposed fix
 schemas:
   bronze_outline.wiki_comments:
     $schema: http://json-schema.org/draft-07/schema#
     type: object
     additionalProperties: false
+    required:
+      - _airbyte_raw_id
+      - _airbyte_extracted_at
+      - _airbyte_meta
+      - _airbyte_generation_id
+      - unique_key
+      - tenant_id
+      - source_id
+      - page_id
+      - comment_id
+      - author_id
+      - created_at
+      - resolution_status
+      - parent_comment_id
+      - anchor_text
     properties:
       _airbyte_raw_id: { type: string }
       _airbyte_extracted_at: { type: string, format: date-time }
       _airbyte_meta: { type: string }
       _airbyte_generation_id: { type: integer }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
bronze_outline.wiki_comments:
$schema: http://json-schema.org/draft-07/schema#
type: object
additionalProperties: false
properties:
_airbyte_raw_id: { type: string }
_airbyte_extracted_at: { type: string, format: date-time }
_airbyte_meta: { type: string }
_airbyte_generation_id: { type: integer }
unique_key: { type: string }
tenant_id: { type: [string, "null"] }
source_id: { type: [string, "null"] }
page_id: { type: [string, "null"] }
comment_id: { type: [string, "null"] }
author_id: { type: [string, "null"] }
created_at: { type: [string, "null"] }
resolution_status: { type: [string, "null"] }
parent_comment_id: { type: [string, "null"] }
anchor_text: { type: [string, "null"] }
bronze_outline.wiki_comments:
$schema: http://json-schema.org/draft-07/schema#
type: object
additionalProperties: false
required:
- _airbyte_raw_id
- _airbyte_extracted_at
- _airbyte_meta
- _airbyte_generation_id
- unique_key
- tenant_id
- source_id
- page_id
- comment_id
- author_id
- created_at
- resolution_status
- parent_comment_id
- anchor_text
properties:
_airbyte_raw_id: { type: string }
_airbyte_extracted_at: { type: string, format: date-time }
_airbyte_meta: { type: string }
_airbyte_generation_id: { type: integer }
unique_key: { type: string }
tenant_id: { type: [string, "null"] }
source_id: { type: [string, "null"] }
page_id: { type: [string, "null"] }
comment_id: { type: [string, "null"] }
author_id: { type: [string, "null"] }
created_at: { type: [string, "null"] }
resolution_status: { type: [string, "null"] }
parent_comment_id: { type: [string, "null"] }
anchor_text: { type: [string, "null"] }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/ingestion/tests/e2e/metrics/schemas/bronze_outline.wiki_comments.yaml`
around lines 4 - 22, The bronze_outline.wiki_comments schema currently only
blocks unknown fields via additionalProperties, but still allows required
columns to be omitted. Update the wiki_comments schema definition to add a
required list covering the expected bronze contract fields, using the existing
property names in bronze_outline.wiki_comments so fixtures must include them
during validation. Keep additionalProperties: false, and make sure the required
set matches the columns that must always be present (including identifiers and
timestamps such as page_id, comment_id, author_id, and created_at).

Comment on lines +4 to +28
bronze_outline.wiki_pages:
$schema: http://json-schema.org/draft-07/schema#
type: object
additionalProperties: false
properties:
_airbyte_raw_id: { type: string }
_airbyte_extracted_at: { type: string, format: date-time }
_airbyte_meta: { type: string }
_airbyte_generation_id: { type: integer }
unique_key: { type: string }
tenant_id: { type: [string, "null"] }
source_id: { type: [string, "null"] }
page_id: { type: [string, "null"] }
space_id: { type: [string, "null"] }
title: { type: [string, "null"] }
status: { type: [string, "null"] }
author_id: { type: [string, "null"] }
author_email: { type: [string, "null"] }
last_editor_id: { type: [string, "null"] }
last_editor_email: { type: [string, "null"] }
parent_page_id: { type: [string, "null"] }
version_number: { type: [number, "null"] }
created_at: { type: [string, "null"] }
updated_at: { type: [string, "null"] }
collected_at: { type: [string, "null"] }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

This schema has the same missing-required gap.

Right now it rejects unexpected fields but still accepts rows that omit expected ones like page_id, author_id, version_number, or created_at. For a strict bronze contract, that means fixture/schema drift can pass validation and only fail later in downstream models.

Proposed fix
 schemas:
   bronze_outline.wiki_pages:
     $schema: http://json-schema.org/draft-07/schema#
     type: object
     additionalProperties: false
+    required:
+      - _airbyte_raw_id
+      - _airbyte_extracted_at
+      - _airbyte_meta
+      - _airbyte_generation_id
+      - unique_key
+      - tenant_id
+      - source_id
+      - page_id
+      - space_id
+      - title
+      - status
+      - author_id
+      - author_email
+      - last_editor_id
+      - last_editor_email
+      - parent_page_id
+      - version_number
+      - created_at
+      - updated_at
+      - collected_at
     properties:
       _airbyte_raw_id: { type: string }
       _airbyte_extracted_at: { type: string, format: date-time }
       _airbyte_meta: { type: string }
       _airbyte_generation_id: { type: integer }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
bronze_outline.wiki_pages:
$schema: http://json-schema.org/draft-07/schema#
type: object
additionalProperties: false
properties:
_airbyte_raw_id: { type: string }
_airbyte_extracted_at: { type: string, format: date-time }
_airbyte_meta: { type: string }
_airbyte_generation_id: { type: integer }
unique_key: { type: string }
tenant_id: { type: [string, "null"] }
source_id: { type: [string, "null"] }
page_id: { type: [string, "null"] }
space_id: { type: [string, "null"] }
title: { type: [string, "null"] }
status: { type: [string, "null"] }
author_id: { type: [string, "null"] }
author_email: { type: [string, "null"] }
last_editor_id: { type: [string, "null"] }
last_editor_email: { type: [string, "null"] }
parent_page_id: { type: [string, "null"] }
version_number: { type: [number, "null"] }
created_at: { type: [string, "null"] }
updated_at: { type: [string, "null"] }
collected_at: { type: [string, "null"] }
bronze_outline.wiki_pages:
$schema: http://json-schema.org/draft-07/schema#
type: object
additionalProperties: false
required:
- _airbyte_raw_id
- _airbyte_extracted_at
- _airbyte_meta
- _airbyte_generation_id
- unique_key
- tenant_id
- source_id
- page_id
- space_id
- title
- status
- author_id
- author_email
- last_editor_id
- last_editor_email
- parent_page_id
- version_number
- created_at
- updated_at
- collected_at
properties:
_airbyte_raw_id: { type: string }
_airbyte_extracted_at: { type: string, format: date-time }
_airbyte_meta: { type: string }
_airbyte_generation_id: { type: integer }
unique_key: { type: string }
tenant_id: { type: [string, "null"] }
source_id: { type: [string, "null"] }
page_id: { type: [string, "null"] }
space_id: { type: [string, "null"] }
title: { type: [string, "null"] }
status: { type: [string, "null"] }
author_id: { type: [string, "null"] }
author_email: { type: [string, "null"] }
last_editor_id: { type: [string, "null"] }
last_editor_email: { type: [string, "null"] }
parent_page_id: { type: [string, "null"] }
version_number: { type: [number, "null"] }
created_at: { type: [string, "null"] }
updated_at: { type: [string, "null"] }
collected_at: { type: [string, "null"] }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/ingestion/tests/e2e/metrics/schemas/bronze_outline.wiki_pages.yaml`
around lines 4 - 28, The bronze_outline.wiki_pages schema is missing a required
list, so it still accepts rows that omit expected fields while blocking only
unknown ones. Update the schema definition in bronze_outline.wiki_pages.yaml to
add a required section for the mandatory columns used by this contract,
especially the core identifiers and timestamps such as page_id, author_id,
version_number, and created_at. Keep the existing properties and
additionalProperties setting unchanged, and ensure the required set matches the
strict bronze expectations for this fixture.

@mozhaev-dev

Copy link
Copy Markdown
Contributor Author

Thanks @coderabbitai — addressed in f549e2ed:

  • jira_user tenant_id reconcile (outside-diff): added the else branch with ALTER TABLE bronze_jira.jira_user ADD COLUMN IF NOT EXISTS tenant_id Nullable(String) so a pre-existing table (warm cluster / created earlier by the Jira connector) is upgraded in place, not just fresh creates. Good catch.
  • parent_comment_id in the strict schema: added it to bronze_confluence.wiki_footer_comments schema + template (the placeholder carries it, so additionalProperties:false should allow it).

On the required: lists (the two outline schemas): respectfully leaving these out — none of the 16 existing e2e schemas (collab/m365 on main included) use required; the established convention is additionalProperties:false plus base templates that carry every column, so a fixture can't silently omit one in practice. Adding required only to the wiki schemas would be inconsistent; happy to do a repo-wide pass in a separate change if the team wants that convention.

Re-verified: ./e2e.sh test -k "wiki_outline or wiki_confluence" → 8 passed.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@mozhaev-dev Thanks — the tenant_id reconcile and parent_comment_id schema/template updates address the concrete issues I flagged.

Your rationale on omitting required also makes sense given the existing repo convention for e2e schemas. I’m good with keeping that consistent here and treating any required adoption as a separate repo-wide follow-up if the team wants it.

Also great to see the wiki_outline / wiki_confluence re-run coming back with 8 passing. 🐇


✏️ Learnings added
Learnt from: mozhaev-dev
URL: https://github.com/constructorfabric/insight/pull/1510

Timestamp: 2026-06-27T12:08:40.406Z
Learning: In this repository's e2e metrics YAML schemas under `src/ingestion/tests/e2e/metrics/schemas`, the established convention is to omit JSON Schema `required` lists and instead use `additionalProperties: false` together with base templates that include every column. Future reviews on similar schema files should not ask for `required` on only a subset of schemas unless proposing a repo-wide convention change.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

mozhaev-dev and others added 2 commits June 30, 2026 12:38
E2E specs for all 4 wiki metrics on IC Bullet Wiki (…0041), one spec per
(connector, metric) — 8 total:
  - wiki_pages_created  (sum, 1/page)
  - wiki_edits          (sum, Σ version_count − 1)
  - wiki_active_authors (active marker; value 1, median 0, range_max = headcount)
  - wiki_comments       (sum, comments attributed to the page author)

Pipeline: bronze_{outline,confluence}.* → {outline,confluence}__wiki_{pages,
engagement} → silver class_wiki_pages / class_wiki_engagement (union_by_tag) →
gold insight.wiki_bullet_rows → IC Bullet Wiki (…0041). Both connectors feed the
SAME silver union, so both connectors' bronze must exist for it to run — this PR
adds placeholders for both even though each spec seeds only its own.

Supporting:
- bronze placeholders: bronze_outline.{wiki_pages,wiki_spaces,wiki_users,
  wiki_comments} + bronze_confluence.{wiki_pages,wiki_spaces,wiki_footer_comments,
  wiki_footer_comment_replies,wiki_inline_comments,wiki_inline_comment_replies}
  (+ schemas/templates for the seeded ones).
- bronze_jira.jira_user placeholder: add the missing `tenant_id` column —
  confluence__wiki_pages' jira_user identity join reads it, and without it the
  model fails to compile on a fresh cluster (latent placeholder gap).
- confluence comment placeholders carry parent_comment_id (the reply-integrity
  singular tests in tests/wiki/ reference it).
- conftest: reset class_wiki_pages / class_wiki_engagement / class_wiki_activity
  at session start (incremental delete+insert unions both connectors → warm-rerun
  determinism). Confluence runs standalone (no Jira) → person_id falls back to
  author_id; specs set author_id to the email so identity resolves to a seeded
  person.

Verified locally: 8 passed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Sergei Mozhaev <mozhaev.dev@gmail.com>
…id schema

- create-bronze-placeholders.sh: add an `else` ALTER branch so a pre-existing
  bronze_jira.jira_user (warm cluster / created earlier by the Jira connector)
  gets `tenant_id` added in place — the `if ! ch_table_exists` create branch is
  skipped for it, and confluence__wiki_pages' jira_user join needs the column.
  Idempotent via ADD COLUMN IF NOT EXISTS.
- bronze_confluence.wiki_footer_comments schema + template: list
  parent_comment_id (the placeholder carries it; additionalProperties:false would
  otherwise reject a fixture that sets it).

Left as-is: no `required:` lists — none of the 16 existing e2e schemas use them
(the convention is additionalProperties:false + base templates that carry every
column), so adding them only here would be inconsistent.

8 passed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Sergei Mozhaev <mozhaev.dev@gmail.com>
@mozhaev-dev
mozhaev-dev force-pushed the test/e2e-wiki-outline branch from 0b75994 to 269dabe Compare June 30, 2026 09:40
@mozhaev-dev
mozhaev-dev merged commit dba9712 into main Jun 30, 2026
18 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.

2 participants