fix(forecast): resolution-spec emission amendment — horizon-commensurable count + resolvable supply/gps windows (#5010)#5012
Merged
Conversation
…able count + resolvable supply/gps windows (#5010) Bet-2 planning found the frozen Bet-1 spec shapes left only ~1 currently-published forecast resolvable. Amending emission now, one day into the clock, resets a near-empty record instead of a month-old one. 1. conflict/ucdp count thresholds are horizon-commensurable: the signal tally is a 365-day trailing count, so a raw threshold would systematically resolve NO over a ~30d window (biased Brier). The threshold is now max(1, round(tally × horizonMs/365d × CONFLICT_ESCALATION_RATIO)) — a named, exported knob like MARKET_PRICE_MOVE_RATIO — counted over NEW events dated within [emission, deadline]. count() semantics documented in the grammar header. 2. supply_chain/gps windows change from a sustained-48h condition (which is unestablishable from current-snapshot feeds and forced permanent VOID) to an at-deadline point read the Bet-2 resolver can establish. prediction_market at-endDate and market/infrastructure within-horizon stay as shipped (confirmed fine). Omission semantics preserved — no new fields, no nulls. Emission only: no probability-spine or publish-selection change (D2 gate re-passed: identical published set and order). Live spot-check (fresh detector batch, 49 hard specs): 100% shape- resolvable, zero sustained windows, conflict thresholds horizon-scoped (7d: 15/1/5 vs raw tallies). Tests 54/54; benchmark 6/6. Closes #5010 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Comment on lines
+173
to
+174
| export const CONFLICT_ESCALATION_RATIO = 1.5; | ||
| const YEAR_MS = 365 * 24 * 60 * 60 * 1000; |
Contributor
There was a problem hiding this comment.
YEAR_MS is module-private, so the two test assertions that verify the threshold formula must inline 365 * 24 * 60 * 60 * 1000 literally. If the constant is ever changed, tests would diverge silently. Exporting it would let tests reference the same value the implementation uses, following the pattern established by CONFLICT_ESCALATION_RATIO and HORIZON_MS.
Suggested change
| export const CONFLICT_ESCALATION_RATIO = 1.5; | |
| const YEAR_MS = 365 * 24 * 60 * 60 * 1000; | |
| export const CONFLICT_ESCALATION_RATIO = 1.5; | |
| export const YEAR_MS = 365 * 24 * 60 * 60 * 1000; |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
koala73
enabled auto-merge (squash)
July 7, 2026 08:26
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.
Closes #5010 (Bet-1 follow-up; unblocks #5007). Epic #4930.
Why now: the Bet-2 planning review found the frozen spec shapes left only ~1 currently-published forecast resolvable. Amending emission one day into the resolution-spec clock resets a near-empty record; every day of delay makes the reset more expensive.
Changes (emission only —
scripts/_forecast-resolution.mjs)countthresholds are horizon-commensurable. The signal tally is a 365-day trailing count (TRAILING_WINDOW_MS, seed-ucdp-events.mjs), so a raw threshold systematically resolves NO over a ~30d horizon — a biased Brier. Now:threshold = max(1, round(tally × horizonMs/365d × CONFLICT_ESCALATION_RATIO))(named, exported knob, likeMARKET_PRICE_MOVE_RATIO), counted over new events dated within [emission, deadline] — thecount()semantics are documented in the grammar header.at-deadlinepoint reads instead of a sustained-48h condition that is unestablishable from current-snapshot feeds (forced permanent VOID).prediction_market: at-endDate,market/infrastructure:within-horizon.Guardrails carried: omission semantics preserved (no new fields, no nulls), grammar unchanged and still parseable (spaces/
?/)values), signal-vocab + horizon drift guards intact.Verification
within-horizon: 41, at-deadline: 7, at-endDate: 1, zero sustained; conflict thresholds horizon-scoped on real data (7d: 15/1/5 instead of raw 365d tallies).Per the issue: this intentionally supersedes the ~1 day of old-shape specs in history — the clock resets to today with resolvable shapes.