Skip to content

Keep malformed Mergify keys out of error traces - #1699

Merged
mergify[bot] merged 1 commit into
mainfrom
lean178/1654-mergify-error-redaction
Nov 26, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
lean178/1654-mergify-error-redaction

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Keep malformed Mergify keys out of error traces

Context and goal

  • Context: Hosted candidate eligibility logs unexpected queue lookup failures, and the CLI prints failures from dequeue.
  • Problem: Python's HTTP client includes an invalid Authorization header value in its exception. The key can reach the failure diagnostic.
  • Goal: Report a safe request error when the HTTP client rejects a malformed header.

Closes #1654

Acceptance

  • A fake Mergify key containing an embedded newline appears in neither the dequeue error nor the hosted lookup traceback.
  • Valid lookup and dequeue still pass the existing Authorization header and preserve response handling.
  • The focused Mergify tests and the full check pass.

Notes

  • The change handles invalid request diagnostics at the shared transport boundary. It leaves credential selection, request headers for valid keys, and the architecture's queue contract intact.

Base

main @ a8fc35c
Base: a8fc35c

Validation

Recorded for 3e974d8358c3 (unverified, run loopzero check)

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, 3e974d8, approve

Architecture-Review: unchanged; only malformed request diagnostics change.
Co-Authored-By: Codex <noreply@openai.com>

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loopzero primary review by claude on 3e974d8358c336b12e1ffec29c6e391301567bc4, 23.2s: approve (0 critical, 0 important, 1 suggestion)

Settings per native call (launch configuration and CLI claims, not backend attestation):

  • Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)

Native Claude output is retained in the restricted local review receipt.

Comment thread tests/test_mergify.py
return io.BytesIO(json.dumps(payload).encode())



Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Extra blank line before the new parametrized test

The diff adds a third blank line after response(), so the new test sits under three blank lines instead of two. If the full check runs a pycodestyle/ruff E303-style rule, this fails the check. Even if not, it doesn't match the rest of the file. Smallest fix: delete the added blank line.

@eowca
eowca marked this pull request as ready for review November 26, 2026 08:24
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as ce3324e at 08:34 UTC

9 min in the queue, 4 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 08:25 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1710
  • ✅ Merged 08:34 · ce3324e · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added the queued label Nov 26, 2026
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit ce3324e into main Nov 26, 2026
16 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/1654-mergify-error-redaction branch November 26, 2026 08:35
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.

Redact malformed Mergify authorization from request errors

1 participant