Skip to content

feat(jacob): add pure contest threshold detector - #23

Draft
Hylfrd wants to merge 1 commit into
masterfrom
codex/prep/prep-jacob-threshold
Draft

Hylfrd wants to merge 1 commit into
masterfrom
codex/prep/prep-jacob-threshold

Conversation

@Hylfrd

@Hylfrd Hylfrd commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a pure feature/jacob evidence parser for cleaned Jacob contest text.
  • Carry explicit contest identity, crop, count, and sequence in immutable evidence.
  • Evaluate immutable crop thresholds with the fixed upstream inclusive count >= threshold rule.
  • Keep lower counts and older sequences stale, reset high-water state across contest identities, and fail closed for unknown, malformed, conflicting, or unavailable threshold evidence.
  • Add stable immutable snapshots and focused tests only; no client wiring, shared config, UI, chat/scoreboard capture, telemetry, or remote control.

Fixed upstream anchors

  • eacb323fbde3eff94d4f2ee7baacb059d84b8e3a, com.jelly.farmhelperv2.handler.GameStateHandler#checkJacob(String): jacob's contest identifies the contest; jacobsRemainingTimePattern plus convertCrop identifies the crop; Collected and recognized medal with lines supply the count.
  • The same method's count extraction anchor is lastIndexOf(" ") followed by comma removal.
  • com.jelly.farmhelperv2.failsafe.impl.JacobFailsafe#onTickDetection(ClientTickEvent): crop-specific caps are selected and the detection boundary is inclusive at getJacobsContestCropNumber() >= cropThreshold.
  • The package separates that server-specific text observation from the pure threshold decision.

Verification

  • Focused: ./gradlew.bat test --tests dev.hylfrd.farmhelper.feature.jacob.JacobThresholdDetectorTest --no-daemon --console=plain (11 tests passed).
  • Full: ./gradlew.bat test --no-daemon --console=plain (passed).
  • Build: ./gradlew.bat build --no-daemon --console=plain (passed; dependency provenance verified and access widener had no source).

Composition risks

  • A caller must provide a stable contest identity and globally monotonic sequence; this package does not infer identity from mutable server state.
  • A composition layer must supply crop thresholds; missing thresholds remain unknown and cannot trigger.
  • The parser accepts already-cleaned lines, leaving client-side capture and formatting normalization outside this package.

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