refactor(db): remove demo seed data — clean empty DB on first deploy (v0.6.0) - #90
Merged
Merged
Conversation
…(v0.6.0) Rant 2026-08-19T10:41:03: remove all demo seed data; production standard (no seed_demo flag, no fake accounts/balances/placeholder keys). - db::open() no longer seeds; first deploy = clean empty DB (tables only) - old seed() -> #[cfg(test)] seed_test_users() helper (test fixtures only, excluded from production builds) - test_state/tmp_db helpers in routes, gateway, billing now call the helper - db tests assert empty DB + seed helper idempotency - auth::hash_password -> #[cfg(test)] (no production callers yet) - UI: login prefill, demo-hint, settings email placeholder cleared - README/docs: login section documents manual first-admin creation - 102/102 tests, clippy -D warnings, fmt clean
3 tasks done
argszero
added a commit
that referenced
this pull request
Sep 27, 2026
…315) Three sentences in ui/README.md named something a reader cannot find. Each is corrected in place, with the change that invalidated it named (the idiom the file already uses for its endpoint-card and login-page sections). 1. bump() wiring. The line claimed 4 balance-change sites including "raise-request approval" and an "isMe" guard. The code has 3 sites (4 bump() calls: two for the wallet top-up, one for the operator crediting themselves, one for the chat deduction). The approval site lived in the local mock branch that mutated D.USER.balance in place; 89963f3 (#94, zero-mock) deleted that branch and approveRaise() now only reloads the list, so the bump went with it. The same refactor inlined the self-top-up guard to `u.email === D.USER.email`. 2. The login "remember me" bullet still said a `demo-hint` element showed the demo account. 35291b3 (#90, v0.6.0 demo-seed removal) deleted that element; the class rule in ui/css/style.css is now orphaned and the `login.demo` pack key already sits in the unreachable sunset list. 3. The C2113 section cited `transactions_model_and_key_filters_match_the_displayed_placeholder`. No such test ever existed: dfa7318 (#231) added the README line and a test named `tx_model_and_key_filters_match_the_displayed_placeholder` in the same commit. The name now matches the file it cites. The corrections describe what was removed rather than re-printing the removed identifiers, so a grep for a stale name still lands nowhere (this is how the C2138 correction above already reads; the login-page section is the deliberate exception -- there the deleted selectors are the section's own subject). Docs only: no production code, no i18n key, no cache-bust token. The orphaned .demo-hint rule is left alone on purpose (removing CSS is a separate, cache-busting change). cargo test 413/0, fmt/clippy clean.
13 tasks done
argszero
added a commit
that referenced
this pull request
Sep 30, 2026
#332) `ui/css/style.css` carried four rules whose names no longer appear on any element — in the markup, in the scripts, or in the design baseline the file itself declares (`ui/css/style.css:4`, `docs/prototype/aitokenpool-console.html`): - `.demo-hint` — the element went away with the demo-seed cleanup (#90 `35291b3`); the rule stayed, and its i18n key was already retired. - `.login-divider` (+ `::before` / `::after`) — #159 `f46882c` moved the markup to the prototype's own name, `.divider`; the old rules kept a "historic alias" comment and nothing else. - `.wallet-note` — #156 `41bb6d1` rewrote the element as `.wallet-hero-note`; the old rule was left in place. - `.sidebar #toggle-mode-btn` (inside the mobile media query) — the button it hides never reached the product; the `#logout-btn` next to it in the same selector list is live. A rule nobody carries still applies — writing `class="wallet-note"` today still gets its 12px — which is why these read as live component rules for elements that no longer exist. `.delta` (three rules) is deliberately kept: the prototype's `statCard()` really does emit `<div class="delta ok">`, so it is design-baseline vocabulary, not a leftover. The rules are deleted; the one inside the media query is dropped from the selector list only (the sibling `#logout-btn` stays). No behaviour changes: nothing renders these names. `src/layout_gate.rs` gains a fourth rule, `every_selector_lands_on_an_element`, so the next such rule is caught when it appears. The token roster is derived from the selector text and the script roster is borrowed from `js_gate`, so a new `ui/js/*.js` cannot slip past it; there is no hand-written name list. The read is deliberately wide (a name mentioned anywhere, even in a comment, counts as a landing site) and the baseline corpus is an intentional escape hatch — the gate proves a name has a landing site, not that the landing site is the element it was written for.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove all demo seed data per host rant
2026-08-19T10:41:03(projectaitokenpool): production standard — noseed_demoflag, no fake accounts / balances / placeholder keys. First deployment = clean empty DB (tables only).Changes
db::open()no longer callsseed()— first deploy creates an empty schema-only databaseseed()(demo/admin/ops users, balance 12471, placeholder key) →#[cfg(test)] seed_test_users()test-fixture helper — production builds exclude it entirelytest_statein routes/gateway,tmp_dbin billing, plus db tests) now explicitly call the helper to keep 102/102 tests greenauth::hash_password→#[cfg(test)](no production callers until a register endpoint exists)ui/index.html): login email/password prefill, demo-hint line, settings email placeholder — demo credentials removedTests
cargo test— 102/102 passcargo clippy --all-targets -- -D warnings— cleancargo fmt --check— cleannode --checkon allui/js/*.js— clean