Skip to content

Fix issue #84 P0 defects: non-finite inputs, walk-away windows, artifact integrity#85

Draft
nedcut wants to merge 1 commit into
mainfrom
issue-84-p0-fixes
Draft

Fix issue #84 P0 defects: non-finite inputs, walk-away windows, artifact integrity#85
nedcut wants to merge 1 commit into
mainfrom
issue-84-p0-fixes

Conversation

@nedcut

@nedcut nedcut commented Jul 22, 2026

Copy link
Copy Markdown
Owner

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. NaN through json.loads defeated 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 with math.isfinite at the adapter parser and simulator boundaries; canonical_sha256 serializes with allow_nan=False so poisoned state can't become an artifact.

0B — walk-aways reset per interaction round, not per decision window. apply_actions cleared window_walkaways on 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 via League.begin_decision_window() (runner.py).

0C — tampered compact artifacts passed strict validation. _validate_episode_panel now 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-dir verifies publication.raw_artifact_sha256 against 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 558e8f35ea1d66b9 to 89c89e53c26740c7. 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:

  1. Refreeze as v2.1: update the pin, add a PUBLISH_READINESS decision-log entry, re-record the 10 smokes under the new contract.
  2. Fold into a sota-v3 lane and keep v2 artifacts untouched.

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-0350 since they're written against the redesigned components.

Refs #84

…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
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 730beb2f-6180-4910-af99-28db8c8011f5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-84-p0-fixes

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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