Skip to content

feat(devex): stop fetching and storing CI checks - #128

Merged
webjunkie merged 4 commits into
mainfrom
feat/devex-drop-ci-checks
Oct 6, 2026
Merged

webjunkie merged 4 commits into
mainfrom
feat/devex-drop-ci-checks

Conversation

@webjunkie

Copy link
Copy Markdown
Contributor

Owner decision: drop CI entirely. Fetching the checks was the expensive part of every PR fetch, the data was usually stale, and since September nothing ranks or speaks on CI anyway. This replaces the checks summary pilot, which won't ship.

What goes

The PR query no longer asks for checks. The CI event, the pane's Checks fact, the CLI rollup and the "Until CI is green" snooze are gone. On 12 PostHog/posthog PRs with 100 checks each, a batch fetch went from 621 to 471 KB and from 5–8 s to about 4 s. The rate-limit points are unchanged.

Old data

  • Migration 030 deletes the stored CI events and their log rows. Re-derivation would never reach merged and closed PRs. Rows only leave, so nothing turns unseen; the copies show the same unseen counts and seqs before and after.
  • Stored "Until CI is green" snoozes end like an expired snooze.
  • Reads drop old checks from the JSON at parse, so they never reach memory or a rewrite. A new storage job, checks_strip, removes them on disk in small slices with no revision bump. It is only marked done once a check against the data passes.
  • Heavy copy: 93 MB of JSON freed, slices up to 54 ms, hot-set heap 283 → 264 MB. Every snapshot equals the original minus its checks.

Every PR read also runs in one read transaction now, taken over from the pilot.

Not checked by hand: the app on a real database, and the pane in fake mode, where the Checks fact is simply gone.

@webjunkie

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T20:10:25.616701Z 4e6ac2d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 4e6ac2dcd9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

webjunkie added a commit that referenced this pull request Oct 5, 2026
…y a full walk

GPT-6.1 review on #128:

- Migration 030 can delete the newest event_log rows, and maxSeq read
  MAX(seq), so it could drop below a cursor. CursorRepo.advance only moves
  forward, so marking a topic seen or finishing consolidation would then
  silently keep the old dossier version and time. maxSeq now reads the
  AUTOINCREMENT counter in sqlite_sequence (never lowered by deletes).
- checks_strip trusted revisions to find snapshots written behind its
  cursor, but unguarded 0.18/0.19 builds keep the revision when they write
  checks back, and the final check could parse a large backlog in one
  slice. Done now means a whole walk, one snapshot per unit within the
  slice budget, found nothing to strip; a walk that stripped anything
  starts over to verify. A downgrade after completion can leave bytes
  behind, which reads drop anyway.
- The activity fold says "N bot events": there is no CI in it any more.
Decided 2026-10-05: drop CI entirely. Checks were the costliest part of
every PR fetch, usually stale by the time anyone looked, and since
2026-09-29 nothing ranks or speaks on them. What was left (a quiet CI
event, the pane's neutral Checks fact, the "Until CI is green" snooze,
the CLI rollup) did not pay for the fetch. Replaces the checks summary
pilot, which is not shipped.

- Fetch: no statusCheckRollup and no head-commit connection in the PR
  query. On 12 PostHog/posthog PRs (100 checks each) the batch response
  went 621 -> 471 KB and 5.3-8.1 s -> 3.7-4.3 s; rate-limit cost
  unchanged at 7 points, 1,212 fewer nodes.
- Model: Pr.checks, summarizeChecks, the CI event, the 'ci' event kind,
  the Checks fact, the CLI rollup and the ci_green snooze are gone.
  Actor-less events are named "GitHub" now (was "CI").
- Old CI events: migration 030 deletes them and their event log rows by
  id, rather than waiting for re-derivation that never comes for merged
  and closed PRs. Log readers join pr_event, rows only leave, so nothing
  turns unseen and no cursor moves (checked on both copies). 0.12 s on
  normal, 0.5 s on heavy, once. 030 is also what makes 0.20.0 refuse
  the database after the strip.
- Old ci_green snoozes read as until_time at their start: they end like
  an expired snooze. Unparseable conditions do the same instead of
  throwing.
- Stored JSON: reads drop the old checks key at parse, so it never
  reaches memory or a local rewrite. Storage job checks_strip removes it
  on disk, one snapshot per unit with json_remove inside the slice, no
  revision bump. Fail closed: done only when no snapshot written since
  the walk started (newer revision) holds checks. Heavy copy: 93 MB of
  JSON freed in 138 slices (max 54 ms), every snapshot equal to the
  original minus checks. Hot-set heap 283 -> 264 MB.
- Every PR read (getMany, keepParsed, listAll) runs in one read
  transaction (GPT-6.1 point 4), kept from the pilot as it is generic.

NO_CI_RULE stays in the writing prompts: glances and dossiers stored
before can still mention CI status.
…y a full walk

GPT-6.1 review on #128:

- Migration 030 can delete the newest event_log rows, and maxSeq read
  MAX(seq), so it could drop below a cursor. CursorRepo.advance only moves
  forward, so marking a topic seen or finishing consolidation would then
  silently keep the old dossier version and time. maxSeq now reads the
  AUTOINCREMENT counter in sqlite_sequence (never lowered by deletes).
- checks_strip trusted revisions to find snapshots written behind its
  cursor, but unguarded 0.18/0.19 builds keep the revision when they write
  checks back, and the final check could parse a large backlog in one
  slice. Done now means a whole walk, one snapshot per unit within the
  slice budget, found nothing to strip; a walk that stripped anything
  starts over to verify. A downgrade after completion can leave bytes
  behind, which reads drop anyway.
- The activity fold says "N bot events": there is no CI in it any more.
@webjunkie
webjunkie force-pushed the feat/devex-drop-ci-checks branch from 6641ff4 to 14a8d1d Compare October 5, 2026 20:40
CI sat queued behind the runner backlog; an empty commit starts it again.
@webjunkie
webjunkie merged commit 6fa2a90 into main Oct 6, 2026
11 checks passed
@webjunkie webjunkie mentioned this pull request Oct 6, 2026
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