Declare marketdata, and document the second store the server now needs - #26
Merged
Conversation
cotmetrics reads bars from marketdata as of its ADR-0007 repoint, so this package needs the dependency declared even though it imports neither: its own source has no cotdata import and no get_prices call at all. Measured rather than assumed — the work order lists cot-analyzer as a consumer to repoint, and there is nothing here to repoint. The coupling is a declared dependency plus a cotdata-update subprocess, and that subprocess stays where it is because COT production did not move. The deployment consequence is the part worth care. The server now needs MARKETDATA_STORE set and a second synced store, and without it the price reads behind the indexer, the rejection scores and the max-pain snapshot fail at the point of read. Positioning and prices come from different packages now, so one store can be healthy while the other is absent; the troubleshooting section names that shape directly, because "COT works but prices do not" is not a symptom this file could previously produce. Both stores are synced rather than produced there — that box cannot produce bars at any Python version, norgatedata needing a Windows-only Norgate Data Updater — and they must stay separate roots, since each package keeps a manifest.json at its own root and does a read-modify-write on it. Also corrects the cache note: the metrics cache busts on both upstream store versions now, and the reason is that the bump it was written for was a price schema bump. 131 tests pass, ruff clean over what CI lints, and the internal dependency floor check passes with all three siblings installed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jo4iovRfc2fzE9MwcLp7r2
Every job went red at install. This repo resolves its internal siblings by checking them out and installing editable, and marketdata has no PyPI release, so declaring the dependency without adding the checkout makes `pip install -r requirements.txt` fail before a single test runs. A dummy MARKETDATA_STORE joins the dummy COTDATA_STORE for the same reason the first one exists: neither package defaults a missing store root to somewhere plausible, both raise by name, and there are two roots now. Worth noting the shape rather than just the fix. The local run passed because the sibling was already installed in the venv; CI builds the environment from scratch, which is the only place a missing distribution shows up. That is the same class as the three defects this port has already produced — a green run proving something narrower than it appeared to. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jo4iovRfc2fzE9MwcLp7r2
mspinola
marked this pull request as ready for review
August 9, 2026 02:30
This was referenced Aug 9, 2026
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.
Companion to mspinola/cotmetrics#11, which repoints price reads from
cotdatatomarketdataunder ADR-0007.Measured: there is nothing here to repoint
The work order lists
cot-analyzeras a consumer to repoint. As measured today it has zeroget_pricescalls and zeroimport cotdata— its coupling is a declared dependency plus acotdata-updatesubprocess inpages/system/admin.py, and that subprocess stays exactly where it is, because COT production did not move.So the change here is wiring and deployment, not code:
pyproject.toml— declaremarketdata>=0.1.0besidecotdatarequirements.txt—-e ../marketdata, same editable-sibling convention as the other twoscripts/check_dep_floors.py—marketdatais an internal sibling and needs the same floor checkThe deployment consequence, which is the part worth care
The server now needs
MARKETDATA_STOREset and a second synced store. Without it, the price reads behind the indexer, the signal rejection scores and the options max-pain snapshot fail at the point of read.Positioning and prices come from different packages now, so one store can be healthy while the other is absent.
server-side/README.mdgains that as a named symptom, because "COT works but prices do not" is not a shape this deployment could previously produce — previously one store meant one failure mode.Also documented there:
norgatedatadrives a locally installed Norgate Data Updater and NDU is Windows-only.manifest.jsonat its own root and does a read-modify-write on it, so merging them would have the producers dropping each other's entries.Testing
131 pass, ruff clean over
srcandtests(what CI lints). The internal dependency floor check passes with all three siblings installed:scripts/max-pain.pyhas two pre-existing ruff findings; it is untouched here and outside CI's lint path.Merge order
marketdatamust be released or available as an editable sibling before this and cotmetrics#11 land together — the two are a pair, and cotmetrics#11 is the one that actually changes reads.Generated by Claude Code