Skip to content

docs: reconcile DATABASE_VIEW_INTELLIGENCE_CATALOG.md view count (96 claimed → 110 actual)#8527

Merged
pethers merged 5 commits intomasterfrom
copilot/reconcile-database-view-discrepancy
Apr 5, 2026
Merged

docs: reconcile DATABASE_VIEW_INTELLIGENCE_CATALOG.md view count (96 claimed → 110 actual)#8527
pethers merged 5 commits intomasterfrom
copilot/reconcile-database-view-discrepancy

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 5, 2026

Description

Full audit of database views against full_schema.sql ground truth revealed the catalog claimed 96 views (68 regular + 28 materialized) but the actual schema contains 110 views (77 regular + 33 materialized). The catalog already had 110 individual view sections—only the summary counts, category tables, and cross-referenced docs were stale.

Key discrepancies:

  • 5 mv_* materialized views (v1.76) never counted
  • 4 politician career/trajectory views missing from category tables
  • 6 election cycle views + 7 seasonal/election year views had no category tables
  • mv_ministry_decision_impact and mv_party_decision_flow uncounted
# Ground truth extraction
grep -cP "^CREATE (OR REPLACE )?(MATERIALIZED )?VIEW public\." full_schema.sql  # → 110

Files updated (7):

  • DATABASE_VIEW_INTELLIGENCE_CATALOG.md — counts, category tables (+23 missing views), new Election Cycle and Seasonal/Election Year categories, document metadata bumped to version 3.0 (2026-04-05), version history 3.0, Current Status validation date updated
  • README.md, INTELLIGENCE_DATA_FLOW.md, CHANGELOG_INTELLIGENCE.md, BUSINESS_PRODUCT_DOCUMENT.md, DATA_ANALYSIS_INTOP_OSINT.md, DATA_QUALITY_MONITORING_DASHBOARD.md — stale count references, broken anchor links, and schema version corrected

Review feedback addressed (15 items across 2 rounds):

Round 1 (9 items):

  • Key Statistics heading date updated (2026-01-19 → 2026-04-05)
  • Intelligence Views count reconciled (7 → 8 to match category table)
  • Materialized Views inventory summary corrected (28 → 33)
  • Point-in-time coverage denominator restored (9/110 → 9/82 for historical accuracy)
  • Document Metadata updated to version 3.0 / 2026-04-05
  • DATA_ANALYSIS_INTOP_OSINT sub-counts corrected (54→77 regular, 28→33 materialized)
  • Broken anchor links removed in INTELLIGENCE_DATA_FLOW.md cross-doc links
  • Broken anchor link removed in DATA_QUALITY_MONITORING_DASHBOARD.md
  • Schema version in dashboard diagram corrected (v1.37 → v1.80)

Round 2 (6 items):

  • Key Statistics: Vote Summary Views 15 → Vote Data Views 16, Document Views 7 → 9 (matches inventory)
  • Current Status Last Validated date updated (2025-11-25 → 2026-04-05)
  • BUSINESS_PRODUCT_DOCUMENT.md: Election Cycle Analysis row count corrected (9 → 3 to match listed views)
  • DATA_ANALYSIS_INTOP_OSINT.md: intelligence views count corrected (7 → 8)
  • BUSINESS_PRODUCT_DOCUMENT.md: reconciled all remaining stale 112 → 110 references (7 locations including Mermaid diagrams, Complete View Reference, White-Label Platform table, and Database Layer references)

Type of Change

Primary Changes

  • 🚀 New Feature
  • 🔄 Enhancement
  • 🐛 Bug Fix
  • 📦 Dependency Update

Political Analysis

  • 📊 Political Data Analysis
    • Party Analysis
    • Committee Processing
    • Government Data
    • Riksdagen Integration
  • 📈 Analytics & Metrics
    • Performance Metrics
    • Risk Assessment
    • Decision Analysis
    • Transparency Metrics

Technical Changes

  • 🎨 UI/UX Changes
    • Layout Updates
    • Form Improvements
    • Visualization Updates
  • 🏗️ Infrastructure
    • Database Changes
    • Performance Optimization
    • Configuration Updates
  • 🔒 Security & Compliance
    • Authentication
    • Authorization
    • Data Protection
  • 📝 Documentation
    • Technical Documentation
    • User Documentation
    • API Documentation
  • ✅ Testing
    • Unit Tests
    • Integration Tests
    • Performance Tests

Impact Analysis

Political Analysis Impact

  • Impact on data quality: No runtime impact—documentation-only
  • Impact on analysis accuracy: Accurate view inventory enables correct JPA entity mapping validation
  • Impact on transparency features: None

Technical Impact

  • Performance impact: None
  • Security implications: None
  • Dependency changes: None

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Political data validation completed
  • Security compliance verified
  • Performance testing completed

Documentation-only change; no code or runtime behavior affected.

Documentation

  • JavaDoc updated
  • README updated
  • API documentation updated
  • Package/module documentation updated
  • Political analysis documentation updated

Screenshots

N/A

Related Issues

Checklist

  • Code follows project coding standards
  • Comments are clear and helpful
  • Documentation is updated
  • Tests are passing
  • Security compliance is maintained
  • Performance impact is acceptable
  • Breaking changes are documented
  • Changes are backward compatible

Additional Notes

Historical changelog entries (version history in the catalog, CHANGELOG_INTELLIGENCE.md release notes) were intentionally left with their original counts since they represent point-in-time snapshots. Cross-document anchor links were simplified to point to the catalog root to avoid breakage from heading changes. All stale "112 views" references in BUSINESS_PRODUCT_DOCUMENT.md (from a prior documentation pass) were corrected to 110 across Mermaid diagrams, tables, and prose.

Security Considerations

  • No sensitive data exposed
  • Security best practices followed
  • Compliance requirements met

Release Notes

Reconciled database view documentation: corrected total view count from 96 to 110 (77 regular + 33 materialized) after full audit against full_schema.sql. Added 23 previously uncounted views to category tables including new Election Cycle (6) and Seasonal/Election Year (7) categories. Updated document metadata to version 3.0, fixed broken cross-document anchor links, and reconciled all stale 112→110 references in BUSINESS_PRODUCT_DOCUMENT.md.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA ec7a227.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

…ed) verified against full_schema.sql

Agent-Logs-Url: https://github.com/Hack23/cia/sessions/a912fc77-6eb0-4480-bf8a-ac8d33d14792

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
…T_DOCUMENT.md

Agent-Logs-Url: https://github.com/Hack23/cia/sessions/a912fc77-6eb0-4480-bf8a-ac8d33d14792

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI changed the title [WIP] Reconcile DATABASE_VIEW_INTELLIGENCE_CATALOG.md view count discrepancy docs: reconcile DATABASE_VIEW_INTELLIGENCE_CATALOG.md view count (96 claimed → 110 actual) Apr 5, 2026
Copilot AI requested a review from pethers April 5, 2026 19:04
@pethers pethers requested a review from Copilot April 5, 2026 19:22
@pethers pethers marked this pull request as ready for review April 5, 2026 19:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Documentation reconciliation to align all view-count references with full_schema.sql ground truth (110 total views: 77 regular + 33 materialized), ensuring consistent cross-document navigation and metrics for the CIA platform’s intelligence layer.

Changes:

  • Updated view totals and category distributions across core intelligence documentation.
  • Expanded/adjusted view category breakdowns (incl. election cycle and seasonal/election-year categories) in the catalog and data-flow mapping.
  • Refreshed cross-referenced docs that previously cited stale totals.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
README.md Updates high-level README references to the correct total view count.
INTELLIGENCE_DATA_FLOW.md Updates view totals and category table to reflect the audited inventory.
DATABASE_VIEW_INTELLIGENCE_CATALOG.md Updates executive summary, key stats, inventory/category counts, and validation history to 110 views.
DATA_QUALITY_MONITORING_DASHBOARD.md Updates dashboard metrics and architecture diagrams to the corrected view totals.
DATA_ANALYSIS_INTOP_OSINT.md Updates analysis doc references to the corrected total view count.
CHANGELOG_INTELLIGENCE.md Updates changelog references to the correct view inventory size.
BUSINESS_PRODUCT_DOCUMENT.md Updates business documentation references to the corrected distinct view total.
Comments suppressed due to low confidence (2)

INTELLIGENCE_DATA_FLOW.md:101

  • The data-flow diagram header was updated to "Database Views - 110 Total", but the category nodes inside the same subgraph still show the old per-category counts (e.g., Politician 8, Party 12, Vote Data 20, etc.). Please update the node counts (and consider adding the new Election Cycle / Seasonal categories if they’re part of the 110) so the diagram matches the revised catalog numbers.
    subgraph DATABASE["🗄️ Database Views - 110 Total"]
        direction LR
        V1["<b>Politician Views</b><br/>8 views<br/>Performance tracking"]
        V2["<b>Party Views</b><br/>12 views<br/>Party analytics"]
        V3["<b>Committee Views</b><br/>12 views<br/>Legislative work"]
        V4["<b>Ministry Views</b><br/>7 views<br/>Government oversight"]
        V5["<b>Vote Data Views</b><br/>20 views<br/>Voting patterns"]
        V6["<b>Document Views</b><br/>7 views<br/>Legislative output"]
        V7["<b>Intelligence Views</b><br/>6 views<br/>Risk & anomaly"]

BUSINESS_PRODUCT_DOCUMENT.md:154

  • This section updates the distinct view total to 110, but the validation line still says "✅ Validated 2026-01-19 (v1.61)". Please update the validation date/version to match the new 2026-04-05 audit (v1.80) so consumers don’t assume the category counts were validated under the older schema.
**Total Database Views:** 110 (77 regular + 33 materialized)

_Note: Category view counts above are not mutually exclusive; a single database view may support multiple intelligence frameworks and can therefore appear in more than one category. The total of 110 refers to distinct database views._

**Framework Coverage:** All 6 intelligence frameworks comprehensively supported  
**Documentation:** 100% coverage in [DATABASE_VIEW_INTELLIGENCE_CATALOG.md](DATABASE_VIEW_INTELLIGENCE_CATALOG.md)  
**Validation Status:** ✅ Validated 2026-01-19 (v1.61)

**Note**: Total view count remains 96. Four views (party_summary, party_longitudinal_performance, party_coalition_evolution, party_electoral_trends) were recreated in v1.61 after being dropped in v1.53/v1.6 but never recreated, causing JPA entity mismatch.
**Note**: Total view count updated from 96 to 110 after full audit against full_schema.sql (v1.80). Added 5 new-style materialized views (mv_*), 4 career/trajectory politician views, 7 seasonal/election year views, and 1 decision temporal trends view that were previously undercounted. Four views (party_summary, party_longitudinal_performance, party_coalition_evolution, party_electoral_trends) were recreated in v1.61 after being dropped in v1.53/v1.6 but never recreated, causing JPA entity mismatch.

### Key Statistics (UPDATED 2026-01-19)
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The heading still says "Key Statistics (UPDATED 2026-01-19)" even though the surrounding summary states the full audit/validation happened 2026-04-05 (v1.80). Updating this heading (and thus its generated anchor) will avoid confusing timestamps and broken deep-links from other docs.

Suggested change
### Key Statistics (UPDATED 2026-01-19)
### Key Statistics (UPDATED 2026-04-05)

Copilot uses AI. Check for mistakes.
| **Views Documented (Detailed)** | 15 | ✅ Views with comprehensive examples and performance characteristics |
| **Views Documented (Structured)** | 95 | Purpose, metrics, queries, product mappings |
| **Documentation Coverage** | 100% | All 110 views documented |
| **Intelligence Views** | 7 | Advanced analytical views (risk, anomaly, influence, crisis, momentum, dashboard, temporal trends) |
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

Key Statistics lists Intelligence Views as 7, but the inventory section shows "Intelligence & Risk Views (8 views)" (and includes two temporal-trends views). Please reconcile this count so category totals are consistent within the catalog.

Suggested change
| **Intelligence Views** | 7 | Advanced analytical views (risk, anomaly, influence, crisis, momentum, dashboard, temporal trends) |
| **Intelligence Views** | 8 | Advanced analytical views (risk, anomaly, influence, crisis, momentum, dashboard, temporal trends) |

