Repository navigation
feat: mail-parser-api service with parse endpoint, CI and release - #1
Merged
Merged
Conversation
A job skipped because a needed job failed satisfies a required check, so an unlabeled PR was mergeable. Count release labels by exact line match.
Run the mail-parser child under choom and prlimit on Linux, allow two parses at once, decode the CLI JSON in place and return a clear 422 when a parse exceeds the limits. Raise uvicorn's concurrency limit so health checks pass while parses queue.
Build the linux/amd64 image without pushing in lint-test-build, so a broken lockfile or Dockerfile fails before a release tag exists. The image build installs the package, so the uv build step and its artifact are dropped. Drop the top-level .github exclude so check-yaml covers the workflows.
…onment-scoped deploy key Queue releases in one concurrency group so quick merges cannot race on the version bump, and reject a malformed version before the arithmetic. Trigger on pull_request_target so merged fork pull requests get the deploy key and packages: write; no job checks out pull request code. Drop workflow-level permissions and grant each job only what it needs. Read RELEASE_DEPLOY_KEY from the release environment, limited to main.
…ge build The main ruleset now holds only pull_request and required_status_checks with the deploy key bypass; the new main-protect ruleset blocks deletion and force pushes with no bypass.
This branch was successfully deployed
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.
Summary
First implementation of
mail-parser-api, the stateless parse service behind the spamscope.ai live parser.POST /api/parsetakes a raw email (Content-Type: message/rfc822, max 5 MB) and returns{"mail_parser_version", "message"}, wheremessageis mail-parser'smail_jsonwithpayloadremoved from every attachment.413oversized body (declared and streamed size),415other content types (Outlook .msg not supported yetforapplication/vnd.ms-outlook),422mail-parser failure,429rate limit,504parse timeout.GET /healthzfor the container health check.python -m mailparser --stdin --json) in a subprocess: fixed argv, email on stdin, no shell, killed after 10 s.X-Forwarded-Forvalue or peer; IPv4 whole, IPv6/64), max 10 000 keys with LRU eviction and purge of expired keys. No new dependency.python:3.13-slim, uv, non-root userapp(uid 10001), one uvicorn worker with--limit-concurrency 8; verified locally with--read-only --cap-drop ALL --tmpfs /tmp.ci.yml(release label check +lint-test-build),release.yml(version bump pushed with theRELEASE_DEPLOY_KEYdeploy key, multi-arch image on GHCR, GitHub release with generated notes, no assets), Dependabot for production uv dependencies and GitHub Actions.needs-triageticket for future Outlook.msgsupport.Test plan
make pre-commitmake test-cov(28 tests, 100% coverage)docker run --read-only --cap-drop ALL --tmpfs /tmp:/healthz,mail_test_10(4 attachments, no payload), 415, 413🤖 Generated with Claude Code