Skip to content

[SCR-494] Add the Typefully quote-chain job - #495

Open
itsryanarmani wants to merge 1 commit into
mainfrom
scr-494-typefully-quote-chain
Open

itsryanarmani wants to merge 1 commit into
mainfrom
scr-494-typefully-quote-chain

Conversation

@itsryanarmani

Copy link
Copy Markdown
Owner

Closes #494

What

Adds typefully-quote-chain/, a launchd job that posts a launch series where each X post quotes the previous one. When post N is live, it sets draft N+1's X quote and schedules it gap_days later. It keeps every platform's text and media, and stops when the chain is done.

Why

A post has no X URL until it publishes, so a series cannot be scheduled up front with its quotes. A 22-post series takes six weeks, longer than any session runs. A one-off version of this job is running the live foxpilot and fox series now. This makes it a tested tool for the next series.

How I verified

The tests cover each way the chain could post wrong. They run against a fake API that drops any platform a PATCH leaves out:

$ ./typefully-quote-chain/typefully-quote-chain.test.sh
ok   waits, and leaves the next draft unscheduled, until the previous post is live
ok   sets the previous post's URL as the X quote
ok   keeps every enabled platform
ok   keeps each platform's text and media
ok   puts the quote on X only
ok   schedules gap_days after the previous post
ok   moves a schedule that would be in the past to at least 25 minutes ahead
ok   does not run a later link while an earlier one waits
ok   logs an API error and exits 0, so launchd runs it again
ok   reports the chain complete when every link is done
ok   selftest finds a re-sent draft unchanged
typefully-quote-chain: all tests passed

I broke the tool twice to check that the tests catch it. Re-sending X only failed "keeps every enabled platform". Scheduling without a live previous post failed "waits ..." and "does not run a later link ...".

selftest against the real API kept a four-platform draft unchanged (draft 11172714).

Proof: n/a - command-line tooling; the test output above is the evidence.

Assisted-by: claude:claude-opus-5-5

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c4e77f90-1df3-4c02-aaa9-06c5f12118ef
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@claude claude 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.

Reviewed head: af1a46860e403750a1093d74ca5ea3314091e893

No code defects found; nothing pushed.

Open (Minor, proof): ## How I verified never exercises install (plist, Keychain write, launchctl bootstrap) or the launchctl bootout on chain completion. TQC_NO_LAUNCHCTL=1 disables it in every test run. A stub launchctl/security on PATH test, or real install chain.json output, would settle it. Evidence is the author's to produce, so I did not add it.

Rejected: per-run re-GETs of processed drafts and a security subprocess per request. That is a few dozen calls every 15 minutes for a ≤22-post chain, so no concrete failure.

🧑‍⚖️ Council
Model Lens Result
GPT-5.6 (Codex) correctness error (429/timeout)
Gemini 3 Pro performance rejected
Kimi K3 security error (429/timeout)
DeepSeek V4 Flash maintainability error (timeout)
GLM 5.3 Flash scope confirmed (install and bootout untested; Minor)
Chair conventions / proof install and bootout paths untested (Minor)

A launch series where each X post quotes the previous one cannot be
scheduled up front, because a post has no URL until it publishes. This
tool fills the chain one link at a time from a launchd job: once post N
is live it sets draft N+1's X quote and schedules it gap_days later.

It re-sends every enabled platform on each PATCH so LinkedIn, Threads
and Bluesky are never dropped, and it stores the key in the Keychain
because launchd cannot read ~/Documents. The tests run against a local
fake API that drops any platform a PATCH leaves out.

Closes #494
@pooriaarab-grokbot
pooriaarab-grokbot Bot force-pushed the scr-494-typefully-quote-chain branch from 88f557a to 2e8e3f8 Compare November 4, 2026 04:11
@pooriaarab-grokbot pooriaarab-grokbot Bot added the policy-change Edits workflows or repo policy label Nov 4, 2026

@pooriaarab-grokbot pooriaarab-grokbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rebased onto main and resolved the tests.yml conflict by adding typefully_quote_chain_tests to main's current verdict loop (step, env entry and loop entry all present; YAML parses; the suite passes locally). The script reads TYPEFULLY_API_KEY from env/Keychain and never prints it. The author model is claude-opus-5-5, the same as mine, so this cannot count as the second-model review; a different model needs to review before merge. Labelled policy-change for the workflow edit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

policy-change Edits workflows or repo policy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the Typefully quote-chain job

1 participant