Skip to content

[test-qa-hourly] test: preserve legacy waitlist attribution - #433

Merged
i-xtsu-sixyou-ken-mei merged 7 commits into
mainfrom
test-qa/ongoing-coverage-20260909
Sep 9, 2026
Merged

[test-qa-hourly] test: preserve legacy waitlist attribution#433
i-xtsu-sixyou-ken-mei merged 7 commits into
mainfrom
test-qa/ongoing-coverage-20260909

Conversation

@i-xtsu-sixyou-ken-mei

Copy link
Copy Markdown
Collaborator

Intent

Continue continuous QA from current main with one small regression test for legacy waitlist attribution rows.

Inspection

QA change

Add waitlist-growth-legacy-language.test.ts to assert that a signup referencing a valid legacy social publish job remains socially attributed even when that job has no language_code and no social_post_id. The conversion must remain present with languageCode = unknown, null views/rate, and the signup must not be misclassified as direct/unknown traffic.

This is test-only. No implementation, workflow, docs, ignore, coverage threshold, or agent-instruction change is included.

Validation / commands and results

  • GitHub fetch_commit_workflow_runs for previous QA head — PASS: CI #2443 completed successfully.
  • Source review of waitlist-growth.ts — PASS: current implementation explicitly preserves canonical job attribution while mapping nullable legacy metadata safely.
  • Existing regression test review — PASS: this exact legacy metadata case was not directly asserted.
  • .github/workflows/ci.yml inspection — PASS: existing gates unchanged.
  • scripts/coverage.sh inspection — PASS: coverage aggregation path remains available.
  • Focused local test / broader test, lint, typecheck, coverage — not executable in this GitHub-connector runtime; PR CI is the executable repository validation gate.
  • Updated-head PR CI — pending after PR creation.

Scope guard

Changed file only:

  • apps/control-center/src/server/services/waitlist-growth-legacy-language.test.ts

Auto-merge

Will only be enabled if repository settings and required checks/reviews permit it and the updated-head diff remains QA-only.

Next QA target

Inspect concurrent mutation during social_post_metrics offset pagination. The smallest useful next invariant is detecting duplicate metric row identities across adjacent pages so a moving snapshot degrades views instead of silently accepting stale pagination.

Copy link
Copy Markdown
Collaborator Author

QA run — 2026-09-09 18:34 JST

Inspection

Action

CI was green, so this run strengthened one regression-prone behavior: offset pagination can repeat the same social_post_metrics.id across adjacent pages if rows move during collection. Previously that duplicate was silently accepted and could produce a stale-but-plausible 24h view snapshot.

Added a focused regression in waitlist-growth-metrics-pagination.test.ts that makes metric-500 appear at the end of page 1 and again on page 2. Added the minimal implementation guard required by the newly exposed behavior: readViews tracks metric row IDs and throws on a duplicate. The existing caller already catches view-read failures, so persisted signup truth remains available while views24h / signupRate degrade to null with the existing telemetry message.

Commits this run:

  • eaa20d94b7ae56e4d6af0b0370808347e2ccd063fix(control-center): fail closed on duplicate metric pages
  • b5fa9b2ce4d0c661141eaf3f8647b0b2b6b256abtest(control-center): detect duplicate metric pagination

Commands / results

  • GitHub fetch_commit_workflow_runs(0cd0ea4...)PASS, CI #2446 completed successfully.
  • GitHub recent commit inspection — PASS, main unchanged since PR creation.
  • GitHub compare_commits(main, test-qa/ongoing-coverage-20260909)PASS, ahead 3 / behind 0; changed files limited to two tests + minimal service guard.
  • GitHub active PR changed-file inspection (Clarify reliability priority scores and check counts #429fix(podcast): drain renders before Fly rollout #432) — PASS, no path overlap.
  • GitHub source review of waitlist-growth.ts and existing metrics pagination tests — PASS, duplicate metric row identity was not previously detected.
  • GitHub .github/workflows/ci.yml inspection — PASS, gates unchanged.
  • GitHub scripts/coverage.sh inspection — PASS, coverage path unchanged.
  • Focused local test / broader test, lint, typecheck, coverage — not executable in this connector runtime; repository CI is the executable validation surface.
  • Updated-head CI #2448 (34335664795) — IN PROGRESS at time of this update.

Scope guard

Current PR diff is only:

  • apps/control-center/src/server/services/waitlist-growth-legacy-language.test.ts
  • apps/control-center/src/server/services/waitlist-growth-metrics-pagination.test.ts
  • apps/control-center/src/server/services/waitlist-growth.ts — 5-line minimal fail-closed guard

No workflow/docs/agent/ignore/coverage-threshold/refactor changes.

Auto-merge

Not enabled. Repository setting is currently allow_auto_merge=false; updated-head CI is also still running. No protections will be bypassed.

Next QA target

The duplicate-row guard catches one observable form of a moving offset snapshot. Next inspect the complementary missing-row case (concurrent delete/insert shifts rows without duplication) and whether a bounded count/checksum-style consistency guard is possible without turning telemetry reads into a heavier transactional path.

Copy link
Copy Markdown
Collaborator Author

QA run update — 2026-09-09

Inspection

Finding

The duplicate-row guard added in the previous run catches the most common offset-pagination shift, but a moving dataset can also return a different unique row that sorts before the last row of the previous page. Without an ordering invariant, that backward page movement is silently accepted and can overwrite a newer 24h view with stale telemetry.

Change

  • Added waitlist-growth-metrics-reorder.test.ts to simulate page 1 ending at 14:00:00 and page 2 returning a unique metric from 13:59:59.
  • Added the minimal implementation guard in readViews() to require strictly increasing (captured_at, id) order within each 100-post metric batch.
  • On backward/reordered pagination, views fail closed through the existing telemetry-only catch: persisted signup counts and attribution remain available while views24h / signupRate degrade to null.
  • The sort cursor is reset per JOB_BATCH_SIZE batch so independent batches are not incorrectly compared against each other.

Commits:

  • 34444d70aafbfa173e480728abb5d549387c2dacfix(control-center): reject reordered metric pages
  • aa6eabd060edd6289d8289d385802532fa163013test(control-center): reject reordered metric pagination

Commands / results

Scope guard

Current PR diff remains limited to Control Center waitlist-growth tests plus the minimal readViews() consistency guards. No workflow, docs, agent instructions, ignores, coverage thresholds, or unrelated refactors were changed.

Auto-merge

Not enabled: repository setting allow_auto_merge=false; updated-head CI is also still running. No protection bypass attempted.

Next QA target

Investigate the remaining missing-row form of offset-pagination mutation (delete/insert causing a skipped row without duplicate or backward order). Determine whether a cheap count/cursor invariant can detect it without turning telemetry reads into a heavyweight transactional snapshot.

Copy link
Copy Markdown
Collaborator Author

Hourly QA — CI-first repair

Inspection

  • Reused this open QA PR ([test-qa-hourly], test-qa/ongoing-coverage-20260909).
  • Branch is synced with main: compare before this repair was ahead 5 / behind 0, merge base cf2770f7ec55f7c9241c617f2e48a98ca3542b20.
  • Previous head aa6eabd060edd6289d8289d385802532fa163013 ran CI #2450 (34340739395) and failed.
  • CI job inspection: coverage, code-quality, e2e, and security passed; the failing job was quick-gates.
  • Downloaded and inspected artifact quick-gates-verify-1 (10099650803): repo PASS, contracts PASS, format FAIL.
  • Exact formatter diff was only EOF normalization in apps/control-center/src/server/services/waitlist-growth.ts: No newline at end of file -> canonical trailing newline.
  • Reviewed active PR changed paths for Clarify reliability priority scores and check counts #429, fix: keep visual fallbacks on topic and simplify scene trace #430, feat(control-center): visualize cross-channel growth journey #431, fix(podcast): drain renders before Fly rollout #432. None overlaps the waitlist-growth QA files in this PR. (fix(podcast): drain renders before Fly rollout #432 changes other Control Center podcast-cost files plus deploy/migration files.)
  • Reviewed .github/workflows/ci.yml: quick gates remain format repo contracts; code quality remains type-check lint deadcode dup; tests remain test analytics; E2E/security/deploy gates remain present.
  • Reviewed scripts/coverage.sh: coverage remains turbo run test:coverage followed by scripts/coverage-summary.ts.
  • Current PR changed paths remain limited to three waitlist-growth regression test files plus the minimal waitlist-growth.ts consistency guard.

Action

Applied only the formatter-required EOF normalization to waitlist-growth.ts.

Commit: fdf9ce26d74bf227485c84e0b06aa93094a5468ffix(control-center): restore canonical file ending

No behavior, tests, workflow gates, docs, ignores, mocks, or coverage thresholds were changed in this repair.

Commands / results

Repository-authoritative checks used this run:

  • fetch_commit_workflow_runs(aa6eabd...)FAIL, CI #2450.
  • CI jobs inspection — PASS for coverage/code-quality/E2E/security; FAIL quick-gates only.
  • Download + inspect quick-gates-verify-1format FAIL, repo PASS, contracts PASS.
  • Formatter artifact diff — only missing final newline in waitlist-growth.ts.
  • compare main...test-qa/ongoing-coverage-20260909ahead 5 / behind 0 before repair.
  • Active PR changed-file inspection Clarify reliability priority scores and check counts #429fix(podcast): drain renders before Fly rollout #432 — no QA target-path overlap.
  • Updated-head CI #2451 (34346015012) — QUEUED for fdf9ce26d74bf227485c84e0b06aa93094a5468f.

Local focused/broader commands are not executable in this connector runtime; GitHub Actions is the executable repository validation surface.

Auto-merge

Not enabled. Updated-head CI is not green yet; do not bypass protections.

Next QA target

After CI is green, inspect a low-cost invariant for missing-row mutation during social_post_metrics offset pagination (row shift without duplicate/backward ordering), rather than adding more pagination guards while CI is red.

Copy link
Copy Markdown
Collaborator Author

QA run update

Inspection / source of truth:

Change this run:

  • Commit c039afe29ce98d9c0466f447c807ed7395a1ce3btest(control-center): pin seven-day attribution boundary.
  • Strengthened waitlist-growth-batching.test.ts with a boundary regression: with now = 2026-09-09T00:00:00Z, a canonical social signup at exactly 2026-09-02T00:00:00Z must be included in both signups7d and attributedSocial7d; an otherwise identical signup 1 ms earlier remains in the all-time conversion count but outside the 7d attribution window.
  • This pins the DB .gte(created_at, since7d) inclusive contract to the in-memory Date.parse(created_at) >= Date.parse(since7d) aggregation, preventing a one-boundary-row split between persisted 7d counts and attribution.

Validation / commands and results:

  • GitHub Actions lookup for previous head fdf9ce26...PASS, CI #2451 conclusion success.
  • fetch_pr_patch on [test-qa-hourly] test: preserve legacy waitlist attribution #433 before/after change — PASS, new diff is test-only for this run; pre-existing minimal consistency implementation changes remain unchanged.
  • fetch_file apps/control-center/src/server/services/waitlist-growth.ts@branchPASS, confirmed inclusive .gte query and >= since7d attribution semantics.
  • Code search for existing direct 7d-boundary coverage — no existing direct assertion found; current batching coverage covered 100-ID and 500-row boundaries instead.
  • Focused local Vitest / broader test, lint, typecheck, coverage — not executable in this connector runtime; updated-head GitHub CI is the repository-authoritative executable validation.

Auto-merge:

  • Not enabled. Repository policy previously reports allow_auto_merge=false; never bypassing repository settings/protections. Updated-head CI must also complete first.

Next QA target:

  • After CI is green, inspect canonical social_publish_jobs read consistency/error behavior for a small user-visible attribution invariant (especially missing canonical job rows vs direct/unknown classification) before adding more metric pagination machinery.

@i-xtsu-sixyou-ken-mei
i-xtsu-sixyou-ken-mei merged commit 57253ae into main Sep 9, 2026
12 checks passed
@i-xtsu-sixyou-ken-mei
i-xtsu-sixyou-ken-mei deleted the test-qa/ongoing-coverage-20260909 branch September 9, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant