require padding when decoding base64 on Python 3.15+#428
Open
mgorny wants to merge 1 commit into
Open
Conversation
Restore the old behavior of `urlsafe_b64decode()` to require padding when running on Python 3.15+, in order to fix raising `BadData` in some cases of malformed input. This fixes the test failures in "bad payload" tests that incidentally surface when using zlib-ng as the compression library. Fixes pallets#420 Signed-off-by: Michał Górny <mgorny@gentoo.org>
giladax
pushed a commit
to giladax/intent-ai
that referenced
this pull request
Jul 23, 2026
Implements Slice O2: every PR opened on a governed repo gets its verdict
with no human action.
Architecture (webhook-swap ready):
- PrEvent dataclass (frozen, 7 fields) — the seam between poll and webhooks
- PrEventSource abstract base; GitHubPollEventSource wraps list_prs today
- O6 webhook endpoint maps GitHub payloads to the same PrEvent → same
handler, zero rework at swap time (as designed)
Per new/updated head SHA:
- Trailer links extracted from mirror (failure-safe; sync_org constructs
LinkStore like first_results when none injected)
- Analysis runs via run_analysis (idempotency cache skips repeats)
- check:analyzed activity_events row emitted (failure-safe, absorbs U4)
- Optional publish_comment gated by HARD RULE: non-giladax remotes (psf,
pallets, …) NEVER receive comments; giladax requires publish_enabled:true
in sync_meta.yaml; default OFF everywhere
Budget discipline: max_prs_per_repo caps per-pass analysis; list_prs capped
at 2 pages; sync_meta.yaml tracks seen SHA set and last_seen_updated_at.
CLI: `python3 -m quire.cli org sync [--loop --interval N] [--max-prs N]`
Live proof (tokenless, ≤20 API calls): one pass detected + analyzed
psf/requests#7586, pallets/itsdangerous#428, #1; verdicts
on the org cards; 3 check:analyzed rows in activity_events; publish guard
asserted OFF for all residents; registry state committed.
Also: github adapter list_prs gains updated_at field (backward-compatible).
Tests: 44 new offline tests (no live GitHub, no live Postgres); backend
707 passed, 1 skipped; app vitest (from app/) 59/59 green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016cmqJ7aie4Kap4ZsZraMF1
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.
Restore the old behavior of
urlsafe_b64decode()to require padding when running on Python 3.15+, in order to fix raisingBadDatain some cases of malformed input. This fixes the test failures in "bad payload" tests that incidentally surface when using zlib-ng as the compression library.Fixes #420