Skip to content

custom(google-send-again-memory-30d): Send again for forgotten Google runs, 30-day memory history for Google bots - #6

Merged
Old-G merged 2 commits into
customfrom
Old-G/google-send-again-memory-30d
Nov 25, 2026
Merged

Old-G merged 2 commits into
customfrom
Old-G/google-send-again-memory-30d

Conversation

@Old-G

@Old-G Old-G commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #4 (D3a + D5).

What

  • Send again on a forgotten Google run (D3a). A not-started run's card still holds the mail or meeting text. Send again now asks run history first: when the run came from Gmail or Calendar and history no longer has its event or any of its words — text, sender, place, link (account disconnected, 30-day sweep) or the event is over 30 days old, it refuses with a plain sentence that quotes nothing from the event. The refusal comes before the claim, so the run's single Send again is not spent. Other sources are unchanged.
  • 30-day memory history for Google bots (D5). A bot with Google on and at least one account open to it (googleAccounts absent = all accounts, or non-empty) keeps 30 days of memory history rows instead of 90, on read, on the background sweep and in listed unwritten rows. Other bots keep 90.

Known limits

  • MEMORY.md itself is not aged out. It is the bot's working memory that the owner edits in Settings and the bot tidies nightly; its lines carry no reliable date, and dropping them by age would silently delete facts the owner wrote. Google words in it are removed with Forget or the owner's edit, as before.
  • The 30-day rule follows the bot's current access: a bot that had Google and lost it goes back to 90 days for rows written earlier.
  • A Google run that run history no longer holds at all (pruned by the per-automation cap) is refused too: nothing left shows its account is still connected.
  • The chat transcript still shows the card's text (cleaning bot chat journals is the separate variant b, not done).

Performance

One extra in-memory lookup of the run in automation run history per Send again click, and one bot-list lookup per memory history read. No new timers, no extra disk reads.

Testing

  • bot-run-google-forgotten.test.ts: real forgetAutomationRunGoogleEvents + sendRunAgain: fresh Gmail run is sent; after disconnect or past 30 days (swept or not) it is refused without claim or send; Slack runs unchanged. Fails with the check removed.
  • bot-memory-history.test.ts: a Google bot's rows go after 30 days on disk, another bot keeps them. Fails with the 30-day branch removed.
  • Targeted vitest 28/28, oxlint/oxfmt clean on touched files, max-lines and recurring-timer ratchets add nothing.

Risk

Low. Two guarded additions behind custom-build markers; the default usesGoogle keeps upstream behavior.

How to revert

git revert <merge commit> — no data migration; history rows already pruned past 30 days are not restored.

Old-G and others added 2 commits November 25, 2026 12:33
…alendar run whose event was forgotten, and a Google bot's memory history keeps 30 days

Send again replays what the run's card kept. Once run history dropped the
event (account disconnected, or the event is over 30 days old) it now refuses
with a plain sentence, before the run's one Send again is spent. A bot with
Google on and an account open to it keeps 30 days of memory history rows;
other bots keep 90.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nished Google run whose sender, place or link went at a disconnect, and finds the run across all automations (review round 1)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Old-G
Old-G force-pushed the Old-G/google-send-again-memory-30d branch from 445e483 to dcaf443 Compare November 25, 2026 09:35
@Old-G
Old-G merged commit dcaf443 into custom Nov 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant