Skip to content

Count only released_bundle requests in discovery; answer the nits on #165 - #192

Merged
MaxGhenis merged 2 commits into
mainfrom
w6/discovery-nits
Oct 16, 2026
Merged

MaxGhenis merged 2 commits into
mainfrom
w6/discovery-nits

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #191 (missed-dispatch discovery, landed from #165).

Released-bundle requests only (W4)

W4 pointed out a problem with the merged rule, which counted a request of any kind for deduplication and the floor. A pre-promotion candidate request names the version the candidate will be released as, but it pins the candidate's wheels, and push.yaml rebuilds the released wheel. So the merged rule would let a missed release dispatch skip the released version, whose bytes are what need replaying.

Now only released_bundle requests, in any status, count, both in pipeline/uk_replay_discover.requested_versions and in the write job's guard (.github/scripts/uk_replay_discovery_guard.py).

  • Duplication stays safe: W4's own released_bundle dispatch dedupes discovery whenever it lands before discovery's push. The 6-hour grace period, which W4 asked to keep, makes a later dispatch unlikely but does not rule it out; the docs say so.
  • Tests:
    • a candidate or unsupported-kind request neither covers nor floors the release;
    • the write job queues the discovered release despite a candidate request;
    • the concurrent-dispatch race now uses W4's released_bundle dispatch.

Nits from the review of f3f21a7

  • N1/N2: the docs say a yanked release still counts toward the floor, a version PyPI no longer lists stops counting, and the floor qualification now sits next to the floor sentence in QUALIFICATION_INTERFACE.md.
  • N3: requests are content-addressed, so a wrong request is recovered by removing it, never by editing it.
  • N4: a published, requested 1!0.1 cannot raise the floor; the epoch check is what excludes it.
  • N5: a Hypothesis property over published and requested sets. Candidates are exactly the published versions above max(certified, released-bundle-requested), never a released-bundle-requested one, and in order.
  • Certify the policyengine.py 6.5.0 replay results, the first with the processed-value check #190 nit: the determinism test's stale 6.4.1 comment.

Validation

  • Local (shared venv, 4 workers, after the disk-pause lift): test_uk_replay_discover, _discovery_workflow, _discovery_scripts, _queue and _determinism, 192 passed.
  • Mutants, each failing a test:
    • discovery counting every request kind (8 tests fail);
    • the guard counting every kind (1 fails);
    • the floor counting epochs (1 fails).
  • CI: every check passes.
  • Independent review: GPT-6.1 Sol approved 23cff0a with no blocking findings. Its test-gap nits are answered: mutants D2, D3, G3 and G4 now each fail a test, and 197 targeted tests pass. A delta review is pending.

axiom: n/a: replay receiver CI; no policy encoding.

🤖 Generated with Claude Code

…3f21a7

W4 (2026-10-16): a pre-promotion candidate request names the version the
candidate will be released as, but pins the candidate's wheels; push.yaml
rebuilds the released wheel. Counting candidate requests for deduplication
and the floor would let a missed release dispatch skip the released version.
Both pipeline/uk_replay_discover.requested_versions and the write job's guard
now count only released_bundle requests, in any status.

Nits from the review of f3f21a7:
- N1/N2: the docs say a yanked release still counts toward the floor, a
  version PyPI no longer lists stops counting, and the floor qualification
  sits next to the floor sentence.
- N3: requests are content-addressed, so recovery is removal, not editing.
- N4: a published, requested epoch version cannot raise the floor.
- N5: a Hypothesis property over published and requested sets checks the
  floor and that no released_bundle-requested version repeats.
- #190's stale comment in the determinism test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
policyengine-scorecard Ready Ready Preview Oct 16, 2026 10:12am UTC

Request Review

…nits on 23cff0a

- The guard test now stores a candidate, an unsupported-kind and a
  kind-less request; none covers the release (mutants G3, G4 now fail).
- Kind-less, null-kind and miscased-kind stored requests cover nothing in
  discovery (mutant D3 now fails).
- The floor property draws repeated versions (a candidate and a
  released_bundle request for one version), unsupported and missing kinds,
  and versions PyPI never published.
- The renamed floor test says what it asserts.
- Docs, the enqueue script's comment and the floor_versions docstring say a
  candidate request does not cover the released version, that the grace
  period reduces but does not rule out a late duplicate, and that a
  certified version suppresses older releases whatever PyPI lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review October 16, 2026 10:32
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Merge audit (W6). Base main, head 2e98fb8cfa8084f743457d0e26735b495d390224.

  • Independent reviews: GPT-6.1 Sol (Subfleet, hard tier).
    • 23cff0a: APPROVE, no blocking findings. It confirmed:

      • the only path to a second released_bundle request for one version is a W4 dispatch landing after discovery's push, which existed before this PR and is documented;
      • discover and the guard agree on every request shape the queue can store.

      Seven nits.

    • 2e98fb8: VERDICT: APPROVE 2e98fb8cfa8084f743457d0e26735b495d390224, no new problems. Nits 1–4 and 6 are resolved; 5 broadens the generator. Optional 7 is not done.

  • Behaviour change requested by W4: only released_bundle requests count for deduplication and the floor, so a pre-promotion candidate request no longer hides a missed release dispatch.
  • Local: 197 targeted tests pass. Mutants D1, D2, D3, G1, G3, G4 and the epoch-floor mutant each fail a test.
  • gh pr checks 192 exits 0: every check passes except "publish db to supabase storage", which is skipped. MERGEABLE, not a draft, no CHANGES_REQUESTED.

@MaxGhenis
MaxGhenis merged commit 61f1611 into main Oct 16, 2026
11 checks passed
@MaxGhenis
MaxGhenis deleted the w6/discovery-nits branch October 16, 2026 10:33

This branch was successfully deployed

1 active deployment
Preview — 2e98fb8c Deployed Oct 16, 2026 by vercel[bot]
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