Skip to content

Fix live demo catalogue synthetic drift - #81

Merged
karlwaldman merged 3 commits into
mainfrom
codex/demo-contract-drift-20260811
Aug 11, 2026
Merged

Fix live demo catalogue synthetic drift#81
karlwaldman merged 3 commits into
mainfrom
codex/demo-contract-drift-20260811

Conversation

@karlwaldman

@karlwaldman karlwaldman commented Aug 11, 2026

Copy link
Copy Markdown
Member

Decision

Restore the hourly SDK synthetic without pinning an intentionally mutable demo catalogue count, and make the always-on keyless monitor fail on every request error. This closes the measured false-red contract in #79/#80 and the red-team false-green path; it does not change the API, entitlements, package version, or published SDK.

Change

  • preserve the original nine demo codes as the stable compatibility floor
  • allow deliberate additions to the configured demo catalogue
  • require every core row to have a unique code, non-empty name/currency/timestamp, and a finite positive price
  • require the advertised demo-code list to preserve the core and contain no duplicates
  • retain envelope, catalogue-size, Brent plausibility, and filtered-code checks
  • propagate HTTP status, HTTP transport, and OS/network exceptions from the always-on synthetic instead of converting them to skips

Adversarial review fixes

The initial draft said all nine core rows had to be usable, but only validated Brent's row fields. Commit f223d744ae4fe8df33671eb7031b88f03805dd59 closes that false-pass path and also rejects duplicate current rows.

The second review found that httpx.HTTPError includes HTTPStatusError, so 404/429/5xx responses were caught and reported as skipped green. It also meant a DNS/API transport outage could skip the workflow despite the workflow's explicit "always runs / cannot silently skip" contract. Current head 81fe122fbc4fbc27e986cc3cb0743381ecbf5a90 removes all request-error skips. A regression injects status, transport, and OS failures while replacing pytest.skip with a hard failure, so reintroducing either false-green path fails the suite.

Red / green proof

Catalogue drift red before the change: live production contract suite failed 3 of 4 tests (34 returned price rows and 37 configured demo codes versus three exact == 9 assertions).

False-green regression red against the previous catch: 3/3 failed because status, transport, and OS failures were converted to skips.

At exact head 81fe122fbc4fbc27e986cc3cb0743381ecbf5a90 locally:

  • failure-semantics regression: 3/3 passed
  • live production synthetic plus regression: 7/7 passed, zero skipped
  • mocked DemoResource unit suite: 5/5 passed
  • Ruff, Black, and git diff --check: clean

Hosted live and Python 3.8-3.12 checks must be green at this exact head before approval. No release, deploy, credential, API mutation, email, SMS, or customer action occurred. After merge, observe an hourly scheduled run with zero skipped keyless tests before closing #79/#80 or treating the monitor as recovered.

@coderabbitai

coderabbitai Bot commented Aug 11, 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: cb4b6a6d-2a4a-40cb-afd5-60a395a1d9f4

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

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.

@karlwaldman

Copy link
Copy Markdown
Member Author

Final exact-head receipt

Exact head: 4d191da09c6dcd4e2e2074f5be28bafdfb6104c5.

  • GitHub: draft, MERGEABLE/CLEAN
  • hosted live API test: green
  • hosted Python 3.8, 3.9, 3.10, 3.11, and 3.12 matrices: all green
  • local red: 3 failures / 4 live tests on current main
  • local green: 4/4 live plus 5/5 mocked DemoResource tests
  • Ruff, Black, and diff check: clean

No release or deploy occurred. Observe at least one scheduled synthetic run after merge before closing #79/#80 or treating SDK health as promotable.

@karlwaldman
karlwaldman marked this pull request as ready for review August 11, 2026 11:06
@karlwaldman
karlwaldman merged commit fdcd39e into main Aug 11, 2026
7 checks passed
@karlwaldman
karlwaldman deleted the codex/demo-contract-drift-20260811 branch August 11, 2026 11:06
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