Skip to content

feat(github): 同步 GitHub Stars 与 Lists - #80

Open
xiaoland wants to merge 5 commits into
mainfrom
feat/github-extension
Open

feat(github): 同步 GitHub Stars 与 Lists#80
xiaoland wants to merge 5 commits into
mainfrom
feat/github-extension

Conversation

@xiaoland

Copy link
Copy Markdown
Member

结果

将旧 GitHub Stars PoC 重写为可用的 github-extension MVP:一个配置的 GitHub access context 可以通过普通 Source collect Job,同步 authenticated account 的完整 Stars、Lists 与 List memberships。

Depends on InKCre/docs#18

Canonical graph

  • Source --collects--> GitHubAccount
  • GitHubAccount --stars--> GitHubRepository
  • GitHubAccount --owns--> GitHubList
  • GitHubList --contains--> GitHubRepository
  • GitHubAccount --owns--> GitHubRepository

远端 membership 消失时只删除当前关系事实,保留已收集实体 Block。

实现

  • 新增 async GitHub GraphQL Adapter,完整分页 Stars、Lists 与 List items
  • 支持 list-only Repository 的批量补全,不假设 Lists 是 Stars 子集
  • 新增 Account、Repository、List 三个 canonical Resolver
  • transactional snapshot reconciliation;Source row lock 串行化同 Source apply
  • 为真实批量图写入增加 caller-owned BlockManager.create_many / RelationManager.create_many
  • 移除 PyGithub、旧 convenience route、legacy resolver/content contract
  • 发布 GitHub extension 0.2.0 release intent

验收证据

在一次性 Neon 分支上迁移到当前 head,并通过真实 GitHub authority 执行 ordinary Job:

  • 473 Stars
  • 19 Lists
  • 395 memberships
  • 942 canonical GitHub Blocks
  • 1,362 managed Relations
  • 相同 snapshot replay:Block/Relation create/update/delete 全部为 0
  • 验证 Source -> Account -> List -> Repository 图导航
  • 验证 Repository Resolver label/text projection

此外通过:

  • pdm run check
  • extension release gate(Changie v1.25.2)
  • GitHub 0.2.0 wheel build 与 distribution verification
  • shared submodule pre-bump / pre-commit contract

真实 GitHub 远端 reversible delta 未执行,已在 task packet 中显式保留为 closure option,不伪装为自动化覆盖。

- replace the legacy PoC with canonical Account, Repository, and List graph facts
- reconcile complete authenticated snapshots through batched Block and Relation persistence
- ship GitHub extension 0.2.0 with real-account acceptance evidence
- bump shared product truth to InKCre/docs e1768c3
- keep the Hub projection separate from the extension implementation
- recover the active long-running packet removed during baseline cleanup
- integrate GitHub as a paused unit under the existing program
- isolate extension ownership correction as its own task
- publish source schemas only from registered Extension classes
- remove Extension profiles from core seed and readiness authority
- document durable owner, dependency, and active-task boundaries
- advance shared truth to Hub commit 3296867
- keep concrete Extension contracts in their owning Spokes
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