Skip to content

security: session-attributed weekly/monthly period keys - #161

Merged
luisleo526 merged 1 commit into
mainfrom
weekly-fx-anchor
Aug 24, 2026
Merged

luisleo526 merged 1 commit into
mainfrom
weekly-fx-anchor

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

Round 3 of the symbol campaign (follows #159, #160).

Defect. Weekly keys took tm_wday of the shifted instant, so a Sunday-opened FX session straddled two ISO weeks — its Sunday-evening bars carried Sunday's weekday while its Monday bars flipped the key mid-session. TV forex weeks start at the weekend-open session (Sun-17:00-ET) and run to Friday's close.

Fix. W/M period keys attribute each session-day to the calendar period of its session OPEN (computed via the local calendar date of the open epoch). Gated: session-less feeds (24x7 crypto, bare grids) keep the Monday-start epoch math bit-for-bit — corpus weekly pins untouched.

Evidence @ HEAD:

lane result
EURUSD htf-bucket-w probe 3.3% → 93.7% (177/189); D & 240m hold at 100%
EURUSD population e+s 307 → 328 (+21); ups 35 / downs 35
AAPL population e+s 241 → 256 (+15); ups 30 / downs 26
ETH scraped 396/396 excellent, 0 moves (fresh grade)
ETH corpus 312/312 ok, 309/2/1 identical, zero regressions (fresh run)
unit tests 133/133

Symbol-gate PASS · pr-gate PASS (tie carried by trendmatrix MATCH probe, 822/822 exact identity). Known residual: ~12 W-probe trades at window edges + the trade #178 one-tick nuance (ledger finding 402 follow-ups).

Weekly keys derived from shifted-instant weekdays split a Sunday-opened
FX session across two ISO weeks (its evening bars carry Sunday's
weekday). W/M period keys now attribute each session-day to the calendar
period of its session OPEN: forex weeks start at the weekend-open
session (TV's Sun-17:00-ET week), equity/24x7 feeds — whose sessions
open and close on one local date and which declare no session window —
keep the Monday-start epoch math bit-for-bit (gated on the declared
session, preserving the corpus weekly pins).

Evidence @ this tree: EURUSD htf-bucket-w probe 3.3% -> 93.7% (177/189);
D and 240m hold at 100%; population e+s EURUSD 307->328 (+21), AAPL
241->256 (+15); ETH scraped 396/396 zero moves; corpus 309/2/1 identical,
zero regressions; 133/133 unit tests.
@luisleo526
luisleo526 merged commit e780321 into main Aug 24, 2026
7 checks passed
@luisleo526
luisleo526 deleted the weekly-fx-anchor branch October 5, 2026 02:44
luisleo526 added a commit that referenced this pull request Oct 17, 2026
* docs: the 1.6.1-rc.1 release candidate notes

Prepare the 1.6.1-rc.1 changelog entry dated 2026-10-17, carrying forward the reviewed 1.6.1 — Unreleased section (b148979, c818585) and naming all pull requests merged since v1.6.0 (#398, #400, #401, #402). Update the two CHANGELOG section anchor links in README.md and docs/pages/public-contract.md introduced by b148979 from #161--unreleased to #161-rc1--2026-10-17 while keeping the current final release and pair lines on 1.6.0.

* docs: drop the hpo-candidate pairing line from the 1.6.1-rc.1 entry (review of #403)

No pineforge-hpo release candidate exists yet and the reviewed 1.6.1 entry
did not claim one.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: HaoLiangWen <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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