Fix issue #84 P0 defects: non-finite inputs, walk-away windows, artifact integrity#85
Draft
nedcut wants to merge 1 commit into
Draft
Fix issue #84 P0 defects: non-finite inputs, walk-away windows, artifact integrity#85nedcut wants to merge 1 commit into
nedcut wants to merge 1 commit into
Conversation
…act integrity - 0A: reject NaN/Infinity at the adapter parser and at simulator salary and query-threshold boundaries; forbid non-finite values in publication JSON hashing (allow_nan=False). - 0B: reset negotiation walk-aways once per decision window via League.begin_decision_window() instead of on every apply_actions call, so the two-declines guard actually persists across interaction rounds. - 0C: strict compact-artifact validation now requires finite numeric fields and recomputes summaries, normalized blocks, and paired statistics from retained episode rows; the panel analyzer can verify compact-to-raw hash linkage via --raw-artifacts-dir. - Adversarial and regression tests for all three, plus findings-blog notes on public-panel adaptation risk, scripted opponents, decorative morale, and the publish-readiness decision history. These behavior changes move the contract fingerprint off the frozen 558e8f35ea1d66b9 pin (now 89c89e53c26740c7); the pinned-fingerprint test and smoke-manifest gates fail deliberately until a refreeze (v2.1) or a new lane (sota-v3) is decided. Refs #84
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Splits the correctness/integrity work out of the sports-wire redesign branch, per review of #84. Implemented by a Codex (gpt-5.6-terra) pass with follow-up test fixes.
What this fixes
0A — non-finite salaries bypass validation.
NaNthroughjson.loadsdefeated every comparison-based check in_sign_free_agent(positive-salary, hard cap, reservation price), letting a probe sign 24 FAs and poison payroll. Now rejected withmath.isfiniteat the adapter parser and simulator boundaries;canonical_sha256serializes withallow_nan=Falseso poisoned state can't become an artifact.0B — walk-aways reset per interaction round, not per decision window.
apply_actionsclearedwindow_walkawayson every call while the runner calls it once per round, so the advertised two-declines guard never persisted. Reset now happens once at window entry viaLeague.begin_decision_window()(runner.py).0C — tampered compact artifacts passed strict validation.
_validate_episode_panelnow requires finite numeric fields and recomputes candidate summaries, normalized blocks, and paired statistics from retained episode rows, rejecting mismatches.analyze_publication_panel.py --raw-artifacts-dirverifiespublication.raw_artifact_sha256against actual raw evidence instead of hash syntax only.Plus adversarial/regression tests for all three, and findings-blog additions (public-panel adaptation risk, scripted opponents, decorative morale, decision-history link).
Deliberately failing gates — decision needed
The 0A/0B behavior changes move the contract fingerprint from the frozen
558e8f35ea1d66b9to89c89e53c26740c7. Five tests fail by design: the pinned-fingerprint test and four smoke-manifest gates that correctly refuse a panel whose smokes were recorded under the old contract. Options before merging:No eligible published row appears to have exploited either bug, so a disclosure note plus refreeze seems proportionate — but that call is why this is a draft. Frozen v2 artifacts and site data are untouched either way.
The site/framing counterparts of #84 (hero rewrite, baseline-count fix, no-ranking callouts) live on
cursor/sports-wire-redesign-0350since they're written against the redesigned components.Refs #84