Software Testing / Learning brief
Lily's query counts every reminder twice
In simple terms / 01
What this means in plain language
An assistant's query runs without error but doubles a total. Tom tests it on a tiny sample he counted by hand, finds a join that repeats rows, and tests a time pattern with a long input.
Complete lesson / 02
Understand the full idea, step by step
A calculator always gives an answer. Press the wrong key and you still get a number. It does not warn you, and the number looks as sure as any other.
So you test it on sums you already know, like two plus two, before you trust it with a bill. Tom plans to treat an assistant's query the same way. He will not ask whether it runs. He will ask whether it is right.
Evidence & review / 03
Evidence & review
The date on this lesson is when it went up on Payments Signal, not when its material was written — most of these were brought across from an earlier catalogue in a single run, which is why so many of them share a date. What the lesson says about the world is dated by the review above and by the sources below it.
General teaching about checking assistant-written queries, text patterns and small scripts. Historical research excerpts remain scoped to their original tools and dates. Selected SQLite count documentation was later opened and the fictional join example checked separately. No assistant brand or universal database guarantee is claimed.
What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Historical regex and reporting-tool excerpts retain their access limits. Selected SQLite count rules were checked against the publisher documentation; the seven-versus-five example is a separate classroom fixture. The recipe still needs checking on your own material.
Sources for this brief — 10 sources
- Market practice
Fan-out resolution (Holistics documentation) ↗ — Holistics · When a one-to-many join runs before a sum or count, the single side is repeated and the total counts the copies, which gives a wrong number with no error (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Understanding Regular Expression Denial of Service (ReDoS): Insights from Regexes Written by Language Models and Developer Forums (International Conference on Program Comprehension, 2024) ↗ — Institute of Electrical and Electronics Engineers (IEEE) and Association for Computing Machinery (ACM), International Conference on Program Comprehension · Regular expressions written by language models were tested for being correct and for being open to denial of service; the generated ones mainly showed a slow, polynomial kind of weakness (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Re(gEx|DoS)Eval: Evaluating Generated Regular Expressions and their Proneness to DoS (ICSE 2024) ↗ — International Conference on Software Engineering (ICSE) · A benchmark of real user regular-expression requests scores generated patterns on whether they work and on whether they are open to denial of service (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Test::Regexp (Perl module documentation) ↗ — MetaCPAN · It is important to test which strings do not match a regular expression as well as which do (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
PostgreSQL documentation ↗ — The PostgreSQL Global Development Group · The reference for SELECT, JOIN, GROUP BY and aggregate functions, with the exact rules for how joins combine rows (registry source, general description, page not opened in this batch)
An implementation, not the standard — which is the point. ISO/IEC 9075-2 is paywalled, and this documents the same constructs in text anybody can open. Its isolation-level chapter attributes to the standard explicitly, so it can carry a standard-level claim as long as the citation says which document it is quoting.
Cited as market practice rather than an official standard by kind: an engine's manual is authoritative about that engine and is not the obligation. Where a question turns on behaviour PostgreSQL chose rather than behaviour SQL requires, the answer has to say so.
One correction carried here because it circulates widely: the sentence "The fundamental difference between WHERE and HAVING…", quoted all over the internet as PostgreSQL documentation, is not in the current documentation. It was searched for in the source tree and is not there.
Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.
Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.
Read from the
postgres/postgresdocumentation source tree (doc/src/sgml), which the project itself maintains and which carries the section ids the published URLs are derived from — so a cited section id can be checked against the rendered page. - Market practice
Regular Expression HOWTO (Python documentation) ↗ — Python · Explains how regular-expression patterns are built, including quantifiers, groups and anchors (registry source, general description, page not opened in this batch)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Open Worldwide Application Security Project cheat sheet series: input validation ↗ — Open Worldwide Application Security Project (OWASP) · Advice on checking input, including with regular expressions (registry source, general description, page not opened in this batch)
Search excerpt, page not opened: returned by WebSearch on 2026-10-18. The excerpts did not use the phrase as early as possible in the data flow, so this site does not quote it. It is guidance for software in general, not for payments.
V34 review, 6 November 2026: Read complete official repository sheet. Syntax, semantic business rules, server checks and safe handling of legitimate Unicode/punctuation have distinct roles.
- Market practice
Date and Time on the Internet: Timestamps (Request for Comments 3339) ↗ — IETF · Describes the internet timestamp format, which writes a date, a time and an offset from universal time (registry source, general description, page not opened in this batch)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments (RFC) 3339, July 2002. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Simplified educational illustration
Payments Signal editorial teaching models — Payments Signal
Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.
- Implementation-specific
SQLite aggregate functions ↗ — SQLite project · SQLite rolling publisher aggregate-functions documentation §§1–3, especially count(X), count(*) and DISTINCT; opened7November2026. Synthetic7-versus5 classroom result separately executed, not a universal SQL or generated-helper guarantee.
§§1–3 incl count(X)/count(*) read7November2026. Actual classroom SQL re-executed separately; SQLite behaviour, not all-database promise.