Copilot uses AI. Check for mistakes.
**Detailed Documentation (📖):** 15
**Structured Documentation (📝):** 95
**Documentation Coverage:** 100%
**Materialized Views:** 28
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The inventory summary still states "Materialized Views: 28" even though the catalog now claims 33 materialized views (28 legacy + 5 mv_*). This should be updated to avoid conflicting totals on the same page.

Suggested change
**Materialized Views:** 28
**Materialized Views:** 33

Copilot uses AI. Check for mistakes.
The documentation achieved 100% coverage through systematic validation and remediation:

- **2025-11-20**: Initial validation revealed 10.98% coverage (9/82 views)
- **2025-11-20**: Initial validation revealed 10.98% coverage (9/110 views)
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

In Coverage Progression, the initial validation is described as "10.98% coverage (9/110 views)", but the Historical Validations table directly above states there were 82 total views on 2025-11-20. The denominator should match the point-in-time total (likely 9/82) to keep the history internally consistent.

Suggested change
- **2025-11-20**: Initial validation revealed 10.98% coverage (9/110 views)
- **2025-11-20**: Initial validation revealed 10.98% coverage (9/82 views)

Copilot uses AI. Check for mistakes.
Comment on lines 8369 to 8375
**Last Updated:** 2025-12-10
**Last Validated Against Schema:** 2025-11-25
**Last Validated Against Schema:** 2026-04-05
**Next Review:** 2025-12-25 (monthly review recommended)
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

Document Metadata still shows Version 2.2 / Date 2025-12-10 / Last Updated 2025-12-10, but this PR adds a 3.0 change-log entry dated 2026-04-05 and updates counts to v1.80. Please update metadata fields (version/date/last-updated/next-review) so the document header reflects the current revision.

Copilot uses AI. Check for mistakes.
Comment on lines 63 to 64
- **Regular Views**: 54 views (100% documented)
- **Materialized Views**: 28 views (100% documented)
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

This section updates the total to 110 views, but the breakdown directly below still states 54 regular + 28 materialized. Please update these sub-counts to match the new totals (77 regular + 33 materialized) to avoid contradictory metrics in the same summary.

Suggested change
- **Regular Views**: 54 views (100% documented)
- **Materialized Views**: 28 views (100% documented)
- **Regular Views**: 77 views (100% documented)
- **Materialized Views**: 33 views (100% documented)

Copilot uses AI. Check for mistakes.
Comment on lines +431 to +434
| **Intelligence Views** | 8 | Pattern, Predictive, All | ⭐⭐⭐⭐⭐ VERY HIGH | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#intelligence--risk-views) |
| **Election Cycle Views** | 6 | Temporal, Predictive, Network | ⭐⭐⭐⭐⭐ VERY HIGH | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#election-cycle-views) |
| **Seasonal/Election Year Views** | 7 | Temporal, Pattern | ⭐⭐⭐⭐ HIGH | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#seasonal--election-year-views) |
| **Application Views** | 14 | Temporal, Pattern | ⭐⭐ LOW | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#application--audit-views) |
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

Several documentation links in the category summary table appear to use anchors that don’t exist in DATABASE_VIEW_INTELLIGENCE_CATALOG.md (e.g., #intelligence--risk-views, #election-cycle-views, #seasonal--election-year-views). Please update these to the actual section anchors in the catalog (or add stable headings/anchors in the catalog) so the links resolve correctly.

Suggested change
| **Intelligence Views** | 8 | Pattern, Predictive, All | ⭐⭐⭐⭐⭐ VERY HIGH | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#intelligence--risk-views) |
| **Election Cycle Views** | 6 | Temporal, Predictive, Network | ⭐⭐⭐⭐⭐ VERY HIGH | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#election-cycle-views) |
| **Seasonal/Election Year Views** | 7 | Temporal, Pattern | ⭐⭐⭐⭐ HIGH | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#seasonal--election-year-views) |
| **Application Views** | 14 | Temporal, Pattern | ⭐⭐ LOW | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#application--audit-views) |
| **Intelligence Views** | 8 | Pattern, Predictive, All | ⭐⭐⭐⭐⭐ VERY HIGH | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md) |
| **Election Cycle Views** | 6 | Temporal, Predictive, Network | ⭐⭐⭐⭐⭐ VERY HIGH | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md) |
| **Seasonal/Election Year Views** | 7 | Temporal, Pattern | ⭐⭐⭐⭐ HIGH | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md) |
| **Application Views** | 14 | Temporal, Pattern | ⭐⭐ LOW | [View Docs](DATABASE_VIEW_INTELLIGENCE_CATALOG.md) |

Copilot uses AI. Check for mistakes.
| **[OSINT Data Analysis](DATA_ANALYSIS_INTOP_OSINT.md)** | 🎯 OSINT Quality | Source data quality metrics, 6 analytical frameworks | [View](DATA_ANALYSIS_INTOP_OSINT.md#core-platform-metrics-verified-2025-11-28) |
| **[Schema Maintenance Guide](service.data.impl/README-SCHEMA-MAINTENANCE.md)** | 🔧 Health Checks | Database health check procedures, validation scripts | [View](service.data.impl/README-SCHEMA-MAINTENANCE.md#health-check-and-validation) |
| **[View Intelligence Catalog](DATABASE_VIEW_INTELLIGENCE_CATALOG.md)** | 🗄️ View Validation | 84 database views catalog with validation status | [View](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#key-statistics-reverified-2025-11-25) |
| **[View Intelligence Catalog](DATABASE_VIEW_INTELLIGENCE_CATALOG.md)** | 🗄️ View Validation | 110 database views catalog with validation status | [View](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#key-statistics-updated-v180) |
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

This link points to DATABASE_VIEW_INTELLIGENCE_CATALOG.md#key-statistics-updated-v180, but the catalog’s Key Statistics heading currently generates a different anchor (and there is no explicit key-statistics-updated-v180 anchor). Please update the link target (or add a stable anchor in the catalog) to avoid a broken cross-reference.

Suggested change
| **[View Intelligence Catalog](DATABASE_VIEW_INTELLIGENCE_CATALOG.md)** | 🗄️ View Validation | 110 database views catalog with validation status | [View](DATABASE_VIEW_INTELLIGENCE_CATALOG.md#key-statistics-updated-v180) |
| **[View Intelligence Catalog](DATABASE_VIEW_INTELLIGENCE_CATALOG.md)** | 🗄️ View Validation | 110 database views catalog with validation status | [View](DATABASE_VIEW_INTELLIGENCE_CATALOG.md) |

Copilot uses AI. Check for mistakes.
│ - 93 tables, 84 views (56 regular + 28 mat views) │
│ - 93 tables, 110 views (77 regular + 33 mat views) │
│ - 20 GB, 5.6M rows │
│ - Schema v1.37 with health monitoring │
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The diagram now states 110 views, but still labels the schema as "v1.37". Elsewhere in this PR the view audit is tied to v1.80; please reconcile the schema version shown here (either update to the current schema version or clarify that the diagram reflects an older snapshot).

Suggested change
│ - Schema v1.37 with health monitoring │
│ - Schema v1.80 with health monitoring │

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 5, 2026

@copilot apply changes based on the comments in this thread

…ncile Intelligence Views count (7→8), fix materialized count (28→33), correct point-in-time denominator (9/82), update document metadata to v3.0, fix DATA_ANALYSIS sub-counts (54→77, 28→33), remove broken anchors in cross-doc links, update schema version (v1.37→v1.80)

Agent-Logs-Url: https://github.com/Hack23/cia/sessions/2d87c40f-c630-4aa4-97ce-c9c715b9eebe

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 5, 2026

@copilot apply changes based on the comments in this thread

Applied all 9 review comments in commit 3716800:

  1. Key Statistics heading date → 2026-04-05
  2. Intelligence Views count 7 → 8 (matches category table)
  3. Materialized Views inventory summary 28 → 33
  4. Point-in-time coverage denominator restored to 9/82
  5. Document Metadata updated to version 3.0 / 2026-04-05
  6. DATA_ANALYSIS_INTOP_OSINT sub-counts: 54→77 regular, 28→33 materialized
  7. Removed broken anchor fragments in INTELLIGENCE_DATA_FLOW.md links
  8. Removed broken anchor in DATA_QUALITY_MONITORING_DASHBOARD.md link
  9. Schema version in dashboard diagram v1.37 → v1.80

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

INTELLIGENCE_DATA_FLOW.md:103

  • In the Mermaid diagram, the per-category view counts (V1–V8) still show the old numbers (e.g., Politician 8, Party 12, Ministry 7, Vote 20, etc.) and don’t include the new Election Cycle / Seasonal categories. This makes the diagram inconsistent with the updated 110-total and the summary table below; update the node counts (and add nodes if needed) to match the new category totals.
    subgraph DATABASE["🗄️ Database Views - 110 Total"]
        direction LR
        V1["<b>Politician Views</b><br/>8 views<br/>Performance tracking"]
        V2["<b>Party Views</b><br/>12 views<br/>Party analytics"]
        V3["<b>Committee Views</b><br/>12 views<br/>Legislative work"]
        V4["<b>Ministry Views</b><br/>7 views<br/>Government oversight"]
        V5["<b>Vote Data Views</b><br/>20 views<br/>Voting patterns"]
        V6["<b>Document Views</b><br/>7 views<br/>Legislative output"]
        V7["<b>Intelligence Views</b><br/>6 views<br/>Risk & anomaly"]
        V8["<b>Application Views</b><br/>10 views<br/>Platform usage"]
    end

Comment on lines +42 to +46
**Last Updated:** 2026-04-05 (Full audit: corrected view count from 96 to 110 — 77 regular + 33 materialized — verified against full_schema.sql)
**Last Validated**: 2026-04-05 (v1.80 with 110 views)
**Validation Method**: Automated schema validation via validate-view-documentation.sh
**Schema Source**: service.data.impl/src/main/resources/full_schema.sql + db-changelog-1.61.xml
**Documentation Coverage**: 100% (96/96 views)
**Schema Source**: service.data.impl/src/main/resources/full_schema.sql + db-changelog-1.80.xml
**Documentation Coverage**: 100% (110/110 views)
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The file’s metadata is internally inconsistent: this section states Last Updated/Validated 2026-04-05 (v1.80), but the document header at the top still shows an older Last Updated date/version. Please reconcile the top-of-file metadata block with the new document metadata/versioning used elsewhere in this update.

Copilot uses AI. Check for mistakes.
Comment on lines 69 to 71
| **Vote Summary Views** | 15 | Daily, weekly, monthly, annual ballot summaries (ballot, party, politician) |
| **Application Event Views** | 12 | User behavior tracking (daily, weekly, monthly, annual) |
| **Document Views** | 7 | Politician and party document productivity |
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

Key Statistics counts don’t match the inventory below: the inventory lists Document Views as 9 and Vote Data Views as 16, but this table still shows Document Views = 7 and only references Vote Summary Views = 15. Please update/rename these metrics so the counts align with the documented category totals.

Suggested change
| **Vote Summary Views** | 15 | Daily, weekly, monthly, annual ballot summaries (ballot, party, politician) |
| **Application Event Views** | 12 | User behavior tracking (daily, weekly, monthly, annual) |
| **Document Views** | 7 | Politician and party document productivity |
| **Vote Data Views** | 16 | Daily, weekly, monthly, annual ballot and voting data summaries (ballot, party, politician) |
| **Application Event Views** | 12 | User behavior tracking (daily, weekly, monthly, annual) |
| **Document Views** | 9 | Politician and party document productivity |

Copilot uses AI. Check for mistakes.
Comment on lines 125 to 131
### Current Status

**Last Validated**: 2025-11-25
**Validation Method**: Automated schema validation via validate-view-documentation.sh
**Schema Source**: service.data.impl/src/main/resources/full_schema.sql
**Coverage**: 100% (84/84 views documented)
**Coverage**: 100% (110/110 views documented)
**Health Score**: 82/100 (per schema-health-check.sql)
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The “Current Status” block still says “Last Validated: 2025-11-25”, which contradicts the earlier 2026-04-05 validation/date updates and the added 2026-04-05 entry in the validation history. Update this block so it reflects the current audit/validation date.

Copilot uses AI. Check for mistakes.
@@ -126,7 +126,7 @@ This section provides direct links to JSON specifications defining the data stru
| **Election Cycle Analysis (v1.59-v1.60)** | [intelligence-schema.md](json-export-specs/schemas/intelligence-schema.md) | `view_riksdagen_election_proximity_trends`, `view_riksdagen_election_year_behavioral_patterns`, `view_riksdagen_pre_election_quarterly_activity` | Weekly | 9 election views |
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The “Election Cycle Analysis (v1.59-v1.60)” row lists 3 primary views but claims “9 election views”. This count appears inconsistent with the updated catalog’s election/seasonal view inventory; adjust the number (or clarify what it’s counting) to avoid misleading totals.

Suggested change
| **Election Cycle Analysis (v1.59-v1.60)** | [intelligence-schema.md](json-export-specs/schemas/intelligence-schema.md) | `view_riksdagen_election_proximity_trends`, `view_riksdagen_election_year_behavioral_patterns`, `view_riksdagen_pre_election_quarterly_activity` | Weekly | 9 election views |
| **Election Cycle Analysis (v1.59-v1.60)** | [intelligence-schema.md](json-export-specs/schemas/intelligence-schema.md) | `view_riksdagen_election_proximity_trends`, `view_riksdagen_election_year_behavioral_patterns`, `view_riksdagen_pre_election_quarterly_activity` | Weekly | 3 election views |

Copilot uses AI. Check for mistakes.
**View Dependencies**:
- 84 database views available (56 regular + 28 materialized)
- 110 database views available (77 regular + 33 materialized)
- 7 intelligence-specific views (risk, anomaly, influence, crisis, momentum, dashboard, temporal trends)
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

This section now states 110 total views, but still claims “7 intelligence-specific views …”. The updated view catalog lists 8 “Intelligence & Risk Views”; please reconcile this count (and/or the list description) so it matches the authoritative catalog.

Suggested change
- 7 intelligence-specific views (risk, anomaly, influence, crisis, momentum, dashboard, temporal trends)
- 8 intelligence & risk views (see `DATABASE_VIEW_INTELLIGENCE_CATALOG.md` for the authoritative catalog and validation history)

Copilot uses AI. Check for mistakes.
Comment on lines +129 to 132
#### Database View Categories (110 Total Views)

**View Distribution by Intelligence Framework:**

Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

Within this section, the heading/table was updated to 110 total views, but earlier in the same “Product-to-Data Mapping” area the “Complete View Reference” sentence still claims 112 views. Please update that earlier statement to 110 so the document doesn’t contradict itself.

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 5, 2026

@copilot apply changes based on the comments in this thread

…pdate Current Status date, fix election view count (9→3), fix intelligence views (7→8), reconcile all stale 112→110 references in BUSINESS_PRODUCT_DOCUMENT.md

Agent-Logs-Url: https://github.com/Hack23/cia/sessions/7aca9138-6dfa-4389-a7d2-04459fe95979

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 5, 2026

@copilot apply changes based on the comments in this thread

Applied all 6 round-2 review comments in commit ec7a227:

  1. Key Statistics: Vote Summary Views 15 → Vote Data Views 16, Document Views 7 → 9 (matches inventory)
  2. Current Status Last Validated: 2025-11-25 → 2026-04-05
  3. Election Cycle Analysis row: 9 election views → 3 (matches listed views)
  4. DATA_ANALYSIS_INTOP_OSINT: 7 intelligence views → 8 intelligence & risk views
  5. BUSINESS_PRODUCT_DOCUMENT: reconciled all remaining stale 112 → 110 references (7 locations including Mermaid diagrams and Complete View Reference)

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 5, 2026

@pethers pethers merged commit 8683717 into master Apr 5, 2026
12 checks passed
@pethers pethers deleted the copilot/reconcile-database-view-discrepancy branch April 5, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconcile DATABASE_VIEW_INTELLIGENCE_CATALOG.md view count discrepancy (96 claimed vs ~31 found in changelogs)

3 participants