CannaTinker depends on things it does not control: three AI providers, a hosted research library, twelve shop websites and an exchange-rate feed. The design rule is simple: every part has a stand-in. A missing key, a provider outage or a slow shop makes an answer smaller, never absent.

The chain of stand-ins

PartNormalStand-in
The voice (the reply)the provider chosen by the administratorthe other AI providers, in order; then built-in rules
The planAnthropic Claude, structured outputthe grow-guide template, in the same plan format
The scout (web brief)Google Gemini with searchthe step is skipped; the scanner still runs
Researchevidence cards + library passagesevidence cards alone (they need no AI key)
Exchange ratesthe ECB daily reference ratesstored fallback rates for a short time
Home pagethe version published in the page builderthe built-in design
18+ windowthe text saved by the administratorthe built-in text, in English and Polish

Rules mode

When no AI provider answers, CannaTinker still replies, from built-in rules:

  1. Keywords in the question select an answer: the grow guide, one of its seven stages, or a default answer with the key parameters.
  2. The English rules also recognise Polish words.
  3. The matching evidence card's advice and sources are attached, so even a rules answer carries the "Practice and research" view.

The reply is labelled rules instead of a model name, so the grower always knows that no AI wrote it.

Failing gracefully mid-reply

  • Before the first word, a provider failure is invisible: the next provider simply takes over.
  • After the reply has started, the text written so far is kept and saved as partial, and the grower can regenerate it.
  • If the browser disconnects, the server still finishes saving the reply.
  • Errors are explained in plain words: a timeout, an invalid key, the provider's own rate limit, a provider error or a lost connection. The grower is never shown a stack trace.

Limits that protect the service

  • A daily cap on AI calls per user and provider prevents runaway costs. It is counted in the database, or in memory if the database is briefly unavailable.
  • Per-minute rate limits apply to chat, scanning and link analysis.
  • Every AI role has a time limit, so one slow provider cannot hold up a reply for long.
  • The scanner is polite to shops:
    • each shop has its own request queue;
    • a shop that says "too many requests" is left alone for a while;
    • results are cached for ten minutes.

Background jobs

Jobs run inside the application on a five-minute tick. Before running, a job takes a time-limited lease in the database, so even while an old and a new release overlap, each job runs once.

  • Price refresh re-checks watched products. It slows down for products that keep failing and drops them after repeated errors.
  • Retention clears data the site no longer needs (see Accounts and privacy).

Releases

  • Database changes run before the new version goes live, and they only add.
  • Each release is checked after it starts. A health endpoint reports the running build, whether the database is reachable and whether its schema is up to date. If the new build does not report healthy, the previous build is restored automatically.
  • Every change is checked first: type checking, linting, the test suite and a full production build, on every pull request.

Tests

The automated tests need no database and no network. Among other things they cover:

  • the plan schema and how plans are tidied;
  • the untrusted-text blocks;
  • the rules answers in both languages;
  • the evidence-card matcher;
  • the scanner's query, specification and price parsing;
  • the URL-fetching protection;
  • encryption;
  • the migration checksums;
  • the shape of the articles, the legal centre and these manuals.

The quality of answers is checked separately: a set of control questions is run through the model, and each answer is checked against its contract. It must give perspective, stay at home scale, give advice that fits a 1 × 1 m tent, and cite only from the data it was given.

Known weak spots

  • The application runs as a single instance. Some caches and per-minute limits live in memory and reset on restart.
  • The scanner depends on shops keeping their public product endpoints; a shop that changes platform needs new code.
  • The research library is hosted by an AI provider. If it is unavailable, answers fall back to the evidence cards.

Related: The AI crew, Architecture.