Skip to content

chore(news): complete signals v2 cutover#117

Merged
FlyM1ss merged 2 commits into
mainfrom
chore/news-signals-v2-cutover
Jul 15, 2026
Merged

chore(news): complete signals v2 cutover#117
FlyM1ss merged 2 commits into
mainfrom
chore/news-signals-v2-cutover

Conversation

@FlyM1ss

@FlyM1ss FlyM1ss commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

PR-2b. Closes out the FinSearch scoresentiment_score rename now that v2 is live end-to-end (FinSearch #361, ATL #115).

Dead fallbacks deleted_project_entry's sig["sentiment_score"] if ... else sig["score"] and the panel's ?? s.score. v2 is a hard rename (schema requires sentiment_score, additionalProperties: false) and AF normalizes at its boundary, so score can't reach the wire via latest or ?as_of. Tolerating it would only paint a plausible number over a real break.

Fixtures were the third blind channel. Pinned to schema_version: 1 + score, they stayed green while prod served v2 — they failed when you fixed them and passed when you were wrong. Re-vendored verbatim from the producer (its golden fixture is already v2) rather than hand-edited, per the plan's own copy-don't-edit policy. signals-wire-fixture.json is regenerated by the documented transform; I verified the generator reproduces the committed v1 wire byte-for-byte from the v1 base first, so there's no incidental formatting churn.

The vendored schema was inert — nothing loaded it, which is how it sat at v1 for a day after the producer moved to v2 with nothing red. jsonschema was already a dependency, so the fixture now validates against it and the pair polices itself. Verified it has teeth: fed the old v1 fixture it fails with Failed validating 'const' ... 2 was expected.

Not touched: api/v2/models.py's NewsSentimentEntry.score — internal envelope, decoupled from the wire by design. _project_entry still emits score deliberately; both docs now say so explicitly, since this keeps getting flagged as a missed rename.

Also in here (same plan file, so splitting would only cause a conflict): plan Task 6's file list omitted app.py — the root cause of the /home-news-signals.js 404. Corrected, plus a routing step and a curl-the-asset check, because "open the page and look" is what let an empty panel pass review.

One test dropped ("prefers sentiment_score when both present") — vacuous once the fallback is gone. Suite 975 passed / 4 skipped.

Stacked on #116 (backtest logging), which makes the new fail-loud actually observable rather than swallowed by the bare except. Independent files; either order merges.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Pbs5wnQZhTi9CQ3pb14vDo

The transitional v1 `score` fallbacks were dead code the moment FinSearch
#361 shipped: v2 is a hard rename (signals-v2.schema.json requires
sentiment_score, additionalProperties:false) and AF normalizes at its API
boundary, so `score` cannot reach the wire from either the latest read or
?as_of. Delete both — the adapter's and the panel's — so a producer break
raises instead of rendering a plausible number.

Fixtures were the third blind channel: hard-pinned to schema_version 1
with a `score` key, they stayed green while prod served v2. They failed
when you fixed them and passed when you were wrong. Re-vendored verbatim
from the producer (the golden fixture is already v2 upstream) rather than
hand-edited, per the plan's own copy-don't-edit policy.

The vendored schema turned out to be inert — nothing in the suite loaded
it, which is exactly how it sat at v1 for a day after the producer moved
to v2 with nothing red. jsonschema was already a dependency, so the
fixture now validates against it and the vendored pair polices itself.

Not touched: api/v2/models.py's NewsSentimentEntry.score. It validates the
internal envelope, whose vocabulary is decoupled from the wire's by
design; _project_entry still emits `score` deliberately.

Also corrects this plan's Task 6, whose file list omitted app.py — the
root cause of the /home-news-signals.js 404 that made the panel five
empty boxes from 5d29d51 until #115.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pbs5wnQZhTi9CQ3pb14vDo
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agentic-trading-lab Ready Ready Preview, Comment Jul 15, 2026 10:29am

- requirements.txt: jsonschema arrives as an mcp transitive but the fixture
  test now imports it directly. Comment the line so a future prune doesn't
  drop it. (Declared here, not pyproject: that's orchestration's package.)
- test_news_sentiment_fixture.py: keep isinstance(..., float) rather than
  relaxing to (int, float). The schema's `number` admits ints, but the
  producer builds the value with float() + round(), so float is the real
  invariant — and since jsonschema.validate() only covers the on-disk
  fixture, this is the wire fixture's only type guard. Comment says so.
- panel design spec: last `signals-v1` reference; de-versioned rather than
  bumped to v2 so it can't re-stale on the next bump.

Suite 975 passed / 4 skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pbs5wnQZhTi9CQ3pb14vDo
@FlyM1ss
FlyM1ss merged commit 589600f into main Jul 15, 2026
5 checks passed
@FlyM1ss
FlyM1ss deleted the chore/news-signals-v2-cutover branch July 16, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant