Remove the email pipeline
Test and publish / test (push) Successful in 1m59s
Test and publish / publish (push) Successful in 1m41s

The mailbox sync (Microsoft Graph and IMAP), its Claude classifier, the
/email routes and the Settings page's email section are taken out while
the pipeline is unused. The last commit with it is tagged
email-pipeline-last; reverting this commit brings it back.

The status rules the capture path shares (statusOrder, StatusAdvances,
NormalizeStatus) move to job_status.go with their tests. ProcessedEmail
stays in the migration, marked dormant, so its history survives for a
restored pipeline. golang.org/x/oauth2 is no longer needed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-14 22:48:07 +01:00
co-authored by Claude Opus 5.5
parent 6b14a96261
commit b7021ca117
32 changed files with 199 additions and 2284 deletions
+12 -9
View File
@@ -40,6 +40,11 @@ type JobAppReference struct {
// ProcessedEmail records that the email pipeline has already looked at a
// message, so it is never classified twice.
//
// DORMANT. The email pipeline was removed (it is in git at the tag
// email-pipeline-last). Nothing reads or writes this table now; the model is
// kept, and still migrated, so the table and its history are there if the
// pipeline comes back and old mail is not processed a second time.
//
// Like JobLead it has no DeletedAt and so is NOT soft deleted — the dedup
// check must see every historical row. Its ReceivedAt drives the next sync's
// time window, so the newest row here is effectively the pipeline's cursor. A
@@ -75,19 +80,18 @@ type ProcessedEmail struct {
}
// JobApplication is a tracked job application. Rows are created by hand
// through GraphQL, automatically by the email pipeline, from the browser by
// the capture userscript (handlers/handle_job_capture.go), or by promoting a
// through GraphQL, from the browser by the capture userscript (handlers/handle_job_capture.go), or by promoting a
// JobLead (services.PromoteJobLead).
//
// Status is a plain string column, but its vocabulary is fixed: the values
// ranked in services.statusOrder ("saved", "applied", "screening",
// "assessment", "interviewing", "offer", "rejected", "withdrawn"), which the
// GraphQL schema repeats as `enum JobStatus`. Every writer keeps to it —
// GraphQL refuses anything else, the email pipeline and the capture endpoint
// coerce with services.NormalizeStatus — but the column predates that, so a
// reader must not assume an old row conforms (services.MarshalJobStatus does
// not). The pipeline matches an existing application on (Company, JobTitle)
// compared case-insensitively.
// GraphQL refuses anything else, the capture endpoint coerces with
// services.NormalizeStatus — but the column predates that, so a reader must
// not assume an old row conforms (services.MarshalJobStatus does not).
// Capture and promotion match an existing application on its URL, then on
// (Company, JobTitle) compared case-insensitively.
//
// Description is the posting's text as captured from the page, kept because
// postings are usually taken down long before the interview. It is large, so
@@ -140,8 +144,7 @@ type JobSource struct {
// JobLead is a posting the fetcher found, waiting in the leads inbox to be
// tracked or dismissed. It is deliberately not a JobApplication: a single
// company board is hundreds of postings, almost all irrelevant, and the
// tracker, its status vocabulary and the email matcher are about jobs
// actually applied to.
// tracker and its status vocabulary are about jobs actually applied to.
//
// Like ProcessedEmail it has no DeletedAt and is NOT soft deleted. The
// (SourceKind, ExternalID) unique index is the dedup that stops every poll