mirror of
https://github.com/prdlk/jobyssey.git
synced 2026-11-02 13:12:49 +00:00
test(tests): update suite for sync‑twenty migration and drop obsolete gmail/notion sync tests
This commit is contained in:
1 parent
7007c4aa9d
commit
b552b70783
8 files changed
+201
-312
No files matched your search
@@ -27,10 +27,9 @@ REPO = Path(__file__).resolve().parent.parent
|
||||
COMMANDS = REPO / ".claude" / "commands"
|
||||
APPLY = COMMANDS / "apply.md"
|
||||
OUTCOME = COMMANDS / "outcome.md"
|
||||
GMAIL_SYNC = COMMANDS / "gmail-sync.md"
|
||||
HTML_REPORT = COMMANDS / "html-report.md"
|
||||
INTERVIEW = COMMANDS / "interview.md"
|
||||
NOTION_SYNC = COMMANDS / "notion-sync.md"
|
||||
SYNC_TWENTY = COMMANDS / "sync-twenty.md"
|
||||
SKILL = REPO / ".claude" / "skills" / "job-application-assistant" / "SKILL.md"
|
||||
SCRAPER = REPO / ".claude" / "skills" / "job-scraper" / "SKILL.md"
|
||||
DOCS_README = REPO / "documents" / "README.md"
|
||||
@@ -190,10 +189,7 @@ class DraftedMeansDraftedToEveryReader(unittest.TestCase):
|
||||
"""`drafted` is non-final, so readers that mean *submitted* must say so.
|
||||
|
||||
Each of these defines its set by exclusion from the final statuses, so
|
||||
a new non-final value joins them all silently. The one exception is
|
||||
/gmail-sync, which must keep searching for drafted rows: the user
|
||||
submitting by hand and not running /outcome is the failure #269 is
|
||||
about, and an employer reply is how it gets caught.
|
||||
a new non-final value joins them all silently.
|
||||
"""
|
||||
|
||||
CASES = [
|
||||
@@ -207,21 +203,6 @@ class DraftedMeansDraftedToEveryReader(unittest.TestCase):
|
||||
(OUTCOME, "## Step 4: Update the Tracker",
|
||||
"overwrite its `date` column with the actual submission date",
|
||||
"the drafting date would be reported as the application date"),
|
||||
(GMAIL_SYNC, None, "`drafted` rows stay in this set",
|
||||
"excluding them discards the row that identifies a submitted-but-"
|
||||
"unrecorded application, which is the recovery #269 asks for"),
|
||||
(GMAIL_SYNC, "## Step 5", "`drafted` -> `applied`, otherwise",
|
||||
"the acknowledgement is the one email that proves a hand-submitted "
|
||||
"application was sent; classified as noise, the recovery never fires"),
|
||||
(GMAIL_SYNC, "### Step 7a", "also set `date` to the email's date",
|
||||
"the row would keep the drafting date after being proved submitted"),
|
||||
(GMAIL_SYNC, "## Step 9: Staleness Check", "Skip `drafted` rows here",
|
||||
"an unsent draft reported as a forgotten application"),
|
||||
(NOTION_SYNC, None, "omit when the status is `drafted`",
|
||||
"an 'Applied on' date for a job never applied to"),
|
||||
(NOTION_SYNC, None, "not yet submitted",
|
||||
"page bodies are write-once, so calling drafts 'submitted documents' "
|
||||
"is permanent even after /outcome records the real submission"),
|
||||
(SCRAPER, None, "do not add a second row",
|
||||
"/scrape would duplicate the row Step 3b just wrote"),
|
||||
(APPLY, "### Step 6b: Record the Application", "bare number, 0-100",
|
||||
@@ -315,8 +296,8 @@ class DeadlineSurvivesEveryWrite(unittest.TestCase):
|
||||
|
||||
The header migration must be header-line-only (inserting it mid-column
|
||||
shifts every value of every existing row), and every path that rewrites
|
||||
a tracker row (/outcome Step 4, /gmail-sync Step 7a) must preserve
|
||||
fields it does not parse - the deadline is the first such field.
|
||||
a tracker row (/outcome Step 4) must preserve fields it does not parse -
|
||||
the deadline is the first such field.
|
||||
"""
|
||||
|
||||
CASES = [
|
||||
@@ -341,13 +322,9 @@ class DeadlineSurvivesEveryWrite(unittest.TestCase):
|
||||
"surfacing the deadline must not drag drafted rows into the follow-up offer"),
|
||||
(OUTCOME, "## Step 4: Update the Tracker", "preserve every other field of the row",
|
||||
"a status update that rewrites the row would blank the deadline column"),
|
||||
(GMAIL_SYNC, "### Step 7a: Write Approved Updates", "preserve every other field",
|
||||
"the sync path rewrites the row too - it must carry the same preservation rule"),
|
||||
(NOTION_SYNC, None, "**Deadline precedence: the tracker wins too**",
|
||||
(SYNC_TWENTY, None, "**Deadline precedence: the tracker wins too**",
|
||||
"the tracker's deadline (written from the posting the application was actually "
|
||||
"built on) must override the scraper's stored value"),
|
||||
(NOTION_SYNC, None, "tracker `deadline` column",
|
||||
"the Deadine property must name the tracker column as its source"),
|
||||
(SKILL, "### Step 3b: Record the Application", "`deadline` is the application deadline",
|
||||
"the /scrape path reaches Step 3b without running /apply Step 0, so it must "
|
||||
"still be told what the field is and where it comes from"),
|
||||
@@ -372,7 +349,7 @@ class DeadlineSurvivesEveryWrite(unittest.TestCase):
|
||||
"Step 4 forbids restructuring the CSV, so without this the header append reads "
|
||||
"as a violation of the same command's own rule and an implementer has a "
|
||||
"documented reason to skip the migration"),
|
||||
(NOTION_SYNC, None, "never reconcile the two by picking the earlier or later date",
|
||||
(SYNC_TWENTY, None, "never reconcile the two dates with `min()`/`max()`",
|
||||
"the tracker-wins rule says which source to prefer but does not forbid the "
|
||||
"plausible-looking min() of the two, which syncs a date the user never "
|
||||
"applied against"),
|
||||
@@ -419,19 +396,12 @@ class ArchiveNameIsOnePathComponent(unittest.TestCase):
|
||||
"by the **Subfolder naming** rule in `documents/README.md`",
|
||||
"the /scrape path writes its documents before Step 3b consults /apply, "
|
||||
"so /apply's filename rule cannot protect it"),
|
||||
(GMAIL_SYNC, "## Step 2: Load State",
|
||||
"by the **Subfolder naming** rule in `documents/README.md`",
|
||||
"gmail-sync both locates and creates archives; its old spaces-only "
|
||||
"paraphrase would split state across two folders"),
|
||||
(INTERVIEW, "## Step 1: Load the Application Context",
|
||||
"by the **Subfolder naming** rule in `documents/README.md`",
|
||||
"interview must read the same archive /apply and /outcome wrote"),
|
||||
(INTERVIEW, "### 6. Logistics",
|
||||
"archive folder derived in Step 1",
|
||||
"interview must reuse its canonical read path when writing the prep pack"),
|
||||
(NOTION_SYNC, "## Step 5: Write the Detail Page",
|
||||
"by the **Subfolder naming** rule in `documents/README.md`",
|
||||
"notion-sync otherwise reports that the sanitized local archive is absent"),
|
||||
(DOCS_README, "## applications/",
|
||||
"If the derived name is empty",
|
||||
"dropping untrusted punctuation can produce no component at all, which "
|
||||
|
||||
Reference in new issue
Block a user