Skip to content

[claude] Move benchmarks-website planning docs into code comments#7810

Merged
connortsui20 merged 3 commits intodevelopfrom
claude/vortex-v3-quality-pass-jbkRO
May 6, 2026
Merged

[claude] Move benchmarks-website planning docs into code comments#7810
connortsui20 merged 3 commits intodevelopfrom
claude/vortex-v3-quality-pass-jbkRO

Conversation

@connortsui20
Copy link
Copy Markdown
Contributor

Summary

This PR consolidates the benchmarks-website v3 planning documentation from the planning/ directory into inline code comments and a top-level README.md, making the architecture and wire contracts discoverable alongside the implementation.

Changes:

  • Removed planning/ directory (00-overview.md, 01-schema.md, 02-contracts.md, AGENTS.md, README.md, decisions.md, deferred.md, benchmark-mapping.md, components/*.md)
  • Added benchmarks-website/README.md with v2/v3 architecture overview and deployment notes
  • Added benchmarks-website/AGENTS.md with contributor guidelines for the v3 codebase
  • Migrated schema design principles and column contracts from 01-schema.md into server/src/schema.rs doc comments
  • Migrated wire-format contracts from 02-contracts.md into server/src/records.rs and vortex-bench/src/v3.rs doc comments
  • Migrated ingest handler details into server/src/ingest.rs doc comments
  • Updated module-level docs in server/src/lib.rs, server/src/db.rs, server/src/slug.rs, server/src/error.rs, server/src/app.rs, server/src/api/mod.rs, server/src/api/dto.rs, migrate/src/v2.rs, migrate/src/classifier.rs, migrate/src/commits.rs, migrate/src/verify.rs, and vortex-bench/src/datasets/mod.rs to reference the new doc locations and clarify their roles
  • Made test helper visibility explicit in server/tests/common/mod.rs (pub → pub(crate))

The planning docs were comprehensive but lived outside the codebase, making them easy to miss during development and harder to keep in sync with implementation. This change embeds the essential contracts and design rationale where developers will encounter them: in the module docs and type definitions they're working with.

Testing

Existing tests pass. No functional changes to the server, migrator, or emitter — only documentation reorganization and visibility adjustments.

https://claude.ai/code/session_012kmSMpZiKfQcHw3PedaFR4

claude added 2 commits May 6, 2026 04:09
Replace the nine-file `benchmarks-website/planning/` directory with
project-level READMEs and module-level `//!` docs anchored to the code
they describe.

- New `benchmarks-website/README.md` is the v3 entry point: side-by-side
  with v2 explanation, architecture summary, route table, local-dev and
  deployment recipes, and the cutover plan.
- New `benchmarks-website/AGENTS.md` carries just the still-load-bearing
  agent norms (don't touch v2, don't add a server-side classifier, the
  tooltip / slider / wheel-pan footguns).
- `server/src/lib.rs` gains a crate-level module map + request-flow
  walkthrough (was: components/server.md).
- `server/src/schema.rs` gains the full design-principles + per-table
  contract walkthrough (was: 01-schema.md).
- `server/src/records.rs` and `server/src/ingest.rs` gain the wire
  envelope + HTTP-matrix docs (was: 02-contracts.md).
- `vortex-bench/src/v3.rs` gains the producer mapping + per-binary
  inventory + per-suite query dim values table (was: benchmark-mapping.md
  and components/emitter.md).
- The TODO breadcrumb on `api::charts::collect_group_charts` is rewritten
  to match the way the user already tracks the N+1 follow-up; the
  removed `planning/README.md` cross-reference goes away.
- Decisions from `decisions.md` are folded into the relevant module
  doc where they still drive current behavior; everything else (alpha
  history, deferred phase-2 items) is dropped.

Signed-off-by: Claude <noreply@anthropic.com>
…docs

Pre-cutover quality pass on `server/` and `migrate/`:

- `server/tests/common/mod.rs`: drop the 18 `unreachable_pub` warnings
  per integration-test binary by switching every shared helper to
  `pub(crate)`. The `#![allow(dead_code)]` stays — different test
  binaries still use different subsets.
- `server/src/db.rs`: hoist the six function-scoped `use std::hash::Hasher`
  statements to the module top, and add doc comments on `finish` and
  `hasher_for` explaining why each exists.
- `server/src/{records, app, ingest}.rs` and `migrate/src/{classifier,
  commits, v2, verify}.rs`: every previously-undocumented `pub` field
  on the wire / state structs now carries a single-line `///` doc.
  Field semantics (units, encoding, role) that were only implicit in
  the field name are now explicit.
- `server/src/main.rs`: document the four environment variables
  (`INGEST_BEARER_TOKEN`, `VORTEX_BENCH_DB`, `VORTEX_BENCH_BIND`,
  `VORTEX_BENCH_LOG`) on the binary's `//!` doc.
- `server/src/{slug, error}.rs`: remove the last `planning/*.md`
  cross-references, replacing them with the [`crate::*`] links that
  point at the live source of truth.
- `static/chart-init.js`: fix the stale `server/src/html.rs` references
  in two comment blocks (the file is now `server/src/html/mod.rs`),
  rebuild the file map at the top to match the actual section
  ordering, and add the two canvas state contract entries
  (`__bench_display_unit`, `__bench_y_user_set`) that the orientation
  comment had drifted from.

Verification:

- `cargo clippy -p vortex-bench-server -p vortex-bench-migrate --all-targets
  --all-features -- -W dead_code -W unreachable_pub -W unused_imports`
  → 0 warnings.
- `cargo test -p vortex-bench-server -p vortex-bench-migrate` → all 140+
  tests pass.
- `cargo test --doc -p vortex-bench-server -p vortex-bench-migrate` → 0
  failures.
- No snapshot regenerated.
- v2 site files (`server.js`, `src/`, `package.json`, etc.) untouched.

Signed-off-by: Claude <noreply@anthropic.com>
@connortsui20 connortsui20 changed the title Move benchmarks-website planning docs into code comments [claude] Move benchmarks-website planning docs into code comments May 6, 2026
@connortsui20 connortsui20 added the changelog/skip Do not list PR in the changelog label May 6, 2026
…gration

Doc-accuracy nits surfaced in review of #7810. No behavior changes.

- `vortex-bench/src/datasets/mod.rs::Dataset::v3_dataset_dims`: drop the
  stale "Public-BI emits dataset = public-bi, dataset_variant = …"
  example. The only override (`PBIBenchmark::v3_dataset_dims`) actually
  returns `(&self.name, None)` to match the migrate classifier — the
  parent-namespace framing was historical. Reword to "Override only when
  a suite needs a different dataset name on the wire than its `name()`
  returns."
- `query_idx` field doc on both `vortex-bench/src/v3.rs` and
  `server/src/records.rs`: drop the "1-based" claim. Query indices are
  whatever the producing bench loop happens to use (ClickBench is
  0-based, others vary); both sides agree only because the migrate
  classifier parses literal digits out of `q07`-style v2 chart names.
- `server/src/app.rs`: add `/api/group/{slug}` to the read-API line; the
  router wires it but the module doc had drifted.
- `server/src/api/charts.rs::collect_group_charts`: re-introduce a
  `TODO(#7812):` marker so the N+1 follow-up is grep-discoverable.
  Tracking issue: #7812
- `benchmarks-website/README.md`: rewrite the cutover-plan bullet to
  reflect that v3 runs alongside v2 on the same EC2 host (v2 on `:80`,
  v3 on `:3001`), per `docker-compose.yml` and `ec2-init.txt`. The
  earlier "separate EC2 host" claim was stale.
- `server/src/ingest.rs`: add the missing 400 row for the older-than-
  expected `schema_version` case to the HTTP matrix table.
- `vortex-bench/src/v3.rs`: drop the `[`canonical_tpc_scale_factor`]`
  intra-doc link in the new dim-mapping table — the function is
  private, so `RUSTDOCFLAGS="-D warnings" cargo doc` rejected it.
- `server/src/lib.rs`: rename "PNGs" to "logos" in the route table —
  typos parsed "PN" inside "PNGs" as a typo of "ON" and failed
  `Spell Check with Typos`.

Verification:

- `cargo +nightly fmt --all`
- `cargo build -p vortex-bench-server -p vortex-bench-migrate` → clean.
- `cargo test -p vortex-bench-server -p vortex-bench-migrate` → all
  140+ tests pass.
- `cargo clippy --all-targets --all-features
   -p vortex-bench-server -p vortex-bench-migrate
   -- -W dead_code -W unreachable_pub -W unused_imports` → 0 warnings.
- `RUSTDOCFLAGS="-D warnings" cargo doc --no-deps -p vortex-bench
   -p vortex-bench-server -p vortex-bench-migrate` → clean.
- `typos .` → 0 hits.

Signed-off-by: Claude <noreply@anthropic.com>
@connortsui20 connortsui20 enabled auto-merge (squash) May 6, 2026 15:23
@connortsui20 connortsui20 merged commit aab4c34 into develop May 6, 2026
66 of 67 checks passed
@connortsui20 connortsui20 deleted the claude/vortex-v3-quality-pass-jbkRO branch May 6, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/skip Do not list PR in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants