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
+8 -13
View File
@@ -117,11 +117,11 @@ func nonEmpty(p *string) bool { return p != nil && strings.TrimSpace(*p) != "" }
// MergeCapture folds a repeat capture into the application it matched and
// reports whether anything changed.
//
// It only ever adds: the status moves forwards or not at all (the same rule
// the email pipeline follows, so re-capturing a posting marked "saved" cannot
// pull an interviewing application back), and a field already holding a value
// It only ever adds: the status moves forwards or not at all
// (StatusAdvances, so re-capturing a posting marked "saved" cannot pull an
// interviewing application back), and a field already holding a value
// is left alone, because the row may have been corrected by hand since. Title
// and company are never touched — they are the key the email pipeline matches
// and company are never touched — they are the key a later capture matches
// on.
func MergeCapture(app *models.JobApplication, in JobCaptureInput, now time.Time) bool {
changed := false
@@ -174,15 +174,10 @@ func (e *JobInputError) Error() string { return e.msg }
// application it matches, and reports which: "created", "updated" or
// "unchanged".
//
// The upsert matters beyond tidiness: the email pipeline identifies an
// application by (company, job title), so two rows for one posting means the
// confirmation email advances only one of them.
//
// Match order is the posting URL, then (company, job title) compared the way
// the pipeline compares them. Only live rows match — unlike the pipeline's
// lookup, which also sees deleted rows so that an email cannot resurrect one.
// Capturing or promoting is a deliberate act, so doing it for a posting whose
// row was deleted makes a new row.
// Match order is the posting URL, then (company, job title) compared
// case-insensitively. Only live rows match: capturing or promoting is a
// deliberate act, so doing it for a posting whose row was deleted makes a new
// row.
//
// The caller bounds Description's length; everything else is trimmed here.
func UpsertJobApplication(db *gorm.DB, input JobCaptureInput, now time.Time) (*models.JobApplication, string, error) {