Skip to content

Session 16: ClickHouse parity audit and documentation hardening - #33

Merged
tomtom215 merged 2 commits into
mainfrom
claude/review-documentation-HJaS1
Feb 17, 2026
Merged

Session 16: ClickHouse parity audit and documentation hardening#33
tomtom215 merged 2 commits into
mainfrom
claude/review-documentation-HJaS1

Conversation

@tomtom215

Copy link
Copy Markdown
Owner

Summary

Rigorous verification of ClickHouse parity claims against official documentation, with corrections to mode semantics and comprehensive documentation updates. Discovered and fixed 'strict_deduplication' mode mapping, clarified behavioral vs. non-behavioral parametric functions, and hardened quality standards with mandatory session protocol.

Changes

  • Fixed 'strict_deduplication' mode mapping: Corrected parse_mode_str so both 'strict' and 'strict_deduplication' SQL strings map to STRICT (0x01), matching ClickHouse's behavior where these are aliases. The timestamp-based deduplication mode is now available as 'timestamp_dedup' (extension-only mode).

  • Clarified mode semantics in window_funnel.rs: Updated documentation to distinguish between five ClickHouse-compatible modes (STRICT, STRICT_ORDER, STRICT_INCREASE, STRICT_ONCE, ALLOW_REENTRY) and one extension mode (STRICT_DEDUPLICATION / 'timestamp_dedup'). Rewrote mode descriptions to match ClickHouse's actual behavior (e.g., STRICT prevents "previously-matched condition firing again" rather than "condition i-1 must not fire").

  • Added non-behavioral parametric functions scope clarification: New section in clickhouse-compatibility.md documenting the four non-behavioral parametric functions (histogram, uniqUpTo, sumMapFiltered, sumMapFilteredWithOverflow) with detailed rationale for why they are out of scope. Includes precise definition of "behavioral analytics functions" (sequences of user actions over time, requiring timestamps).

  • Hardened quality standards in CLAUDE.md: Added mandatory requirements section (zero test failures, zero clippy warnings, zero formatting violations, zero doc errors), anti-patterns list (no unverified claims, no guessed semantics), and formal session protocol (read docs, establish baseline, verify claims, update documentation).

  • Updated test count documentation: Corrected test count from 434 to 435 (one additional test added in Session 16).

  • Updated CHANGELOG.md: Added entries for 'timestamp_dedup' mode string and mandatory session protocol.

  • Updated FAQ and function documentation: Clarified mode availability (5 ClickHouse + 1 extension) and corrected strict_deduplication description in window-funnel.md and faq.md.

  • Added WEB_ANALYTICS_PLAN.md: Comprehensive project plan for a DuckDB-based web analytics platform (Webfoot) showcasing the behavioral extension. Includes architecture, technology stack (Axum, Parquet, Preact), feature roadmap (MVP → behavioral analytics → production hardening → ecosystem), data model, SQL query examples, and 8-week development plan.

Testing

  • cargo test passes (435 unit tests + 1 doc-test)
  • cargo clippy --all-targets produces zero warnings
  • cargo fmt -- --check passes
  • cargo doc --no-deps builds without errors or warnings
  • All claims in CLAUDE.md verified against actual code state

Notes

Session 16 focused on rigorous verification against official ClickHouse documentation. The 'strict_deduplication' fix corrects a semantic error where the mode was previously mapped to timestamp-based deduplication instead of the ClickHouse-compatible "prevent backward movement" behavior. The WEB_ANALYTICS_PLAN.md is a comprehensive specification for a production-ready analytics platform that demonstrates real-world usage of the behavioral extension, serving as both a reference implementation and a deployment option for users.

https://claude.ai/code/session_01MvYKE1YxJC564kEQCkq3HL

…ntation hardening

Audit ClickHouse parity against official parametric functions documentation.
Fix strict_deduplication mode mapping to match ClickHouse semantics (alias
for strict). Add quality standards, session protocol, and web analytics
project plan.

Changes:
- Fix FunnelMode::parse_mode_str: 'strict_deduplication' now maps to STRICT
  (0x01), matching ClickHouse where it is an alias for 'strict'. The previous
  timestamp-based dedup behavior is now available as 'timestamp_dedup'.
- Update FunnelMode Display: STRICT_DEDUPLICATION displays as 'timestamp_dedup'
- Add test_parse_modes_all_modes_including_extensions test (435 total)
- Update CLAUDE.md: precise ClickHouse parity scope table, mode mapping
  details, extensions list, known semantic differences, mandatory session
  protocol, anti-pattern list, Session 16 entry
- Update clickhouse-compatibility.md: non-behavioral function scope table,
  semantic difference notes, extensions section
- Update window-funnel.md, faq.md: corrected mode tables
- Update CHANGELOG.md: strict_deduplication mapping change
- Update SQL test comment for strict_deduplication
- Add WEB_ANALYTICS_PLAN.md: comprehensive project plan for DuckDB-based
  web analytics showcasing the behavioral extension

Verified: 435 tests + 1 doc-test pass, zero clippy warnings, zero fmt issues.

https://claude.ai/code/session_01MvYKE1YxJC564kEQCkq3HL
…plan details

- clickhouse-compatibility.md: Replace terse scope table with rigorous
  per-function analysis (signature, return type, what it does, why not
  behavioral) for all 4 out-of-scope functions
- CLAUDE.md: Expand scope table with per-function detail and link to
  full justification document
- WEB_ANALYTICS_PLAN.md: Add tiered project name candidates with
  availability verification, framework evaluation (Axum selected),
  quality standards matching duckdb-behavioral, CI/CD pipeline
  requirements, testing requirements, updated sprint plans

https://claude.ai/code/session_01MvYKE1YxJC564kEQCkq3HL
@tomtom215
tomtom215 merged commit c4ada2c into main Feb 17, 2026
19 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