Skip to content

[codex] Guard trendline slope for sparse windows#62

Merged
sdcoffey merged 11 commits into
codex/fix-stop-lossfrom
codex/fix-trendline-panic
May 29, 2026
Merged

[codex] Guard trendline slope for sparse windows#62
sdcoffey merged 11 commits into
codex/fix-stop-lossfrom
codex/fix-trendline-panic

Conversation

@sdcoffey

@sdcoffey sdcoffey commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • return zero until trendline has enough points to calculate a slope
  • guard zero regression denominators before dividing
  • add regression coverage for index 0 and window size 1

Related issues

Addresses the trendline divide-by-zero report in #39.

Validation

  • GOCACHE=/private/tmp/techan-gocache mise x go@1.26.3 -- go test ./...

Stacked on #61.

@sdcoffey sdcoffey marked this pull request as ready for review May 29, 2026 15:28
@sdcoffey

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sdcoffey sdcoffey force-pushed the codex/fix-trendline-panic branch from 0cde7f9 to 376ccd8 Compare May 29, 2026 15:42
@sdcoffey sdcoffey force-pushed the codex/fix-stop-loss branch from 1f1be15 to 0abd685 Compare May 29, 2026 15:42
sdcoffey added 4 commits May 29, 2026 08:44
[codex] Make indicator test helper vet-safe
[codex] Document indicator warm-up behavior
[codex] Add indicator cache invalidation
@sdcoffey sdcoffey merged commit e620377 into codex/fix-stop-loss May 29, 2026
1 check passed
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