Chapters: 

DEV then LIVE refresh completed

Date:
2026-05-06

Current verified facts

Recipes Backdrop is the source.
Views Data Export is the export mechanism.
Control Door is not part of the refresh process. It is only a viewer/client.

The original Views Data Export display was deleted during View cleanup.
The current Data Export display is V2, a rebuilt replacement.

Backdrop Data Export requirements

Display:
  Data Export

Format:
  CSV

Required columns:
  Recipe
  Content
  Dish
  Stage
  food_pics

Required behavior:
  Column headers enabled
  All records exported
  No 10-row pager cap
  No image-only filter unless intentionally testing images
  Replace newlines in rendered fields: OFF

Important View setting

Replace newlines in rendered fields must be OFF.

Reason:
  When enabled with Replacement "," it flattens recipe body content.

Bad flattened shape:
  Ingredients, , 1.5 lbs beans, 8 tablespoon oil

Required shape:
  Ingredients

  1.5 lbs beans
  8 tablespoon oil

CSV field separator remains comma.
Do not change the CSV field separator.

Current CSV validation

Header:
  ['Recipe', 'Content', 'Dish', 'Stage', 'food_pics']

Records:
  94

Stage is okay.
The importer normalizes Stage internally.

DEV / Camelot project

Project path:
  /home/tux/camelot/get-smart

Current structure:
  rag_setup/recipes.csv
  rag_setup/recipes_normalized.jsonl
  runtime/runtime_recipes.json

Importer:
  /home/tux/camelot/get-smart/import_recipes.py

Runtime builder:
  /home/tux/camelot/get-smart/build_runtime_catalog.py

DEV import command:
  python3 import_recipes.py --csv rag_setup/recipes.csv --output rag_setup/recipes_normalized.jsonl

Successful DEV import:
  Imported 94 rows from rag_setup/recipes.csv -> rag_setup/recipes_normalized.jsonl

DEV build command:
  python3 build_runtime_catalog.py

Successful DEV build:
  Runtime-ready recipes: 33 -> /home/tux/camelot/get-smart/runtime/runtime_recipes.json
  Skipped recipes:
    insufficient_structured_ingredients: 6
    not_recipe_full: 55

DEV contract check:
  runtime records: 33
  contract check: OK

DEV builder path block

build_runtime_catalog.py should use:

  REPO_ROOT = Path(__file__).resolve().parent
  DEFAULT_INPUT = REPO_ROOT / "rag_setup" / "recipes_normalized.jsonl"
  DEFAULT_OUTPUT = REPO_ROOT / "runtime" / "runtime_recipes.json"
  MIN_STRUCTURED_INGREDIENTS = 3

Builder gate restored to original strict behavior:
  classification == "recipe_full"

LIVE / cPanel project

Live project path:
  /home/eckfordc/get-smart.recipes.eckford.ca

Activate live Python environment:
  source /home/eckfordc/virtualenv/get-smart.recipes.eckford.ca/*/bin/activate

Inside the venv, use:
  python

Do not use python3 inside the venv unless intentionally testing interpreter behavior.

LIVE import command:
  python import_recipes.py

Successful LIVE import:
  Imported 94 rows from /home/eckfordc/get-smart.recipes.eckford.ca/rag_setup/recipes.csv -> /home/eckfordc/get-smart.recipes.eckford.ca/rag_setup/recipes_normalized.jsonl

LIVE build command:
  python build_runtime_catalog.py

Successful LIVE build:
  Runtime-ready recipes: 33 -> /home/eckfordc/get-smart.recipes.eckford.ca/runtime/runtime_recipes.json
  Skipped recipes:
    insufficient_structured_ingredients: 6
    not_recipe_full: 55

Restart live Passenger app:
  touch tmp/restart.txt

LIVE import_recipes.py path block

import_recipes.py should use:

  REPO_ROOT = Path(__file__).resolve().parent
  DEFAULT_INPUT = REPO_ROOT / "rag_setup" / "recipes.csv"
  DEFAULT_OUTPUT = REPO_ROOT / "rag_setup" / "recipes_normalized.jsonl"

LIVE build_runtime_catalog.py path block

build_runtime_catalog.py should use:

  REPO_ROOT = Path(__file__).resolve().parent
  DEFAULT_INPUT = REPO_ROOT / "rag_setup" / "recipes_normalized.jsonl"
  DEFAULT_OUTPUT = REPO_ROOT / "runtime" / "runtime_recipes.json"

Mistakes corrected during recovery

Old builder output path was wrong:
  rag_setup/runtime_recipes.json

Correct builder output path:
  runtime/runtime_recipes.json

Old copied-forward paths referenced stale locations:
  /home/tux/camelot/rag_setup
  /home/tux/camelot/multi_agent_chatbot
  /home/eckfordc/recipes.csv

These are stale for the current Get Smart layout.

Current refresh flow

Backdrop View: Data Export
  -> save/export CSV as rag_setup/recipes.csv
  -> import_recipes.py
  -> rag_setup/recipes_normalized.jsonl
  -> build_runtime_catalog.py
  -> runtime/runtime_recipes.json
  -> restart live Passenger app if on cPanel

What is now complete

Header problem fixed.
10-row export cap fixed.
Newline replacement issue found and fixed.
Current CSV has 94 records.
DEV import succeeded.
DEV runtime build succeeded.
DEV contract check passed.
LIVE import succeeded.
LIVE runtime build succeeded.
LIVE Passenger restart completed.
Runtime-ready count is currently 33.

Known non-blocking parser refinement

Example:
  1 head of garlic

Currently parses as:
  quantity: 1
  unit: head
  name: of garlic

This is parser polish, not a refresh blocker.

Next direction, not tonight

Add Content Status field to the Backdrop Data Export.

Terms:
  Incomplete Image
  Needs Update
  Ready

Goal:
  Export Content Status with each recipe.
  Parse/report what is missing per recipe.
  Compare Backdrop Content Status against parser findings.

Possible future report fields:
  Recipe title
  Content Status
  Image present/missing
  Ingredient section present/missing
  Structured ingredient count
  Runtime-ready yes/no
  Missing-data reason