> ## Documentation Index
> Fetch the complete documentation index at: https://calendar-effects.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 2026-11-16 · Mahad · The pipeline reads everything from config/, and tests enforce it

* **Done:**
  * **What is studied is now data in `config/`:**
    * `retailers.csv` holds the ticker list: 10 in scope, plus BABA, L.TO and CTC-A.TO as candidates.
    * `wiki_articles.csv` moved from `lookup/`.
    * `retail_series.csv` holds the FRED series.
    * Each has a contract and a loader in `common.contracts` that checks its header, including CSVs saved by Excel.
  * **Where things are is in `common.settings`:** `RAW_DIR`, `clean_path()`, `REPLAY_DIR`, `STREAM_DIR`, `RESULTS_DIR`, `CHECKPOINT_DIR` and `KAFKA_BOOTSTRAP` (the environment variable of the same name overrides it). `common.study` gains `STUDY_START` and `STUDY_END`.
  * **Every ETL script, producer, topic script and the streaming job reads from those modules** and validates with `require_contract` before writing. `pip install -r requirements.txt` installs `src/` as a package, so scripts run from any folder. `src/ingest/build_events.py` moved to `etl/`.
  * **Enforcement:**
    * `tests/test_no_hardcoding.py`: no ticker, event, title, series, year, path or Kafka setting typed into `etl/`, `src/` or `scripts/`.
    * `tests/test_config.py`: the registries are valid and consistent.
    * `tests/test_clean_files.py`: the clean files match their contracts and `config/`, cover the whole study period, and carry exactly the calendar's events.
    * `.claude/hooks/pre-commit-tests.sh`: runs the tests on what a commit will contain, in both Claude Code and Cursor. It is tested by `tests/test_commit_hook.py`.
    * `AGENTS.md` rules 8–11, `CLAUDE.md`, path rules for `etl/`, `config/` and `src/common/`, and the contract-checker's checklist.
* **Results:**
  * Re-running every ETL script from another folder reproduces the committed clean files with identical values. The only change is that `volume` is stored as long in `prices` and `master`.
  * A fresh streaming replay with 2% late data still matches the direct computation (largest difference 1.1e-16).
  * 84 tests pass, and each of the 6 commits passes on its own.
* **Decisions:** `docs/decisions/0005-config-driven-pipeline.md` (proposed).
* **Contracts:**
  * New: `retailers`, `wiki_articles`, `retail_series`, and `pageviews` and `retail_sales` as built.
  * Changed: `prices` now describes the daily file as built.
  * Removed: `attention`, and the unused `prices`/`attention` Kafka topics.
  * `clean/tickers.parquet` and `clean/events.parquet` are no longer made.
* **Next:**
  1. Push the local commits on `main`.
  2. Run the streaming job on the cluster against Kafka (see the previous handoff).
  3. Pick the alerts for the demo video.
* **Blocked on / needs from others:**
  * **Everyone:** after pulling, run `pip install -r requirements.txt` again, or `import common` fails. Read `AGENTS.md` rules 8–11. Run `git add` and `git commit` as separate commands, because the hook refuses both in one.
  * **Sanchi, Anushiya, Areej:** review the changes to your files, listed per person under Consequences in decision 0005, and fill in "Agreed by".
  * **Open:** putting the TSX candidates in scope needs a TSX market index, so `MARKET_TICKER` would become per country.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.