Skip to content

docs(adr): decide Skill ingestion on Cloudflare primitives - #692

Merged
harlan-zw merged 2 commits into
mainfrom
docs/ingestion-architecture
Nov 12, 2026
Merged

harlan-zw merged 2 commits into
mainfrom
docs/ingestion-architecture

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Related to #126 (daily check-in: database capacity incident). Follows #688 and #691.

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

ADR-0019 maps Skill ingestion end to end and decides its target shape on Cloudflare primitives.

Measured in production on 2026-11-12, with bounded reads:

Decisions: every growing D1 table names a retention window and a prune; SKILL.md bodies move to R2 by rendered_raw_sha256 behind one readSkillSource reader with D1 fallback; rendered_html stops being stored; the build path adopts the ETag cache; the GitHub App push webhook enqueues the same sync job the cron creates; one Repository sync becomes a Workflow keyed by (owner, repo, treeSha); observations go to an skilld_ingest_v1 Analytics Engine dataset; no Durable Objects.

The Consequences section lists eleven steps, each with its rollback. Steps 10 and 11 are destructive and stay with Harlan.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

🤖 Generated with Claude Code

D1 filled to 10 GB on 2026-11-04 because ingestion used it as a blob
store, an append-only log, and a job queue with no retention. ADR-0019
records the measured hotspots and decides where each kind of data
lives: D1 for relational state with named retention, R2 for SKILL.md
bodies, KV ETags for GitHub reads, a Workflow per Repository sync, and
Analytics Engine for observations. It sequences the migration as
independently shippable steps, each with a rollback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Nov 12, 2026
@harlan-github-agent

harlan-github-agent Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-11-12 06:50 UTC.

GitHub merged this pull request.

  • Logged (76/100): The specified Workflow identity prevents repeated Repository syncs. View code Optional follow-up: Optional follow-up: specify valid per-run instance IDs and a separate Repository claim with an explicit release and recovery lifecycle.
    • Ask an agent to verify and fix this finding
  • Logged (70/100): The rollout and rollback do not establish the promised single writer. View code Optional follow-up: Optional follow-up: require draining existing work or a claim shared by both execution paths before switching pools, and define a concrete generation fence rather than referring to a comparison the current implementation lacks.
    • Ask an agent to verify and fix this finding

21da4134-9d37-4a2d-9324-185d50c4b2f1

Selected findings run after merge and open separate pull requests.

@harlan-github-agent harlan-github-agent Bot added harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Nov 12, 2026

@harlan-github-agent harlan-github-agent 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.

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: READY.

Read the Review results

A key of (owner, repo, treeSha) only deduplicated one tree; two trees
of one Repository could write at once. The instance is now the
Repository claim and the tree SHA is its generation fence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-ready The automated Review passed every gate on this head commit. labels Nov 12, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Nov 12, 2026

@harlan-github-agent harlan-github-agent 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.

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: READY.

Read the Review results

@harlan-zw
harlan-zw merged commit 8fa6b94 into main Nov 12, 2026
8 checks passed
@harlan-zw
harlan-zw deleted the docs/ingestion-architecture branch November 12, 2026 06:45
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Nov 12, 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